mirror of
https://github.com/OpenNebula/one.git
synced 2025-04-01 06:50:25 +03:00
M #-: add extra info into provision doc (#537)
This commit is contained in:
parent
2dd2c17e05
commit
6df1cd1702
@ -503,6 +503,9 @@ module OneProvision
|
||||
# Resources are allocated later
|
||||
document['provision']['resource'] = {}
|
||||
|
||||
# Add extra information to the document
|
||||
document.merge!(template.extra)
|
||||
|
||||
document.to_json
|
||||
end
|
||||
|
||||
|
@ -316,6 +316,36 @@ module OneProvision
|
||||
dsearch(path.split('/'))
|
||||
end
|
||||
|
||||
# Gets extra information from the template
|
||||
#
|
||||
# @return [Hash] Extra information
|
||||
def extra
|
||||
ret = {}
|
||||
|
||||
reject = %w[cluster
|
||||
datastores
|
||||
defaults
|
||||
extends
|
||||
flowtemplates
|
||||
hosts
|
||||
images
|
||||
inputs
|
||||
marketplaceapps
|
||||
name
|
||||
networks
|
||||
playbook
|
||||
templates
|
||||
vntemplates]
|
||||
|
||||
@config.each do |key, value|
|
||||
next if reject.include?(key)
|
||||
|
||||
ret[key] = value
|
||||
end
|
||||
|
||||
ret
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Reads configuration content
|
||||
|
Loading…
x
Reference in New Issue
Block a user