rancher-metadata 0.17.12 → 0.17.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rancher-metadata/api.rb +16 -1
- data/lib/rancher-metadata/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 881cf3b137ce4010e1532a4b79199de578889ee1
|
4
|
+
data.tar.gz: 293c545de6c10860db4d09eb823edac8a8203453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f560323459d2fb6eeca34be599ecc5e120915b61e1e01c5aaa7427c77dafbe6cd965aae24ddb942c57884f0909c480467367ff76e3aeed35d74da300c20b2ec5
|
7
|
+
data.tar.gz: ad9037b89b29c71574bc11c457de594b51cdc4c0769a7a238a500177dd68b5a5e9532aa0d0e724d2fdc24a7a6e26eb5477b3a4157ba43593db031259fe246e58
|
data/lib/rancher-metadata/api.rb
CHANGED
@@ -103,6 +103,9 @@ module RancherMetadata
|
|
103
103
|
containers = {}
|
104
104
|
|
105
105
|
self.get_service_field("containers", service).each do |container|
|
106
|
+
container['create_index'] = container['create_index'].to_i if (container.has_key?('create_index') and container['create_index'].is_a?(String))
|
107
|
+
container['service_index'] = container['service_index'].to_i if (container.has_key?('service_index') and container['service_index'].is_a?(String))
|
108
|
+
|
106
109
|
containers[container['name']] = container
|
107
110
|
end
|
108
111
|
|
@@ -150,7 +153,16 @@ module RancherMetadata
|
|
150
153
|
end
|
151
154
|
|
152
155
|
def get_containers
|
153
|
-
|
156
|
+
containers = []
|
157
|
+
|
158
|
+
self.api_get("/containers").each do |container|
|
159
|
+
container['create_index'] = container['create_index'].to_i if (container.has_key?('create_index') and container['create_index'].is_a?(String))
|
160
|
+
container['service_index'] = container['service_index'].to_i if (container.has_key?('service_index') and container['service_index'].is_a?(String))
|
161
|
+
|
162
|
+
containers << container
|
163
|
+
end
|
164
|
+
|
165
|
+
containers
|
154
166
|
end
|
155
167
|
|
156
168
|
def get_container(container_name = nil)
|
@@ -162,6 +174,9 @@ module RancherMetadata
|
|
162
174
|
container = self.api_get("/self/container")
|
163
175
|
end
|
164
176
|
|
177
|
+
container['create_index'] = container['create_index'].to_i if (container.has_key?('create_index') and container['create_index'].is_a?(String))
|
178
|
+
container['service_index'] = container['service_index'].to_i if (container.has_key?('service_index') and container['service_index'].is_a?(String))
|
179
|
+
|
165
180
|
container
|
166
181
|
end
|
167
182
|
|