Commit 185d0e19 authored by Federico Simoncelli's avatar Federico Simoncelli

cloudprovider: aws InstanceID implementation

parent 466a7daa
...@@ -438,7 +438,13 @@ func (aws *AWSCloud) ExternalID(name string) (string, error) { ...@@ -438,7 +438,13 @@ func (aws *AWSCloud) ExternalID(name string) (string, error) {
// InstanceID returns the cloud provider ID of the specified instance. // InstanceID returns the cloud provider ID of the specified instance.
func (aws *AWSCloud) InstanceID(name string) (string, error) { func (aws *AWSCloud) InstanceID(name string) (string, error) {
return "", nil inst, err := aws.getInstancesByDnsName(name)
if err != nil {
return "", err
}
// In the future it is possible to also return an endpoint as:
// <endpoint>/<zone>/<instanceid>
return "/" + *inst.Placement.AvailabilityZone + "/" + *inst.InstanceID, nil
} }
// Return the instances matching the relevant private dns name. // Return the instances matching the relevant private dns name.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment