cloudprovider: add support for InstanceID method

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
Federico Simoncelli
2015-05-08 11:19:17 -04:00
parent 194343267d
commit faba12951a
9 changed files with 51 additions and 8 deletions

View File

@@ -488,7 +488,7 @@ func (gce *GCECloud) NodeAddresses(_ string) ([]api.NodeAddress, error) {
}, nil
}
// ExternalID returns the cloud provider ID of the specified instance.
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
func (gce *GCECloud) ExternalID(instance string) (string, error) {
inst, err := gce.getInstanceByName(instance)
if err != nil {
@@ -497,6 +497,11 @@ func (gce *GCECloud) ExternalID(instance string) (string, error) {
return strconv.FormatUint(inst.Id, 10), nil
}
// InstanceID returns the cloud provider ID of the specified instance.
func (gce *GCECloud) InstanceID(instance string) (string, error) {
return "", nil
}
// List is an implementation of Instances.List.
func (gce *GCECloud) List(filter string) ([]string, error) {
listCall := gce.service.Instances.List(gce.projectID, gce.zone)