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.
- checksums.yaml +4 -4
- data/bin/oneacct +2 -1
- data/bin/oneacl +2 -1
- data/bin/onecluster +2 -1
- data/bin/onedatastore +2 -1
- data/bin/oneflow +149 -551
- data/bin/oneflow-template +171 -292
- data/bin/onegroup +2 -1
- data/bin/onehook +2 -1
- data/bin/onehost +9 -9
- data/bin/oneimage +2 -1
- data/bin/onemarket +2 -1
- data/bin/onemarketapp +2 -1
- data/bin/onesecgroup +2 -1
- data/bin/oneshowback +2 -1
- data/bin/onetemplate +2 -1
- data/bin/oneuser +2 -1
- data/bin/onevcenter +2 -1
- data/bin/onevdc +2 -1
- data/bin/onevm +88 -16
- data/bin/onevmgroup +2 -1
- data/bin/onevnet +11 -3
- data/bin/onevntemplate +2 -1
- data/bin/onevrouter +2 -1
- data/bin/onezone +2 -1
- data/lib/cli_helper.rb +10 -4
- data/lib/command_parser.rb +32 -13
- data/lib/one_helper.rb +193 -2
- data/lib/one_helper/oneacct_helper.rb +1 -1
- data/lib/one_helper/oneacl_helper.rb +1 -1
- data/lib/one_helper/onecluster_helper.rb +1 -1
- data/lib/one_helper/onedatastore_helper.rb +1 -1
- data/lib/one_helper/oneflow_helper.rb +413 -0
- data/lib/one_helper/oneflowtemplate_helper.rb +306 -0
- data/lib/one_helper/onegroup_helper.rb +1 -1
- data/lib/one_helper/onehook_helper.rb +1 -1
- data/lib/one_helper/onehost_helper.rb +29 -27
- data/lib/one_helper/oneimage_helper.rb +2 -2
- data/lib/one_helper/onemarket_helper.rb +1 -1
- data/lib/one_helper/onemarketapp_helper.rb +1 -1
- data/lib/one_helper/oneprovision_helper.rb +104 -60
- data/lib/one_helper/onequota_helper.rb +1 -1
- data/lib/one_helper/onesecgroup_helper.rb +1 -1
- data/lib/one_helper/onetemplate_helper.rb +9 -180
- data/lib/one_helper/oneuser_helper.rb +1 -1
- data/lib/one_helper/onevcenter_helper.rb +2 -1
- data/lib/one_helper/onevdc_helper.rb +1 -1
- data/lib/one_helper/onevm_helper.rb +11 -6
- data/lib/one_helper/onevmgroup_helper.rb +1 -1
- data/lib/one_helper/onevnet_helper.rb +1 -1
- data/lib/one_helper/onevntemplate_helper.rb +1 -1
- data/lib/one_helper/onevrouter_helper.rb +1 -1
- data/lib/one_helper/onezone_helper.rb +1 -1
- metadata +10 -8
data/bin/onegroup
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onehook
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onehost
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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
|
-
|
|
81
|
-
:name => '
|
|
82
|
-
:large => '--
|
|
83
|
-
:description => 'Use
|
|
84
|
-
'probes are no longer in the fronted
|
|
85
|
-
'deleted in the hosts.
|
|
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,
|
|
98
|
+
SYNC_OPTIONS = [OneClusterHelper::CLUSTER, FORCE, SSH]
|
|
99
99
|
|
|
100
100
|
########################################################################
|
|
101
101
|
# Formatters for arguments
|
data/bin/oneimage
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onemarket
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onemarketapp
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onesecgroup
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/oneshowback
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onetemplate
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/oneuser
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onevcenter
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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-
|
|
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-
|
|
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
|
|
944
|
-
|
|
945
|
-
|
|
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
|
|
955
|
-
|
|
956
|
-
|
|
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
|
|
969
|
-
|
|
970
|
-
|
|
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
|
|
982
|
-
|
|
983
|
-
|
|
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
|
|
995
|
-
|
|
996
|
-
|
|
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
|
|
data/bin/onevmgroup
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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/onevnet
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
# -------------------------------------------------------------------------- #
|
|
4
|
-
# Copyright 2002-
|
|
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
|
|