func enableDVSNetworkResourceManagement(client *govmomi.Client, dvs *object.VmwareDistributedVirtualSwitch, enabled bool) error {
	req := &types.EnableNetworkResourceManagement{
		This:   dvs.Reference(),
		Enable: enabled,
	}

	ctx, cancel := context.WithTimeout(context.Background(), defaultAPITimeout)
	defer cancel()
	_, err := methods.EnableNetworkResourceManagement(ctx, client, req)
	if err != nil {
		return err
	}

	return nil
}
func enableDVSNetworkResourceManagement(client *govmomi.Client, dvs *object.VmwareDistributedVirtualSwitch, enabled bool) error {
	req := &types.EnableNetworkResourceManagement{
		This:   dvs.Reference(),
		Enable: enabled,
	}

	ctx, cancel := context.WithTimeout(context.Background(), defaultAPITimeout)
	defer cancel()
	_, err := methods.EnableNetworkResourceManagement(ctx, client, req)
	if err != nil {
		return err
	}

	return nil
}
// enableDVSNetworkResourceManagement exposes the
// EnableNetworkResourceManagement method of the DistributedVirtualSwitch MO.
// This local implementation may go away if this is exposed in the higher-level
// object upstream.