mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #700 in YUNIONIO/onecloud from ~QUXUAN/onecloud:bugfix/qx-validate-eip-change-bandwidht to release/2.3.0
* commit '44196113d700b38369a2630721f34f664fa13670': 补充eip修改带宽验证代码
This commit is contained in:
@@ -13,6 +13,10 @@ func (self *SAwsProviderFactory) GetId() string {
|
||||
return aws.CLOUD_PROVIDER_AWS
|
||||
}
|
||||
|
||||
func (self *SAwsProviderFactory) ValidateChangeBandwidth(instanceId string, bandwidth int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SAwsProviderFactory) GetProvider(providerId, providerName, url, account, secret string) (cloudprovider.ICloudProvider, error) {
|
||||
client, err := aws.NewAwsClient(providerId, providerName, url, account, secret)
|
||||
if err != nil {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
"yunion.io/x/onecloud/pkg/cloudprovider"
|
||||
"yunion.io/x/onecloud/pkg/util/qcloud"
|
||||
@@ -14,6 +16,13 @@ func (self *SQcloudProviderFactory) GetId() string {
|
||||
return qcloud.CLOUD_PROVIDER_QCLOUD
|
||||
}
|
||||
|
||||
func (self *SQcloudProviderFactory) ValidateChangeBandwidth(instanceId string, bandwidth int64) error {
|
||||
if len(instanceId) == 0 {
|
||||
return fmt.Errorf("Only changes to the binding machine's EIP bandwidth are supported")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (self *SQcloudProviderFactory) GetProvider(providerId, providerName, url, account, secret string) (cloudprovider.ICloudProvider, error) {
|
||||
client, err := qcloud.NewQcloudClient(providerId, providerName, account, secret)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user