opsmgr 0.34.16 → 0.34.17

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: b5832215c2a77af0680898189552f1e4dbb1be7c
4
- data.tar.gz: 8a22c9379f07c6fd551048d93d8822e966fce9b7
3
+ metadata.gz: 8f1d8c27e3a445cb069e3504e40eda270fbcff60
4
+ data.tar.gz: c620fdb0116604ea67cff20f91fcde94e94f6968
5
5
  SHA512:
6
- metadata.gz: 5c929ca0a27c4ded1274f2ec2f094c111fcb5a535bf2ec9a15655adbb2becb9ce5a5cca84560e1b0e277c71152dda680441cab6c05dff287269cc36a576196ff
7
- data.tar.gz: 1438dc49b2e21e7697c015a55145919056b06884a83b4935ac0974d296f0a038722764031c42ff0f54a8e5aca1d85f83078828eb3202d25bfebb05af338c47ea
6
+ metadata.gz: 8deb15863ca4610bb90a407e2a440b18411096c4bb1e561db5dbb358154ca4521a1f36efd5115cdd87753013008c9a00eb3d16a54fb0017afdbd9cd5b50c794f
7
+ data.tar.gz: cec83e78da4e427d7881905633b40fe9f1d55f448e400afd0726d935b0195840c33a2f3f973d28f181daf87d74e693e0ae526ec64242d876bc77d0fa7b61c859
@@ -102,9 +102,24 @@ module Opsmgr
102
102
  end
103
103
 
104
104
  def director_ip
105
- ips = microbosh_settings.fetch('ips')
106
- _, director_ips = ips.each_pair.find { |ip_key, _| ip_key =~ /^director-/ }
107
- director_ips.first
105
+ ips_for_job(product_name: 'p-bosh', job_name: 'director').first ||
106
+ ips_for_job(product_name: 'microbosh', job_name: 'director').first
107
+ end
108
+
109
+ def ips_for_job(product_name:, job_name:)
110
+ product = products.find { |p| p.name == product_name }
111
+ return [] if product.nil?
112
+
113
+ if install_hash['ip_assignments']
114
+ install_hash['ip_assignments']['assignments'][product['guid']].each do |job_guid, assignment|
115
+ return assignment.values.flatten if job_guid.starts_with?(job_name)
116
+ end
117
+ else
118
+ product.fetch('ips').each do |job_guid, ips|
119
+ return ips if job_guid.starts_with?(job_name)
120
+ end
121
+ end
122
+ []
108
123
  end
109
124
 
110
125
  def director_password
@@ -166,7 +181,7 @@ module Opsmgr
166
181
  attr_reader :install_hash
167
182
 
168
183
  def microbosh_settings
169
- products.find { |product| product.name == 'microbosh' } || fail('microbosh not found')
184
+ products.find { |product| product.name == 'p-bosh' || product.name == 'microbosh' } || fail('microbosh not found')
170
185
  end
171
186
 
172
187
  def cf_settings
@@ -1,5 +1,5 @@
1
1
  module Opsmgr
2
- VERSION = '0.34.16'.freeze
2
+ VERSION = '0.34.17'.freeze
3
3
  end
4
4
  # Copyright (c) 2014-2015 Pivotal Software, Inc.
5
5
  # All rights reserved.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opsmgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.16
4
+ version: 0.34.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Release Engineering
@@ -378,7 +378,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
378
378
  requirements:
379
379
  - - ">="
380
380
  - !ruby/object:Gem::Version
381
- version: '0'
381
+ version: 2.3.0
382
382
  required_rubygems_version: !ruby/object:Gem::Requirement
383
383
  requirements:
384
384
  - - ">="