vsphere/distributed_virtual_switch_helper.go
func dvsFromUUID(client *govmomi.Client, uuid string) (*object.VmwareDistributedVirtualSwitch, error) {
	dvsm := types.ManagedObjectReference{Type: "DistributedVirtualSwitchManager", Value: "DVSManager"}
	req := &types.QueryDvsByUuid{
		This: dvsm,
		Uuid: uuid,
	}
	resp, err := methods.QueryDvsByUuid(context.TODO(), client, req)
	if err != nil {
		return nil, err
	}

	return dvsFromMOID(client, resp.Returnval.Reference().Value)
}
func dvsFromUUID(client *govmomi.Client, uuid string) (*object.VmwareDistributedVirtualSwitch, error) {
	dvsm := types.ManagedObjectReference{Type: "DistributedVirtualSwitchManager", Value: "DVSManager"}
	req := &types.QueryDvsByUuid{
		This: dvsm,
		Uuid: uuid,
	}
	resp, err := methods.QueryDvsByUuid(context.TODO(), client, req)
	if err != nil {
		return nil, err
	}

	return dvsFromMOID(client, resp.Returnval.Reference().Value)
}
func dvsFromUUID ( client * govmomi . Client , uuid string ) ( * object . VmwareDistributedVirtualSwitch , error ) { dvsm := types . ManagedObjectReference { Type : " " , Value : " " } req := & types . QueryDvsByUuid { This : dvsm , Uuid : uuid , } resp , err := methods . QueryDvsByUuid ( context . TODO ( ) , client , req ) if err != nil { return nil , err } return dvsFromMOID ( client , resp . Returnval . Reference ( ) . Value ) }
// dvsFromUUID gets a DVS object from its UUID.
dvsFromUUID gets a DVS object from its UUID .