1
0
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:
Javi Fontan 2015-09-30 15:49:37 +02:00
parent 9d41c764ea
commit 6f88d48839
2 changed files with 19 additions and 0 deletions

View File

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

View File

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