diff --git a/zunclient/osc/v1/containers.py b/zunclient/osc/v1/containers.py index 9b38b369..c33c51f5 100644 --- a/zunclient/osc/v1/containers.py +++ b/zunclient/osc/v1/containers.py @@ -243,7 +243,9 @@ class CreateContainer(command.ShowOne): opts['command'] = parsed_args.command opts['registry'] = parsed_args.registry opts['host'] = parsed_args.host - opts['entrypoint'] = zun_utils.parse_entrypoint(parsed_args.entrypoint) + if parsed_args.entrypoint: + opts['entrypoint'] = zun_utils.parse_entrypoint( + parsed_args.entrypoint) if parsed_args.security_group: opts['security_groups'] = parsed_args.security_group if parsed_args.expose_port: @@ -946,7 +948,9 @@ class RunContainer(command.ShowOne): opts['command'] = parsed_args.command opts['registry'] = parsed_args.registry opts['host'] = parsed_args.host - opts['entrypoint'] = zun_utils.parse_entrypoint(parsed_args.entrypoint) + if parsed_args.entrypoint: + opts['entrypoint'] = zun_utils.parse_entrypoint( + parsed_args.entrypoint) if parsed_args.security_group: opts['security_groups'] = parsed_args.security_group if parsed_args.expose_port: diff --git a/zunclient/tests/unit/v1/test_containers_shell.py b/zunclient/tests/unit/v1/test_containers_shell.py index 205522df..c35274b7 100644 --- a/zunclient/tests/unit/v1/test_containers_shell.py +++ b/zunclient/tests/unit/v1/test_containers_shell.py @@ -28,7 +28,6 @@ def _get_container_args(**kwargs): 'mounts': [], 'nets': [], 'command': [], - 'entrypoint': [], } default_args.update(kwargs) return default_args diff --git a/zunclient/v1/containers_shell.py b/zunclient/v1/containers_shell.py index 72c09323..72f59680 100644 --- a/zunclient/v1/containers_shell.py +++ b/zunclient/v1/containers_shell.py @@ -215,7 +215,8 @@ def do_create(cs, args): opts['command'] = args.command opts['registry'] = args.registry opts['host'] = args.host - opts['entrypoint'] = zun_utils.parse_entrypoint(args.entrypoint) + if args.entrypoint: + opts['entrypoint'] = zun_utils.parse_entrypoint(args.entrypoint) if args.healthcheck: opts['healthcheck'] = zun_utils.parse_health(args.healthcheck) @@ -749,7 +750,8 @@ def do_run(cs, args): opts['command'] = args.command opts['registry'] = args.registry opts['host'] = args.host - opts['entrypoint'] = zun_utils.parse_entrypoint(args.entrypoint) + if args.entrypoint: + opts['entrypoint'] = zun_utils.parse_entrypoint(args.entrypoint) if args.healthcheck: opts['healthcheck'] = zun_utils.parse_health(args.healthcheck)