fix comment

This commit is contained in:
TangBin
2019-01-24 11:56:25 +08:00
parent d0bb6a894d
commit 9007c966cf
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ func (self *EipAllocateTask) OnInit(ctx context.Context, obj db.IStandaloneModel
return
}
extEip, err := iregion.CreateEIP(eip.Name, eip.Bandwidth, eip.ChargeType, "")
extEip, err := iregion.CreateEIP(eip.Name, eip.Bandwidth, eip.ChargeType, eip.BgpType)
if err != nil {
msg := fmt.Sprintf("create eip fail %s", err)
eip.SetStatus(self.UserCred, models.EIP_STATUS_ALLOCATE_FAIL, msg)
+6
View File
@@ -183,6 +183,10 @@ func (self *SSecurityGroup) GetSecurityRule(ruleId string, withRuleId bool) (sec
_, ipNet, err = net.ParseCIDR("0.0.0.0/0")
}
if err != nil {
return secrules.SecurityRule{}, err
}
// withRuleId.将ruleId附加到description字段。该hook有特殊目的,仅在同步安全组时使用。
desc := ""
if withRuleId {
@@ -202,6 +206,8 @@ func (self *SSecurityGroup) GetSecurityRule(ruleId string, withRuleId bool) (sec
Ports: nil,
Description: desc,
}
err = rule.ValidateRule()
return rule, err
}