Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
hubboss / boss / app / commands / ps.py
Size: Mime:
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)