opennebula-cli 5.10.5 → 5.11.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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +2 -1
  3. data/bin/oneacl +2 -1
  4. data/bin/onecluster +2 -1
  5. data/bin/onedatastore +2 -1
  6. data/bin/oneflow +149 -551
  7. data/bin/oneflow-template +171 -292
  8. data/bin/onegroup +2 -1
  9. data/bin/onehook +2 -1
  10. data/bin/onehost +9 -9
  11. data/bin/oneimage +2 -1
  12. data/bin/onemarket +2 -1
  13. data/bin/onemarketapp +2 -1
  14. data/bin/onesecgroup +2 -1
  15. data/bin/oneshowback +2 -1
  16. data/bin/onetemplate +2 -1
  17. data/bin/oneuser +2 -1
  18. data/bin/onevcenter +2 -1
  19. data/bin/onevdc +2 -1
  20. data/bin/onevm +88 -16
  21. data/bin/onevmgroup +2 -1
  22. data/bin/onevnet +11 -3
  23. data/bin/onevntemplate +2 -1
  24. data/bin/onevrouter +2 -1
  25. data/bin/onezone +2 -1
  26. data/lib/cli_helper.rb +10 -4
  27. data/lib/command_parser.rb +32 -13
  28. data/lib/one_helper.rb +193 -2
  29. data/lib/one_helper/oneacct_helper.rb +1 -1
  30. data/lib/one_helper/oneacl_helper.rb +1 -1
  31. data/lib/one_helper/onecluster_helper.rb +1 -1
  32. data/lib/one_helper/onedatastore_helper.rb +1 -1
  33. data/lib/one_helper/oneflow_helper.rb +413 -0
  34. data/lib/one_helper/oneflowtemplate_helper.rb +306 -0
  35. data/lib/one_helper/onegroup_helper.rb +1 -1
  36. data/lib/one_helper/onehook_helper.rb +1 -1
  37. data/lib/one_helper/onehost_helper.rb +29 -27
  38. data/lib/one_helper/oneimage_helper.rb +2 -2
  39. data/lib/one_helper/onemarket_helper.rb +1 -1
  40. data/lib/one_helper/onemarketapp_helper.rb +1 -1
  41. data/lib/one_helper/oneprovision_helper.rb +104 -60
  42. data/lib/one_helper/onequota_helper.rb +1 -1
  43. data/lib/one_helper/onesecgroup_helper.rb +1 -1
  44. data/lib/one_helper/onetemplate_helper.rb +9 -180
  45. data/lib/one_helper/oneuser_helper.rb +1 -1
  46. data/lib/one_helper/onevcenter_helper.rb +2 -1
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +11 -6
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +1 -1
  51. data/lib/one_helper/onevntemplate_helper.rb +1 -1
  52. data/lib/one_helper/onevrouter_helper.rb +1 -1
  53. data/lib/one_helper/onezone_helper.rb +1 -1
  54. metadata +10 -8
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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,6 +30,7 @@ end
30
30
 
31
31
  if File.directory?(GEMS_LOCATION)
32
32
  Gem.use_paths(GEMS_LOCATION)
33
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
33
34
  end
34
35
 
35
36
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -77,13 +78,12 @@ CommandParser::CmdParser.new(ARGV) do
77
78
  :description => 'Force probe upgrade in onehost sync'
78
79
  }
79
80
 
80
- RSYNC = {
81
- :name => 'rsync',
82
- :large => '--rsync',
83
- :description => 'Use rsync to synchronize remotes. In case some '\
84
- 'probes are no longer in the fronted ithey will be '\
85
- 'deleted in the hosts. rsync command must be '\
86
- 'installed in the frontend and nodes.'
81
+ SSH = {
82
+ :name => 'ssh',
83
+ :large => '--ssh',
84
+ :description => 'Use SSH to synchronize remotes. In case some '\
85
+ 'probes are no longer in the fronted they will be '\
86
+ 'deleted in the hosts.'
87
87
  }
88
88
 
89
89
  TYPE = {
@@ -95,7 +95,7 @@ CommandParser::CmdParser.new(ARGV) do
95
95
  }
96
96
 
97
97
  CREAT_OPTIONS = [IM, VMM, OneClusterHelper::CLUSTER, TYPE]
98
- SYNC_OPTIONS = [OneClusterHelper::CLUSTER, FORCE, RSYNC]
98
+ SYNC_OPTIONS = [OneClusterHelper::CLUSTER, FORCE, SSH]
99
99
 
100
100
  ########################################################################
101
101
  # Formatters for arguments
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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,6 +30,7 @@ end
30
30
 
31
31
  if File.directory?(GEMS_LOCATION)
32
32
  Gem.use_paths(GEMS_LOCATION)
33
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
33
34
  end
34
35
 
35
36
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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,6 +30,7 @@ end
30
30
 
31
31
  if File.directory?(GEMS_LOCATION)
32
32
  Gem.use_paths(GEMS_LOCATION)
33
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
33
34
  end
34
35
 
35
36
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/onevdc CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
data/bin/onevm CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -927,6 +928,9 @@ CommandParser::CmdParser.new(ARGV) do
927
928
  OneVMHelper::HOURLY,
928
929
  OneVMHelper::END_TIME] do
929
930
  if !options[:schedule].nil?
931
+ # add name as an argument
932
+ options[:args] = args[1]
933
+
930
934
  helper.schedule_actions(args[0], options, @comm_name)
931
935
  else
932
936
  helper.perform_actions(args[0], options, 'snapshot created') do |o|
@@ -940,9 +944,22 @@ CommandParser::CmdParser.new(ARGV) do
940
944
  Reverts a VM to a saved snapshot
941
945
  EOT
942
946
 
943
- command :"snapshot-revert", snapshot_revert_desc, :vmid, :snapshot_id do
944
- helper.perform_action(args[0], options, 'snapshot reverted') do |o|
945
- o.snapshot_revert(args[1].to_i)
947
+ command :"snapshot-revert", snapshot_revert_desc, :vmid, :snapshot_id,
948
+ :options => [OneVMHelper::SCHEDULE,
949
+ OneVMHelper::WEEKLY,
950
+ OneVMHelper::MONTHLY,
951
+ OneVMHelper::YEARLY,
952
+ OneVMHelper::HOURLY,
953
+ OneVMHelper::END_TIME] do
954
+ if !options[:schedule].nil?
955
+ # add snap ID as an argument
956
+ options[:args] = args[1]
957
+
958
+ helper.schedule_actions([args[0]], options, @comm_name)
959
+ else
960
+ helper.perform_action(args[0], options, 'snapshot reverted') do |o|
961
+ o.snapshot_revert(args[1].to_i)
962
+ end
946
963
  end
947
964
  end
948
965
 
@@ -951,9 +968,22 @@ CommandParser::CmdParser.new(ARGV) do
951
968
  Delets a snapshot of a VM
952
969
  EOT
953
970
 
954
- command :"snapshot-delete", snapshot_delete_desc, :vmid, :snapshot_id do
955
- helper.perform_action(args[0], options, 'snapshot deleted') do |o|
956
- o.snapshot_delete(args[1])
971
+ command :"snapshot-delete", snapshot_delete_desc, :vmid, :snapshot_id,
972
+ :options => [OneVMHelper::SCHEDULE,
973
+ OneVMHelper::WEEKLY,
974
+ OneVMHelper::MONTHLY,
975
+ OneVMHelper::YEARLY,
976
+ OneVMHelper::HOURLY,
977
+ OneVMHelper::END_TIME] do
978
+ if !options[:schedule].nil?
979
+ # add snap ID as an argument
980
+ options[:args] = args[1]
981
+
982
+ helper.schedule_actions([args[0]], options, @comm_name)
983
+ else
984
+ helper.perform_action(args[0], options, 'snapshot deleted') do |o|
985
+ o.snapshot_delete(args[1])
986
+ end
957
987
  end
958
988
  end
959
989
 
@@ -965,9 +995,23 @@ CommandParser::CmdParser.new(ARGV) do
965
995
  EOT
966
996
 
967
997
  command :"disk-snapshot-create", disk_snapshot_create_desc,
968
- :vmid, :diskid, :name do
969
- helper.perform_action(args[0], options, 'disk snapshot created') do |o|
970
- o.disk_snapshot_create(args[1].to_i, args[2])
998
+ :vmid, :diskid, :name,
999
+ :options => [OneVMHelper::SCHEDULE,
1000
+ OneVMHelper::WEEKLY,
1001
+ OneVMHelper::MONTHLY,
1002
+ OneVMHelper::YEARLY,
1003
+ OneVMHelper::HOURLY,
1004
+ OneVMHelper::END_TIME] do
1005
+ if !options[:schedule].nil?
1006
+ # add disk ID and name as arguments
1007
+ options[:args] = "#{args[1]},#{args[2]}"
1008
+
1009
+ helper.schedule_actions([args[0]], options, @comm_name)
1010
+ else
1011
+ helper.perform_action(args[0], options,
1012
+ 'disk snapshot created') do |o|
1013
+ o.disk_snapshot_create(args[1].to_i, args[2])
1014
+ end
971
1015
  end
