Closed brews closed 4 years ago
Note: Merge either this PR or PR #49. Not both.
Thanks @brews - this is definitely a clean implementation. But this requires users of the python API to create their own client, right? Why not make the client creation helper public?
@delgadom Followed your last suggestion with 1761e68.
Ready to merge when you are.
flake8 rhg_compute_tools tests docs
This PR presents an alternative approach to PR #49.
I refactored how we create authenticated clients. Minor refactor to how we mock the CLI tests. Reverted the earlier change to
rhg_compute_tools.gcs.replicate_directory_structure_on_gcs()
signature -- here it no longer accepting certificates and requires an authenticated client on input. This client is created withrhg_compute_tools.gcs._authenticate_client()
which reads from a path to credentials or use alternative authentication internal tocloud.google.storage
.I feel like this makes the process less magical and flexible enough for future development.