mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix baremetal register get service url
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user