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 +4 -4
- data/lib/hula/bosh_director.rb +11 -2
- data/lib/hula/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cea61fa551c9c90d7ba87de03a6ab03da4369fd
|
4
|
+
data.tar.gz: e65dea63fbf9cd535b081beb799dabaf6ad6d7cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f97996e8e48569a61cfbd81c473a4bd832095f48b4f77b00171afc24a743f00b50349f01c98bbf6c8b934d1b6dd11442e3b594c960d7f3944953406fafbee08d
|
7
|
+
data.tar.gz: eb65094b87e52147e6268050c27de14555c5a0518984c8931754b7125cb56e3b2b797f9b48c1f2c992b18fb8f0da523c11257300b3c3a3fdce87d9977827cf33
|
data/lib/hula/bosh_director.rb
CHANGED
@@ -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
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.
|
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:
|
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.
|
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...
|