Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Streamer download requests use permanently stored pem files. #2499

Merged
merged 1 commit into from Mar 30, 2016

Conversation

bowlofeggs
Copy link
Contributor

This commit begins a shift towards storing repository PEM data (CA
certificates, client certificates, and client keys) on the
filesystem, and passing paths to those certs to Nectar rather than
allowing nectar to write them in temporary files.

This commit provides the infrastructure for this change, but only
converts the streamer to using it. All other downloads in Pulp
still take the old, now deprecated path.

https://pulp.plan.io/issues/1771

fixes #1771

@bowlofeggs bowlofeggs changed the title Streamer download requests use permanently stored pem files. [WIP] Streamer download requests use permanently stored pem files. Mar 28, 2016
@bowlofeggs bowlofeggs changed the title [WIP] Streamer download requests use permanently stored pem files. Streamer download requests use permanently stored pem files. Mar 30, 2016
@@ -454,14 +454,17 @@ def queue_delete(repo_id):

def get_importer_by_id(object_id):
"""
Get a plugin and call configuration using the document ID
Get a plugin, call configuration, and Importer document object using the document ID
Copy link
Contributor

Choose a reason for hiding this comment

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

Oxford comma 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jeremycline jeremycline self-assigned this Mar 30, 2016
importer_constants.KEY_SSL_CLIENT_CERT: 'Client Cert',
importer_constants.KEY_SSL_CLIENT_KEY: 'Client Key'}
importer = model.Importer(repo_id='coolcars', importer_type_id='supercar', config=config)
temp_path = tempfile.mkdtemp()
Copy link
Contributor

Choose a reason for hiding this comment

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

Somebody told me about https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory recently. Too bad we can't use Python 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, wasn't that me, yesterday?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I was trying to pour salt into the wound, but I guess my text tone was just a little off 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really wish we could use Python 3 though ☹

@jeremycline
Copy link
Contributor

Looks good to me. I got worried for a second with the get_importer_by_id signature change, but it seems we added that especially for lazy. Who knew?

Anyway, nice job. I'm not sure why Jenkies is unhappy, but it doesn't look to be related to this PR.

@bowlofeggs
Copy link
Contributor Author

Yeah that change also made me nervous, but I did grep for other uses and found that only the streamer uses it. Unfortunately, there is another function with the same name in pulp.plugins.something so the grep was slightly tricky.

This commit begins a shift towards storing repository PEM data (CA
certificates, client certificates, and client keys) on the
filesystem, and passing paths to those certs to Nectar rather than
allowing nectar to write them in temporary files.

This commit provides the infrastructure for this change, but only
converts the streamer to using it. All other downloads in Pulp
still take the old, now deprecated path.

https://pulp.plan.io/issues/1771

fixes pulp#1771
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants