opennebula-cli 4.14.2 → 4.90.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/NOTICE +1 -1
  3. data/bin/oneacct +1 -1
  4. data/bin/oneacl +1 -1
  5. data/bin/onecluster +4 -1
  6. data/bin/onedatastore +4 -1
  7. data/bin/oneflow +26 -1
  8. data/bin/oneflow-template +57 -1
  9. data/bin/onegroup +4 -1
  10. data/bin/onehost +24 -15
  11. data/bin/oneimage +5 -3
  12. data/bin/onemarket +178 -0
  13. data/bin/onemarketapp +282 -0
  14. data/bin/onesecgroup +18 -1
  15. data/bin/oneshowback +1 -1
  16. data/bin/onetemplate +30 -21
  17. data/bin/oneuser +12 -6
  18. data/bin/oneuser.backup +522 -0
  19. data/bin/onevcenter +287 -1
  20. data/bin/onevdc +4 -1
  21. data/bin/onevm +78 -56
  22. data/bin/onevnet +10 -4
  23. data/bin/onevrouter +305 -0
  24. data/bin/onezone +4 -1
  25. data/lib/cli_helper.rb +1 -1
  26. data/lib/command_parser.rb +1 -1
  27. data/lib/one_helper/oneacct_helper.rb +1 -1
  28. data/lib/one_helper/oneacl_helper.rb +11 -5
  29. data/lib/one_helper/onecluster_helper.rb +1 -1
  30. data/lib/one_helper/onedatastore_helper.rb +17 -7
  31. data/lib/one_helper/onegroup_helper.rb +1 -1
  32. data/lib/one_helper/onehost_helper.rb +2 -5
  33. data/lib/one_helper/oneimage_helper.rb +1 -15
  34. data/lib/one_helper/onemarket_helper.rb +152 -0
  35. data/lib/one_helper/onemarketapp_helper.rb +223 -0
  36. data/lib/one_helper/onequota_helper.rb +1 -1
  37. data/lib/one_helper/onesecgroup_helper.rb +46 -3
  38. data/lib/one_helper/onetemplate_helper.rb +146 -11
  39. data/lib/one_helper/oneuser_helper.rb +1 -1
  40. data/lib/one_helper/onevdc_helper.rb +1 -1
  41. data/lib/one_helper/onevm_helper.rb +37 -53
  42. data/lib/one_helper/onevnet_helper.rb +23 -11
  43. data/lib/one_helper/onevrouter_helper.rb +221 -0
  44. data/lib/one_helper/onezone_helper.rb +1 -1
  45. data/lib/one_helper.rb +193 -25
  46. metadata +21 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c8b0d34aa27f09011a52b0ac589242fdbc8c497
4
- data.tar.gz: e798b9a08d35fa05ebf9637a35fa0ccfff817be2
3
+ metadata.gz: 03d316a86c2d34e3a0f246b8c1bc65380a3edabb
4
+ data.tar.gz: 9cce74d38345ea1f873119f10bdb16ace40391a6
5
5
  SHA512:
6
- metadata.gz: 38bf76e873ef7b2722e4bbcaaa5cca317a14010aac0f1eba7345c3cc2d644a80377d419b5d45ba9adce8c4b70520551c63339d62dd6c8dcb001a4625c2c8486b
7
- data.tar.gz: 9983b5712e6a5c975b32b4b9e8db3a68c30699afa6336e4b191c7f3a2289ce1181cc181ad317c47a4f41ddce2c627c4730aea0f4192f214683c9f91675b7f612
6
+ metadata.gz: adc9b92034a6fb1ac7d4ee40ed90ae967eed40a05e34309ab02cd21a383cbb9112e58b0bad114d3e3b6e48cb4c22d2606c7b1974b306340cc2044352b78226d3
7
+ data.tar.gz: 5651dbf53d3b2827bb65bd839c3c58b9a401e013864e7eab4183902240937126ef4c260a17f2669b285735075b0b8b8340e387a5fc959d46aedfd6aba9c594d7
data/NOTICE CHANGED
@@ -1,6 +1,6 @@
1
1
  OpenNebula Open Source Project
2
2
  --------------------------------------------------------------------------------
3
- Copyright 2002-2015, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
3
+ Copyright 2002-2016, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
4
4
  --------------------------------------------------------------------------------
5
5
 
6
6
  You can find more information about the project, release notes and
data/bin/oneacct CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/oneacl CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
data/bin/onecluster CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -194,6 +194,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do
194
194
  str = OpenNebulaHelper.update_template(args[0], obj, args[1])
195
195
  end
196
196
 
197
+ helper.set_client(options)
198
+ obj = helper.retrieve_resource(obj.id)
199
+
197
200
  obj.update(str, options[:append])
198
201
  end
199
202
  end
data/bin/onedatastore CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -171,6 +171,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do
171
171
  str = OpenNebulaHelper.update_template(args[0], obj, args[1])
172
172
  end
173
173
 
174
+ helper.set_client(options)
175
+ obj = helper.retrieve_resource(obj.id)
176
+
174
177
  obj.update(str, options[:append])
175
178
  end
176
179
  end
data/bin/oneflow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -650,6 +650,31 @@ cmd=CommandParser::CmdParser.new(ARGV) do
650
650
  }
651
651
  end
652
652
 
653
+ rename_desc = <<-EOT.unindent
654
+ Renames the Service
655
+ EOT
656
+
657
+ command :rename, rename_desc, :service_id, :name do
658
+ client = Service::Client.new(
659
+ :username => options[:username],
660
+ :password => options[:password],
661
+ :url => options[:server],
662
+ :user_agent => USER_AGENT)
663
+
664
+ params = Hash.new
665
+ params['name'] = args[1]
666
+
667
+ json_action = Service.build_json_action('rename', params)
668
+
669
+ response = client.post("#{RESOURCE_PATH}/#{args[0]}/action", json_action)
670
+
671
+ if CloudClient::is_error?(response)
672
+ [response.code.to_i, response.to_s]
673
+ else
674
+ response.code.to_i
675
+ end
676
+ end
677
+
653
678
  action_desc = <<-EOT.unindent
654
679
  Perform an action on all the Virtual Machines of a given role.
655
680
  Actions supported: #{Role::SCHEDULE_ACTIONS.join(",")}
data/bin/oneflow-template CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -399,6 +399,62 @@ cmd=CommandParser::CmdParser.new(ARGV) do
399
399
  }
400
400
  end
401
401
 
402
+ clone_desc = <<-EOT.unindent
403
+ Creates a new Service Template from an existing one
404
+ EOT
405
+
406
+ command :clone, clone_desc, :templateid, :name do
407
+ client = Service::Client.new(
408
+ :username => options[:username],
409
+ :password => options[:password],
410
+ :url => options[:server],
411
+ :user_agent => USER_AGENT)
412
+
413
+ params = Hash.new
414
+ params['name'] = args[1]
415
+
416
+ json_action = Service.build_json_action('clone', params)
417
+
418
+ response = client.post("#{RESOURCE_PATH}/#{args[0]}/action", json_action)
419
+
420
+ if CloudClient::is_error?(response)
421
+ [response.code.to_i, response.to_s]
422
+ else
423
+ if options[:json]
424
+ [0, response.body]
425
+ else
426
+ template = JSON.parse(response.body)
427
+ puts "ID: #{template['DOCUMENT']['ID']}"
428
+ 0
429
+ end
430
+ end
431
+ end
432
+
433
+ rename_desc = <<-EOT.unindent
434
+ Renames the Service Template
435
+ EOT
436
+
437
+ command :rename, rename_desc, :templateid, :name do
438
+ client = Service::Client.new(
439
+ :username => options[:username],
440
+ :password => options[:password],
441
+ :url => options[:server],
442
+ :user_agent => USER_AGENT)
443
+
444
+ params = Hash.new
445
+ params['name'] = args[1]
446
+
447
+ json_action = Service.build_json_action('rename', params)
448
+
449
+ response = client.post("#{RESOURCE_PATH}/#{args[0]}/action", json_action)
450
+
451
+ if CloudClient::is_error?(response)
452
+ [response.code.to_i, response.to_s]
453
+ else
454
+ response.code.to_i
455
+ end
456
+ end
457
+
402
458
  update_desc = <<-EOT.unindent
403
459
  Update the template contents. If a path is not provided the editor will
404
460
  be launched to modify the current content.
data/bin/onegroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -130,6 +130,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do
130
130
  str = OpenNebulaHelper.update_template(args[0], obj, args[1])
131
131
  end
132
132
 
133
+ helper.set_client(options)
134
+ obj = helper.retrieve_resource(obj.id)
135
+
133
136
  obj.update(str, options[:append])
134
137
  end
135
138
  end
data/bin/onehost CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -65,14 +65,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do
65
65
  :format => String
66
66
  }
67
67
 
68
- VNET = {
69
- :name => "net",
70
- :short => "-n vnet_mad",
71
- :large => "--net vnet_mad" ,
72
- :description => "Set the network driver for the host",
73
- :format => String
74
- }
75
-
76
68
  FORCE = {
77
69
  :name => "force",
78
70
  :large => "--force" ,
@@ -87,7 +79,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
87
79
  " rsync command must be installed in the frontend and nodes."
88
80
  }
89
81
 
90
- CREAT_OPTIONS = [ IM, VMM, VNET, OneClusterHelper::CLUSTER ]
82
+ CREAT_OPTIONS = [ IM, VMM, OneClusterHelper::CLUSTER ]
91
83
  SYNC_OPTIONS = [ OneClusterHelper::CLUSTER, FORCE, RSYNC ]
92
84
 
93
85
  ########################################################################
@@ -111,11 +103,10 @@ cmd=CommandParser::CmdParser.new(ARGV) do
111
103
  EOT
112
104
 
113
105
  command :create, create_desc, :hostname, :options=>CREAT_OPTIONS do
114
- if options[:im].nil? or options[:vm].nil? or options[:net].nil?
106
+ if options[:im].nil? || options[:vm].nil?
115
107
  STDERR.puts "Drivers are mandatory to create a host:"
116
108
  STDERR.puts "\t -i information driver"
117
109
  STDERR.puts "\t -v hypervisor driver"
118
- STDERR.puts "\t -n network driver"
119
110
  exit -1
120
111
  end
121
112
 
@@ -125,7 +116,6 @@ cmd=CommandParser::CmdParser.new(ARGV) do
125
116
  host.allocate(args[0],
126
117
  options[:im],
127
118
  options[:vm],
128
- options[:net],
129
119
  cid)
130
120
  end
131
121
  end
@@ -141,7 +131,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
141
131
  end
142
132
 
143
133
  enable_desc = <<-EOT.unindent
144
- Enables the given Host
134
+ Enables the given host, fully operational
145
135
  EOT
146
136
 
147
137
  command :enable, enable_desc, [:range,:hostid_list] do
@@ -151,7 +141,10 @@ cmd=CommandParser::CmdParser.new(ARGV) do
151
141
  end
152
142
 
153
143
  disable_desc = <<-EOT.unindent
154
- Disables the given Host
144
+ Disables the given host:
145
+ - monitor: enabled
146
+ - scheduler deployment: disabled
147
+ - manual deployment: enabled
155
148
  EOT
156
149
 
157
150
  command :disable, disable_desc, [:range,:hostid_list] do
@@ -160,6 +153,19 @@ cmd=CommandParser::CmdParser.new(ARGV) do
160
153
  end
161
154
  end
162
155
 
156
+ offline_desc = <<-EOT.unindent
157
+ Sets the host offline:
158
+ - monitor: disabled
159
+ - scheduler deployment: disabled
160
+ - manual deployment: disabled
161
+ EOT
162
+
163
+ command :offline, offline_desc, [:range,:hostid_list] do
164
+ helper.perform_actions(args[0],options,"offline") do |host|
165
+ host.offline
166
+ end
167
+ end
168
+
163
169
  update_desc = <<-EOT.unindent
164
170
  Update the template contents. If a path is not provided the editor will
165
171
  be launched to modify the current content.
@@ -174,6 +180,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do
174
180
  str = OpenNebulaHelper.update_template(args[0], obj, args[1])
175
181
  end
176
182
 
183
+ helper.set_client(options)
184
+ obj = helper.retrieve_resource(obj.id)
185
+
177
186
  obj.update(str, options[:append])
178
187
  end
179
188
  end
data/bin/oneimage CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2015, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
5
  # #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
7
  # not use this file except in compliance with the License. You may obtain #
@@ -109,8 +109,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do
109
109
 
110
110
  - a datablock image of 400MB:
111
111
 
112
- oneimage create -d 1 --name data --type DATABLOCK --size 400 \\
113
- --fstype ext2
112
+ oneimage create -d 1 --name data --type DATABLOCK --size 400
114
113
 
115
114
  EOT
116
115
 
@@ -223,6 +222,9 @@ cmd=CommandParser::CmdParser.new(ARGV) do
223
222
  str = OpenNebulaHelper.update_template(args[0], obj, args[1])
224
223
  end
225
224
 
225
+ helper.set_client(options)
226
+ obj = helper.retrieve_resource(obj.id)
227
+
226
228
  obj.update(str, options[:append])
227
229
  end
228
230
  end
data/bin/onemarket ADDED
@@ -0,0 +1,178 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # -------------------------------------------------------------------------- #
4
+ # Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
5
+ # #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may #
7
+ # not use this file except in compliance with the License. You may obtain #
8
+ # a copy of the License at #
9
+ # #
10
+ # http://www.apache.org/licenses/LICENSE-2.0 #
11
+ # #
12
+ # Unless required by applicable law or agreed to in writing, software #
13
+ # distributed under the License is distributed on an "AS IS" BASIS, #
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15
+ # See the License for the specific language governing permissions and #
16
+ # limitations under the License. #
17
+ #--------------------------------------------------------------------------- #
18
+
19
+ ONE_LOCATION=ENV["ONE_LOCATION"]
20
+
21
+ if !ONE_LOCATION
22
+ RUBY_LIB_LOCATION="/usr/lib/one/ruby"
23
+ else
24
+ RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
25
+ end
26
+
27
+ $: << RUBY_LIB_LOCATION
28
+ $: << RUBY_LIB_LOCATION+"/cli"
29
+
30
+ require 'command_parser'
31
+ require 'one_helper/onemarket_helper'
32
+
33
+ cmd=CommandParser::CmdParser.new(ARGV) do
34
+ usage "`onemarket` <command> [<args>] [<options>]"
35
+ version OpenNebulaHelper::ONE_VERSION
36
+
37
+ helper = OneMarketPlaceHelper.new
38
+
39
+ before_proc do
40
+ helper.set_client(options)
41
+ end
42
+
43
+ ########################################################################
44
+ # Global Options
45
+ ########################################################################
46
+ set :option, CommandParser::OPTIONS+OpenNebulaHelper::CLIENT_OPTIONS
47
+
48
+ list_options = CLIHelper::OPTIONS
49
+ list_options << OpenNebulaHelper::XML
50
+ list_options << OpenNebulaHelper::NUMERIC
51
+ list_options << OpenNebulaHelper::DESCRIBE
52
+
53
+ ########################################################################
54
+ # Formatters for arguments
55
+ ########################################################################
56
+ set :format, :marketplaceid, OneMarketPlaceHelper.to_id_desc do |arg|
57
+ helper.to_id(arg)
58
+ end
59
+
60
+ set :format, :marketplaceid_list, OneMarketPlaceHelper.list_to_id_desc do |arg|
61
+ helper.list_to_id(arg)
62
+ end
63
+
64
+ set :format, :groupid, OpenNebulaHelper.rname_to_id_desc("GROUP") do |arg|
65
+ OpenNebulaHelper.rname_to_id(arg, "GROUP")
66
+ end
67
+
68
+ set :format, :userid, OpenNebulaHelper.rname_to_id_desc("USER") do |arg|
69
+ OpenNebulaHelper.rname_to_id(arg, "USER")
70
+ end
71
+
72
+ ########################################################################
73
+ # Commands
74
+ ########################################################################
75
+
76
+ create_desc = <<-EOT.unindent
77
+ Creates a new Marketplace from the given template file
78
+ EOT
79
+
80
+ command :create, create_desc, :file do
81
+
82
+ helper.create_resource(options) do |marketplace|
83
+ begin
84
+ template = File.read(args[0])
85
+ marketplace.allocate(template)
86
+ rescue =>e
87
+ STDERR.puts e.message
88
+ exit -1
89
+ end
90
+ end
91
+ end
92
+
93
+ delete_desc = <<-EOT.unindent
94
+ Deletes the given Marketplace
95
+ EOT
96
+
97
+ command :delete, delete_desc, [:range, :marketplaceid_list] do
98
+ helper.perform_actions(args[0],options,"deleted") do |obj|
99
+ obj.delete
100
+ end
101
+ end
102
+
103
+ chgrp_desc = <<-EOT.unindent
104
+ Changes the Marketplace group
105
+ EOT
106
+
107
+ command :chgrp, chgrp_desc,[:range, :marketplaceid_list], :groupid do
108
+ helper.perform_actions(args[0],options,"Group changed") do |obj|
109
+ obj.chown(-1, args[1].to_i)
110
+ end
111
+ end
112
+
113
+ chown_desc = <<-EOT.unindent
114
+ Changes the Marketplace owner and group
115
+ EOT
116
+
117
+ command :chown, chown_desc, [:range, :marketplaceid_list], :userid,
118
+ [:groupid,nil] do
119
+ gid = args[2].nil? ? -1 : args[2].to_i
120
+ helper.perform_actions(args[0],options,"Owner/Group changed") do |obj|
121
+ obj.chown(args[1].to_i, gid)
122
+ end
123
+ end
124
+
125
+ chmod_desc = <<-EOT.unindent
126
+ Changes the Marketplace permissions
127
+ EOT
128
+
129
+ command :chmod, chmod_desc, [:range, :marketplaceid_list], :octet do
130
+ helper.perform_actions(args[0],options, "Permissions changed") do |obj|
131
+ obj.chmod_octet(args[1])
132
+ end
133
+ end
134
+
135
+ list_desc = <<-EOT.unindent
136
+ Lists Marketplaces
137
+ EOT
138
+
139
+ command :list, list_desc, :options=>list_options do
140
+ helper.list_pool(options)
141
+ end
142
+
143
+ show_desc = <<-EOT.unindent
144
+ Shows Marketplace information
145
+ EOT
146
+
147
+ command :show, show_desc, :marketplaceid, :options=>OpenNebulaHelper::XML do
148
+ helper.show_resource(args[0],options)
149
+ end
150
+
151
+ update_desc = <<-EOT.unindent
152
+ Update the template contents. If a path is not provided the editor will
153
+ be launched to modify the current content.
154
+ EOT
155
+
156
+ command :update, update_desc, :marketplaceid, [:file, nil],
157
+ :options=>OpenNebulaHelper::APPEND do
158
+ helper.perform_action(args[0],options,"modified") do |obj|
159
+ if options[:append]
160
+ str = OpenNebulaHelper.append_template(args[0], obj, args[1])
161
+ else
162
+ str = OpenNebulaHelper.update_template(args[0], obj, args[1])
163
+ end
164
+
165
+ obj.update(str, options[:append])
166
+ end
167
+ end
168
+
169
+ rename_desc = <<-EOT.unindent
170
+ Renames the Marketplace
171
+ EOT
172
+
173
+ command :rename, rename_desc, :marketplaceid, :name do
174
+ helper.perform_action(args[0],options,"renamed") do |o|
175
+ o.rename(args[1])
176
+ end
177
+ end
178
+ end