func dvsFromPath(client *govmomi.Client, name string, dc *object.Datacenter) (*object.VmwareDistributedVirtualSwitch, error) {
	net, err := network.FromPath(client, name, dc)
	if err != nil {
		return nil, err
	}
	if net.Reference().Type != "VmwareDistributedVirtualSwitch" {
		return nil, fmt.Errorf("network at path %q is not a VMware distributed virtual switch (type %s)", name, net.Reference().Type)
	}
	return dvsFromMOID(client, net.Reference().Value)
}
func dvsFromPath(client *govmomi.Client, name string, dc *object.Datacenter) (*object.VmwareDistributedVirtualSwitch, error) {
	net, err := network.FromPath(client, name, dc)
	if err != nil {
		return nil, err
	}
	if net.Reference().Type != "VmwareDistributedVirtualSwitch" {
		return nil, fmt.Errorf("network at path %q is not a VMware distributed virtual switch (type %s)", name, net.Reference().Type)
	}
	return dvsFromMOID(client, net.Reference().Value)
}
func dvsFromPath ( client * govmomi . Client , name string , dc * object . Datacenter ) ( * object . VmwareDistributedVirtualSwitch , error ) { net , err := network . FromPath ( client , name , dc ) if err != nil { return nil , err } if net . Reference ( ) . Type != " " { return nil , fmt . Errorf ( " " , name , net . Reference ( ) . Type ) } return dvsFromMOID ( client , net . Reference ( ) . Value ) }
// dvsFromPath gets a DVS object from its path.
dvsFromPath gets a DVS object from its path .