godep: update vmware/govmomi
This commit is contained in:
24
vendor/github.com/vmware/govmomi/simulator/host_system.go
generated
vendored
24
vendor/github.com/vmware/govmomi/simulator/host_system.go
generated
vendored
@@ -71,6 +71,22 @@ func NewHostSystem(host mo.HostSystem) *HostSystem {
|
||||
return hs
|
||||
}
|
||||
|
||||
func (h *HostSystem) eventArgument() *types.HostEventArgument {
|
||||
return &types.HostEventArgument{
|
||||
Host: h.Self,
|
||||
EntityEventArgument: types.EntityEventArgument{Name: h.Name},
|
||||
}
|
||||
}
|
||||
|
||||
func (h *HostSystem) eventArgumentParent() *types.ComputeResourceEventArgument {
|
||||
parent := hostParent(&h.HostSystem)
|
||||
|
||||
return &types.ComputeResourceEventArgument{
|
||||
ComputeResource: parent.Self,
|
||||
EntityEventArgument: types.EntityEventArgument{Name: parent.Name},
|
||||
}
|
||||
}
|
||||
|
||||
func hostParent(host *mo.HostSystem) *mo.ComputeResource {
|
||||
switch parent := Map.Get(*host.Parent).(type) {
|
||||
case *mo.ComputeResource:
|
||||
@@ -137,9 +153,15 @@ func CreateStandaloneHost(f *Folder, spec types.HostConnectSpec) (*HostSystem, t
|
||||
summary := new(types.ComputeResourceSummary)
|
||||
addComputeResource(summary, host)
|
||||
|
||||
cr := &mo.ComputeResource{Summary: summary}
|
||||
cr := &mo.ComputeResource{
|
||||
ConfigurationEx: &types.ComputeResourceConfigInfo{
|
||||
VmSwapPlacement: string(types.VirtualMachineConfigInfoSwapPlacementTypeVmDirectory),
|
||||
},
|
||||
Summary: summary,
|
||||
}
|
||||
|
||||
Map.PutEntity(cr, Map.NewEntity(host))
|
||||
host.Summary.Host = &host.Self
|
||||
|
||||
Map.PutEntity(cr, Map.NewEntity(pool))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user