Remove unimplemented 'show' command

Its not clear what this command would return which would be useful for
the user. For now they can find all they need by running 'paunch list'
or commands directly to docker.

Change-Id: I9e2744946799655ca0cc075955de36f70a5dc04a
This commit is contained in:
Steve Baker 2017-05-01 11:47:02 +12:00
parent aebcaba50f
commit e4cf82b9cf
4 changed files with 0 additions and 32 deletions

View File

@ -79,10 +79,6 @@ def list(managed_by, docker_cmd=None):
return r.list_configs()
def show(config_id, managed_by, docker_cmd=None):
raise NotImplementedError()
def delete(config_ids, managed_by, docker_cmd=None):
"""Delete containers with the specified config IDs.

View File

@ -162,27 +162,3 @@ class List(lister.Lister):
status = i.get('State', {}).get('Status')
data.append((k, name, image, cmd, status))
return columns, data
class Show(command.Command):
log = logging.getLogger(__name__)
def get_parser(self, prog_name):
parser = super(Show, self).get_parser(prog_name)
parser.add_argument(
'config_id',
metavar='<config_id>',
help=('Identifier for the config to show the containers for'),
)
parser.add_argument(
'--managed-by',
metavar='<name>',
dest='managed_by',
default='paunch',
help=('Override the name of the tool managing the containers'),
)
return parser
def take_action(self, parsed_args):
paunch.show(parsed_args.config_id, parsed_args.managed_by)

View File

@ -65,9 +65,6 @@ class TestPaunch(base.TestCase):
runner.assert_called_once_with('tester', docker_cmd=None)
runner.return_value.list_configs.assert_called_once_with()
def test_show(self):
self.assertRaises(NotImplementedError, paunch.show, 'foo', 'tester')
@mock.patch('paunch.runner.DockerRunner', autospec=True)
def test_delete(self, runner):
paunch.delete(['foo', 'bar'], 'tester')

View File

@ -32,7 +32,6 @@ paunch =
cleanup = paunch.cmd:Cleanup
delete = paunch.cmd:Delete
list = paunch.cmd:List
show = paunch.cmd:Show
[build_sphinx]
source-dir = doc/source