mirror of https://github.com/k3s-io/k3s
Revert "Openstack: register metadata.hostname as node name"
This reverts commit eaac0f5489
.
pull/8/head
parent
2f48ad3ff5
commit
6ab76041b7
|
@ -70,7 +70,7 @@ type DeviceMetadata struct {
|
|||
// See http://docs.openstack.org/user-guide/cli_config_drive.html
|
||||
type Metadata struct {
|
||||
UUID string `json:"uuid"`
|
||||
Hostname string `json:"hostname"`
|
||||
Name string `json:"name"`
|
||||
AvailabilityZone string `json:"availability_zone"`
|
||||
Devices []DeviceMetadata `json:"devices,omitempty"`
|
||||
// .. and other fields we don't care about. Expand as necessary.
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
|
||||
var FakeMetadata = Metadata{
|
||||
UUID: "83679162-1378-4288-a2d4-70e13ec132aa",
|
||||
Hostname: "test",
|
||||
Name: "test",
|
||||
AvailabilityZone: "nova",
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,8 @@ func TestParseMetadata(t *testing.T) {
|
|||
t.Fatalf("Should succeed when provided with valid data: %s", err)
|
||||
}
|
||||
|
||||
if md.Hostname != "test.novalocal" {
|
||||
t.Errorf("incorrect hostname: %s", md.Hostname)
|
||||
if md.Name != "test" {
|
||||
t.Errorf("incorrect name: %s", md.Name)
|
||||
}
|
||||
|
||||
if md.UUID != "83679162-1378-4288-a2d4-70e13ec132aa" {
|
||||
|
|
|
@ -61,7 +61,7 @@ func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return types.NodeName(md.Hostname), nil
|
||||
return types.NodeName(md.Name), nil
|
||||
}
|
||||
|
||||
// AddSSHKeyToAllInstances is not implemented for OpenStack
|
||||
|
|
Loading…
Reference in New Issue