hula 0.7.1 → 0.8.0

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: c4c2d89b28b0e529f5236121502d5fc7da46a3db
4
- data.tar.gz: 380624ff929ed4d53a4383132ca4a49ac75fd893
3
+ metadata.gz: 5cea61fa551c9c90d7ba87de03a6ab03da4369fd
4
+ data.tar.gz: e65dea63fbf9cd535b081beb799dabaf6ad6d7cc
5
5
  SHA512:
6
- metadata.gz: 6d9b0269dd701fd4a12b864315ae06af48438e02197359e01663466c2bb7312d47258f642d84ef36475356fe5de214c14d4a14b0d1c4a59cf8a417cabe247963
7
- data.tar.gz: 2fa96cadf394a54cc57e004a8e1d4ab21ce82f9702566482b70bb69dd15d39503538f713e94e8dc9c21871cf463f83aab7de32f8c355f494adbbd9f9d49447df
6
+ metadata.gz: f97996e8e48569a61cfbd81c473a4bd832095f48b4f77b00171afc24a743f00b50349f01c98bbf6c8b934d1b6dd11442e3b594c960d7f3944953406fafbee08d
7
+ data.tar.gz: eb65094b87e52147e6268050c27de14555c5a0518984c8931754b7125cb56e3b2b797f9b48c1f2c992b18fb8f0da523c11257300b3c3a3fdce87d9977827cf33
@@ -130,6 +130,15 @@ module Hula
130
130
  # +------------------------------------+---------+---------------+--------------+
131
131
  # | api_z1/0 | running | large_z1 | 10.244.0.138 |
132
132
  # ...
133
+ #
134
+ # Also matches output from 1.3184 bosh_cli e.g.
135
+ #
136
+ # +------------------------------------------------+---------+----------------+--------------+
137
+ # | VM | State | AZ | VM Type | IPs |
138
+ # +------------------------------------------------+---------+----------------+--------------+
139
+ # | api_z1/0 (fe04916e-afd0-42a3-aaf5-52a8b163f1ab)| running | n/a | large_z1 | 10.244.0.138 |
140
+ # ...
141
+ #
133
142
  def ips_for_job(job, deployment_name = nil)
134
143
  output = run_bosh("vms #{deployment_name}")
135
144
  deployments = output.split(/^Deployment/)
@@ -139,8 +148,8 @@ module Hula
139
148
  deployments.each do |deployment|
140
149
  rows = deployment.split("\n")
141
150
  row_cols = rows.map { |row| row.split('|') }
142
- job_cols = row_cols. select { |cols| cols.length == 5 } # match job boxes
143
- job_ip_pairs = job_cols.map { |cols| [cols[1].strip, cols.last.strip] }
151
+ job_cols = row_cols. select { |cols| cols.length == 5 || cols.length == 6 } # match job boxes
152
+ job_ip_pairs = job_cols.map { |cols| [cols[1].strip.split(' ')[0], cols.last.strip] }
144
153
  jobs_with_real_ips = job_ip_pairs.select { |pairs| pairs.last =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ }
145
154
  # converts eg cf-redis-broker/2 to cf-redis-broker
146
155
  jobs_without_instance_numbers = jobs_with_real_ips.map { |pair| [pair.first.gsub(/\/.*/, ''), pair.last] }
data/lib/hula/version.rb CHANGED
@@ -9,5 +9,5 @@
9
9
  #
10
10
 
11
11
  module Hula
12
- VERSION = '0.7.1'
12
+ VERSION = '0.8.0'
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Pragnell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-09 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  requirements: []
230
230
  rubyforge_project:
231
- rubygems_version: 2.4.2
231
+ rubygems_version: 2.4.5
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: A tasty wrapper around cf, and more...