opennebula-cli 5.8.5 → 5.9.80.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -192,6 +192,29 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
192
192
  puts template
193
193
  end
194
194
 
195
+ def check_orphans
196
+ orphans = []
197
+ xpath = '/VMTEMPLATE_POOL/VMTEMPLATE/TEMPLATE/NIC'
198
+
199
+ pool = factory_pool
200
+ tmpl_pool = OpenNebula::TemplatePool.new(@client, -2)
201
+
202
+ pool.info
203
+ tmpl_pool.info
204
+
205
+ pool.each do |img|
206
+ attrs = { :id => img['ID'],
207
+ :name => img['NAME'],
208
+ :uname => img['UNAME'] }
209
+
210
+ orphans << img['ID'] if check_orphan(tmpl_pool,
211
+ xpath,
212
+ 'NETWORK', attrs)
213
+ end
214
+
215
+ orphans
216
+ end
217
+
195
218
  private
196
219
 
197
220
  def factory(id=nil)
@@ -296,7 +319,6 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
296
319
 
297
320
  puts
298
321
  CLIHelper.print_header(str_h1 % ["LEASES"], false)
299
-
300
322
  ar_list = []
301
323
 
302
324
  if !vn_hash['VNET']['AR_POOL']['AR'].nil?
@@ -342,7 +364,7 @@ class OneVNetHelper < OpenNebulaHelper::OneHelper
342
364
  d["IP"]||"-"
343
365
  end
344
366
 
345
- column :IP6, "", :donottruncate, :size=>26 do |d|
367
+ column :IP6, "", :adjust, :size=>26 do |d|
346
368
  d["IP6"]||d["IP6_GLOBAL"]||"-"
347
369
  end
348
370
  end.show(leases, {})
@@ -203,7 +203,7 @@ class OneVirtualRouterHelper < OpenNebulaHelper::OneHelper
203
203
  end
204
204
 
205
205
 
206
- column :IP, "",:left, :donottruncate, :size=>15 do |d|
206
+ column :IP, "",:left, :adjust, :size=>15 do |d|
207
207
  d["IP"]
208
208
  end
209
209
  end.show(vm_nics,{})
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.5
4
+ version: 5.9.80.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-24 00:00:00.000000000 Z
11
+ date: 2019-10-14 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.5
19
+ version: 5.9.80.pre
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.5
26
+ version: 5.9.80.pre
27
27
  description: Commands used to talk to OpenNebula
28
28
  email: contact@opennebula.org
29
29
  executables:
@@ -34,6 +34,7 @@ executables:
34
34
  - oneflow
35
35
  - oneflow-template
36
36
  - onegroup
37
+ - onehook
37
38
  - onehost
38
39
  - oneimage
39
40
  - onemarket
@@ -60,6 +61,7 @@ files:
60
61
  - bin/oneflow
61
62
  - bin/oneflow-template
62
63
  - bin/onegroup
64
+ - bin/onehook
63
65
  - bin/onehost
64
66
  - bin/oneimage
65
67
  - bin/onemarket
@@ -84,6 +86,7 @@ files:
84
86
  - lib/one_helper/onecluster_helper.rb
85
87
  - lib/one_helper/onedatastore_helper.rb
86
88
  - lib/one_helper/onegroup_helper.rb
89
+ - lib/one_helper/onehook_helper.rb
87
90
  - lib/one_helper/onehost_helper.rb
88
91
  - lib/one_helper/oneimage_helper.rb
89
92
  - lib/one_helper/onemarket_helper.rb
@@ -118,9 +121,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
121
  version: '0'
119
122
  required_rubygems_version: !ruby/object:Gem::Requirement
120
123
  requirements:
121
- - - '>='
124
+ - - '>'
122
125
  - !ruby/object:Gem::Version
123
- version: '0'
126
+ version: 1.3.1
124
127
  requirements: []
125
128
  rubyforge_project:
126
129
  rubygems_version: 2.0.14.1