Merge "Remove the runtime constraint"
This commit is contained in:
commit
880205df53
@ -145,10 +145,9 @@ class CreateContainer(command.ShowOne):
|
|||||||
help='Automatically remove the container when it exits')
|
help='Automatically remove the container when it exits')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--runtime',
|
'--runtime',
|
||||||
choices=['runc'],
|
|
||||||
metavar='<runtime>',
|
metavar='<runtime>',
|
||||||
help='The container runtime tool to create container with. '
|
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(
|
parser.add_argument(
|
||||||
'--hostname',
|
'--hostname',
|
||||||
metavar='<hostname>',
|
metavar='<hostname>',
|
||||||
@ -689,9 +688,8 @@ class RunContainer(command.ShowOne):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--runtime',
|
'--runtime',
|
||||||
metavar='<runtime>',
|
metavar='<runtime>',
|
||||||
choices=['runc'],
|
|
||||||
help='The container runtime tool to create container with. '
|
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(
|
parser.add_argument(
|
||||||
'--hostname',
|
'--hostname',
|
||||||
metavar='<hostname>',
|
metavar='<hostname>',
|
||||||
|
@ -159,14 +159,6 @@ class ShellTest(shell_test_base.TestCommandLineArgument):
|
|||||||
self._test_arg_success('run --runtime runc x')
|
self._test_arg_success('run --runtime runc x')
|
||||||
mock_show_container.assert_called_once_with('container')
|
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_shell._show_container')
|
||||||
@mock.patch('zunclient.v1.containers.ContainerManager.run')
|
@mock.patch('zunclient.v1.containers.ContainerManager.run')
|
||||||
def test_zun_container_run_success_with_hostname(
|
def test_zun_container_run_success_with_hostname(
|
||||||
|
@ -114,9 +114,8 @@ def _show_container(container):
|
|||||||
'v6-fixed-ip: IPv6 fixed address for container.')
|
'v6-fixed-ip: IPv6 fixed address for container.')
|
||||||
@utils.arg('--runtime',
|
@utils.arg('--runtime',
|
||||||
metavar='<runtime>',
|
metavar='<runtime>',
|
||||||
choices=['runc'],
|
|
||||||
help='The container runtime tool to create container with. '
|
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',
|
@utils.arg('--hostname',
|
||||||
metavar='<hostname>',
|
metavar='<hostname>',
|
||||||
default=None,
|
default=None,
|
||||||
@ -505,9 +504,8 @@ def do_kill(cs, args):
|
|||||||
'v6-fixed-ip: IPv6 fixed address for container.')
|
'v6-fixed-ip: IPv6 fixed address for container.')
|
||||||
@utils.arg('--runtime',
|
@utils.arg('--runtime',
|
||||||
metavar='<runtime>',
|
metavar='<runtime>',
|
||||||
choices=['runc'],
|
|
||||||
help='The container runtime tool to create container with. '
|
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',
|
@utils.arg('--hostname',
|
||||||
metavar='<hostname>',
|
metavar='<hostname>',
|
||||||
default=None,
|
default=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user