This repository was archived by the owner on Mar 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
pkg/cloudprovider/providers/openstack Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const (
3636 // metadataUrlTemplate allows building an OpenStack Metadata service URL.
3737 // It's a hardcoded IPv4 link-local address as documented in "OpenStack Cloud
3838 // Administrator Guide", chapter Compute - Networking with nova-network.
39- // https://docs.openstack.org/admin-guide/compute- networking-nova.html#metadata-service
39+ //https://docs.openstack.org/nova/latest/ admin/ networking-nova.html#metadata-service
4040 defaultMetadataVersion = "2012-08-10"
4141 metadataUrlTemplate = "http://169.254.169.254/openstack/%s/meta_data.json"
4242
@@ -45,7 +45,7 @@ const (
4545
4646 // Config drive is defined as an iso9660 or vfat (deprecated) drive
4747 // with the "config-2" label.
48- // http ://docs.openstack.org/user-guide/cli- config-drive.html
48+ //https ://docs.openstack.org/nova/latest/ user/ config-drive.html
4949 configDriveLabel = "config-2"
5050 configDrivePathTemplate = "openstack/%s/meta_data.json"
5151
@@ -66,7 +66,7 @@ type DeviceMetadata struct {
6666}
6767
6868// Assumes the "2012-08-10" meta_data.json format.
69- // See http ://docs.openstack.org/user-guide/cli_config_drive .html
69+ //https ://docs.openstack.org/nova/latest/ user/config-drive .html
7070type Metadata struct {
7171 Uuid string `json:"uuid"`
7272 Hostname string `json:"hostname"`
Original file line number Diff line number Diff line change @@ -108,4 +108,8 @@ func TestParseMetadata(t *testing.T) {
108108 if md .Devices [0 ].Type != "disk" {
109109 t .Errorf ("incorrect device type: %s" , md .Devices [0 ].Type )
110110 }
111+
112+ if md .Devices [0 ].Serial != "6df1888b-f373-41cf-b960-3786e60a28ef" {
113+ t .Errorf ("incorrect device serial: %s" , md .Devices [0 ].Serial )
114+ }
111115}
You can’t perform that action at this time.
0 commit comments