opennebula-cli 5.4.15 → 5.5.80.pre

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/NOTICE +1 -1
  3. data/bin/oneacct +3 -3
  4. data/bin/oneacl +2 -2
  5. data/bin/onecluster +1 -1
  6. data/bin/onedatastore +1 -1
  7. data/bin/oneflow +1 -1
  8. data/bin/oneflow-template +1 -1
  9. data/bin/onegroup +1 -1
  10. data/bin/onehost +1 -1
  11. data/bin/oneimage +64 -1
  12. data/bin/onemarket +1 -1
  13. data/bin/onemarketapp +65 -2
  14. data/bin/onesecgroup +1 -1
  15. data/bin/oneshowback +2 -2
  16. data/bin/onetemplate +66 -3
  17. data/bin/oneuser +3 -3
  18. data/bin/onevcenter +95 -86
  19. data/bin/onevdc +1 -1
  20. data/bin/onevm +75 -11
  21. data/bin/onevmgroup +64 -1
  22. data/bin/onevnet +64 -1
  23. data/bin/onevrouter +64 -1
  24. data/bin/onezone +1 -1
  25. data/lib/cli_helper.rb +1 -1
  26. data/lib/command_parser.rb +9 -1
  27. data/lib/one_helper/oneacct_helper.rb +22 -18
  28. data/lib/one_helper/oneacl_helper.rb +1 -1
  29. data/lib/one_helper/onecluster_helper.rb +1 -1
  30. data/lib/one_helper/onedatastore_helper.rb +1 -1
  31. data/lib/one_helper/onegroup_helper.rb +1 -1
  32. data/lib/one_helper/onehost_helper.rb +32 -6
  33. data/lib/one_helper/oneimage_helper.rb +2 -1
  34. data/lib/one_helper/onemarket_helper.rb +1 -1
  35. data/lib/one_helper/onemarketapp_helper.rb +2 -1
  36. data/lib/one_helper/onequota_helper.rb +1 -1
  37. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  38. data/lib/one_helper/onetemplate_helper.rb +2 -1
  39. data/lib/one_helper/oneuser_helper.rb +13 -1
  40. data/lib/one_helper/onevcenter_helper.rb +425 -0
  41. data/lib/one_helper/onevdc_helper.rb +5 -5
  42. data/lib/one_helper/onevm_helper.rb +100 -2
  43. data/lib/one_helper/onevmgroup_helper.rb +14 -9
  44. data/lib/one_helper/onevnet_helper.rb +7 -3
  45. data/lib/one_helper/onevrouter_helper.rb +2 -1
  46. data/lib/one_helper/onezone_helper.rb +22 -39
  47. data/lib/one_helper.rb +64 -8
  48. metadata +7 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25d7ebc8cd5dc0d4b4c63bdf1099a5c0c3a3a423
4
- data.tar.gz: 581ab03aa5009c58fd9ace4131816a7e2046fd67
3
+ metadata.gz: fc41f8f8df8ba4974563f1d788b8fa0e69ce4617
4
+ data.tar.gz: 31e9809c019b480988762595668062132560b0cc
5
5
  SHA512:
6
- metadata.gz: 5c7fccdb857113420f1f58803118d68546861748fd62c8ea8b531edad10b7a3c3507c96ee111851a51c87dcd35b538cd63b27574104bbd745560ebeb519cdfbe
7
- data.tar.gz: c2911cea6a58f5fa56afcc0134c615a805def6cd40b789a2d2d8d5b4c76b357505c4bffda20bd1e9ed9c0de12b6a4e91894169edb8211e8fffced0ba3f97594c
6
+ metadata.gz: 53b2984f595372db08abf082ebd17108e6a276fcf9471ed06be843982714f0b8b30acf9550e0ff7e451e80072ee31013f9c893f80b78e9e7c5692166b9e2f665
7
+ data.tar.gz: 4162550f47afd3a4995577a34f6a6d0ae4d3a5b4bb7852a842e5a29e54cb50bf45f2d720df04f95e185ff1464b00ff19ef73008e4090bf9c73a98b80a7138271
data/NOTICE CHANGED
@@ -1,6 +1,6 @@
1
1
  OpenNebula Open Source Project
2
2
  --------------------------------------------------------------------------------
3
- Copyright 2002-2016, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
3
+ Copyright 2002-2018, 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-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -32,7 +32,7 @@ require 'one_helper/oneacct_helper'
32
32
 
33
33
  require 'json'
34
34
 
35
- cmd = CommandParser::CmdParser.new(ARGV) do
35
+ cmd=CommandParser::CmdParser.new(ARGV) do
36
36
  usage "`oneacct` [<options>]"
37
37
  description ""
38
38
  version OpenNebulaHelper::ONE_VERSION
@@ -154,4 +154,4 @@ cmd = CommandParser::CmdParser.new(ARGV) do
154
154
  exit_code 0
155
155
  end
156
156
  end
157
- end
157
+ end
data/bin/oneacl CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -30,7 +30,7 @@ $: << RUBY_LIB_LOCATION+"/cli"
30
30
  require 'command_parser'
31
31
  require 'one_helper/oneacl_helper'
32
32
 
33
- cmd = CommandParser::CmdParser.new(ARGV) do
33
+ cmd=CommandParser::CmdParser.new(ARGV) do
34
34
  usage "`oneacl` <command> [<args>] [<options>]"
35
35
  version OpenNebulaHelper::ONE_VERSION
36
36
 
data/bin/onecluster CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/onedatastore CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/oneflow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/oneflow-template CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/onegroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/onehost CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/oneimage CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -41,6 +41,30 @@ cmd=CommandParser::CmdParser.new(ARGV) do
41
41
  helper.set_client(options)
42
42
  end
43
43
 
44
+ USE={
45
+ :name => "use",
46
+ :large => "--use",
47
+ :description => "lock use actions"
48
+ }
49
+
50
+ MANAGE={
51
+ :name => "manage",
52
+ :large => "--manage",
53
+ :description => "lock manage actions"
54
+ }
55
+
56
+ ADMIN={
57
+ :name => "admin",
58
+ :large => "--admin",
59
+ :description => "lock admin actions"
60
+ }
61
+
62
+ ALL={
63
+ :name => "all",
64
+ :large => "--all",
65
+ :description => "lock all actions"
66
+ }
67
+
44
68
  ########################################################################
45
69
  # Global Options
46
70
  ########################################################################
@@ -357,4 +381,43 @@ cmd=CommandParser::CmdParser.new(ARGV) do
357
381
  command :top, top_desc, [:filterflag, nil], :options=>list_options do
358
382
  helper.list_pool(options, true, args[0])
359
383
  end
384
+
385
+ lock_desc = <<-EOT.unindent
386
+ Locks a VM with differents levels for lock any actions with this VM, show and
387
+ monitoring never will be locked.
388
+ Valid states are: All.
389
+ Levels:
390
+ [Use]: locks Admin, Manage and Use actions.
391
+ [Manage]: locks Manage and Use actions.
392
+ [Admin]: locks only Admin actions.
393
+ EOT
394
+
395
+ command :lock, lock_desc, :imageid,
396
+ :options => [USE, MANAGE, ADMIN, ALL] do
397
+ helper.perform_action(args[0],options,"Image locked") do |i|
398
+ if !options[:use].nil?
399
+ level = 1
400
+ elsif !options[:manage].nil?
401
+ level = 2
402
+ elsif !options[:admin].nil?
403
+ level = 3
404
+ elsif !options[:all].nil?
405
+ level = 4
406
+ else
407
+ level = 1
408
+ end
409
+ i.lock(level)
410
+ end
411
+ end
412
+
413
+ unlock_desc = <<-EOT.unindent
414
+ Unlocks a VM for unlock any actions with this VM.
415
+ Valid states are: All.
416
+ EOT
417
+
418
+ command :unlock, unlock_desc, :imageid do
419
+ helper.perform_action(args[0],options,"Image unlocked") do |i|
420
+ i.unlock
421
+ end
422
+ end
360
423
  end
data/bin/onemarket CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/onemarketapp CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -34,7 +34,7 @@ require 'one_helper/onemarketapp_helper'
34
34
  require 'one_helper/onemarket_helper'
35
35
  require 'one_helper/onedatastore_helper'
36
36
 
37
- CommandParser::CmdParser.new(ARGV) do
37
+ cmd=CommandParser::CmdParser.new(ARGV) do
38
38
  usage "`onemarket` <command> [<args>] [<options>]"
39
39
  version OpenNebulaHelper::ONE_VERSION
40
40
 
@@ -44,6 +44,30 @@ CommandParser::CmdParser.new(ARGV) do
44
44
  helper.set_client(options)
45
45
  end
46
46
 
47
+ USE={
48
+ :name => "use",
49
+ :large => "--use",
50
+ :description => "lock use actions"
51
+ }
52
+
53
+ MANAGE={
54
+ :name => "manage",
55
+ :large => "--manage",
56
+ :description => "lock manage actions"
57
+ }
58
+
59
+ ADMIN={
60
+ :name => "admin",
61
+ :large => "--admin",
62
+ :description => "lock admin actions"
63
+ }
64
+
65
+ ALL={
66
+ :name => "all",
67
+ :large => "--all",
68
+ :description => "lock all actions"
69
+ }
70
+
47
71
  ########################################################################
48
72
  # Global Options
49
73
  ########################################################################
@@ -279,4 +303,43 @@ CommandParser::CmdParser.new(ARGV) do
279
303
  obj.disable
280
304
  end
281
305
  end
