vsphere/host_network_policy_structure.go
func expandHostNicTeamingPolicy(d *schema.ResourceData) *types.HostNicTeamingPolicy {
	obj := &types.HostNicTeamingPolicy{
		Policy: d.Get("teaming_policy").(string),
	}
	if v, ok := d.GetOkExists("failback"); ok {
		obj.RollingOrder = structure.BoolPtr(!v.(bool))
	}
	if v, ok := d.GetOkExists("notify_switches"); ok {
		obj.NotifySwitches = structure.BoolPtr(v.(bool))
	}
	obj.FailureCriteria = expandHostNicFailureCriteria(d)
	obj.NicOrder = expandHostNicOrderPolicy(d)

	// These fields are deprecated and are set only to make things work. They are
	// not exposed to Terraform.
	obj.ReversePolicy = structure.BoolPtr(true)

	return obj
}
func expandHostNicTeamingPolicy(d *schema.ResourceData) *types.HostNicTeamingPolicy {
	obj := &types.HostNicTeamingPolicy{
		Policy: d.Get("teaming_policy").(string),
	}
	if v, ok := d.GetOkExists("failback"); ok {
		obj.RollingOrder = structure.BoolPtr(!v.(bool))
	}
	if v, ok := d.GetOkExists("notify_switches"); ok {
		obj.NotifySwitches = structure.BoolPtr(v.(bool))
	}
	obj.FailureCriteria = expandHostNicFailureCriteria(d)
	obj.NicOrder = expandHostNicOrderPolicy(d)

	// These fields are deprecated and are set only to make things work. They are
	// not exposed to Terraform.
	obj.ReversePolicy = structure.BoolPtr(true)

	return obj
}
// expandHostNicTeamingPolicy reads certain ResourceData keys and returns a
// HostNicTeamingPolicy.