mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix comment
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user