From e5ace9e5527503c87b3332a49adbdef29622dea4 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sat, 1 Apr 2017 22:29:59 -0400 Subject: [PATCH] Return docker url as well on interactive mode This is a requirement for supporting interactive execute inside a container. Generally speaking, this feature works by letting server expose the URL that is used by client to connect and enter the container. This patch is the first step by letting server return the URL. There is another patch in zunclient for leveraging the URL to connect to the container: https://review.openstack.org/#/c/445234/ Note that it is insecure to directly expose such URL and this will be fixed by another BP: https://blueprints.launchpad.net/zun/+spec/stream-via-rest-api Partial-Implements: blueprint support-interactive-mode Change-Id: If987222ecf5419a305810858e304a4c2b4a78474 --- zun/compute/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zun/compute/manager.py b/zun/compute/manager.py index 58ae83f39..aa23c4891 100755 --- a/zun/compute/manager.py +++ b/zun/compute/manager.py @@ -338,7 +338,7 @@ class Manager(object): if run: return self.driver.execute_run(exec_id) else: - return exec_id + return {'exec_id': exec_id, 'url': CONF.docker.api_url} except exception.DockerError as e: LOG.error("Error occurred while calling Docker exec API: %s", six.text_type(e))