Fix lookup of linked containers for API version 1.20
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
97fe2ee40c
commit
4bf2f8c4f9
6 changed files with 26 additions and 22 deletions
|
|
@ -228,16 +228,6 @@ class Container(object):
|
|||
self.has_been_inspected = True
|
||||
return self.dictionary
|
||||
|
||||
# TODO: only used by tests, move to test module
|
||||
def links(self):
|
||||
links = []
|
||||
for container in self.client.containers():
|
||||
for name in container['Names']:
|
||||
bits = name.split('/')
|
||||
if len(bits) > 2 and bits[1] == self.name:
|
||||
links.append(bits[2])
|
||||
return links
|
||||
|
||||
def attach(self, *args, **kwargs):
|
||||
return self.client.attach(self.id, *args, **kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue