mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #59029 from jianglingxia/jlx-0130
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Correct the URL of openstack and make test case more detail **What this PR does / why we need it**: correct the url of openstack doc and make the test case more detail,thanks! **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #54044 **Special notes for your reviewer**: /assign @dims **Release note**: ```release-note NONE ```
This commit is contained in:
commit
1e63d5eb78
@ -36,7 +36,7 @@ const (
|
||||
// metadataUrlTemplate allows building an OpenStack Metadata service URL.
|
||||
// It's a hardcoded IPv4 link-local address as documented in "OpenStack Cloud
|
||||
// Administrator Guide", chapter Compute - Networking with nova-network.
|
||||
// https://docs.openstack.org/admin-guide/compute-networking-nova.html#metadata-service
|
||||
//https://docs.openstack.org/nova/latest/admin/networking-nova.html#metadata-service
|
||||
defaultMetadataVersion = "2012-08-10"
|
||||
metadataUrlTemplate = "http://169.254.169.254/openstack/%s/meta_data.json"
|
||||
|
||||
@ -45,7 +45,7 @@ const (
|
||||
|
||||
// Config drive is defined as an iso9660 or vfat (deprecated) drive
|
||||
// with the "config-2" label.
|
||||
// http://docs.openstack.org/user-guide/cli-config-drive.html
|
||||
//https://docs.openstack.org/nova/latest/user/config-drive.html
|
||||
configDriveLabel = "config-2"
|
||||
configDrivePathTemplate = "openstack/%s/meta_data.json"
|
||||
|
||||
@ -66,7 +66,7 @@ type DeviceMetadata struct {
|
||||
}
|
||||
|
||||
// Assumes the "2012-08-10" meta_data.json format.
|
||||
// See http://docs.openstack.org/user-guide/cli_config_drive.html
|
||||
//https://docs.openstack.org/nova/latest/user/config-drive.html
|
||||
type Metadata struct {
|
||||
Uuid string `json:"uuid"`
|
||||
Hostname string `json:"hostname"`
|
||||
|
@ -108,4 +108,8 @@ func TestParseMetadata(t *testing.T) {
|
||||
if md.Devices[0].Type != "disk" {
|
||||
t.Errorf("incorrect device type: %s", md.Devices[0].Type)
|
||||
}
|
||||
|
||||
if md.Devices[0].Serial != "6df1888b-f373-41cf-b960-3786e60a28ef" {
|
||||
t.Errorf("incorrect device serial: %s", md.Devices[0].Serial)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user