Delly Qiao

Results 3 comments of Delly Qiao

天翼云,测试的情况是如果并发创建,最终返回的ISecurityGroupRule对象是一样的。如果中间稍微隔些时间,可以正常获取ISecurityGroupRule对象。 func (self *SSecurityGroup) CreateRule(opts *cloudprovider.SecurityGroupRuleCreateOptions) (cloudprovider.ISecurityGroupRule, error) { ruleIds := []string{} for _, rule := range self.SecurityGroupRuleList { if !utils.IsInStringArray(rule.Id, ruleIds) { ruleIds = append(ruleIds, rule.Id) } } err...

我可以理解ctyun的安全组与vpc并无绑定关系。但是在创建安全组时,还是需要传入vpcid这个参数,感觉有点不太统一。是否可以在这里直接把传入的参数返回。