opennebula-cli 5.12.0.3 → 5.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf18312886b529b2e6efe5526e0f2452c3b0b30a
4
- data.tar.gz: f7857dd799fa3651f9c6dcaef612638ea347a002
3
+ metadata.gz: bf6e5e798b363cb760c687cb5fd21a53f172e79f
4
+ data.tar.gz: 6c49c0c55816e6f9cdc9560b0339d87fdf5f03c9
5
5
  SHA512:
6
- metadata.gz: 4183b23d9c934c0162d150000a24f71214b34244e545ddc4c451b1828c8038891aaa5006716babc4b042abf53b25a0513cbacd35e4dc5851767237c87823c1d7
7
- data.tar.gz: 358dade92607ea88527dbd5b5b10d7c7b22212eccc589819ce734a758b59e02f6f8acd7e66d5024b20eef3441064efd9f77a1a9a753abbfc6e72acb313d76585
6
+ metadata.gz: 1555cc93d12c2358037c19491fd81f12a94554038a9fe8b720222a0a687ce4cd97149bef414f00784d70df774182cde5c10f0431a796af418b700d5cca7b04e2
7
+ data.tar.gz: 09174b70d83b62c5cedab69f75c6d1b29adee105153ae80970e2fda19a0a77d5152ba1d56d17b2bd1bfa49a0d3216c7e8a9fc528e012af9d9c327202c93fa0e2
data/bin/onevm CHANGED
@@ -1250,12 +1250,7 @@ CommandParser::CmdParser.new(ARGV) do
1250
1250
  helper.perform_action(args[0], options,
1251
1251
  'Updating VM configuration') do |vm|
1252
1252
  if template.empty?
1253
- rc = vm.info
1254
-
1255
- if OpenNebula.is_error?(rc)
1256
- STDERR.puts "ERROR: #{rc.message}"
1257
- exit(-1)
1258
- end
1253
+ vm.info
1259
1254
 
