Skip to content

Commit

Permalink
F #2427: Added help for new option into the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmont committed Sep 20, 2018
1 parent 8f33588 commit ba4f0bf
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/cli/one_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ module OpenNebulaHelper
:description => "Networks to attach. To use a network owned by"<<
" other user use user[network]. Additional"<<
" attributes are supported like with the --disk"<<
" option.",
" option. Also you can use auto if you want that" <<
" OpenNebula select automatically the network",
:format => Array
},
{
Expand Down Expand Up @@ -1241,15 +1242,19 @@ def self.create_disk_net(objects, section, name)
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"
if object.casecmp? "auto"
template<<" NETWORK_MODE=\"#{object}\"\n"
else
template<<" #{name.upcase}=\"#{object}\"\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
template<<" #{name.upcase}=\"#{object}\"\n"
end
end
template<<"]\n"
end if objects
Expand Down

0 comments on commit ba4f0bf

Please sign in to comment.