Merge "Re-work the response of /containers/<id>/exec"
This commit is contained in:
commit
55e316b19e
@ -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",
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user