cloudprovider: add support for InstanceID method
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
@@ -427,7 +427,7 @@ func (aws *AWSCloud) NodeAddresses(name string) ([]api.NodeAddress, error) {
|
||||
return addresses, nil
|
||||
}
|
||||
|
||||
// ExternalID returns the cloud provider ID of the specified instance.
|
||||
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
|
||||
func (aws *AWSCloud) ExternalID(name string) (string, error) {
|
||||
inst, err := aws.getInstancesByDnsName(name)
|
||||
if err != nil {
|
||||
@@ -436,6 +436,11 @@ func (aws *AWSCloud) ExternalID(name string) (string, error) {
|
||||
return *inst.InstanceID, nil
|
||||
}
|
||||
|
||||
// InstanceID returns the cloud provider ID of the specified instance.
|
||||
func (aws *AWSCloud) InstanceID(name string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// Return the instances matching the relevant private dns name.
|
||||
func (aws *AWSCloud) getInstancesByDnsName(name string) (*ec2.Instance, error) {
|
||||
f := &ec2InstanceFilter{}
|
||||
|
Reference in New Issue
Block a user