huawei eip disassociate bugfix

This commit is contained in:
TangBin
2019-10-18 15:22:10 +08:00
parent c103d56324
commit 306d501ff8
3 changed files with 3 additions and 4 deletions
@@ -43,7 +43,7 @@ func NewPortManager(regionId string, projectId string, signer auth.Signer, debug
SBaseManager: NewBaseManager2(signer, debug, &requestHook),
ServiceName: ServiceNameVPC,
Region: regionId,
ProjectId: "",
ProjectId: projectId,
version: "v1",
Keyword: "port",
KeywordPlural: "ports",
+1 -2
View File
@@ -20,7 +20,6 @@ import (
"time"
"yunion.io/x/jsonutils"
billing_api "yunion.io/x/onecloud/pkg/apis/billing"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudprovider"
@@ -144,7 +143,7 @@ func (self *SEipAddress) GetMode() string {
}
func (self *SEipAddress) GetPort() *Port {
if len(self.PortId) > 0 {
if len(self.PortId) == 0 {
return nil
}
+1 -1
View File
@@ -139,7 +139,7 @@ func (self *SRegion) GetPort(portId string) (Port, error) {
return port, err
}
// https://support.huaweicloud.com/api-vpc/zh-cn_topic_0030591299.html
// https://support.huaweicloud.com/api-vpc/zh-cn_topic_0133195888.html
func (self *SRegion) GetPorts(instanceId string) ([]Port, error) {
ports := make([]Port, 0)
querys := map[string]string{}