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

[WIP] Collect instance types from the API #582

Conversation

agrare
Copy link
Member

@agrare agrare commented Dec 19, 2019

@agrare agrare requested a review from Fryguy as a code owner December 19, 2019 17:33
@miq-bot miq-bot added the wip label Dec 19, 2019
@agrare agrare force-pushed the bz_1781155_dynamically_collect_aws_instance_types branch 2 times, most recently from 43b254e to b15f2c3 Compare December 19, 2019 17:46
@miq-bot
Copy link
Member

miq-bot commented Dec 19, 2019

Checked commit agrare@b15f2c3 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

@@ -4,7 +4,7 @@ def instances
end

def flavors
ManageIQ::Providers::Amazon::InstanceTypes.all
hash_collection.new(aws_ec2.client.describe_instance_types[:instance_types])
Copy link
Contributor

Choose a reason for hiding this comment

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

Any filters we should apply here? Do we want to cap the results? Just checking:

https://docs.aws.amazon.com/sdkforruby/api/Aws/EC2/Client.html#describe_instance_types-instance_method

Copy link
Member Author

Choose a reason for hiding this comment

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

No need to cap the results, but we do need to handle paging generally. That is out of scope of this PR since that is a general issue with all of these API calls. I opened an issue to track that, #583

Copy link
Contributor

Choose a reason for hiding this comment

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

So then it just becomes hash_collection.new(aws_ec2.client.describe_instance_types.flat_map(&:instance_types))

@agrare
Copy link
Member Author

agrare commented Apr 30, 2020

Superseded by #614

@agrare agrare closed this Apr 30, 2020
@agrare agrare deleted the bz_1781155_dynamically_collect_aws_instance_types branch April 30, 2020 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants