mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #1727: Generic system to allow to resize
on onetemplate instantiate from the CLI
This commit is contained in:
parent
de73086981
commit
675dd15df2
@ -879,12 +879,17 @@ EOT
|
||||
template=''
|
||||
|
||||
objects.each do |obj|
|
||||
obj, *extra_attributes = obj.split(":")
|
||||
res=parse_user_object(obj)
|
||||
return [-1, "#{section.capitalize} \"#{obj}\" malformed"] if !res
|
||||
user, object=*res
|
||||
|
||||
template<<"#{section.upcase}=[\n"
|
||||
template<<" #{name.upcase}_UNAME=\"#{user}\",\n" if user
|
||||
extra_attributes.each do |extra_attribute|
|
||||
key, value = extra_attribute.split("=")
|
||||
template<<" #{key.upcase}=\"#{value}\",\n"
|
||||
end
|
||||
if object.match(/^\d+$/)
|
||||
template<<" #{name.upcase}_ID=#{object}\n"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user