F #4302: Resolve issue deleting security groups on NSX-T (#4858)

Co-authored-by: mouyaq <amoya@opennebula.io>
This commit is contained in:
Angel Luis Moya Gonzalezandmouyaq authored and GitHub committed 2020-06-01 19:22:55 +02:00
1 parent dcf15dfb4d
commit 79c275b1b3
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -84,7 +84,7 @@ is_modified = modified?(template)
nsx_nics = NSXDriver::LogicalSwitch.nsx_nics(template_xml,
is_modified)
vm_state = one_vm.state_str
unless nsx_nics.empty? || (vm_state != 'POWEROFF')
unless nsx_nics.empty?
begin
# Clear rules
nsx_client = NSXDriver::NSXClient.new_from_id(one_host['ID'])
+1 -1
View File
@@ -88,7 +88,7 @@ vm_state = one_vm.state_str
unless nsx_nics.empty? || (vm_state == 'POWEROFF')
begin
# NSX Objects
nsx_client = NSXDriver::NSXTClient.new_from_id(one_host['ID'])
nsx_client = NSXDriver::NSXClient.new_from_id(one_host['ID'])
dfw = NSXDriver::DistributedFirewall.new_child(nsx_client)
dfw.create_rules(deploy_id, template, is_modified)
rescue StandardError => e