vsphere/resource_vsphere_compute_cluster.go
func flattenClusterDrsConfigInfo(d *schema.ResourceData, obj types.ClusterDrsConfigInfo) error {
	err := structure.SetBatch(d, map[string]interface{}{
		"drs_automation_level":    obj.DefaultVmBehavior,
		"drs_enabled":             obj.Enabled,
		"drs_enable_vm_overrides": obj.EnableVmBehaviorOverrides,
		"drs_migration_threshold": obj.VmotionRate,
	})
	if err != nil {
		return err
	}

	return flattenResourceVSphereComputeClusterDrsAdvancedOptions(d, obj.Option)
}
func flattenClusterDrsConfigInfo(d *schema.ResourceData, obj types.ClusterDrsConfigInfo) error {
	err := structure.SetBatch(d, map[string]interface{}{
		"drs_automation_level":    obj.DefaultVmBehavior,
		"drs_enabled":             obj.Enabled,
		"drs_enable_vm_overrides": obj.EnableVmBehaviorOverrides,
		"drs_migration_threshold": obj.VmotionRate,
	})
	if err != nil {
		return err
	}

	return flattenResourceVSphereComputeClusterDrsAdvancedOptions(d, obj.Option)
}
func flattenClusterDrsConfigInfo ( d * schema . ResourceData , obj types . ClusterDrsConfigInfo ) error { err := structure . SetBatch ( d , map [ string ] interface { } { " " : obj . DefaultVmBehavior , " " : obj . Enabled , " " : obj . EnableVmBehaviorOverrides , " " : obj . VmotionRate , } ) if err != nil { return err } return flattenResourceVSphereComputeClusterDrsAdvancedOptions ( d , obj . Option ) }
// flattenClusterDrsConfigInfo saves a ClusterDrsConfigInfo into the supplied
// ResourceData.
flattenClusterDrsConfigInfo saves a ClusterDrsConfigInfo into the supplied ResourceData .