cloudprovider: add support for InstanceID method
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
@@ -167,7 +167,7 @@ func (v *OVirtCloud) NodeAddresses(name string) ([]api.NodeAddress, error) {
|
||||
return []api.NodeAddress{{Type: api.NodeLegacyHostIP, Address: address.String()}}, nil
|
||||
}
|
||||
|
||||
// ExternalID returns the cloud provider ID of the specified instance.
|
||||
// ExternalID returns the cloud provider ID of the specified instance (deprecated).
|
||||
func (v *OVirtCloud) ExternalID(name string) (string, error) {
|
||||
instance, err := v.fetchInstance(name)
|
||||
if err != nil {
|
||||
@@ -176,6 +176,11 @@ func (v *OVirtCloud) ExternalID(name string) (string, error) {
|
||||
return instance.UUID, nil
|
||||
}
|
||||
|
||||
// InstanceID returns the cloud provider ID of the specified instance.
|
||||
func (v *OVirtCloud) InstanceID(name string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func getInstancesFromXml(body io.Reader) (OVirtInstanceMap, error) {
|
||||
if body == nil {
|
||||
return nil, fmt.Errorf("ovirt rest-api response body is missing")
|
||||
|
||||
Reference in New Issue
Block a user