Explorar el Código

ps and logs can filter by service too

Aanand Prasad hace 12 años
padre
commit
94cae10417
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      plum/cli/main.py

+ 4 - 4
plum/cli/main.py

@@ -88,12 +88,12 @@ class TopLevelCommand(Command):
         """
         """
         List services and containers.
         List services and containers.
 
 
-        Usage: ps [options]
+        Usage: ps [options] [SERVICE...]
 
 
         Options:
         Options:
             -q    Only display IDs
             -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']:
         if options['-q']:
             for container in containers:
             for container in containers:
@@ -210,9 +210,9 @@ class TopLevelCommand(Command):
         """
         """
         View output from containers
         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)
         print "Attaching to", list_containers(containers)
         LogPrinter(containers, attach_params={'logs': True}).run()
         LogPrinter(containers, attach_params={'logs': True}).run()