func (m *MetadataDriver) packngoGetPacketFacilityCodeMetadata() (string, error) {
	device, err := m.getMetadata()
	if err != nil {
		return "", err
	}
	return device.Facility, nil
}
use this when packngo serialization is fixed
GetFacilityCodeMetadata returns the facility code
package packet
import (
	"net"
	"strconv"
	"github.com/packethost/packngo/metadata"
	"github.com/pkg/errors"
)
type CapacityMetaData struct {
	Size string `json:"size"`
	Unit string `json:"unit"`
}
type VolumeMetadata struct {
	Name     string           `json:"name"`
	IPs      []net.IP         `json:"ips"`
	Capacity CapacityMetaData `json:"capacity"`
	IQN      string           `json:"iqn"`
}
type MetadataDriver struct {
	BaseURL *string
}
func (m *MetadataDriver) GetVolumeMetadata(volumeName string) (VolumeMetadata, error) {
	empty := VolumeMetadata{}
	volumeInfo, err := m.packngoGetPacketVolumeMetadata(volumeName)
	if err != nil {
		return empty, err
	}
	volumeMetaData := VolumeMetadata{
		Name: volumeInfo.Name,
		IPs:  volumeInfo.IPs,
		IQN:  volumeInfo.IQN,
		Capacity: CapacityMetaData{
			Size: strconv.Itoa(volumeInfo.Capacity.Size),
			Unit: volumeInfo.Capacity.Unit,
		},
	}
	return volumeMetaData, nil
}
func (m *MetadataDriver) GetFacilityCodeMetadata() (string, error) {
	device, err := m.getMetadata()
	if err != nil {
		return "", err
	}
	return device.Facility, nil
}
func (m *MetadataDriver) GetInitiator() (string, error) {
	device, err := m.getMetadata()
	if err != nil {
		return "", err
	}
	return device.IQN, nil
}
func (m *MetadataDriver) GetNodeID() (string, error) {
	device, err := m.getMetadata()
	if err != nil {
		return "", err
	}
	return device.ID, nil
}
func (m *MetadataDriver) packngoGetPacketVolumeMetadata(volumeName string) (metadata.VolumeInfo, error) {
	device, err := m.getMetadata()
	if err != nil {
		return metadata.VolumeInfo{}, err
	}
	var volumeMetaData = metadata.VolumeInfo{}
	for _, vdata := range device.Volumes {
		if vdata.Name == volumeName {
			volumeMetaData = vdata
			break
		}
	}
	if volumeMetaData.Name == "" {
		return metadata.VolumeInfo{}, errors.Errorf("volume %s not found in metadata", volumeName)
	}
	return volumeMetaData, nil
}