From 466a7daaa850df56fb75ab395272675544d285bf Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Fri, 8 May 2015 12:03:42 -0400 Subject: [PATCH] cloudprovider: ovirt InstanceID implementation Signed-off-by: Federico Simoncelli --- pkg/cloudprovider/ovirt/ovirt.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/ovirt/ovirt.go b/pkg/cloudprovider/ovirt/ovirt.go index a912484e488..6c78202df1d 100644 --- a/pkg/cloudprovider/ovirt/ovirt.go +++ b/pkg/cloudprovider/ovirt/ovirt.go @@ -178,7 +178,13 @@ func (v *OVirtCloud) ExternalID(name string) (string, error) { // InstanceID returns the cloud provider ID of the specified instance. func (v *OVirtCloud) InstanceID(name string) (string, error) { - return "", nil + instance, err := v.fetchInstance(name) + if err != nil { + return "", err + } + // TODO: define a way to identify the provider instance to complete + // the format /. + return "/" + instance.UUID, err } func getInstancesFromXml(body io.Reader) (OVirtInstanceMap, error) {