972
1016
  end
973
1017
 
@@ -978,9 +1022,23 @@ CommandParser::CmdParser.new(ARGV) do
978
1022
  EOT
979
1023
 
980
1024
  command :"disk-snapshot-revert", disk_snapshot_revert_desc,
981
- :vmid, :diskid, :disk_snapshot_id do
982
- helper.perform_action(args[0], options, 'disk snapshot reverted') do |o|
983
- o.disk_snapshot_revert(args[1].to_i, args[2].to_i)
1025
+ :vmid, :diskid, :disk_snapshot_id,
1026
+ :options => [OneVMHelper::SCHEDULE,
1027
+ OneVMHelper::WEEKLY,
1028
+ OneVMHelper::MONTHLY,
1029
+ OneVMHelper::YEARLY,
1030
+ OneVMHelper::HOURLY,
1031
+ OneVMHelper::END_TIME] do
1032
+ if !options[:schedule].nil?
1033
+ # add disk ID and snap ID as arguments
1034
+ options[:args] = "#{args[1]},#{args[2]}"
1035
+
1036
+ helper.schedule_actions([args[0]], options, @comm_name)
1037
+ else
1038
+ helper.perform_action(args[0], options,
1039
+ 'disk snapshot reverted') do |o|
1040
+ o.disk_snapshot_revert(args[1].to_i, args[2].to_i)
1041
+ end
984
1042
  end
985
1043
  end
986
1044
 
@@ -991,9 +1049,23 @@ CommandParser::CmdParser.new(ARGV) do
991
1049
  EOT
992
1050
 
993
1051
  command :"disk-snapshot-delete", disk_snapshot_delete_desc,
994
- :vmid, :diskid, :disk_snapshot_id do
995
- helper.perform_action(args[0], options, 'disk snapshot deleted') do |o|
996
- o.disk_snapshot_delete(args[1].to_i, args[2].to_i)
1052
+ :vmid, :diskid, :disk_snapshot_id,
1053
+ :options => [OneVMHelper::SCHEDULE,
1054
+ OneVMHelper::WEEKLY,
1055
+ OneVMHelper::MONTHLY,
1056
+ OneVMHelper::YEARLY,
1057
+ OneVMHelper::HOURLY,
1058
+ OneVMHelper::END_TIME] do
1059
+ if !options[:schedule].nil?
1060
+ # add disk ID and snap ID as arguments
1061
+ options[:args] = "#{args[1]},#{args[2]}"
1062
+
1063
+ helper.schedule_actions([args[0]], options, @comm_name)
1064
+ else
1065
+ helper.perform_action(args[0], options,
1066
+ 'disk snapshot deleted') do |o|
1067
+ o.disk_snapshot_delete(args[1].to_i, args[2].to_i)
1068
+ end
997
1069
  end
998
1070
  end
999
1071
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2019, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2020, 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 #
@@ -28,6 +28,7 @@ end
28
28
 
29
29
  if File.directory?(GEMS_LOCATION)
30
30
  Gem.use_paths(GEMS_LOCATION)
31
+ $LOAD_PATH.reject! {|l| l =~ /(vendor|site)_ruby/ }
31
32
  end
32
33
 
33
34
  $LOAD_PATH << RUBY_LIB_LOCATION
@@ -71,6 +72,13 @@ CommandParser::CmdParser.new(ARGV) do
71
72
  :description => 'lock all actions'
72
73
  }
73
74
 
75
+ FORCE = {
76
+ :name => 'force',
77
+ :large => '--force',
78
+ :description => 'Force execution of action, ' \
79
+ 'bypass the consistency checks'
80
+ }
81
+
74
82
  ########################################################################
75
83
  # Global Options
76
84
  ########################################################################
@@ -169,9 +177,9 @@ CommandParser::CmdParser.new(ARGV) do
169
177
  Removes an address range from the Virtual Network
170
178
  EOT
171
179
 
172
- command :rmar, rmar_desc, :vnetid, :ar_id do
180
+ command :rmar, rmar_desc, :vnetid, :ar_id, :options => FORCE do
173
181
  helper.perform_action(args[0], options, 'address range removed') do |vn|
174
- vn.rm_ar(args[1])
182
+ vn.rm_ar(args[1], options[:force] || false)
175
183
  end
176
184
  end
177
185