diff --git a/share/linters/.rubocop.yml b/share/linters/.rubocop.yml index 50de03ffa4..c0a6c894b3 100644 --- a/share/linters/.rubocop.yml +++ b/share/linters/.rubocop.yml @@ -42,6 +42,20 @@ AllCops: - src/authm_mad/remotes/ssh/authenticate - src/sunstone/bin/novnc-server - src/sunstone/config.ru + - src/im_mad/remotes/dummy-probes.d/vms/monitor/monitor.rb + - src/im_mad/remotes/dummy.d/collectd-client.rb + - src/im_mad/remotes/dummy.d/collectd-client.rb + - src/im_mad/remotes/kvm-probes.d/host/monitor/numa_usage.rb + - src/im_mad/remotes/kvm-probes.d/host/system/machines_models.rb + - src/im_mad/remotes/kvm-probes.d/host/system/numa_host.rb + - src/im_mad/remotes/lib/kvm.rb + - src/im_mad/remotes/lib/probe_db.rb + - src/im_mad/remotes/lxd-probes.d/host/monitor/numa_usage.rb + - src/im_mad/remotes/lxd-probes.d/host/system/numa_host.rb + - src/im_mad/remotes/lxd-probes.d/vms/status/status.rb + - src/im_mad/remotes/node-probes.d/numa_usage.rb + - src/im_mad/remotes/lib/linux.rb + - src/im_mad/remotes/node-probes.d/numa_host.rb - src/pm_mad/remotes/dummy/cancel - src/pm_mad/remotes/dummy/shutdown - src/pm_mad/remotes/dummy/reboot @@ -61,6 +75,8 @@ AllCops: - src/pm_mad/remotes/ec2/reset - src/pm_mad/remotes/ec2/poll - src/onegate/config.ru + - src/im_mad/remotes/kvm-probes.d/host/system/pci.rb + - src/im_mad/remotes/lxd-probes.d/host/system/pci.rb - src/im_mad/remotes/lxd-probes.d/pci.rb - src/im_mad/remotes/kvm-probes.d/pci.rb - src/im_mad/remotes/kvm.d/collectd-client.rb diff --git a/src/cli/one_helper/onehost_helper.rb b/src/cli/one_helper/onehost_helper.rb index eb61063dee..d16626e9c2 100644 --- a/src/cli/one_helper/onehost_helper.rb +++ b/src/cli/one_helper/onehost_helper.rb @@ -579,8 +579,9 @@ class OneHostHelper < OpenNebulaHelper::OneHelper OpenNebulaHelper.unit_to_str(host['HOST_SHARE/MAX_MEM'] .to_i, {})) puts format(str, ' USED (REAL)', - OpenNebulaHelper.unit_to_str(host['MONITORING/CAPACITY/USED_MEMORY'] - .to_i, {})) + OpenNebulaHelper + .unit_to_str(host['MONITORING/CAPACITY/USED_MEMORY'] + .to_i, {})) puts format(str, ' USED (ALLOCATED)', OpenNebulaHelper.unit_to_str(host['HOST_SHARE/MEM_USAGE'] .to_i, {})) diff --git a/src/vmm_mad/remotes/vcenter/reconfigure b/src/vmm_mad/remotes/vcenter/reconfigure index 9ef860f67f..f70660d2b3 100755 --- a/src/vmm_mad/remotes/vcenter/reconfigure +++ b/src/vmm_mad/remotes/vcenter/reconfigure @@ -35,7 +35,6 @@ require 'vcenter_driver' vm_ref = ARGV[0] vc_cluster_name = ARGV[-1] -vm_id = ARGV[-2] drv_action = OpenNebula::XMLElement.new drv_action.initialize_xml(Base64.decode64(STDIN.read), 'VMM_DRIVER_ACTION_DATA') @@ -45,8 +44,9 @@ host_id = drv_action['VM/HISTORY_RECORDS/HISTORY[last()]/HID'] begin vi_client = VCenterDriver::VIClient.new_from_host(host_id) - one_item_xml = drv_action.retrieve_xmlelements('VM').first.to_xml - one_item = OpenNebula::VirtualMachine.new(OpenNebula::XMLElement.build_xml(one_item_xml, 'VM'), vi_client) + one_item_xml = drv_action.retrieve_xmlelements('VM').first.to_xml + one_item_raw_xml = OpenNebula::XMLElement.build_xml(one_item_xml, 'VM') + one_item = OpenNebula::VirtualMachine.new(one_item_raw_xml, vi_client) vm = VCenterDriver::VirtualMachine.new_one(vi_client, vm_ref, one_item)