opennebula-cli 5.13.80.pre → 6.0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/oneacct +13 -2
- data/bin/oneacl +13 -2
- data/bin/onecluster +13 -2
- data/bin/onedatastore +13 -2
- data/bin/oneflow +13 -2
- data/bin/oneflow-template +13 -2
- data/bin/onegroup +13 -2
- data/bin/onehook +17 -6
- data/bin/onehost +15 -4
- data/bin/oneimage +19 -8
- data/bin/onemarket +13 -2
- data/bin/onemarketapp +23 -16
- data/bin/onesecgroup +13 -2
- data/bin/oneshowback +13 -2
- data/bin/onetemplate +28 -8
- data/bin/oneuser +13 -2
- data/bin/onevcenter +22 -6
- data/bin/onevdc +13 -2
- data/bin/onevm +180 -18
- data/bin/onevmgroup +17 -6
- data/bin/onevnet +17 -6
- data/bin/onevntemplate +17 -6
- data/bin/onevrouter +17 -6
- data/bin/onezone +15 -4
- data/lib/cli_helper.rb +13 -2
- data/lib/command_parser.rb +16 -13
- data/lib/one_helper.rb +4 -3
- data/lib/one_helper/oneacct_helper.rb +1 -3
- data/lib/one_helper/onecluster_helper.rb +75 -42
- data/lib/one_helper/oneimage_helper.rb +6 -0
- data/lib/one_helper/onemarketapp_helper.rb +12 -6
- data/lib/one_helper/onevm_helper.rb +20 -0
- data/lib/one_helper/onevnet_helper.rb +173 -151
- data/lib/one_helper/onezone_helper.rb +25 -21
- data/share/schemas/xsd/index.xsd +1 -0
- data/share/schemas/xsd/monitoring_data.xsd +41 -0
- data/share/schemas/xsd/opennebula_configuration.xsd +1 -0
- data/share/schemas/xsd/vnet.xsd +2 -0
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef732bebd452365e562d9f6099502278df886613
|
4
|
+
data.tar.gz: f23992f9012ee9a987b8b82a0fe7ea7393e5142e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0659beee2f6bd73ce137a403f273601f3a05034b71ec0a348f3ef112fd37fb4f08113ead4e20cd7c0fe9336dbc55b714fba8dc70e2adbfade1d6392e5d9b7b
|
7
|
+
data.tar.gz: 094668b93bf8cf3757c20a9f8b65e5541f32df5bcbf282f0aadeb7a3210fa0925b4ea0d0617ff8d238cfa3d8f7553b2b428c61c6411f496b4d1310a91d42a57b
|
data/bin/oneacct
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/oneacl
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/onecluster
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/onedatastore
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/oneflow
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/oneflow-template
CHANGED
@@ -28,14 +28,25 @@ else
|
|
28
28
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
29
29
|
end
|
30
30
|
|
31
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
31
32
|
if File.directory?(GEMS_LOCATION)
|
32
33
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
33
34
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
34
35
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
35
|
-
|
36
|
-
|
36
|
+
|
37
|
+
# Suppress warnings from Rubygems
|
38
|
+
# https://github.com/OpenNebula/one/issues/5379
|
39
|
+
begin
|
40
|
+
verb = $VERBOSE
|
41
|
+
$VERBOSE = nil
|
42
|
+
require 'rubygems'
|
43
|
+
Gem.use_paths(real_gems_path)
|
44
|
+
ensure
|
45
|
+
$VERBOSE = verb
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
49
|
+
# %%RUBYGEMS_SETUP_END%%
|
39
50
|
|
40
51
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
41
52
|
$LOAD_PATH << ONEFLOW_LOCATION
|
data/bin/onegroup
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/onehook
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
@@ -254,9 +265,9 @@ CommandParser::CmdParser.new(ARGV) do
|
|
254
265
|
[Admin]: locks only Admin actions.
|
255
266
|
EOT
|
256
267
|
|
257
|
-
command :lock, lock_desc, :
|
268
|
+
command :lock, lock_desc, [:range, :hookid_list],
|
258
269
|
:options => [USE, MANAGE, ADMIN, ALL] do
|
259
|
-
helper.
|
270
|
+
helper.perform_actions(args[0], options, 'Hook locked') do |t|
|
260
271
|
if !options[:use].nil?
|
261
272
|
level = 1
|
262
273
|
elsif !options[:manage].nil?
|
@@ -277,8 +288,8 @@ CommandParser::CmdParser.new(ARGV) do
|
|
277
288
|
Valid states are: All.
|
278
289
|
EOT
|
279
290
|
|
280
|
-
command :unlock, unlock_desc, :
|
281
|
-
helper.
|
291
|
+
command :unlock, unlock_desc, [:range, :hookid_list] do
|
292
|
+
helper.perform_actions(args[0], options, 'Hook unlocked') do |t|
|
282
293
|
t.unlock
|
283
294
|
end
|
284
295
|
end
|
data/bin/onehost
CHANGED
@@ -28,14 +28,25 @@ else
|
|
28
28
|
REMOTES_LOCATION = ONE_LOCATION + '/var/remotes/'
|
29
29
|
end
|
30
30
|
|
31
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
31
32
|
if File.directory?(GEMS_LOCATION)
|
32
33
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
33
34
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
34
35
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
35
|
-
|
36
|
-
|
36
|
+
|
37
|
+
# Suppress warnings from Rubygems
|
38
|
+
# https://github.com/OpenNebula/one/issues/5379
|
39
|
+
begin
|
40
|
+
verb = $VERBOSE
|
41
|
+
$VERBOSE = nil
|
42
|
+
require 'rubygems'
|
43
|
+
Gem.use_paths(real_gems_path)
|
44
|
+
ensure
|
45
|
+
$VERBOSE = verb
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
49
|
+
# %%RUBYGEMS_SETUP_END%%
|
39
50
|
|
40
51
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
41
52
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
@@ -171,8 +182,8 @@ CommandParser::CmdParser.new(ARGV) do
|
|
171
182
|
[:file, nil], :options => CREAT_OPTIONS do
|
172
183
|
if options[:im].nil? || options[:vm].nil?
|
173
184
|
STDERR.puts 'Drivers are mandatory to create a host:'
|
174
|
-
STDERR.puts
|
175
|
-
STDERR.puts
|
185
|
+
STDERR.puts "\t -i information driver"
|
186
|
+
STDERR.puts "\t -v hypervisor driver"
|
176
187
|
exit(-1)
|
177
188
|
end
|
178
189
|
|
data/bin/oneimage
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
@@ -164,7 +175,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
164
175
|
:options => CREATE_OPTIONS + OneImageHelper::TEMPLATE_OPTIONS do
|
165
176
|
if options[:datastore].nil? && !options[:dry]
|
166
177
|
STDERR.puts 'Datastore to save the image is mandatory: '
|
167
|
-
STDERR.puts
|
178
|
+
STDERR.puts "\t -d datastore_id"
|
168
179
|
exit(-1)
|
169
180
|
end
|
170
181
|
|
@@ -434,9 +445,9 @@ CommandParser::CmdParser.new(ARGV) do
|
|
434
445
|
[Admin]: locks only Admin actions.
|
435
446
|
EOT
|
436
447
|
|
437
|
-
command :lock, lock_desc, :
|
448
|
+
command :lock, lock_desc, [:range, :imageid_list],
|
438
449
|
:options => [USE, MANAGE, ADMIN, ALL] do
|
439
|
-
helper.
|
450
|
+
helper.perform_actions(args[0], options, 'Image locked') do |i|
|
440
451
|
if !options[:use].nil?
|
441
452
|
level = 1
|
442
453
|
elsif !options[:manage].nil?
|
@@ -457,8 +468,8 @@ CommandParser::CmdParser.new(ARGV) do
|
|
457
468
|
Valid states are: All.
|
458
469
|
EOT
|
459
470
|
|
460
|
-
command :unlock, unlock_desc, :
|
461
|
-
helper.
|
471
|
+
command :unlock, unlock_desc, [:range, :imageid_list] do
|
472
|
+
helper.perform_actions(args[0], options, 'Image unlocked') do |i|
|
462
473
|
i.unlock
|
463
474
|
end
|
464
475
|
end
|
@@ -484,7 +495,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
484
495
|
# Check user options
|
485
496
|
unless options[:datastore]
|
486
497
|
STDERR.puts 'Datastore to save the image is mandatory: '
|
487
|
-
STDERR.puts
|
498
|
+
STDERR.puts "\t -d datastore_id"
|
488
499
|
exit(-1)
|
489
500
|
end
|
490
501
|
|
data/bin/onemarket
CHANGED
@@ -26,14 +26,25 @@ else
|
|
26
26
|
GEMS_LOCATION = ONE_LOCATION + '/share/gems'
|
27
27
|
end
|
28
28
|
|
29
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
29
30
|
if File.directory?(GEMS_LOCATION)
|
30
31
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
31
32
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
32
33
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
33
|
-
|
34
|
-
|
34
|
+
|
35
|
+
# Suppress warnings from Rubygems
|
36
|
+
# https://github.com/OpenNebula/one/issues/5379
|
37
|
+
begin
|
38
|
+
verb = $VERBOSE
|
39
|
+
$VERBOSE = nil
|
40
|
+
require 'rubygems'
|
41
|
+
Gem.use_paths(real_gems_path)
|
42
|
+
ensure
|
43
|
+
$VERBOSE = verb
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
47
|
+
# %%RUBYGEMS_SETUP_END%%
|
37
48
|
|
38
49
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
39
50
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
data/bin/onemarketapp
CHANGED
@@ -28,14 +28,25 @@ else
|
|
28
28
|
VAR_LOCATION = ONE_LOCATION + '/var'
|
29
29
|
end
|
30
30
|
|
31
|
+
# %%RUBYGEMS_SETUP_BEGIN%%
|
31
32
|
if File.directory?(GEMS_LOCATION)
|
32
33
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
33
34
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
34
35
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
35
|
-
|
36
|
-
|
36
|
+
|
37
|
+
# Suppress warnings from Rubygems
|
38
|
+
# https://github.com/OpenNebula/one/issues/5379
|
39
|
+
begin
|
40
|
+
verb = $VERBOSE
|
41
|
+
$VERBOSE = nil
|
42
|
+
require 'rubygems'
|
43
|
+
Gem.use_paths(real_gems_path)
|
44
|
+
ensure
|
45
|
+
$VERBOSE = verb
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
49
|
+
# %%RUBYGEMS_SETUP_END%%
|
39
50
|
|
40
51
|
$LOAD_PATH << RUBY_LIB_LOCATION
|
41
52
|
$LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
|
@@ -45,9 +56,6 @@ require 'one_helper/onemarketapp_helper'
|
|
45
56
|
require 'one_helper/onemarket_helper'
|
46
57
|
require 'one_helper/onedatastore_helper'
|
47
58
|
|
48
|
-
require 'vcenter_driver'
|
49
|
-
CONFIG = VCenterConf.new
|
50
|
-
|
51
59
|
CommandParser::CmdParser.new(ARGV) do
|
52
60
|
usage '`onemarket` <command> [<args>] [<options>]'
|
53
61
|
version OpenNebulaHelper::ONE_VERSION
|
@@ -177,7 +185,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
177
185
|
OneMarketPlaceAppHelper::TEMPLATE_OPTIONS do
|
178
186
|
if options[:marketplace].nil?
|
179
187
|
STDERR.puts 'Marketplace to save the app is mandatory: '
|
180
|
-
STDERR.puts
|
188
|
+
STDERR.puts "\t -m marketplace_id"
|
181
189
|
exit(-1)
|
182
190
|
end
|
183
191
|
|
@@ -287,8 +295,7 @@ CommandParser::CmdParser.new(ARGV) do
|
|
287
295
|
:vmtemplate_name => options[:vmname],
|
288
296
|
:url_args => tag,
|
289
297
|
:notemplate => options[:no] == 'no',
|
290
|
-
:template => options[:template]
|
291
|
-
:default_template => CONFIG[:default_template]
|
298
|
+
:template => options[:template]
|
292
299
|
)
|
293
300
|
|
294
301
|
if OpenNebula.is_error?(rc)
|
@@ -442,11 +449,11 @@ CommandParser::CmdParser.new(ARGV) do
|
|
442
449
|
[Admin]: locks only Admin actions.
|
443
450
|
EOT
|
444
451
|
|
445
|
-
command :lock, lock_desc, :
|
452
|
+
command :lock, lock_desc, [:range, :appid_list],
|
446
453
|
:options => [USE, MANAGE, ADMIN, ALL] do
|
447
|
-
helper.
|
448
|
-
|
449
|
-
|
454
|
+
helper.perform_actions(args[0],
|
455
|
+
options,
|
456
|
+
'MarketPlaceApp locked') do |app|
|
450
457
|
if !options[:use].nil?
|
451
458
|
level = 1
|
452
459
|
elsif !options[:manage].nil?
|
@@ -467,10 +474,10 @@ CommandParser::CmdParser.new(ARGV) do
|
|
467
474
|
Valid states are: All.
|
468
475
|
EOT
|
469
476
|
|
470
|
-
command :unlock, unlock_desc, :
|
471
|
-
helper.
|
472
|
-
|
473
|
-
|
477
|
+
command :unlock, unlock_desc, [:range, :appid_list] do
|
478
|
+
helper.perform_actions(args[0],
|
479
|
+
options,
|
480
|
+
'MarketPlaceApp unlocked') do |app|
|
474
481
|
app.unlock
|
475
482
|
end
|
476
483
|
end
|