From f33a45ee94377e2b4654d9d69812320e4b2b823b Mon Sep 17 00:00:00 2001 From: Kevin Klues Date: Fri, 24 Feb 2017 10:40:05 -0800 Subject: [PATCH] task: allow `dcos task exec` to work with pods. (#916) --- dcos/mesos.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dcos/mesos.py b/dcos/mesos.py index 03d5036..93e97c8 100644 --- a/dcos/mesos.py +++ b/dcos/mesos.py @@ -481,7 +481,7 @@ class Master(object): def _get_container_id(container_status): if 'container_id' in container_status: if 'value' in container_status['container_id']: - return container_status['container_id']['value'] + return container_status['container_id'] raise DCOSException( "No container found for the specified task." @@ -1206,9 +1206,7 @@ class TaskIO(object): 'type': "LAUNCH_NESTED_CONTAINER_SESSION", 'launch_nested_container_session': { 'container_id': { - 'parent': { - 'value': self.parent_id - }, + 'parent': self.parent_id, 'value': self.container_id }, 'command': { @@ -1289,9 +1287,7 @@ class TaskIO(object): 'attach_container_input': { 'type': 'CONTAINER_ID', 'container_id': { - 'parent': { - 'value': self.parent_id - }, + 'parent': self.parent_id, 'value': self.container_id}}} yield self.encoder.encode(message)