opennebula-cli 6.3.80.pre → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/bin/oneacct +1 -1
  3. data/bin/oneacl +1 -1
  4. data/bin/onecluster +1 -1
  5. data/bin/onedatastore +1 -1
  6. data/bin/oneflow +24 -1
  7. data/bin/oneflow-template +1 -1
  8. data/bin/onegroup +1 -1
  9. data/bin/onehook +1 -1
  10. data/bin/onehost +1 -1
  11. data/bin/oneimage +1 -1
  12. data/bin/oneirb +131 -0
  13. data/bin/onelog +101 -0
  14. data/bin/onemarket +1 -1
  15. data/bin/onemarketapp +1 -1
  16. data/bin/onesecgroup +1 -1
  17. data/bin/oneshowback +1 -1
  18. data/bin/onetemplate +1 -1
  19. data/bin/oneuser +2 -2
  20. data/bin/onevcenter +1 -1
  21. data/bin/onevdc +1 -1
  22. data/bin/onevm +35 -1
  23. data/bin/onevmgroup +1 -1
  24. data/bin/onevnet +58 -1
  25. data/bin/onevntemplate +1 -1
  26. data/bin/onevrouter +1 -1
  27. data/bin/onezone +1 -1
  28. data/lib/cli_helper.rb +10 -2
  29. data/lib/command_parser.rb +1 -1
  30. data/lib/one_helper/oneacct_helper.rb +1 -1
  31. data/lib/one_helper/oneacl_helper.rb +1 -1
  32. data/lib/one_helper/onecluster_helper.rb +1 -1
  33. data/lib/one_helper/onedatastore_helper.rb +1 -1
  34. data/lib/one_helper/oneflow_helper.rb +1 -1
  35. data/lib/one_helper/oneflowtemplate_helper.rb +35 -28
  36. data/lib/one_helper/onegroup_helper.rb +1 -1
  37. data/lib/one_helper/onehook_helper.rb +1 -1
  38. data/lib/one_helper/onehost_helper.rb +1 -1
  39. data/lib/one_helper/oneimage_helper.rb +1 -1
  40. data/lib/one_helper/onemarket_helper.rb +1 -1
  41. data/lib/one_helper/onemarketapp_helper.rb +1 -1
  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 +1 -1
  45. data/lib/one_helper/oneuser_helper.rb +1 -1
  46. data/lib/one_helper/onevcenter_helper.rb +1 -1
  47. data/lib/one_helper/onevdc_helper.rb +1 -1
  48. data/lib/one_helper/onevm_helper.rb +1 -1
  49. data/lib/one_helper/onevmgroup_helper.rb +1 -1
  50. data/lib/one_helper/onevnet_helper.rb +15 -2
  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. data/lib/one_helper.rb +2 -2
  55. data/share/schemas/xsd/vnet.xsd +2 -0
  56. data/share/schemas/xsd/vnet_pool.xsd +2 -0
  57. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a1350ce7a3d5d9d6e1b7ffb16f51eaecdf01cd397fa8d1bb0fb87f08b5c0fc4
4
- data.tar.gz: fb950f30366562c94cd865adffeae41d7442cf70e20a7ab035c8a40cbb6aec3e
3
+ metadata.gz: 56b346315b2634a821c776148d1e7e01aa05adfcdb3b4a2e367cae4a29b26857
4
+ data.tar.gz: 7046877fa9eb556c11b1dc21bcb27576ed801cb0e8ed6f55c50c3a6b72579ee2
5
5
  SHA512:
6
- metadata.gz: c5d582717725a0da69269abe94e4fb07f429ac58286116a3bf165833c9e894505370fbaf4ca2b7d3d9ebfe26c2c927d8e4a1848c014db13c45550c0d1af9ec8a
7
- data.tar.gz: 34127cec5cc3eaf71dc8e4dc479a05d3f5f0760b99725f99c0155a37986d7477ec3879298d11153d79559c091075f698d04145b2d35d86898d63e85aeb017a6a
6
+ metadata.gz: 3fc21ffc004d6e90f856f49b58164318b365653839009225b77d6074004f24da92d495d6f71669130c47b75648f744e31ae7ff412634198990ff7ec537856203
7
+ data.tar.gz: 1dc9aef9254b2ef752a9adea4c98f55aec7537842cd62f6fe88f3c8b09a89d0c38f6c2218af2d582e800fe7cc920672316d656e9543ab6d29b77a38c65704d95
data/bin/oneacct CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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 #
@@ -521,4 +521,27 @@ CommandParser::CmdParser.new(ARGV) do
521
521
  0
522
522
  end
523
523
  end
524
+
525
+ ###
526
+
527
+ release_desc = <<-EOT.unindent
528
+ Release roles of a service on hold
529
+ EOT
530
+
531
+ command :release, release_desc, :service_id do
532
+ service_id = args[0]
533
+ client = helper.client(options)
534
+
535
+ params = {}
536
+ json = Service.build_json_action('release', params)
537
+
538
+ response = client.post("#{RESOURCE_PATH}/#{service_id}/action",
539
+ json)
540
+
541
+ if CloudClient.is_error?(response)
542
+ [response.code.to_i, response.to_s]
543
+ else
544
+ 0
545
+ end
546
+ end
524
547
  end
data/bin/oneflow-template CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onehook CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/oneirb ADDED
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # -------------------------------------------------------------------------- #
4
+ # Copyright 2002-2022, 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
+ GEMS_LOCATION = '/usr/share/one/gems'
24
+ else
25
+ RUBY_LIB_LOCATION = ONE_LOCATION + '/lib/ruby'
26
+ GEMS_LOCATION = ONE_LOCATION + '/share/gems'
27
+ end
28
+
29
+ # %%RUBYGEMS_SETUP_BEGIN%%
30
+ if File.directory?(GEMS_LOCATION)
31
+ real_gems_path = File.realpath(GEMS_LOCATION)
32
+ if !defined?(Gem) || Gem.path != [real_gems_path]
33
+ $LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
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
45
+ end
46
+ end
47
+ # %%RUBYGEMS_SETUP_END%%
48
+
49
+ $LOAD_PATH << RUBY_LIB_LOCATION
50
+ $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
51
+ $LOAD_PATH << RUBY_LIB_LOCATION + '/oneflow/lib'
52
+
53
+ ################################################################################
54
+ # Required libraries
55
+ ################################################################################
56
+
57
+ require 'base64'
58
+ require 'csv'
59
+ require 'date'
60
+ require 'digest/md5'
61
+ require 'erb'
62
+ require 'json'
63
+ require 'nokogiri'
64
+ require 'openssl'
65
+ require 'ox'
66
+ require 'pp'
67
+ require 'set'
68
+ require 'socket'
69
+ require 'sqlite3'
70
+ require 'tempfile'
71
+ require 'time'
72
+ require 'uri'
73
+ require 'yaml'
74
+
75
+ require 'opennebula'
76
+ require 'vcenter_driver'
77
+
78
+ # Include OpenNebula to avoid having to use OpenNebula:: namespace
79
+ include OpenNebula
80
+
81
+ ################################################################################
82
+ # vCenter helper functions
83
+ ################################################################################
84
+
85
+ # Get VIClient object from host
86
+ #
87
+ # @param id [Integer] Host ID
88
+ def vi_client_host(id)
89
+ VCenterDriver::VIClient.new_from_host(id)
90
+ end
91
+
92
+ # Get VM vCenter object
93
+ #
94
+ # @param id [Integer] VM ID
95
+ def vm(id)
96
+ one_vm = VCenterDriver::VIHelper.one_item(OpenNebula::VirtualMachine, id)
97
+
98
+ did = one_vm['DEPLOY_ID']
99
+ hid = one_vm.retrieve_xmlelements(
100
+ 'HISTORY_RECORDS/HISTORY/HID'
101
+ ).last.text.to_i
102
+
103
+ VCenterDriver::VirtualMachine.new_one(vi_client_host(hid), did, one_vm)
104
+ end
105
+
106
+ # Get host vCenter object
107
+ #
108
+ # @param id [Integer] Host ID
109
+ def host(id)
110
+ vi_client = vi_client_host(id)
111
+ one_h = VCenterDriver::VIHelper.one_item(OpenNebula::Host, hid)
112
+
113
+ VCenterDriver::ClusterComputeResource.new_from_ref(
114
+ one_h['TEMPLATE/VCENTER_CCR_REF'],
115
+ vi_client
116
+ )
117
+ end
118
+
119
+ ################################################################################
120
+ # Open irb session
121
+ ################################################################################
122
+
123
+ puts '* You can use the function vi_client_host(id) to get vCenter client'
124
+ puts '* You can use the function vm(id) to get vCenter VM'
125
+ puts '* You can use the function host(id) to get vCenter host'
126
+
127
+ @client = Client.new
128
+ version = '>= 0'
129
+
130
+ gem 'pry', version
131
+ load Gem.bin_path('pry', 'pry', version)
data/bin/onelog ADDED
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # -------------------------------------------------------------------------- #
4
+ # Copyright 2002-2022, 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
+ $LOAD_PATH << RUBY_LIB_LOCATION
28
+ $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
29
+
30
+ # Default pager to check logs
31
+ DEFAULT_PAGER = 'less'
32
+
33
+ # List of OpenNebula services and the logs files
34
+ SERVICES = {
35
+ 'fireedge' => { :log => 'fireedge.log', :error => 'fireedge.error' },
36
+ 'monitor' => 'monitor.log',
37
+ 'novnc' => 'novnc.log',
38
+ 'oned' => 'oned.log',
39
+ 'onehem' => { :log => 'onehem.log', :error => 'onehem.error' },
40
+ 'sched' => 'sched.log',
41
+ 'sunstone' => { :log => 'sunstone.log', :error => 'sunstone.error' },
42
+ 'vcenter' => 'vcenter_monitor.log'
43
+ }
44
+
45
+ require 'command_parser'
46
+ require 'one_helper'
47
+
48
+ CommandParser::CmdParser.new(ARGV) do
49
+ usage '`onelog` <command> [<args>] [<options>]'
50
+ version OpenNebulaHelper::ONE_VERSION
51
+
52
+ TYPE = {
53
+ :name => 'type',
54
+ :short => '-t type',
55
+ :large => '--type type',
56
+ :format => String,
57
+ :description => 'Log type (log/error) [default: log]'
58
+ }
59
+
60
+ PAGER = {
61
+ :name => 'pager',
62
+ :short => '-p pager',
63
+ :large => '--pager pager',
64
+ :format => String,
65
+ :description => 'Pager to use to read logs [defaul: less]'
66
+ }
67
+
68
+ PAGER_OPTS = {
69
+ :name => 'pager_opts',
70
+ :large => '--pager-opts pager_opts',
71
+ :format => String,
72
+ :description => 'Pager options'
73
+ }
74
+
75
+ get_desc = <<-EOT.unindent
76
+ Gets log from an specific OpenNebula service
77
+ EOT
78
+
79
+ command :get, get_desc, :service, :options => [TYPE, PAGER, PAGER_OPTS] do
80
+ unless SERVICES[args[0]]
81
+ STDERR.puts "Service '#{args[0]}' not found"
82
+ exit 1
83
+ end
84
+
85
+ if options[:type] && !SERVICES[args[0]][options[:type].to_sym]
86
+ STDERR.puts "Log file type '#{options[:type]}' not found"
87
+ exit 1
88
+ end
89
+
90
+ if (SERVICES[args[0]].is_a? Hash) && !options[:type]
91
+ options[:type] = :log
92
+ end
93
+
94
+ type = options[:type].to_sym
95
+ pager = options[:pager] || DEFAULT_PAGER
96
+
97
+ type.nil? ? file = SERVICES[args[0]] : file = SERVICES[args[0]][type]
98
+
99
+ system("#{pager} #{options[:pager_opts]} /var/log/one/#{file}")
100
+ end
101
+ end
data/bin/onemarket CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onesecgroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onetemplate CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/oneuser CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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 #
@@ -443,7 +443,7 @@ CommandParser::CmdParser.new(ARGV) do
443
443
  command :key, key_desc, :options => [KEY] do
444
444
  require 'opennebula/ssh_auth'
445
445
 
446
- options[:key] ||= ENV['HOME'] + '/.ssh/id_rsa'
446
+ options[:key] ||= Dir.home + '/.ssh/id_rsa'
447
447
 
448
448
  begin
449
449
  sshauth = SshAuth.new(:private_key => options[:key])
data/bin/onevcenter CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onevdc CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onevm CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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 #
@@ -49,6 +49,9 @@ end
49
49
  $LOAD_PATH << RUBY_LIB_LOCATION
50
50
  $LOAD_PATH << RUBY_LIB_LOCATION + '/cli'
51
51
 
52
+ # Default VNC viewer
53
+ DEFAULT_VNC = 'vinagre'
54
+
52
55
  require 'command_parser'
53
56
  require 'one_helper/onevm_helper'
54
57
  require 'one_helper/onedatastore_helper'
@@ -239,6 +242,13 @@ CommandParser::CmdParser.new(ARGV) do
239
242
  :description => 'SSH options to use'
240
243
  }
241
244
 
245
+ VNC = {
246
+ :name => 'vnc',
247
+ :large => '--vnc vnc',
248
+ :format => String,
249
+ :description => 'VNC client to use'
250
+ }
251
+
242
252
  OpenNebulaHelper::TEMPLATE_OPTIONS_VM.delete_if do |v|
243
253
  %w[as_gid as_uid].include?(v[:name])
244
254
  end
@@ -1666,6 +1676,30 @@ CommandParser::CmdParser.new(ARGV) do
1666
1676
  end
1667
1677
  end
1668
1678
 
1679
+ connect_desc = <<-EOT.unindent
1680
+ Opens a VNC session to the VM
1681
+ EOT
1682
+
1683
+ command :vnc, connect_desc, :vmid, :options => [VNC] do
1684
+ helper.perform_action(args[0], options, 'VNC') do |vm|
1685
+ rc = vm.info
1686
+
1687
+ if OpenNebula.is_error?(rc)
1688
+ STDERR.puts rc.message
1689
+ exit(1)
1690
+ end
1691
+
1692
+ host = vm['HISTORY_RECORDS/HISTORY[last()]/HOSTNAME']
1693
+ port = vm['TEMPLATE/GRAPHICS/PORT']
1694
+
1695
+ vncviewer = options['vnc'] || DEFAULT_VNC
1696
+
1697
+ cmd = [vncviewer, "#{host}::#{port}"]
1698
+
1699
+ exec(*cmd)
1700
+ end
1701
+ end
1702
+
1669
1703
  # Deprecated commands
1670
1704
 
1671
1705
  deprecated_command(:shutdown, 'terminate')
data/bin/onevmgroup CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onevnet CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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 #
@@ -94,6 +94,26 @@ CommandParser::CmdParser.new(ARGV) do
94
94
  'bypass the consistency checks'
95
95
  }
96
96
 
97
+ SUCCESS = {
98
+ :name => 'success',
99
+ :large => '--success',
100
+ :description => 'Recover a Virtual Network by succeeding ' \
101
+ 'the pending action'
102
+ }
103
+
104
+ FAILURE = {
105
+ :name => 'failure',
106
+ :large => '--failure',
107
+ :description => 'Recover a Virtual Network by failing ' \
108
+ 'the pending action'
109
+ }
110
+
111
+ DELETE = {
112
+ :name => 'delete',
113
+ :large => '--delete',
114
+ :description => 'No recover action possible, delete the Virtual Network'
115
+ }
116
+
97
117
  ########################################################################
98
118
  # Global Options
99
119
  ########################################################################
@@ -428,4 +448,41 @@ CommandParser::CmdParser.new(ARGV) do
428
448
 
429
449
  return 0
430
450
  end
451
+
452
+ recover_desc = <<-EOT.unindent
453
+ Recovers a Virtual Network in ERROR state or waiting for a driver operation
454
+ to complete.
455
+ The recovery may be done by failing, succeeding or retrying the current operation.
456
+ YOU NEED TO MANUALLY CHECK THE VN STATUS, to decide if the
457
+ operation was successful or not, or if it can be retried.
458
+
459
+ States for success/failure recovers: LOCK_CREATE, LOCK_DELETE state.
460
+ States for a retry recover: LOCK_CREATE, LOCK_DELETE state
461
+ States for delete: Any but READY
462
+ EOT
463
+
464
+ command :recover, recover_desc, [:range, :vmid_list],
465
+ :options => [SUCCESS, FAILURE, DELETE] do
466
+ if !options[:success].nil?
467
+ result = 1
468
+ elsif !options[:failure].nil?
469
+ result = 0
470
+ elsif !options[:delete].nil?
471
+ result = 2
472
+ else
473
+ error_message = <<-EOT.unindent
474
+ Need to specify the result of the pending action.
475
+ \t--success recover the VN by succeeding the missing action.
476
+ \t--failure recover the VN by failing the missing action.
477
+ \t--delete no recover possible, delete the VN.
478
+ EOT
479
+
480
+ STDERR.puts error_message
481
+ exit(-1)
482
+ end
483
+
484
+ helper.perform_actions(args[0], options, 'recovering') do |vn|
485
+ vn.recover(result)
486
+ end
487
+ end
431
488
  end
data/bin/onevntemplate CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onevrouter CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/onezone CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  # -------------------------------------------------------------------------- #
4
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
4
+ # Copyright 2002-2022, 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/lib/cli_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -188,9 +188,17 @@ module CLIHelper
188
188
  error
189
189
  ERROR
190
190
  FAILED_DEPLOYING
191
+ FAILED_DEPLOYING_NETS
191
192
  FAILED_UNDEPLOYING
193
+ FAILED_UNDEPLOYING_NETS
192
194
  FAILED_SCALING]
193
- REGULAR_STATES = %w[PENDING DEPLOYING CONFIGURING WARNING]
195
+ REGULAR_STATES = %w[PENDING
196
+ DEPLOYING
197
+ DEPLOYING_NETS
198
+ UNDEPLOYING
199
+ UNDEPLOYING_NETS
200
+ CONFIGURING
201
+ WARNING]
194
202
 
195
203
  # Set state color
196
204
  #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -221,16 +221,14 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
221
221
  exit(-1)
222
222
  end
223
223
 
224
- mandatory, _type, description, _params, initial = input_cfg
225
-
226
- vnet = {}
224
+ vnet = {}
225
+ mandatory, _, description, _, initial = input_cfg
227
226
 
228
227
  if initial && !initial.empty?
229
228
  type, resource_id, extra = initial.split(':', -1)
230
229
  end
231
230
 
232
- if (type.nil? || resource_id.nil?) &&
233
- (initial && !initial.empty?)
231
+ if (!type || !resource_id) && (initial && !initial.empty?)
234
232
  STDERR.puts 'Wrong type for user input default value:'
235
233
  STDERR.puts " #{key}: #{val}"
236
234
  exit(-1)
@@ -239,7 +237,7 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
239
237
  vnet[key] = {}
240
238
 
241
239
  if get_defaults
242
- vnet[key][type] = resource_id
240
+ vnet[key][type] = resource_id
243
241
  vnet[key]['extra'] = extra
244
242
 
245
243
  answers << vnet unless mandatory == 'M'
@@ -248,22 +246,25 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
248
246
 
249
247
  puts " * (#{key}) #{description}"
250
248
 
251
- #######################################
252
- # Asks for type
253
- #######################################
254
-
255
- header = ' '
249
+ ####################################################################
250
+ # Ask for type
251
+ ####################################################################
252
+ header = ' '
256
253
  header += 'TYPE Existing(1), Create(2), Reserve(3). '
257
-
258
- if !type.nil? && type != ''
259
- header += 'Press enter for default. '
260
- end
254
+ header += 'Press enter for default. ' if type && !type.empty?
261
255
 
262
256
  print header
263
257
 
264
258
  answer = STDIN.readline.chop
265
259
 
266
- type_a = type
260
+ if type && !type.empty? && ![1, 2, 3].include?(answer.to_i)
261
+ type_a = type
262
+ else
263
+ until [1, 2, 3].include?(answer.to_i)
264
+ print header
265
+ answer = STDIN.readline.chop
266
+ end
267
+ end
267
268
 
268
269
  case answer.to_i
269
270
  when 1
@@ -274,18 +275,18 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
274
275
  type_a = 'reserve_from'
275
276
  end
276
277
 
277
- #######################################
278
- # Asks for resource id
279
- #######################################
280
-
278
+ ####################################################################
279
+ # Ask for resource id
280
+ ####################################################################
281
281
  header = ' '
282
+
282
283
  if type_a == 'template_id'
283
284
  header += 'VN Template ID. '
284
285
  else
285
286
  header += 'VN ID. '
286
287
  end
287
288
 
288
- if !resource_id.nil? && resource_id != ''
289
+ if resource_id && !resource_id.empty?
289
290
  header += "Press enter for default (#{resource_id}). "
290
291
  end
291
292
 
@@ -293,17 +294,23 @@ class OneFlowTemplateHelper < OpenNebulaHelper::OneHelper
293
294
 
294
295
  resource_id_a = STDIN.readline.chop
295
296
 
296
- resource_id_a = resource_id if resource_id_a.empty?
297
+ if resource_id && !resource_id.empty?
298
+ resource_id_a = resource_id
299
+ else
300
+ while resource_id_a.empty?
301
+ print header
302
+ resource_id_a = STDIN.readline.chop
303
+ end
304
+ end
297
305
 
298
- #######################################
306
+ ####################################################################
299
307
  # Asks for extra
300
- #######################################
301
-
308
+ ####################################################################
302
309
  if type_a != 'id'
303
- header = ' '
310
+ header = ' '
304
311
  header += 'EXTRA (Type EMPTY for leaving empty). '
305
312
 
306
- if !extra.nil? && extra != ''
313
+ if extra && !extra.empty?
307
314
  header += " Press enter for default (#{extra}). "
308
315
  end
309
316
 
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -138,6 +138,12 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
138
138
  'onevnet.yaml'
139
139
  end
140
140
 
141
+ def self.state_to_str(id)
142
+ id = id.to_i
143
+ state_str = VirtualNetwork::VN_STATES[id]
144
+ VirtualNetwork::SHORT_VN_STATES[state_str]
145
+ end
146
+
141
147
  def format_pool(options)
142
148
  config_file = self.class.table_conf
143
149
 
@@ -170,12 +176,18 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
170
176
  d['BRIDGE']
171
177
  end
172
178
 
179
+ column :STATE, 'State of the Virtual Network', :left,
180
+ :size=>6 do |d|
181
+ OneVNetHelper.state_to_str(d['STATE'])
182
+ end
183
+
173
184
  column :LEASES, "Number of this Virtual Network's given leases",
174
185
  :size=>6 do |d|
175
186
  d['USED_LEASES']
176
187
  end
177
188
 
178
- default :ID, :USER, :GROUP, :NAME, :CLUSTERS, :BRIDGE, :LEASES
189
+ default :ID, :USER, :GROUP, :NAME, :CLUSTERS, :BRIDGE, :STATE,
190
+ :LEASES
179
191
  end
180
192
  end
181
193
 
@@ -315,6 +327,7 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
315
327
  vn.retrieve_elements('CLUSTERS/ID')
316
328
  ))
317
329
  puts format(str, 'BRIDGE', vn['BRIDGE'])
330
+ puts format(str, 'STATE', vn.state_str)
318
331
  puts format(str, 'VN_MAD', vn['VN_MAD']) unless vn['VN_MAD'].empty?
319
332
  puts format(str, 'PHYSICAL DEVICE',
320
333
  vn['PHYDEV']) unless vn['PHYDEV'].empty?
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
data/lib/one_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # -------------------------------------------------------------------------- #
2
- # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
2
+ # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
3
3
  # #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you may #
5
5
  # not use this file except in compliance with the License. You may obtain #
@@ -30,7 +30,7 @@ include OpenNebula
30
30
  module OpenNebulaHelper
31
31
  ONE_VERSION=<<-EOT
32
32
  OpenNebula #{OpenNebula::VERSION}
33
- Copyright 2002-2021, OpenNebula Project, OpenNebula Systems
33
+ Copyright 2002-2022, OpenNebula Project, OpenNebula Systems
34
34
  EOT
35
35
 
36
36
  if ONE_LOCATION
@@ -44,6 +44,8 @@
44
44
  </xs:element>
45
45
  <xs:element name="BRIDGE" type="xs:string"/>
46
46
  <xs:element name="BRIDGE_TYPE" type="xs:string" minOccurs="0"/>
47
+ <xs:element name="STATE" type="xs:integer"/>
48
+ <xs:element name="PREV_STATE" type="xs:integer"/>
47
49
  <xs:element name="PARENT_NETWORK_ID" type="xs:string"/>
48
50
  <xs:element name="VN_MAD" type="xs:string"/>
49
51
  <xs:element name="PHYDEV" type="xs:string"/>
@@ -38,6 +38,8 @@
38
38
  </xs:element>
39
39
  <xs:element name="BRIDGE" type="xs:string"/>
40
40
  <xs:element name="BRIDGE_TYPE" type="xs:string" minOccurs="0"/>
41
+ <xs:element name="STATE" type="xs:integer"/>
42
+ <xs:element name="PREV_STATE" type="xs:integer"/>
41
43
  <xs:element name="PARENT_NETWORK_ID" type="xs:string"/>
42
44
  <xs:element name="VN_MAD" type="xs:string"/>
43
45
  <xs:element name="PHYDEV" type="xs:string"/>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.80.pre
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-04 00:00:00.000000000 Z
11
+ date: 2022-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opennebula
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 6.3.80.pre
19
+ version: 6.4.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 6.3.80.pre
26
+ version: 6.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -50,6 +50,7 @@ executables:
50
50
  - onehook
51
51
  - onevdc
52
52
  - oneacl
53
+ - oneirb
53
54
  - oneflow-template
54
55
  - onevrouter
55
56
  - oneshowback
@@ -57,6 +58,7 @@ executables:
57
58
  - oneacct
58
59
  - onesecgroup
59
60
  - onecluster
61
+ - onelog
60
62
  - onemarketapp
61
63
  - onetemplate
62
64
  - onemarket
@@ -80,6 +82,8 @@ files:
80
82
  - bin/onehook
81
83
  - bin/onehost
82
84
  - bin/oneimage
85
+ - bin/oneirb
86
+ - bin/onelog
83
87
  - bin/onemarket
84
88
  - bin/onemarketapp
85
89
  - bin/onesecgroup
@@ -185,9 +189,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
189
  version: '0'
186
190
  required_rubygems_version: !ruby/object:Gem::Requirement
187
191
  requirements:
188
- - - ">"
192
+ - - ">="
189
193
  - !ruby/object:Gem::Version
190
- version: 1.3.1
194
+ version: '0'
191
195
  requirements: []
192
196
  rubygems_version: 3.1.2
193
197
  signing_key: