vsphere/host_port_group_structure.go
func calculatePorts(ports []types.HostPortGroupPort) *schema.Set {
	s := make([]interface{}, 0)
	for _, port := range ports {
		m := make(map[string]interface{})
		m["key"] = port.Key
		m["mac_addresses"] = structure.SliceStringsToInterfaces(port.Mac)
		m["type"] = port.Type
		s = append(s, m)
	}
	return schema.NewSet(schema.HashResource(portGroupPortSchema()), s)
}
func calculatePorts(ports []types.HostPortGroupPort) *schema.Set {
	s := make([]interface{}, 0)
	for _, port := range ports {
		m := make(map[string]interface{})
		m["key"] = port.Key
		m["mac_addresses"] = structure.SliceStringsToInterfaces(port.Mac)
		m["type"] = port.Type
		s = append(s, m)
	}
	return schema.NewSet(schema.HashResource(portGroupPortSchema()), s)
}
func calculatePorts ( ports [ ] types . HostPortGroupPort ) * schema . Set { s := make ( [ ] interface { } , 0 ) for _ , port := range ports { m := make ( map [ string ] interface { } ) m [ " " ] = port . Key m [ " " ] = structure . SliceStringsToInterfaces ( port . Mac ) m [ " " ] = port . Type s = append ( s , m ) } return schema . NewSet ( schema . HashResource ( portGroupPortSchema ( ) ) , s ) }
// calculatePorts is a utility function that returns a set of port data.
calculatePorts is a utility function that returns a set of port data .