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
98e1aef2
Commit
98e1aef2
authored
Jun 18, 2015
by
Satnam Singh
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9910 from justinsb/instanceid_contract
Document assumption made by node-controller, and fix AWS to match
parents
b48aa0b6
a77bc9cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
aws.go
pkg/cloudprovider/aws/aws.go
+7
-3
cloud.go
pkg/cloudprovider/cloud.go
+1
-0
No files found.
pkg/cloudprovider/aws/aws.go
View file @
98e1aef2
...
...
@@ -588,13 +588,17 @@ func (aws *AWSCloud) NodeAddresses(name string) ([]api.NodeAddress, error) {
}
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
// Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
func
(
aws
*
AWSCloud
)
ExternalID
(
name
string
)
(
string
,
error
)
{
//
TODO: Do we need to verify it exists, or can we just return name
inst
,
err
:=
aws
.
getInstanceById
(
name
)
//
We must verify that the instance still exists
inst
ance
,
err
:=
aws
.
getInstanceById
(
name
)
if
err
!=
nil
{
return
""
,
err
}
return
orEmpty
(
inst
.
InstanceID
),
nil
if
instance
==
nil
||
!
isAlive
(
instance
)
{
return
""
,
cloudprovider
.
InstanceNotFound
}
return
orEmpty
(
instance
.
InstanceID
),
nil
}
// InstanceID returns the cloud provider ID of the specified instance.
...
...
pkg/cloudprovider/cloud.go
View file @
98e1aef2
...
...
@@ -103,6 +103,7 @@ type Instances interface {
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
ExternalID
(
name
string
)
(
string
,
error
)
// InstanceID returns the cloud provider ID of the specified instance.
// Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
InstanceID
(
name
string
)
(
string
,
error
)
// List lists instances that match 'filter' which is a regular expression which must match the entire instance name (fqdn)
List
(
filter
string
)
([]
string
,
error
)
...
...
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