diff --git a/src/cli/oneacct b/src/cli/oneacct index a880c36357..ee10867ece 100755 --- a/src/cli/oneacct +++ b/src/cli/oneacct @@ -83,7 +83,8 @@ cmd = CommandParser::CmdParser.new(ARGV) do order_by[:order_by_1] = 'VM/UID' order_by[:order_by_2] = 'VM/ID' if options[:split] - acct_hash = pool.accounting(filter_flag, common_opts.merge(order_by)) + acct_hash = pool.accounting(filter_flag, + common_opts.merge(order_by)) if OpenNebula.is_error?(acct_hash) puts acct_hash.message exit -1 diff --git a/src/cli/onecluster b/src/cli/onecluster index a389067566..11ddb04bd9 100755 --- a/src/cli/onecluster +++ b/src/cli/onecluster @@ -69,7 +69,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do OpenNebulaHelper.rname_to_id(arg, "HOST") end - set :format, :datastoreid, OpenNebulaHelper.rname_to_id_desc("DATASTORE") do |arg| + set :format, :datastoreid, + OpenNebulaHelper.rname_to_id_desc("DATASTORE") do |arg| OpenNebulaHelper.rname_to_id(arg, "DATASTORE") end diff --git a/src/cli/onedatastore b/src/cli/onedatastore index 5e2b449ed2..5f23224acf 100755 --- a/src/cli/onedatastore +++ b/src/cli/onedatastore @@ -62,7 +62,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do helper.list_to_id(arg) end - set :format, :clusterid, OpenNebulaHelper.rname_to_id_desc("CLUSTER") do |arg| + set :format, :clusterid, + OpenNebulaHelper.rname_to_id_desc("CLUSTER") do |arg| OpenNebulaHelper.rname_to_id(arg, "CLUSTER") end @@ -82,7 +83,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do Creates a new Datastore from the given template file EOT - command :create, create_desc, :file, :options=>[OneClusterHelper::CLUSTER] do + command :create, create_desc, :file, + :options=>[OneClusterHelper::CLUSTER] do cid = options[:cluster] || ClusterPool::NONE_CLUSTER_ID diff --git a/src/cli/onegroup b/src/cli/onegroup index 26471938d2..ebad8da4d5 100755 --- a/src/cli/onegroup +++ b/src/cli/onegroup @@ -103,8 +103,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do end quota_desc = <<-EOT.unindent - Set the quota limits for the group. If a path is not provided the editor - will be launched to modify the current quotas. + Set the quota limits for the group. If a path is not provided the + editor will be launched to modify the current quotas. EOT command :quota, quota_desc, :groupid, [:file, nil] do @@ -131,7 +131,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do provided the editor will be launched to create new quotas. EOT - command :batchquota, batchquota_desc, [:range, :groupid_list], [:file, nil] do + command :batchquota, batchquota_desc, [:range, :groupid_list], + [:file, nil] do batch_str = OneQuotaHelper.get_batch_quota(args[1]) helper.perform_actions(args[0], options, "modified") do |group| diff --git a/src/cli/oneimage b/src/cli/oneimage index 0c1dc39dfc..e70c44fa90 100755 --- a/src/cli/oneimage +++ b/src/cli/oneimage @@ -81,7 +81,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do if Image::IMAGE_TYPES.include? type [0, type] else - [1, "Image type not supported. Must be #{Image::IMAGE_TYPES.join(", ")}."] + [1, "Image type not supported. Must be "<< + Image::IMAGE_TYPES.join(", ")<<"."] end end diff --git a/src/cli/onetemplate b/src/cli/onetemplate index 390cdd61fa..7604e4b457 100755 --- a/src/cli/onetemplate +++ b/src/cli/onetemplate @@ -94,12 +94,13 @@ cmd=CommandParser::CmdParser.new(ARGV) do - new VM Template named "arch vm" with a disk and a nic: - onetemplate create --name "arch vm" --memory 128 --cpu 1 --disk arch \\ - --network private_lan + onetemplate create --name "arch vm" --memory 128 --cpu 1 \\ + --disk arch --network private_lan - using two disks: - onetempate create --name "test vm" --memory 128 --cpu 1 --disk arch,data + onetempate create --name "test vm" --memory 128 --cpu 1 \\ + --disk arch,data EOT @@ -184,7 +185,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do number = options[:multiple] || 1 number.times do |i| - exit_code=helper.perform_action(args[0],options,"instantiated") do |t| + exit_code=helper.perform_action(args[0], options, + "instantiated") do |t| name = options[:name] name = name.gsub("%i",i.to_s) if name diff --git a/src/cli/oneuser b/src/cli/oneuser index fdebb37639..64508a0e35 100755 --- a/src/cli/oneuser +++ b/src/cli/oneuser @@ -228,7 +228,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do provided the editor will be launched to create new quotas. EOT - command :batchquota, batchquota_desc, [:range, :userid_list], [:file, nil] do + command :batchquota, batchquota_desc, [:range, :userid_list], + [:file, nil] do batch_str = OneQuotaHelper.get_batch_quota(args[1]) helper.perform_actions(args[0], options, "modified") do |user| diff --git a/src/cli/onevm b/src/cli/onevm index f98081f8d9..4ec176fa16 100755 --- a/src/cli/onevm +++ b/src/cli/onevm @@ -112,8 +112,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do ######################################################################## create_desc = <<-EOT.unindent - Creates a new VM from the given description instead of using a previously - defined template (see 'onetemplate create' and 'onetemplate instantiate'). + Creates a new VM from the given description instead of using a + previously defined template (see 'onetemplate create' and + 'onetemplate instantiate'). Examples: @@ -189,7 +190,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do command :update, update_desc, :vmid, [:file, nil] do helper.perform_action(args[0],options,"modified") do |vm| - str = OpenNebulaHelper.update_template(args[0], vm, args[1],'USER_TEMPLATE') + str = OpenNebulaHelper.update_template(args[0], vm, args[1], + 'USER_TEMPLATE') vm.update(str) end end @@ -255,7 +257,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do States: ANY EOT - command :saveas, saveas_desc, :vmid, :diskid, :img_name, :options=>[TYPE] do + command :saveas, saveas_desc, :vmid, :diskid, :img_name, + :options=>[TYPE] do disk_id = args[1].to_i image_name = args[2] image_type = options[:type] || "" @@ -352,7 +355,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do States: PENDING EOT - command :deploy, deploy_desc, [:range,:vmid_list], :hostid, :options=>[ENFORCE] do + command :deploy, deploy_desc, [:range,:vmid_list], :hostid, + :options=>[ENFORCE] do host_id = args[1] verbose = "deploying in host #{host_id}" @@ -371,7 +375,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do States: RUNNING EOT - command :livemigrate, livemigrate_desc, [:range,:vmid_list], :hostid, :options=>[ENFORCE] do + command :livemigrate, livemigrate_desc, [:range,:vmid_list], :hostid, + :options=>[ENFORCE] do host_id = args[1] verbose = "live migrating to #{host_id}" @@ -390,7 +395,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do States: RUNNING EOT - command :migrate, migrate_desc, [:range,:vmid_list], :hostid, :options=>[ENFORCE] do + command :migrate, migrate_desc, [:range,:vmid_list], :hostid, + :options=>[ENFORCE] do host_id = args[1] verbose = "migrating to #{host_id}"