openstack: report the nodes external id

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
Federico Simoncelli 2015-02-16 16:54:44 +00:00
parent ad6091be99
commit bfb93a1928

View File

@ -314,7 +314,11 @@ func (i *Instances) IPAddress(name string) (net.IP, error) {
// ExternalID returns the cloud provider ID of the specified instance.
func (i *Instances) ExternalID(name string) (string, error) {
return "", fmt.Errorf("unimplemented")
srv, err := getServerByName(i.compute, name)
if err != nil {
return "", err
}
return srv.ID, nil
}
func (i *Instances) GetNodeResources(name string) (*api.NodeResources, error) {