Merge "Re-work the response of /containers/<id>/exec"

This commit is contained in:
Zuul 2017-11-23 06:51:10 +00:00 committed by Gerrit Code Review
commit 55e316b19e
2 changed files with 7 additions and 2 deletions

View File

@ -580,7 +580,9 @@ class Manager(periodic_task.PeriodicTasks):
if run:
return self.driver.execute_run(exec_id, command)
else:
return {'exec_id': exec_id,
return {'output': None,
'exit_code': None,
'exec_id': exec_id,
'url': CONF.docker.docker_remote_api_url}
except exception.DockerError as e:
LOG.error("Error occurred while calling Docker exec API: %s",

View File

@ -559,7 +559,10 @@ class DockerDriver(driver.ContainerDriver):
raise exception.Conflict(_(
"Timeout on executing command: %s") % command)
inspect_res = docker.exec_inspect(exec_id)
return {"output": output, "exit_code": inspect_res['ExitCode']}
return {"output": output,
"exit_code": inspect_res['ExitCode'],
"exec_id": None,
"url": None}
def execute_resize(self, exec_id, height, width):
height = int(height)