mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #-: DDC put host config into ONE host template (#4682)
This commit is contained in:
parent
dfee994096
commit
441861c4cc
@ -345,6 +345,8 @@ module OneProvision
|
||||
ssh_key = try_read_file(host['connection']['public_key'])
|
||||
config = Base64.strict_encode64(host['configuration'].to_yaml)
|
||||
|
||||
reject = %w[im_mad vm_mad provision connection configuration]
|
||||
|
||||
Nokogiri::XML::Builder.new do |xml|
|
||||
xml.HOST do
|
||||
xml.NAME "provision-#{SecureRandom.hex(24)}"
|
||||
@ -379,6 +381,10 @@ module OneProvision
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
host.each do |key, value|
|
||||
xml.send(key.upcase, value) unless reject.include?(key)
|
||||
end
|
||||
end
|
||||
end
|
||||
end.doc.root
|
||||
|
Loading…
x
Reference in New Issue
Block a user