Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

ptzianos
Copy link
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)

httplib.responses[httplib.OK])

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
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