1260
1255
  template = vm.template_like_str('TEMPLATE', true,
1261
1256
  'OS | FEATURES | INPUT | '\
@@ -325,10 +325,9 @@ module CLIHelper
325
325
  column[:size] = 5
326
326
 
327
327
  conf.each do |c|
328
- case c
329
- when Symbol
328
+ if c.is_a? Symbol
330
329
  column[c] = true
331
- when Hash
330
+ elsif c.is_a? Hash
332
331
  c.each do |key, value|
333
332
  column[key] = value
334
333
  end
@@ -668,9 +667,7 @@ module CLIHelper
668
667
  def expand_columns(expand_columns, all = false)
669
668
  return if expand_columns.empty?
670
669
 
671
- if $stdout.isatty
672
- terminal_size = $stdout.winsize[1]
673
- elsif IO.console && IO.console.tty?
670
+ if $stdout.tty? || (IO.console && IO.console.tty?)
674
671
  terminal_size = IO.console.winsize[1]
675
672
  else
676
673
  terminal_size = nil
@@ -115,7 +115,7 @@ class OneAclHelper < OpenNebulaHelper::OneHelper
115
115
  def format_pool(_options)
116
116
  config_file = self.class.table_conf
117
117
 
118
- CLIHelper::ShowTable.new(config_file, self) do
118
+ table = CLIHelper::ShowTable.new(config_file, self) do
119
119
  column :ID,
120
120
  'Rule Identifier',
121
121
  :size => 5 do |d|
@@ -157,6 +157,8 @@ class OneAclHelper < OpenNebulaHelper::OneHelper
157
157
 
158
158
  default :ID, :USER, :RES_VHNIUTGDCOZSvRMAPt, :RID, :OPE_UMAC, :ZONE
159
159
  end
160
+
161
+ table
160
162
  end
161
163
  # rubocop:enable Lint/IneffectiveAccessModifier
162
164
 
@@ -94,7 +94,7 @@ class OneHookHelper < OpenNebulaHelper::OneHelper
94
94
  def format_pool(_options)
95
95
  config_file = self.class.table_conf
96
96
 
97
- CLIHelper::ShowTable.new(config_file, self) do
97
+ table = CLIHelper::ShowTable.new(config_file, self) do
98
98
  column :ID, 'ONE identifier for the Hook', :size => 5 do |d|
99
99
  d['ID']
100
100
  end
@@ -109,6 +109,8 @@ class OneHookHelper < OpenNebulaHelper::OneHelper
109
109
 
110
110
  default :ID, :NAME, :TYPE
111
111
  end
112
+
113
+ table
112
114
  end
113
115
 
114
116
  # Function to print Execution Log records as sent by oned using:
@@ -161,11 +163,7 @@ class OneHookHelper < OpenNebulaHelper::OneHelper
161
163
  end
162
164
  end
163
165
 
164
- if !header
165
- default :HOOK, :ID, :TIMESTAMP, :RC, :EXECUTION
166
- else
167
- default :ID, :TIMESTAMP, :RC, :EXECUTION
168
- end
166
+ default :HOOK, :ID, :TIMESTAMP, :RC, :EXECUTION
169
167
  end
170
168
 
171
169
  table.show(execs, :stat_column => :EXECUTION)
@@ -103,7 +103,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
103
103
  def format_pool(options)
104
104
  config_file = self.class.table_conf
105
105
 
106
- CLIHelper::ShowTable.new(config_file, self) do
106
+ table = CLIHelper::ShowTable.new(config_file, self) do
107
107
  column :ID, 'ONE identifier for Host', :size => 4 do |d|
108
108
  d['ID']
109
109
  end
@@ -233,6 +233,8 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
233
233
  default :ID, :NAME, :CLUSTER, :TVM,
234
234
  :ALLOCATED_CPU, :ALLOCATED_MEM, :STAT
235
235
  end
236
+
237
+ table
236
238
  end
237
239
 
238
240
  def set_hybrid(type, path)
@@ -192,7 +192,7 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
192
192
  def format_pool(options)
193
193
  config_file = self.class.table_conf
194
194
 
195
- CLIHelper::ShowTable.new(config_file, self) do
195
+ table = CLIHelper::ShowTable.new(config_file, self) do
196
196
  column :ID, 'ONE identifier for the Image', :size=>4 do |d|
197
197
  d['ID']
198
198
  end
@@ -246,6 +246,8 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
246
246
  default :ID, :USER, :GROUP, :NAME, :DATASTORE, :SIZE, :TYPE,
247
247
  :PERSISTENT, :STAT, :RVMS
248
248
  end
249
+
250
+ table
249
251
  end
250
252
 
251
253
  def check_orphans
@@ -49,7 +49,7 @@ class OneProvisionHelper < OpenNebulaHelper::OneHelper
49
49
  def format_pool
50
50
  config_file = self.class.table_conf
51
51
 
52
- CLIHelper::ShowTable.new(config_file, self) do
52
+ table = CLIHelper::ShowTable.new(config_file, self) do
53
53
  column :ID, 'Identifier for the Provision', :size => 36 do |p|
54
54
  p['ID']
55
55
  end
@@ -80,6 +80,8 @@ class OneProvisionHelper < OpenNebulaHelper::OneHelper
80
80
 
81
81
  default :ID, :NAME, :CLUSTERS, :HOSTS, :NETWORKS, :DATASTORES, :STAT
82
82
  end
83
+
84
+ table
83
85
  end
84
86
 
85
87
  #######################################################################
@@ -226,9 +228,11 @@ class OneProvisionHelper < OpenNebulaHelper::OneHelper
226
228
  end
227
229
 
228
230
  def names_to_ids(objects, type)
229
- [objects].flatten.map do |obj|
231
+ objects = [objects].flatten.map do |obj|
230
232
  OpenNebulaHelper.rname_to_id(obj.to_s, type)[1]
231
233
  end
234
+
235
+ objects
232
236
  end
233
237
 
234
238
  def get_list(provision_list)
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: 5.12.0.3
4
+ version: 5.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2020-07-08 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: 5.12.0.3
19
+ version: 5.12.1
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: 5.12.0.3
26
+ version: 5.12.1
27
27
  description: Commands used to talk to OpenNebula
28
28
  email: contact@opennebula.io
29
29
  executables:
@@ -78,34 +78,34 @@ files:
78
78
  - bin/onevntemplate
79
79
  - bin/onevrouter
80
80
  - bin/onezone
81
- - lib/command_parser.rb
82
81
  - lib/cli_helper.rb
82
+ - lib/command_parser.rb
83
83
  - lib/one_helper.rb
84
+ - lib/one_helper/oneacct_helper.rb
84
85
  - lib/one_helper/oneacl_helper.rb
85
86
  - lib/one_helper/onecluster_helper.rb
87
+ - lib/one_helper/onedatastore_helper.rb
88
+ - lib/one_helper/oneflow_helper.rb
89
+ - lib/one_helper/oneflowtemplate_helper.rb
86
90
  - lib/one_helper/onegroup_helper.rb
87
91
  - lib/one_helper/onehook_helper.rb
92
+ - lib/one_helper/onehost_helper.rb
93
+ - lib/one_helper/oneimage_helper.rb
88
94
  - lib/one_helper/onemarket_helper.rb
95
+ - lib/one_helper/onemarketapp_helper.rb
96
+ - lib/one_helper/oneprovision_helper.rb
89
97
  - lib/one_helper/onequota_helper.rb
90
98
  - lib/one_helper/onesecgroup_helper.rb
91
99
  - lib/one_helper/onetemplate_helper.rb
100
+ - lib/one_helper/oneuser_helper.rb
92
101
  - lib/one_helper/onevcenter_helper.rb
93
102
  - lib/one_helper/onevdc_helper.rb
103
+ - lib/one_helper/onevm_helper.rb
94
104
  - lib/one_helper/onevmgroup_helper.rb
95
105
  - lib/one_helper/onevnet_helper.rb
96
106
  - lib/one_helper/onevntemplate_helper.rb
97
107
  - lib/one_helper/onevrouter_helper.rb
98
108
  - lib/one_helper/onezone_helper.rb
99
- - lib/one_helper/oneacct_helper.rb
100
- - lib/one_helper/onedatastore_helper.rb
101
- - lib/one_helper/oneflow_helper.rb
102
- - lib/one_helper/oneflowtemplate_helper.rb
103
- - lib/one_helper/onehost_helper.rb
104
- - lib/one_helper/oneimage_helper.rb
105
- - lib/one_helper/onemarketapp_helper.rb
106
- - lib/one_helper/oneprovision_helper.rb
107
- - lib/one_helper/oneuser_helper.rb
108
- - lib/one_helper/onevm_helper.rb
109
109
  - NOTICE
110
110
  - LICENSE
111
111
  homepage: http://opennebula.io