Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MetadataID is used as an identifier on the metadata search order configuration. MetadataID = "metadataService" // ConfigDriveID is used as an identifier on the metadata search order configuration. ConfigDriveID = "configDrive" )
Variables ¶
View Source
var ErrBadMetadata = errors.New("invalid OpenStack metadata, got empty uuid")
ErrBadMetadata is used to indicate a problem parsing data from metadata server
Functions ¶
func GetDevicePath ¶
Types ¶
type DeviceMetadata ¶
type DeviceMetadata struct { Type string `json:"type"` Bus string `json:"bus,omitempty"` Serial string `json:"serial,omitempty"` Address string `json:"address,omitempty"` }
DeviceMetadata is a single/simplified data structure for all kinds of device metadata types.
type IMetadata ¶
IMetadata implements GetInstanceID & GetAvailabilityZone
var MetadataService IMetadata
MetadataService instance of IMetadata
func GetMetadataProvider ¶
GetMetadataProvider retrieves instance of IMetadata
type Metadata ¶
type Metadata struct { UUID string `json:"uuid"` Name string `json:"name"` AvailabilityZone string `json:"availability_zone"` Devices []DeviceMetadata `json:"devices,omitempty"` }
Metadata has the information fetched from OpenStack metadata service or config drives. Assumes the "latest" meta_data.json format.
type MetadataOpts ¶
type MetadataOpts struct { SearchOrder string `gcfg:"search-order"` RequestTimeout MyDuration `gcfg:"request-timeout"` }
MetadataOpts is used for configuring how to talk to metadata service or config drive
type MyDuration ¶
MyDuration is the encoding.TextUnmarshaler interface for time.Duration
func (*MyDuration) UnmarshalText ¶
func (d *MyDuration) UnmarshalText(text []byte) error
UnmarshalText is used to convert from text to Duration
Click to show internal directories.
Click to hide internal directories.