diff --git a/zunclient/osc/v1/containers.py b/zunclient/osc/v1/containers.py index 6d637177..1fe17681 100644 --- a/zunclient/osc/v1/containers.py +++ b/zunclient/osc/v1/containers.py @@ -842,9 +842,9 @@ class CommitContainer(command.Command): opts['tag'] = parsed_args.tag opts = zun_utils.remove_null_parms(**opts) try: - client.containers.commit(container, **opts) - print(_('Request to commit container %s has been accepted') - % container) + image = client.containers.commit(container, **opts) + print("Request to commit container %s has been accepted. " + "The image is %s." % (container, image)) except Exception as e: print("commit container %(container)s failed: %(e)s" % {'container': container, 'e': e}) diff --git a/zunclient/v1/containers_shell.py b/zunclient/v1/containers_shell.py index 27431cd1..832b2ca7 100644 --- a/zunclient/v1/containers_shell.py +++ b/zunclient/v1/containers_shell.py @@ -586,9 +586,9 @@ def do_commit(cs, args): if args.tag is not None: opts['tag'] = args.tag try: - cs.containers.commit(args.container, **opts) - print("Request to commit container %s has been accepted." % - args.container) + image = cs.containers.commit(args.container, **opts) + print("Request to commit container %s has been accepted. " + "The image is %s." % (args.container, image)) except Exception as e: print("Commit for container %(container)s failed: %(e)s" % {'container': args.container, 'e': e})