opennebula-cli 5.6.1 → 5.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NOTICE +0 -15
- data/lib/cli_helper.rb +7 -3
- data/lib/command_parser.rb +16 -3
- data/lib/one_helper.rb +1 -1
- data/lib/one_helper/onehost_helper.rb +1 -1
- data/lib/one_helper/oneimage_helper.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d1313a09ad69bd8995ea3d0f18e3d2c14fab328
|
4
|
+
data.tar.gz: a473397450005c9ece8ac0c828112fa283771a27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4881c31920ba49fe702a331342edb631b0583d998ed698f39d88ebe2ed4f1cc5d40ef586314c62e24acd4a570cae6dd1c58025720079666619b2a6a0ec42e2e1
|
7
|
+
data.tar.gz: 962c7bda318cf8597f26af880d292a9f7524fad71198785c040c1b4a4e38e2152ef5e3912b5bb8c63095b9409a9c9392a83a4429c63265ddc8856ba3ae079be4
|
data/NOTICE
CHANGED
@@ -6,21 +6,6 @@ Copyright 2002-2018, OpenNebula Project, OpenNebula Systems (formerly C12G Labs)
|
|
6
6
|
You can find more information about the project, release notes and
|
7
7
|
documentation at www.OpenNebula.org
|
8
8
|
|
9
|
-
AUTHORS
|
10
|
-
|
11
|
-
- Ruben Santiago Montero (rsmontero@opennebula.org)
|
12
|
-
- Ignacio Martin Llorente (imllorente@opennebula.org)
|
13
|
-
|
14
|
-
ACKNOWLEDGEMENTS
|
15
|
-
|
16
|
-
The following people have contributed to the development of the technology
|
17
|
-
- Javier Fontan Muiños (jfontan@opennebula.org)
|
18
|
-
- Constantino Vazquez Blanco (tinova@opennebula.org)
|
19
|
-
- Jaime Melis Bayo (jmelis@opennebula.org)
|
20
|
-
- Carlos Martin Sanchez (cmartin@opennebula.org)
|
21
|
-
- Daniel Molina Aranda (dmolina@opennebula.org)
|
22
|
-
- Hector Sanjuan Redondo (hsanjuan@opennebula.org)
|
23
|
-
|
24
9
|
LICENSE
|
25
10
|
|
26
11
|
OpenNebula is licensed under the Apache License, Version 2.0 (the
|
data/lib/cli_helper.rb
CHANGED
@@ -110,9 +110,11 @@ module CLIHelper
|
|
110
110
|
ANSI_RED="\33[31m"
|
111
111
|
ANSI_GREEN="\33[32m"
|
112
112
|
ANSI_RESET="\33[0m"
|
113
|
+
ANSI_YELLOW="\33[33m"
|
113
114
|
|
114
|
-
OK_STATES=%w{runn rdy on}
|
115
|
-
BAD_STATES=%w{fail err err}
|
115
|
+
OK_STATES=%w{runn rdy on configured}
|
116
|
+
BAD_STATES=%w{fail err err error}
|
117
|
+
REGULAR_STATES=%w{pending}
|
116
118
|
|
117
119
|
def CLIHelper.color_state(stat)
|
118
120
|
if $stdout.tty?
|
@@ -121,6 +123,8 @@ module CLIHelper
|
|
121
123
|
ANSI_GREEN+stat+ANSI_RESET
|
122
124
|
when *BAD_STATES
|
123
125
|
ANSI_RED+stat+ANSI_RESET
|
126
|
+
when *REGULAR_STATES
|
127
|
+
ANSI_YELLOW+stat+ANSI_RESET
|
124
128
|
else
|
125
129
|
stat
|
126
130
|
end
|
@@ -270,7 +274,7 @@ module CLIHelper
|
|
270
274
|
|
271
275
|
def print_table(data, options)
|
272
276
|
if !options[:csv] && !options[:noheader]
|
273
|
-
CLIHelper.print_header(header_str)
|
277
|
+
CLIHelper.print_header(header_str)
|
274
278
|
end
|
275
279
|
|
276
280
|
data ? print_data(data, options) : puts
|
data/lib/command_parser.rb
CHANGED
@@ -74,7 +74,7 @@ module CommandParser
|
|
74
74
|
instance_eval(&block)
|
75
75
|
|
76
76
|
addons = Dir["#{OpenNebulaHelper::CLI_ADDONS_LOCATION}/#{File.basename($0)}/*"]
|
77
|
-
if defined?(addons) and !addons.nil?
|
77
|
+
if defined?(addons) and !addons.nil?
|
78
78
|
addons.each do |addon_path|
|
79
79
|
addon_code = File.read(addon_path)
|
80
80
|
instance_eval(addon_code)
|
@@ -280,6 +280,10 @@ module CommandParser
|
|
280
280
|
# end
|
281
281
|
#
|
282
282
|
def command(name, desc, *args_format, &block)
|
283
|
+
if name.is_a? (Array)
|
284
|
+
name = name.join(" ").to_sym
|
285
|
+
end
|
286
|
+
|
283
287
|
cmd = Hash.new
|
284
288
|
cmd[:desc] = desc
|
285
289
|
cmd[:arity] = 0
|
@@ -432,8 +436,17 @@ module CommandParser
|
|
432
436
|
comm = @main
|
433
437
|
elsif
|
434
438
|
if @args[0] && !@args[0].match(/^-/)
|
435
|
-
|
436
|
-
|
439
|
+
while comm.nil? and @args.size > 0 do
|
440
|
+
current = @args.shift
|
441
|
+
|
442
|
+
if comm_name.empty?
|
443
|
+
@comm_name = comm_name = "#{current}".to_sym
|
444
|
+
else
|
445
|
+
@comm_name = comm_name = "#{comm_name} #{current}".to_sym
|
446
|
+
end
|
447
|
+
|
448
|
+
comm = @commands[comm_name]
|
449
|
+
end
|
437
450
|
end
|
438
451
|
end
|
439
452
|
|
data/lib/one_helper.rb
CHANGED
@@ -581,7 +581,7 @@ EOT
|
|
581
581
|
# output
|
582
582
|
#-----------------------------------------------------------------------
|
583
583
|
def list_pool_table(table, pool, options, filter_flag)
|
584
|
-
if $stdout.isatty
|
584
|
+
if $stdout.isatty and (!options.key?:no_pager)
|
585
585
|
size = $stdout.winsize[0] - 1
|
586
586
|
|
587
587
|
# ----------- First page, check if pager is needed -------------
|
@@ -533,7 +533,7 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
|
|
533
533
|
|
534
534
|
onevm_helper=OneVMHelper.new
|
535
535
|
onevm_helper.client=@client
|
536
|
-
onevm_helper.list_pool({:filter=>["HOST=#{host.name}"]}, false)
|
536
|
+
onevm_helper.list_pool({:filter=>["HOST=#{host.name}"], :no_pager => true}, false)
|
537
537
|
end
|
538
538
|
|
539
539
|
def print_pcis(pcis)
|
@@ -320,7 +320,7 @@ class OneImageHelper < OpenNebulaHelper::OneHelper
|
|
320
320
|
vms.map!{|e| e.to_i }
|
321
321
|
onevm_helper=OneVMHelper.new
|
322
322
|
onevm_helper.client=@client
|
323
|
-
onevm_helper.list_pool({:ids=>vms}, false)
|
323
|
+
onevm_helper.list_pool({:ids=>vms, :no_pager => true}, false)
|
324
324
|
end
|
325
325
|
end
|
326
326
|
|
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.6.
|
4
|
+
version: 5.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-10 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.6.
|
19
|
+
version: 5.6.2
|
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.6.
|
26
|
+
version: 5.6.2
|
27
27
|
description: Commands used to talk to OpenNebula
|
28
28
|
email: contact@opennebula.org
|
29
29
|
executables:
|