mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
Co-authored-by: mouyaq <amoya@opennebula.io>
This commit is contained in:
1 parent
dcf15dfb4d
commit
79c275b1b3
2 files changed
+2
-2
No files matched your search
@@ -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'])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user