Repository URL to install this package:
|
Version:
0.3.30 ▾
|
from . import base
from ... import commands
class Ps(base.BaseCommand):
names = ['ps', 'list']
help = 'List containers'
arguments = (
dict(dest='hosts', action='store', nargs='*', help='hosts to connect to'),
(
('--all', '-a'),
dict(action='store_true', help='List all containers')
),
(
('--grep',),
dict(default=None, action='store', help='Limit containers by name')
),
(
('--show_restart', '-r'),
dict(
action='store_true',
default=False,
help='Get restart policy for all containers'
)
),
(
('--show_stopped', '-s'),
dict(action='store', help='Show stopped only containers')
),
(
('--quiet', '-q'),
dict(action='store_true', default=False, help='Show only container IDs')
),
)
def run(self):
return commands.ps(app=self.app, **self.kwargs)