vsphere/distributed_virtual_switch_helper.go
func dvsProperties(dvs *object.VmwareDistributedVirtualSwitch) (*mo.VmwareDistributedVirtualSwitch, error) {
	ctx, cancel := context.WithTimeout(context.Background(), defaultAPITimeout)
	defer cancel()
	var props mo.VmwareDistributedVirtualSwitch
	if err := dvs.Properties(ctx, dvs.Reference(), nil, &props); err != nil {
		return nil, err
	}
	return &props, nil
}
func dvsProperties(dvs *object.VmwareDistributedVirtualSwitch) (*mo.VmwareDistributedVirtualSwitch, error) {
	ctx, cancel := context.WithTimeout(context.Background(), defaultAPITimeout)
	defer cancel()
	var props mo.VmwareDistributedVirtualSwitch
	if err := dvs.Properties(ctx, dvs.Reference(), nil, &props); err != nil {
		return nil, err
	}
	return &props, nil
}
// dvsProperties is a convenience method that wraps fetching the DVS MO from
// its higher-level object.