Skip to content

[LIBCLOUD-864] Fix Docker Driver install_image response parsing#918

Closed
ptzianos wants to merge 1 commit into
apache:trunkfrom
ptzianos:libcloud_864_docker_driver_response_parsing_fix
Closed

[LIBCLOUD-864] Fix Docker Driver install_image response parsing#918
ptzianos wants to merge 1 commit into
apache:trunkfrom
ptzianos:libcloud_864_docker_driver_response_parsing_fix

Conversation

@ptzianos
Copy link
Copy Markdown
Contributor

@ptzianos ptzianos commented Oct 20, 2016

Minor fix for Docker Driver response parsing

Description

As reported in the corresponding bug, the docker daemon will respond in an install_image call with all the messages produced during the procedure parsed as json docs. In that case the response headers also contain the value 'transfer-encoding':'chunked'. That kind of response can now be parsed properly by the DockerResponse parse_body method. Also, another small change is that previously the id of the new image was marked in the json document as id, but now it's marked as sha256, so the regex used to discover the id has been updated. Finally the test data have been updated both for linux and for mac for install_image tests where this behavior has been observed and the version of the test fixtures has been bumped up to 124 to show the change more clearly.

Status

Done and ready for review.

Checklist (tick everything that applies)

def _vmac_124_images_create(
self, method, url, body, headers):
return (httplib.OK, self.fixtures.load('mac_124/create_image.json'), {'Content-Type': 'application/json'},
return (httplib.OK, self.fixtures.load('mac_124/create_image.txt'), {'Content-Type': 'application/json', 'transfer-encoding': 'chunked'},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asfgit asfgit closed this in d59e52c Oct 24, 2016
asfgit pushed a commit that referenced this pull request Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants