1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-25 06:03:36 +03:00

M #-: Remove temp file

This commit is contained in:
Tino Vazquez 2020-04-30 10:39:25 +02:00
parent a7cf93882b
commit de1f9a217a
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE

33
tep
View File

@ -1,33 +0,0 @@
From: /var/lib/one/remotes/im/lib/vcenter.rb:1107 VcenterMonitor#fetch_vms_data:
1099: def fetch_vms_data(with_monitoring: false)
1100: # rubocop:disable Layout/LineLength
1101: vmpool = OpenNebula::VirtualMachinePool
1102: .new(@client, OpenNebula::VirtualMachinePool::INFO_ALL_VM)
1103: # rubocop:enable Layout/LineLength
1104: vmpool.info
1105:
1106: vms = []
=> 1107: vmpool.each do |remote_vm|
1108: id = remote_vm['USER_TEMPLATE/REMOTE_OPENNEBULA_VM_ID'] || '-1'
1109: deploy_id = remote_vm['USER_TEMPLATE/REMOTE_OPENNEBULA_DEPLOY_ID'] \
1110: || "#{DEPLOY_ID_PREFIX}#{remote_vm.id}"
1111: cpu = remote_vm['TEMPLATE/CPU']
1112: memory = remote_vm['TEMPLATE/MEMORY']
1113:
1114: vm = { :id => id,
1115: :uuid => deploy_id,
1116: :name => remote_vm.name,
1117: :state => vm_state(remote_vm),
1118: :type => "#{cpu}cpu/#{memory}memory" }
1119:
1120: if with_monitoring
1121: vm[:monitor] = get_vm_monitor_data(remote_vm)
1122: end
1123: vms << vm
1124: end
1125:
1126: vms
1127: end