Skip to content

Commit

Permalink
F #2451 Avoid running into NoMethodError
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Apr 17, 2019
1 parent 5fda757 commit 16aa6a0
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/802.1Q/clean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/802.1Q/post
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/802.1Q/pre
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = VLANTagDriver::XPATH_FILTER

hm = VLANTagDriver.from_base64(template64, xpath_filter, deploy_id)
exit hm.run_hooks(ARGV, template64) if hm.activate.zero?
exit hm.run_hooks(ARGV, template64) if hm.activate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/bridge/clean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ xpath_filter = "TEMPLATE/NIC[VN_MAD='bridge']"

begin
hm = VNMMAD::NoVLANDriver.from_base64(template64, xpath_filter, deploy_id)
hm.run_hooks(ARGV, template64) if hm.deactivate.zero?
hm.run_hooks(ARGV, template64) if hm.deactivate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/bridge/pre
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = "TEMPLATE/NIC[VN_MAD='bridge']"

hm = VNMMAD::NoVLANDriver.from_base64(template64, xpath_filter, deploy_id)
exit hm.run_hooks(ARGV, template64) if hm.activate.zero?
exit hm.run_hooks(ARGV, template64) if hm.activate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ebtables/clean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ebtables/post
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ebtables/pre
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = EbtablesVLAN::XPATH_FILTER

onevlan = EbtablesVLAN.from_base64(template64, xpath_filter, deploy_id)
onevlan.run_hooks(ARGV, template64) if onevlan.activate.zero?
onevlan.run_hooks(ARGV, template64) if onevlan.activate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/fw/clean
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/fw/post
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/fw/pre
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = "TEMPLATE/NIC[VN_MAD='fw']"

hm = VNMMAD::NoVLANDriver.from_base64(template64, xpath_filter, deploy_id)
exit hm.run_hooks(ARGV, template64) if hm.activate.zero?
exit hm.run_hooks(ARGV, template64) if hm.activate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ovswitch/clean
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = nil
xpath_filter = OpenvSwitchVLAN::XPATH_FILTER

ovs = OpenvSwitchVLAN.from_base64(template64, xpath_filter, deploy_id)
ovs.run_hooks(ARGV, template64) if ovs.deactivate.zero?
ovs.run_hooks(ARGV, template64) if ovs.deactivate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ovswitch/post
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = OpenvSwitchVLAN::XPATH_FILTER

ovs = OpenvSwitchVLAN.from_base64(template64, xpath_filter, deploy_id)
ovs.run_hooks(ARGV, template64) if ovs.activate.zero?
ovs.run_hooks(ARGV, template64) if ovs.activate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ovswitch/pre
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = OpenvSwitchVLAN::XPATH_FILTER

ovs = OpenvSwitchVLAN.from_base64(template64, xpath_filter, deploy_id)
ovs.run_hooks(ARGV, template64) if ovs.activate.zero?
ovs.run_hooks(ARGV, template64) if ovs.activate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/ovswitch_vxlan/clean
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = nil
xpath_filter = OpenvSwitchVXLAN::XPATH_FILTER

ovs = OpenvSwitchVXLAN.from_base64(template64, xpath_filter, deploy_id)
ovs.run_hooks(ARGV, template64) if ovs.deactivate.zero?
ovs.run_hooks(ARGV, template64) if ovs.deactivate == 0
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/vxlan/clean
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ begin
xpath_filter,
deploy_id)
filter_driver.deactivate
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.deactivate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/vxlan/post
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ begin
filter_driver = VNMMAD::VNMDriver.filter_driver(template64,
xpath_filter,
deploy_id)
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate.zero?
filter_driver.run_hooks(ARGV, template64) if filter_driver.activate == 0
rescue Exception => e
OpenNebula.log_error(e.message)
OpenNebula.log_error(e.backtrace)
Expand Down
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/vxlan/pre
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ deploy_id = ARGV[0]
xpath_filter = VXLANDriver::XPATH_FILTER

hm = VXLANDriver.from_base64(template64, xpath_filter, deploy_id)
exit hm.run_hooks(ARGV, template64) if hm.activate.zero?
exit hm.run_hooks(ARGV, template64) if hm.activate == 0

0 comments on commit 16aa6a0

Please sign in to comment.