1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-21 18:03:38 +03:00

L #-: Linting for vCenter reconfigure

Also exclude some offending (to rubocop ;) files

(cherry picked from commit 5b3e93cf4484a9436717779963168af7cde63d4d)
This commit is contained in:
Tino Vazquez 2020-03-06 10:31:46 +01:00
parent be1299a3cf
commit 76880aa21d
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE
2 changed files with 19 additions and 3 deletions

View File

@ -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

View File

@ -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)