Refactor service to add a container object

This commit is contained in:
Ben Firshman 2013-12-18 18:37:48 +00:00
commit a5fc880d10
6 changed files with 169 additions and 57 deletions

View file

@ -78,7 +78,7 @@ class TopLevelCommand(Command):
Usage: ps
"""
for container in self._get_containers(all=False):
print get_container_name(container)
print container.name
def run(self, options):
"""
@ -126,4 +126,4 @@ class TopLevelCommand(Command):
LogPrinter(client=self.client).attach(containers)
def _get_containers(self, all):
return [c for s in self.service_collection for c in s.get_containers(all=all)]
return [c for s in self.service_collection for c in s.containers(all=all)]