diff --git a/pkg/keystone/models/identity_provider.go b/pkg/keystone/models/identity_provider.go index 0d3758e9c5..e717974e8a 100644 --- a/pkg/keystone/models/identity_provider.go +++ b/pkg/keystone/models/identity_provider.go @@ -375,7 +375,7 @@ func (self *SIdentityProvider) CanSync() bool { func (self *SIdentityProvider) getSyncIntervalSeconds() int { if self.SyncIntervalSeconds == 0 { - return options.Options.DefaultSyncIntervalSeoncds + return options.Options.DefaultSyncIntervalSeconds } return self.SyncIntervalSeconds } diff --git a/pkg/keystone/options/options.go b/pkg/keystone/options/options.go index 9515c4e52c..5710ea4d27 100644 --- a/pkg/keystone/options/options.go +++ b/pkg/keystone/options/options.go @@ -34,7 +34,7 @@ type SKeystoneOptions struct { AutoSyncIntervalSeconds int `help:"frequency to check auto sync tasks" default:"30"` - DefaultSyncIntervalSeoncds int `help:"frequency to do auto sync tasks" default:"900"` + DefaultSyncIntervalSeconds int `help:"frequency to do auto sync tasks" default:"900"` FetchProjectResourceCountIntervalSeconds int `help:"frequency tp fetch project resource counts" default:"900"` } diff --git a/pkg/mcclient/session.go b/pkg/mcclient/session.go index 2f6fa6c7ae..3e8bd6fd00 100644 --- a/pkg/mcclient/session.go +++ b/pkg/mcclient/session.go @@ -141,7 +141,7 @@ func (this *ClientSession) GetServiceVersionURL(service, endpointType, apiVersio } service = this.getServiceName(service, apiVersion) url, err := this.token.GetServiceURL(service, this.region, this.zone, endpointType) - if err != nil { + if err != nil && this.client.serviceCatalog != nil { url, err = this.client.serviceCatalog.GetServiceURL(service, this.region, this.zone, endpointType) } if err != nil && service == api.SERVICE_TYPE { @@ -161,7 +161,7 @@ func (this *ClientSession) GetServiceVersionURLs(service, endpointType, apiVersi } service = this.getServiceName(service, apiVersion) urls, err := this.token.GetServiceURLs(service, this.region, this.zone, endpointType) - if err != nil { + if err != nil && this.client.serviceCatalog != nil { urls, err = this.client.serviceCatalog.GetServiceURLs(service, this.region, this.zone, endpointType) } if err != nil && service == api.SERVICE_TYPE {