mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-29 18:50:08 +03:00
feature #4012: get cutomizations list from vcenter
Customizations are added to host monitoring. For example: CUSTOMIZATION=[ NAME="customization-linux", TYPE="Linux" ] CUSTOMIZATION=[ NAME="customization-windows", TYPE="Windows" ]
This commit is contained in:
parent
9d41c764ea
commit
6f88d48839
@ -45,4 +45,7 @@ vm_monitor_info = vcenter_host.monitor_vms
|
||||
cluster_info << "\nVM_POLL=YES"
|
||||
cluster_info << "#{vm_monitor_info}" if !vm_monitor_info.empty?
|
||||
|
||||
cluster_info << "\n"
|
||||
cluster_info << vcenter_host.monitor_customizations
|
||||
|
||||
puts cluster_info
|
||||
|
@ -717,6 +717,22 @@ class VCenterHost < ::OpenNebula::Host
|
||||
|
||||
return str_info
|
||||
end
|
||||
|
||||
def monitor_customizations
|
||||
customizations = client.vim.serviceContent.customizationSpecManager.info
|
||||
|
||||
text = ''
|
||||
|
||||
customizations.each do |c|
|
||||
t = "CUSTOMIZATION = [ "
|
||||
t << %Q<NAME = "#{c.name}", >
|
||||
t << %Q<TYPE = "#{c.type}" ]\n>
|
||||
|
||||
text << t
|
||||
end
|
||||
|
||||
text
|
||||
end
|
||||
end
|
||||
|
||||
################################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user