306
+
307
+ lock_desc = <<-EOT.unindent
308
+ Locks a VM with differents levels for lock any actions with this VM, show and
309
+ monitoring never will be locked.
310
+ Valid states are: All.
311
+ Levels:
312
+ [Use]: locks Admin, Manage and Use actions.
313
+ [Manage]: locks Manage and Use actions.
314
+ [Admin]: locks only Admin actions.
315
+ EOT
316
+
317
+ command :lock, lock_desc, :appid,
318
+ :options => [USE, MANAGE, ADMIN, ALL] do
319
+ helper.perform_action(args[0],options,"MarketPlaceApp locked") do |app|
320
+ if !options[:use].nil?
321
+ level = 1
322
+ elsif !options[:manage].nil?
323
+ level = 2
324
+ elsif !options[:admin].nil?
325
+ level = 3
326
+ elsif !options[:all].nil?
327
+ level = 4
328
+ else
329
+ level = 1
330
+ end
331
+ app.lock(level)
332
+ end
333
+ end
334
+
335
+ unlock_desc = <<-EOT.unindent
336
+ Unlocks a VM for unlock any actions with this VM.
337
+ Valid states are: All.
338
+ EOT
339
+
340
+ command :unlock, unlock_desc, :appid do
341
+ helper.perform_action(args[0],options,"MarketPlaceApp unlocked") do |app|
342
+ app.unlock
343
+ end
344
+ end
282
345
  end
data/bin/onesecgroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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/oneshowback CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -32,7 +32,7 @@ require 'one_helper/oneacct_helper'
32
32
 
33
33
  require 'json'
34
34
 
35
- cmd = CommandParser::CmdParser.new(ARGV) do
35
+ cmd=CommandParser::CmdParser.new(ARGV) do
36
36
 
37
37
  @formats = Hash.new
38
38
 
data/bin/onetemplate CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -41,6 +41,30 @@ cmd=CommandParser::CmdParser.new(ARGV) do
41
41
  helper.set_client(options)
42
42
  end
43
43
 
44
+ USE={
45
+ :name => "use",
46
+ :large => "--use",
47
+ :description => "lock use actions"
48
+ }
49
+
50
+ MANAGE={
51
+ :name => "manage",
52
+ :large => "--manage",
53
+ :description => "lock manage actions"
54
+ }
55
+
56
+ ADMIN={
57
+ :name => "admin",
58
+ :large => "--admin",
59
+ :description => "lock admin actions"
60
+ }
61
+
62
+ ALL={
63
+ :name => "all",
64
+ :large => "--all",
65
+ :description => "lock all actions"
66
+ }
67
+
44
68
  ########################################################################
45
69
  # Global Options
46
70
  ########################################################################
@@ -101,8 +125,8 @@ cmd=CommandParser::CmdParser.new(ARGV) do
101
125
 
102
126
  - using two disks:
103
127
 
104
- onetempate create --name "test vm" --memory 128 --cpu 1 \\
105
- --disk arch,data
128
+ onetemplate create --name "test vm" --memory 128 --cpu 1 \\
129
+ --disk arch,data
106
130
 
107
131
  EOT
108
132
 
@@ -341,4 +365,43 @@ cmd=CommandParser::CmdParser.new(ARGV) do
341
365
  command :top, top_desc, [:filterflag, nil], :options=>list_options do
342
366
  helper.list_pool(options, true, args[0])
343
367
  end
368
+
369
+ lock_desc = <<-EOT.unindent
370
+ Locks a VM with differents levels for lock any actions with this VM, show and
371
+ monitoring never will be locked.
372
+ Valid states are: All.
373
+ Levels:
374
+ [Use]: locks Admin, Manage and Use actions.
375
+ [Manage]: locks Manage and Use actions.
376
+ [Admin]: locks only Admin actions.
377
+ EOT
378
+
379
+ command :lock, lock_desc, :templateid,
380
+ :options => [USE, MANAGE, ADMIN, ALL] do
381
+ helper.perform_action(args[0],options,"Template locked") do |t|
382
+ if !options[:use].nil?
383
+ level = 1
384
+ elsif !options[:manage].nil?
385
+ level = 2
386
+ elsif !options[:admin].nil?
387
+ level = 3
388
+ elsif !options[:all].nil?
389
+ level = 4
390
+ else
391
+ level = 1
392
+ end
393
+ t.lock(level)
394
+ end
395
+ end
396
+
397
+ unlock_desc = <<-EOT.unindent
398
+ Unlocks a VM for unlock any actions with this VM.
399
+ Valid states are: All.
400
+ EOT
401
+
402
+ command :unlock, unlock_desc, :templateid do
403
+ helper.perform_action(args[0],options,"Template unlocked") do |t|
404
+ t.unlock
405
+ end
406
+ end
344
407
  end
data/bin/oneuser CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2017, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2018, 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 #
@@ -33,7 +33,7 @@ require 'one_helper/onequota_helper'
33
33
 
34
34
  require 'uri'
35
35
 
36
- cmd = CommandParser::CmdParser.new(ARGV) do
36
+ cmd=CommandParser::CmdParser.new(ARGV) do
37
37
  usage "`oneuser` <command> [<args>] [<options>]"
38
38
  version OpenNebulaHelper::ONE_VERSION
39
39
 
@@ -449,7 +449,7 @@ cmd = CommandParser::CmdParser.new(ARGV) do
449
449
  Changes the given User's password
450
450
  EOT
451
451
 
452
- command :passwd, passwd_desc, :userid, [:password, nil],
452
+ command :passwd, passwd_desc, [:userid], [:password, nil],
453
453
  :options=>auth_options do
454
454
  if args[1]
455
455
  pass = args[1]