Merge pull request #13749 from ioito/hotfix/qx-vmware-sec

fix(region): vmware no need secgroup
This commit is contained in:
Zexi Li
2022-03-23 10:59:50 +08:00
committed by GitHub
+3
View File
@@ -173,6 +173,9 @@ func (self *SInstance) AssignSecurityGroup(id string) error {
}
func (self *SInstance) SetSecurityGroups(ids []string) error {
if self.Hypervisor == api.HYPERVISOR_ESXI {
return nil
}
input := api.GuestSetSecgroupInput{}
input.SecgroupIds = ids
_, err := self.host.zone.region.perform(&modules.Servers, self.Id, "set-secgroup", input)