-
Notifications
You must be signed in to change notification settings - Fork 117
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
Vendor API connection code from Docker SDK for Python #398
Vendor API connection code from Docker SDK for Python #398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some very small things that are not worth withholding approval, nice work!
# if self.debug: | ||
# log_file = open('docker.log', 'a') | ||
# if pretty_print: | ||
# log_file.write(json.dumps(msg, sort_keys=True, indent=4, separators=(',', ': '))) | ||
# log_file.write(u'\n') | ||
# else: | ||
# log_file.write(msg + u'\n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this meant to stay in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copied from common.py, having it commented out makes it easy to comment it back in and have some basic logging on debug=true
. So as long as it looks the same in common.py it should also be in common_api.py :)
This is a combination of the latest git version (https://github.com/docker/docker-py/tree/a48a5a9647761406d66e8271f19fab7fa0c5f582) and the version before Python 2.7 support was removed (https://github.com/docker/docker-py/tree/650aad3a5fb84059b392ad450f760ed08143ae3f), including some modifications to work with Ansible module_utils's system (i.e. third-party imports are guarded, and errors are reported during runtime through a new exception MissingRequirementException).
The delete call cannot be called delete() since that method already exists from requests.
Co-authored-by: Brian Scholer <[email protected]>
ad635bf
to
e181b5c
Compare
@briantist thanks a lot for reviewing this! |
SUMMARY
Subset of #387: just add the vendored code and some module_utils and plugin_utils.
Once this is merged, I will create one PR per plugin/module from #387.
ISSUE TYPE
COMPONENT NAME
module_utils
plugin_utils