Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ab6e6771
Unverified
Commit
ab6e6771
authored
May 15, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Openstack: register metadata.hostname as node name"
This reverts commit
eaac0f54
.
parent
abd6d5c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
metadata.go
pkg/cloudprovider/providers/openstack/metadata.go
+1
-1
metadata_test.go
pkg/cloudprovider/providers/openstack/metadata_test.go
+3
-3
openstack_instances.go
pkg/cloudprovider/providers/openstack/openstack_instances.go
+1
-1
No files found.
pkg/cloudprovider/providers/openstack/metadata.go
View file @
ab6e6771
...
@@ -70,7 +70,7 @@ type DeviceMetadata struct {
...
@@ -70,7 +70,7 @@ type DeviceMetadata struct {
// See http://docs.openstack.org/user-guide/cli_config_drive.html
// See http://docs.openstack.org/user-guide/cli_config_drive.html
type
Metadata
struct
{
type
Metadata
struct
{
UUID
string
`json:"uuid"`
UUID
string
`json:"uuid"`
Hostname
string
`json:"host
name"`
Name
string
`json:"
name"`
AvailabilityZone
string
`json:"availability_zone"`
AvailabilityZone
string
`json:"availability_zone"`
Devices
[]
DeviceMetadata
`json:"devices,omitempty"`
Devices
[]
DeviceMetadata
`json:"devices,omitempty"`
// .. and other fields we don't care about. Expand as necessary.
// .. and other fields we don't care about. Expand as necessary.
...
...
pkg/cloudprovider/providers/openstack/metadata_test.go
View file @
ab6e6771
...
@@ -23,7 +23,7 @@ import (
...
@@ -23,7 +23,7 @@ import (
var
FakeMetadata
=
Metadata
{
var
FakeMetadata
=
Metadata
{
UUID
:
"83679162-1378-4288-a2d4-70e13ec132aa"
,
UUID
:
"83679162-1378-4288-a2d4-70e13ec132aa"
,
Hostname
:
"test"
,
Name
:
"test"
,
AvailabilityZone
:
"nova"
,
AvailabilityZone
:
"nova"
,
}
}
...
@@ -81,8 +81,8 @@ func TestParseMetadata(t *testing.T) {
...
@@ -81,8 +81,8 @@ func TestParseMetadata(t *testing.T) {
t
.
Fatalf
(
"Should succeed when provided with valid data: %s"
,
err
)
t
.
Fatalf
(
"Should succeed when provided with valid data: %s"
,
err
)
}
}
if
md
.
Hostname
!=
"test.novalocal
"
{
if
md
.
Name
!=
"test
"
{
t
.
Errorf
(
"incorrect
hostname: %s"
,
md
.
Hostn
ame
)
t
.
Errorf
(
"incorrect
name: %s"
,
md
.
N
ame
)
}
}
if
md
.
UUID
!=
"83679162-1378-4288-a2d4-70e13ec132aa"
{
if
md
.
UUID
!=
"83679162-1378-4288-a2d4-70e13ec132aa"
{
...
...
pkg/cloudprovider/providers/openstack/openstack_instances.go
View file @
ab6e6771
...
@@ -60,7 +60,7 @@ func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types
...
@@ -60,7 +60,7 @@ func (i *Instances) CurrentNodeName(ctx context.Context, hostname string) (types
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
}
}
return
types
.
NodeName
(
md
.
Hostn
ame
),
nil
return
types
.
NodeName
(
md
.
N
ame
),
nil
}
}
// AddSSHKeyToAllInstances is not implemented for OpenStack
// AddSSHKeyToAllInstances is not implemented for OpenStack
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment