foreman_xen 0.1.6 → 0.1.7

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: 6c7609ff160f6ad5aa47e600a462ec5ce27c875a
4
- data.tar.gz: d944bb014e7db5a5341c079177c2d05d81aa79c5
3
+ metadata.gz: aaa1f18e100d2c3dced394a39ae7922f7f397257
4
+ data.tar.gz: a9a3dddeedc56affe56bbb6ce2b69f479be2f711
5
5
  SHA512:
6
- metadata.gz: 71f45a60fa45467ee1d782b520625e66aec7d2753d9d6d28052ee8f5869e95b73975bd120b4eaf3aeeefa7bc77b26d78e19371a4a69a182c44c5f433caca2549
7
- data.tar.gz: c2266c7ccd6a59dac205ffd12dd6a8bae3b5ba085ad5568e7ab2078f5458b01213e3baa04254c485ad163fd3f1be6243720019f7d22285c915c5f0f7c867a14b
6
+ metadata.gz: 4a958f2661f5aa9a4d3876638649e5cf1f847f633c5ccf84e6bd5bf0db83e3a393a9670c4b48145fe6460186ff60857ee944d14fc57a899e84eb36799b845c39
7
+ data.tar.gz: ad39bf9ca8a14ce29aee572e9fa5a98e0b4dc7aa9f226c91bf2e6ef2af1230a78c2b9aa6cda150e3b0e420ded2d930c8f3000737f38ad4dd2b38c56429db97a0
@@ -86,22 +86,15 @@ module ForemanXen
86
86
 
87
87
  storages.each do |sr|
88
88
  subresults = {}
89
- found = 0
89
+
90
90
  hosts.each do |host|
91
- next until sr.reference == host.suspend_image_sr
92
- found = 1
91
+ append_hostname = (sr.reference == host.suspend_image_sr) ? '(' + host.hostname + ')' : ''
93
92
  subresults[:name] = sr.name
94
- subresults[:display_name] = sr.name + '(' + host.hostname + ')'
93
+ subresults[:display_name] = sr.name + append_hostname
95
94
  subresults[:uuid] = sr.uuid
96
- break
97
- end
98
95
 
99
- if found == 0
100
- subresults[:name] = sr.name
101
- subresults[:display_name] = sr.name
102
- subresults[:uuid] = sr.uuid
96
+ results.push(subresults)
103
97
  end
104
- results.push(subresults)
105
98
  end
106
99
 
107
100
  results.sort_by! { |item| item[:display_name] }
@@ -1,3 +1,3 @@
1
1
  module ForemanXen
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_xen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Nemirovsky
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-09 00:00:00.000000000 Z
13
+ date: 2015-11-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project:
87
- rubygems_version: 2.2.2
87
+ rubygems_version: 2.5.0
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Provision and manage XEN Server from Foreman