rancher-metadata 0.17.4 → 0.17.5

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: 930d308438607c980b53c7806dcd576378341575
4
- data.tar.gz: a22c6f66f4f8b121e390938bbcdd7d70af8d6d0a
3
+ metadata.gz: 5467d2c11bfe48b395bd83e5f825160da89c95d0
4
+ data.tar.gz: e577c1fe121ed79030fc9d51a58924640beb4694
5
5
  SHA512:
6
- metadata.gz: 4e30f43fec3d920f0a058095c6b975b371f806cba0291f1c1e1578a4c7fcef9d27062e763ca41fafe617fdc8da25648fd4960c7bcd5c1feee63b535c26265a6b
7
- data.tar.gz: 7d87ece64f2ab381e42ebddb1993af6a09f4e6e6e3e952c763bbc7477f26f8b37f59ebd004f25cdebe892ec8cfa986502786479097cd862851de0ec103f9f071
6
+ metadata.gz: 2944b89d04b249a8f4cf8d31370384ca271c108e97dc4f46942ac5318ac704050adf45188b3dfa74a21dc10b1b3b0603deaf7a10b09aaa328337ed889e00d8c1
7
+ data.tar.gz: 93f57158527773f4157f04a71b36d0cc9ecd3f32fbef56f11f0f6b43646eaa9440f57437ea9c927c937cb2ef98228ab24b21fde0891593147bfd9baf607ed9be
data/README.md CHANGED
@@ -23,7 +23,7 @@ puts("Container service name: #{api.get_container_service_name}")
23
23
  puts("Container hostname: #{api.get_container_hostname}")
24
24
 
25
25
  api.wait_service_containers() do |name, container|
26
- puts("Container #{name} is up (ip: #{container['primary_ip']}, create index: #{container['create_index']}, service suffix: #{api.get_container_service_suffix(name))")
26
+ puts("Container #{name} is up (ip: #{container['primary_ip']}, create index: #{container['create_index']}, service suffix: #{container['service_suffix']})")
27
27
  end
28
28
 
29
29
  metadata = api.get_service_metadata
@@ -148,7 +148,18 @@ module RancherMetadata
148
148
  end
149
149
 
150
150
  def get_container(container_name = nil)
151
- container_name ? self.api_get("/containers/#{container_name}") : self.api_get("/self/container")
151
+ container = nil
152
+
153
+ if container_name
154
+ container = self.api_get("/containers/#{container_name}")
155
+ else
156
+ container = self.api_get("/self/container")
157
+ end
158
+
159
+ # FIXME: https://github.com/rancher/cattle/pull/1197
160
+ container['service_suffix'] = self.get_container_service_suffix(container_name) unless container.has_key?('service_suffix')
161
+
162
+ container
152
163
  end
153
164
 
154
165
  def get_container_field(field, container_name = nil)
@@ -166,6 +177,7 @@ module RancherMetadata
166
177
 
167
178
  def get_container_ip(container_name = nil)
168
179
  if container_name
180
+ # FIXME: https://github.com/rancher/rancher/issues/2750
169
181
  if self.is_network_managed?
170
182
  self.api_get("/self/container/primary_ip")
171
183
  else
@@ -5,7 +5,7 @@
5
5
  #
6
6
 
7
7
  module RancherMetadata
8
- VERSION = "0.17.4"
8
+ VERSION = "0.17.5"
9
9
 
10
10
  def self.version
11
11
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rancher-metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.4
4
+ version: 0.17.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti