fix baremetal register get service url

This commit is contained in:
wanyaoqi
2019-12-12 17:35:36 +08:00
parent 24b518a3b7
commit f0cb9c15d3
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -824,7 +824,7 @@ func (self *SHostManager) AllowGetPropertyBmStartRegisterScript(ctx context.Cont
}
func (self *SHostManager) GetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
regionUri, err := auth.GetServiceURL("compute_v2", options.Options.Region, "", "")
regionUri, err := auth.GetPublicServiceURL("compute_v2", options.Options.Region, "")
if err != nil {
return nil, err
}
+4
View File
@@ -261,6 +261,10 @@ func GetServiceURL(service, region, zone, endpointType string) (string, error) {
return manager.GetServiceURL(service, region, zone, endpointType)
}
func GetPublicServiceURL(service, region, zone string) (string, error) {
return manager.GetServiceURL(service, region, zone, PublicEndpointType)
}
func GetServiceURLs(service, region, zone, endpointType string) ([]string, error) {
return manager.GetServiceURLs(service, region, zone, endpointType)
}