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

@@ -357,7 +357,7 @@ func (i *Instances) NodeAddresses(name string) ([]api.NodeAddress, error) {
return addrs, nil
}
// ExternalID returns the cloud provider ID of the specified instance.
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
func (i *Instances) ExternalID(name string) (string, error) {
srv, err := getServerByName(i.compute, name)
if err != nil {
@@ -366,6 +366,11 @@ func (i *Instances) ExternalID(name string) (string, error) {
return srv.ID, nil
}
// InstanceID returns the cloud provider ID of the specified instance.
func (i *Instances) InstanceID(name string) (string, error) {
return "", nil
}
func (i *Instances) GetNodeResources(name string) (*api.NodeResources, error) {
glog.V(4).Infof("GetNodeResources(%v) called", name)