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

Maintain instance types #170

Merged
merged 4 commits into from
Mar 14, 2017
Merged

Conversation

durandom
Copy link
Member

@durandom durandom commented Mar 9, 2017

This takes data from

and creates a new instance_types.rb file to be copied over app/models/manageiq/providers/amazon/instance_types.rb

It can be run via a rake task

❯ bin/rails providers:amazon:instance_types
Created ./instance_types.rb with 21 new, 4 newly deprecated and 0 new
discontinued instances.
Now copy it to the existing one:

mv instance_types.rb
app/models/manageiq/providers/amazon/instance_types.rb

It maintains order of the current instances.

NOTE: I havent found a better place than a rake task for this. I started out with a spec, but specs should not create files. Then a tools/ script, but I can't rails runner in an engine. Now it's a task.
For this, I had to load a engine tasks in the Rakefile. I opted to put them under the providers:amazon namespace, because they are also loaded in the core repo

If you want I could split this into 2 PRs

  1. change Rakefile
  2. add rake task

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1427966

cc @bronaghs @Fryguy @blomquisg

@durandom
Copy link
Member Author

durandom commented Mar 9, 2017

includes #171
because new instances is euwe/yes and this is euwe/no

❯ bin/rails providers:amazon:instance_types
Created ./instance_types.rb with 21 new, 4 newly deprecated and 0 new
discontinued instances.
Now copy it to the existing one:

mv instance_types.rb
app/models/manageiq/providers/amazon/instance_types.rb
@miq-bot
Copy link
Member

miq-bot commented Mar 9, 2017

Some comments on commits durandom/manageiq-providers-amazon@69db2fc~...36effca

lib/tasks/instance_types.rake

  • ⚠️ - 208 - Detected puts. Remove all debugging statements.
  • ⚠️ - 211 - Detected puts. Remove all debugging statements.

@miq-bot
Copy link
Member

miq-bot commented Mar 9, 2017

Checked commits durandom/manageiq-providers-amazon@69db2fc~...36effca with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
8 files checked, 5 offenses detected

app/models/manageiq/providers/amazon/instance_types.rb

@blomquisg blomquisg merged commit a0344f6 into ManageIQ:master Mar 14, 2017
@blomquisg blomquisg added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 14, 2017
@durandom durandom deleted the maintain_instance_types branch March 14, 2017 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants