Adding vSphere Volume support for vSphere Cloud Provider

This commit is contained in:
Abitha Palaniappan
2016-04-13 17:36:05 -07:00
parent 346f965871
commit 95c009dbdb
31 changed files with 2672 additions and 493 deletions

View File

@@ -130,6 +130,10 @@ type ComputeResource struct {
ConfigurationEx types.BaseComputeResourceConfigInfo `mo:"configurationEx"`
}
func (m *ComputeResource) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["ComputeResource"] = reflect.TypeOf((*ComputeResource)(nil)).Elem()
}
@@ -187,6 +191,10 @@ type Datacenter struct {
Configuration types.DatacenterConfigInfo `mo:"configuration"`
}
func (m *Datacenter) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["Datacenter"] = reflect.TypeOf((*Datacenter)(nil)).Elem()
}
@@ -203,6 +211,10 @@ type Datastore struct {
IormConfiguration *types.StorageIORMInfo `mo:"iormConfiguration"`
}
func (m *Datastore) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["Datastore"] = reflect.TypeOf((*Datastore)(nil)).Elem()
}
@@ -255,6 +267,10 @@ type DistributedVirtualSwitch struct {
Runtime *types.DVSRuntimeInfo `mo:"runtime"`
}
func (m *DistributedVirtualSwitch) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["DistributedVirtualSwitch"] = reflect.TypeOf((*DistributedVirtualSwitch)(nil)).Elem()
}
@@ -359,6 +375,10 @@ type Folder struct {
ChildEntity []types.ManagedObjectReference `mo:"childEntity"`
}
func (m *Folder) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["Folder"] = reflect.TypeOf((*Folder)(nil)).Elem()
}
@@ -878,6 +898,10 @@ type HostSystem struct {
SystemResources *types.HostSystemResourceInfo `mo:"systemResources"`
}
func (m *HostSystem) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["HostSystem"] = reflect.TypeOf((*HostSystem)(nil)).Elem()
}
@@ -1117,6 +1141,10 @@ type Network struct {
Vm []types.ManagedObjectReference `mo:"vm"`
}
func (m *Network) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["Network"] = reflect.TypeOf((*Network)(nil)).Elem()
}
@@ -1286,6 +1314,10 @@ type ResourcePool struct {
ChildConfiguration []types.ResourceConfigSpec `mo:"childConfiguration"`
}
func (m *ResourcePool) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["ResourcePool"] = reflect.TypeOf((*ResourcePool)(nil)).Elem()
}
@@ -1551,6 +1583,10 @@ type VirtualMachine struct {
GuestHeartbeatStatus types.ManagedEntityStatus `mo:"guestHeartbeatStatus"`
}
func (m *VirtualMachine) Entity() *ManagedEntity {
return &m.ManagedEntity
}
func init() {
t["VirtualMachine"] = reflect.TypeOf((*VirtualMachine)(nil)).Elem()
}