Automatic merge from release/2.5.0 -> release/2.6.0

* commit '274e31d858fb054a0ccda96a65f292df94727740':
  通过provider is_public_cloud区分公有云私有云
This commit is contained in:
邱剑
2019-02-18 18:29:46 +08:00
14 changed files with 116 additions and 36 deletions
+4 -4
View File
@@ -23,6 +23,10 @@ func (self *SAzureProviderFactory) ValidateChangeBandwidth(instanceId string, ba
return fmt.Errorf("Changing %s bandwidth is not supported", azure.CLOUD_PROVIDER_AZURE)
}
func (self *SAzureProviderFactory) IsPublicCloud() bool {
return true
}
func (self *SAzureProviderFactory) ValidateCreateCloudaccountData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) error {
directoryID, _ := data.GetString("directory_id")
if len(directoryID) == 0 {
@@ -79,10 +83,6 @@ type SAzureProvider struct {
client *azure.SAzureClient
}
func (self *SAzureProvider) IsPublicCloud() bool {
return true
}
func (self *SAzureProvider) IsOnPremiseInfrastructure() bool {
return false
}