Merge "Remove the runtime constraint"

This commit is contained in:
Zuul 2017-11-01 18:31:11 +00:00 committed by Gerrit Code Review
commit 880205df53
3 changed files with 4 additions and 16 deletions

View File

@ -145,10 +145,9 @@ class CreateContainer(command.ShowOne):
help='Automatically remove the container when it exits')
parser.add_argument(
'--runtime',
choices=['runc'],
metavar='<runtime>',
help='The container runtime tool to create container with. '
'It can have following value: "runc"')
'It can have value "runc" or any other custom runtime.')
parser.add_argument(
'--hostname',
metavar='<hostname>',
@ -689,9 +688,8 @@ class RunContainer(command.ShowOne):
parser.add_argument(
'--runtime',
metavar='<runtime>',
choices=['runc'],
help='The container runtime tool to create container with. '
'It can have following value: "runc"')
'It can have value "runc" or any other custom runtime.')
parser.add_argument(
'--hostname',
metavar='<hostname>',

View File

@ -159,14 +159,6 @@ class ShellTest(shell_test_base.TestCommandLineArgument):
self._test_arg_success('run --runtime runc x')
mock_show_container.assert_called_once_with('container')
@mock.patch('zunclient.v1.containers.ContainerManager.run')
def test_zun_container_run_failure_with_wrong_runtime(
self, mock_run):
self._test_arg_failure(
'run --runtime wrong x',
self._invalid_choice_error)
self.assertFalse(mock_run.called)
@mock.patch('zunclient.v1.containers_shell._show_container')
@mock.patch('zunclient.v1.containers.ContainerManager.run')
def test_zun_container_run_success_with_hostname(

View File

@ -114,9 +114,8 @@ def _show_container(container):
'v6-fixed-ip: IPv6 fixed address for container.')
@utils.arg('--runtime',
metavar='<runtime>',
choices=['runc'],
help='The container runtime tool to create container with. '
'It can have following value: "runc"')
'It can have value "runc" or any other custom runtime.')
@utils.arg('--hostname',
metavar='<hostname>',
default=None,
@ -505,9 +504,8 @@ def do_kill(cs, args):
'v6-fixed-ip: IPv6 fixed address for container.')
@utils.arg('--runtime',
metavar='<runtime>',
choices=['runc'],
help='The container runtime tool to create container with. '
'It can have following value: "runc"')
'It can have value "runc" or any other custom runtime.')
@utils.arg('--hostname',
metavar='<hostname>',
default=None,