driver.py (zun-6.0.0) | : | driver.py (zun-7.0.0) | ||
---|---|---|---|---|
skipping to change at line 242 | skipping to change at line 242 | |||
if not container_id: | if not container_id: | |||
return | return | |||
response = self.runtime_stub.ListContainers( | response = self.runtime_stub.ListContainers( | |||
api_pb2.ListContainersRequest( | api_pb2.ListContainersRequest( | |||
filter={'id': container_id} | filter={'id': container_id} | |||
) | ) | |||
) | ) | |||
if not response.containers: | if not response.containers: | |||
raise exception.ZunException( | raise exception.ZunException( | |||
"Container %s is not found in runtime", container_id) | "Container %s is not found in runtime" % container_id) | |||
container_response = response.containers[0] | container_response = response.containers[0] | |||
self._populate_container(container, container_response) | self._populate_container(container, container_response) | |||
return container | return container | |||
def _populate_container(self, container, response): | def _populate_container(self, container, response): | |||
self._populate_container_state(container, response) | self._populate_container_state(container, response) | |||
def _populate_container_state(self, container, response): | def _populate_container_state(self, container, response): | |||
state = response.state | state = response.state | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |