diff --git a/pkg/util/openstack/region.go b/pkg/util/openstack/region.go index e15cb33438..d5032b2f2c 100644 --- a/pkg/util/openstack/region.go +++ b/pkg/util/openstack/region.go @@ -51,11 +51,11 @@ func (region *SRegion) GetId() string { } func (region *SRegion) GetName() string { - return fmt.Sprintf("%s %s", CLOUD_PROVIDER_OPENSTACK, region.Name) + return fmt.Sprintf("%s-%s", region.client.providerName, region.Name) } func (region *SRegion) GetGlobalId() string { - return fmt.Sprintf("%s/%s", CLOUD_PROVIDER_OPENSTACK, region.Name) + return fmt.Sprintf("%s/%s/%s", CLOUD_PROVIDER_OPENSTACK, region.Name, region.client.providerID) } func (region *SRegion) IsEmulated() bool { diff --git a/pkg/util/openstack/zone.go b/pkg/util/openstack/zone.go index d3c562fa7d..6fc4350c01 100644 --- a/pkg/util/openstack/zone.go +++ b/pkg/util/openstack/zone.go @@ -62,11 +62,11 @@ func (zone *SZone) GetId() string { } func (zone *SZone) GetName() string { - return fmt.Sprintf("%s %s", CLOUD_PROVIDER_OPENSTACK, zone.ZoneName) + return zone.ZoneName } func (zone *SZone) GetGlobalId() string { - return fmt.Sprintf("%s/%s", zone.region.GetGlobalId(), zone.ZoneName) + return fmt.Sprintf("%s/%s/%s", CLOUD_PROVIDER_OPENSTACK, zone.region.Name, zone.ZoneName) } func (zone *SZone) IsEmulated() bool {