You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
557 B
Python
25 lines
557 B
Python
"""
|
|
Container object handle a single container link
|
|
"""
|
|
|
|
|
|
class Container(object):
|
|
|
|
"""Container handles a single container link"""
|
|
|
|
def __init__(self, ip, env, names, id, links=None):
|
|
self.ip = ip
|
|
self.environ = env
|
|
self.names = names
|
|
self.id = id
|
|
self._set_links(links)
|
|
|
|
def _set_links(self, links):
|
|
lst = []
|
|
if not links:
|
|
self.links = tuple()
|
|
for link in links:
|
|
if link.ip == self.ip:
|
|
lst.append(link)
|
|
self.links = tuple(lst)
|