mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-24 10:25:12 +00:00
Update vmware/govmomi godeps
This commit is contained in:
19
vendor/github.com/vmware/govmomi/object/common.go
generated
vendored
19
vendor/github.com/vmware/govmomi/object/common.go
generated
vendored
@@ -80,17 +80,24 @@ func (c *Common) SetInventoryPath(p string) {
|
||||
func (c Common) ObjectName(ctx context.Context) (string, error) {
|
||||
var o mo.ManagedEntity
|
||||
|
||||
name := c.Name()
|
||||
if name != "" {
|
||||
return name, nil
|
||||
}
|
||||
|
||||
err := c.Properties(ctx, c.Reference(), []string{"name"}, &o)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return o.Name, nil
|
||||
if o.Name != "" {
|
||||
return o.Name, nil
|
||||
}
|
||||
|
||||
// Network has its own "name" field...
|
||||
var n mo.Network
|
||||
|
||||
err = c.Properties(ctx, c.Reference(), []string{"name"}, &n)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return n.Name, nil
|
||||
}
|
||||
|
||||
func (c Common) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, dst interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user