1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

name and storage profile VM configuraiton during vApp instantiation

This commit is contained in:
Miguel Martinez 2015-04-30 15:21:54 -07:00
parent 7d6c74f6e7
commit edb17763d7

View file

@ -61,6 +61,21 @@ module Fog
} }
# The template # The template
xml.Source(:href => options[:template_uri]) xml.Source(:href => options[:template_uri])
# Use of sourceItems for configuring VM's during instantiation.
# NOTE: Name and storage profile configuration supported so far.
# http://pubs.vmware.com/vca/index.jsp?topic=%2Fcom.vmware.vcloud.api.doc_56%2FGUID-BF9B790D-512E-4EA1-99E8-6826D4B8E6DC.html
(options[:vms_config] || []).each do |vm_config|
next unless vm_config[:href]
xml.SourcedItem {
xml.Source(:href => vm_config[:href])
xml.VmGeneralParams{
xml.Name(vm_config[:name]) if vm_config[:name]
}
if storage_href = vm_config[:storage_profile_href]
xml.StorageProfile(:href => storage_href)
end
}
end
xml.AllEULAsAccepted("true") xml.AllEULAsAccepted("true")
} }
end end