From 94cae104173554496f0ba4c3ab104fb4652ecb6f Mon Sep 17 00:00:00 2001 From: Aanand Prasad Date: Fri, 20 Dec 2013 19:13:55 +0000 Subject: [PATCH] ps and logs can filter by service too --- plum/cli/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plum/cli/main.py b/plum/cli/main.py index 0c844040f..b5289bc09 100644 --- a/plum/cli/main.py +++ b/plum/cli/main.py @@ -88,12 +88,12 @@ class TopLevelCommand(Command): """ List services and containers. - Usage: ps [options] + Usage: ps [options] [SERVICE...] Options: -q Only display IDs """ - containers = self.project.containers(stopped=True) + self.project.containers(one_off=True) + containers = self.project.containers(service_names=options['SERVICE'], stopped=True) + self.project.containers(service_names=options['SERVICE'], one_off=True) if options['-q']: for container in containers: @@ -210,9 +210,9 @@ class TopLevelCommand(Command): """ View output from containers - Usage: logs + Usage: logs [SERVICE...] """ - containers = self.project.containers(stopped=False) + containers = self.project.containers(service_names=options['SERVICE'], stopped=False) print "Attaching to", list_containers(containers) LogPrinter(containers, attach_params={'logs': True}).run()