vsphere/distributed_virtual_switch_structure.go
func flattenDistributedVirtualSwitchHostMember(obj types.DistributedVirtualSwitchHostMember) map[string]interface{} {
	d := make(map[string]interface{})
	d["host_system_id"] = obj.Config.Host.Value

	var devices []string
	backing := obj.Config.Backing.(*types.DistributedVirtualSwitchHostMemberPnicBacking)
	for _, spec := range backing.PnicSpec {
		devices = append(devices, spec.PnicDevice)
	}

	d["devices"] = devices

	return d
}
func flattenDistributedVirtualSwitchHostMember(obj types.DistributedVirtualSwitchHostMember) map[string]interface{} {
	d := make(map[string]interface{})
	d["host_system_id"] = obj.Config.Host.Value

	var devices []string
	backing := obj.Config.Backing.(*types.DistributedVirtualSwitchHostMemberPnicBacking)
	for _, spec := range backing.PnicSpec {
		devices = append(devices, spec.PnicDevice)
	}

	d["devices"] = devices

	return d
}
// flattenDistributedVirtualSwitchHostMemberConfigSpec reads various fields
// from a DistributedVirtualSwitchHostMemberConfigSpec and returns a Set object
// map.
//
// This is the flatten counterpart to
// expandDistributedVirtualSwitchHostMemberConfigSpec.