Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

support for provisioning unlisted images #99

Conversation

michaelsbradleyjr
Copy link
Contributor

If the image isn't found in the list-collection, try to look it up directly using the get method. This allows provisioning "unlisted" images by ID, such as those indicated in the CoreOS documentation.

@krames
Copy link
Collaborator

krames commented Jun 16, 2014

Good catch!!

What do you think about moving all of this logic into find_matching? We could pass env[:rackspace_compute].flavors and env[:rackspace_compute].images in for parameters. We would call get if the name parameter anything other than a regex. If it was a regex, we could just use the same behavior.

I only mention this be cause it would be one less network call.

@michaelsbradleyjr
Copy link
Contributor Author

Reducing the number of network calls sounds good to me, though the present solution has something going for it in the way of simplicity.

I'll admit this is my first ever pull request in the Ruby language – a quick hack to get something working for one of my current projects. I'll understand if you want to close without merging and instead "substitute" a pull request along the lines you suggested; the combo-call implementation is probably better left to someone more familiar with the language.

@krames
Copy link
Collaborator

krames commented Jun 17, 2014

@michaelsbradleyjr Let me try to take a stab at this.

@krames
Copy link
Collaborator

krames commented Jun 17, 2014

@michaelsbradleyjr I just accepted another PR which makes one less network call than this approach. Thanks for bringing this issue to my attention!

@krames krames closed this Jun 17, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants