opennebula-cli 5.8.4 → 5.8.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3da1f96f5523b5563fd189d3281e1162084815f6
4
- data.tar.gz: d6bf1f07c1a907b54297eccdf9ee8f38c4bbb407
3
+ metadata.gz: 253bc8ebcbcfdc1139f455981da95a8043d44328
4
+ data.tar.gz: b36d99d50d8a70e5456321bd68f8724dee3b44d3
5
5
  SHA512:
6
- metadata.gz: 2e9a3561a6ae34cb79b3ba2b57b0bac6b9e39519143a741d16206b678ca065eb50be84dc9378c2f76760f3deee4aef61c683cc05b3385d6f2010d81281b36606
7
- data.tar.gz: 76ca8036103b4f5c6f316b361a8bc6eb1c83423ee98d29001a46737aaec3dd8a03341cfa7816f33b6bf00509a9e367eb3a9eae4e8b04c2e55f98b8916868e457
6
+ metadata.gz: 2d1cae7a51028b7a8e0647b44d9a2d8a2db8483f80085db1dc6edd7e31ab9a5863abd936db5add7eeac421caa709a0de717d1c97200f998a1144c96f40255c96
7
+ data.tar.gz: aae2915016a07cc0ffa13f9b9dfbeaab37154b62b893d72ee3299fc1d252524960b28feea5b59f02158a0e95d8d2c570d446776efbd605733d9614116500044a
@@ -91,10 +91,10 @@ def show_service_template(client, args, options)
91
91
  "SERVICE TEMPLATE #{document_hash['DOCUMENT']['ID']} "\
92
92
  'INFORMATION')
93
93
 
94
- puts format(str, ['ID', document_hash['DOCUMENT']['ID']])
95
- puts format(str, ['NAME', document_hash['DOCUMENT']['NAME']])
96
- puts format(str, ['USER', document_hash['DOCUMENT']['UNAME']])
97
- puts format(str, ['GROUP', document_hash['DOCUMENT']['GNAME']])
94
+ puts Kernel.format str, 'ID', document_hash['DOCUMENT']['ID']
95
+ puts Kernel.format str, 'NAME', document_hash['DOCUMENT']['NAME']
96
+ puts Kernel.format str, 'USER', document_hash['DOCUMENT']['UNAME']
97
+ puts Kernel.format str, 'GROUP', document_hash['DOCUMENT']['GNAME']
98
98
 
99
99
  puts
100
100
 
@@ -107,7 +107,7 @@ def show_service_template(client, args, options)
107
107
  mask[1] = 'm' if permissions_hash["#{e}_M"] == '1'
108
108
  mask[2] = 'a' if permissions_hash["#{e}_A"] == '1'
109
109
 
110
- puts format(str, [e, mask])
110
+ puts Kernel.format str, e, mask
111
111
  end
112
112
 
113
113
  puts
@@ -182,7 +182,7 @@ CommandParser::CmdParser.new(ARGV) do
182
182
 
183
183
  image.allocate(template, options[:datastore], check_capacity)
184
184
  rescue StandardError => e
185
- STDERR.puts e.messsage
185
+ STDERR.puts e.message
186
186
  exit(-1)
187
187
  end
188
188
  end
@@ -92,7 +92,7 @@ CommandParser::CmdParser.new(ARGV) do
92
92
 
93
93
  obj.allocate(template)
94
94
  rescue StandardError => e
95
- STDERR.puts e.messsage
95
+ STDERR.puts e.message
96
96
  exit(-1)
97
97
  end
98
98
  end
@@ -161,7 +161,7 @@ CommandParser::CmdParser.new(ARGV) do
161
161
  tmpl.allocate(template)
162
162
  end
163
163
  rescue StandardError => e
164
- STDERR.puts e.messsage
164
+ STDERR.puts e.message
165
165
  exit(-1)
166
166
  end
167
167
  end
@@ -112,7 +112,7 @@ CommandParser::CmdParser.new(ARGV) do
112
112
 
113
113
  obj.allocate(template)
114
114
  rescue StandardError => e
115
- STDERR.puts "Error creating VM Group: #{e.messsage}"
115
+ STDERR.puts "Error creating VM Group: #{e.message}"
116
116
  exit(-1)
117
117
  end
118
118
  end
@@ -135,7 +135,7 @@ CommandParser::CmdParser.new(ARGV) do
135
135
  tmpl.allocate(template)
136
136
  end
137
137
  rescue StandardError => e
138
- STDERR.puts e.messsage
138
+ STDERR.puts e.message
139
139
  exit(-1)
140
140
  end
141
141
  end
@@ -121,7 +121,7 @@ CommandParser::CmdParser.new(ARGV) do
121
121
 
122
122
  obj.allocate(template)
123
123
  rescue StandardError => e
124
- STDERR.puts e.messsage
124
+ STDERR.puts e.message
125
125
  exit(-1)
126
126
  end
127
127
  end
@@ -191,7 +191,7 @@ EOT
191
191
  :format => Integer,
192
192
  :description => 'The Group ID to instantiate the VM'
193
193
  }
194
-
194
+
195
195
  #NOTE: Other options defined using this array, add new options at the end
196
196
  TEMPLATE_OPTIONS=[
197
197
  {
@@ -674,7 +674,7 @@ EOT
674
674
  def list_pool_xml(pool, options, filter_flag)
675
675
  extended = options.include?(:extended) && options[:extended]
676
676
 
677
- if $stdout.isatty
677
+ if $stdout.isatty and (!options.key?:no_pager)
678
678
  size = $stdout.winsize[0] - 1
679
679
 
680
680
  # ----------- First page, check if pager is needed -------------
@@ -702,6 +702,13 @@ EOT
702
702
  return 0
703
703
  end
704
704
 
705
+ if elements < size
706
+ return 0
707
+ elsif !pool.is_paginated?
708
+ stop_pager(ppid)
709
+ return 0
710
+ end
711
+
705
712
  # ------- Rest of the pages in the pool, piped to pager --------
706
713
  current = size
707
714
 
@@ -712,6 +719,12 @@ EOT
712
719
 
713
720
  current += size
714
721
 
722
+ begin
723
+ Process.waitpid(ppid, Process::WNOHANG)
724
+ rescue Errno::ECHILD
725
+ break
726
+ end
727
+
715
728
  elements, page = print_page(pool, options)
716
729
 
717
730
  puts page
@@ -1061,7 +1074,7 @@ EOT
1061
1074
  end
1062
1075
  end
1063
1076
 
1064
- def OpenNebulaHelper.time_to_str(time, print_seconds=true,
1077
+ def OpenNebulaHelper.time_to_str(time, print_seconds=true,
1065
1078
  print_hours=true, print_years=false)
1066
1079
 
1067
1080
  value = time.to_i
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.8.4
4
+ version: 5.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2019-09-24 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.8.4
19
+ version: 5.8.5
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.8.4
26
+ version: 5.8.5
27
27
  description: Commands used to talk to OpenNebula
28
28
  email: contact@opennebula.org
29
29
  executables: