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

Migrate Ansible Tower InventoryRootGroup to be of AutomationManager #13852

Merged
merged 3 commits into from
Feb 14, 2017

Conversation

jameswnl
Copy link
Contributor

@jameswnl jameswnl commented Feb 9, 2017

A sequel to #13720
From ConfigurationManager to AutomationManager

@jameswnl
Copy link
Contributor Author

jameswnl commented Feb 9, 2017

@bdunne this one should be quick.

@jameswnl
Copy link
Contributor Author

jameswnl commented Feb 9, 2017

@miq-bot add_labels enhancement, providers/ansible_tower

@bdunne
Copy link
Member

bdunne commented Feb 9, 2017

@jameswnl I don't see a corresponding model for the source or destination type.


def up
say_with_time('Migrating STI type of ansible_tower inventory_root_groups to be of automation_manager') do
EmsFolder.where(:type => 'ManageIQ::Providers::AnsibleTower::ConfigurationManager::InventoryRootGroup').update_all(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bdunne this ^ ManageIQ::Providers::AnsibleTower::ConfigurationManager::InventoryRootGroup to ManageIQ::Providers::AnsibleTower::AutomationManager::InventoryRootGroup

Copy link
Member

Choose a reason for hiding this comment

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

image
@jameswnl but there's no model ^

irb(main):008:0> EmsFolder.descendants.collect(&:name).sort
=> ["Datacenter", "ManageIQ::Providers::AutomationManager::InventoryGroup", "ManageIQ::Providers::AutomationManager::InventoryRootGroup", "StorageCluster"]

@jameswnl
Copy link
Contributor Author

jameswnl commented Feb 9, 2017

@bdunne Good catch. It's under higher level of AutomationManager namespace. I've updated now.

@bdunne
Copy link
Member

bdunne commented Feb 9, 2017

@jameswnl Can you add the missing leaf model ManageIQ::Providers::AnsibleTower::Inventory < ManageIQ::Providers::AutomationManager::InventoryGroup and migrate to that instead?

@miq-bot
Copy link
Member

miq-bot commented Feb 10, 2017

Checked commits jameswnl/manageiq@079c028~...c9a1871 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
5 files checked, 3 offenses detected

db/migrate/20170209192130_migrate_ansible_tower_configuration_manager_inventory_root_group_sti_type.rb

spec/lib/miq_automation_engine/service_models/miq_ae_service_manageiq-providers-ansible_tower-automation_manager-inventory_spec.rb

  • ❗ - Line 1, Col 1 - Style/FileName - The name of this source file (miq_ae_service_manageiq-providers-ansible_tower-automation_manager-inventory_spec.rb) should use snake_case.

@jameswnl
Copy link
Contributor Author

@bdunne see the new updates

Copy link
Member

@bdunne bdunne left a comment

Choose a reason for hiding this comment

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

👍 LGTM. Leaving the merge for @Fryguy since he's the master of migrations.

@jameswnl
Copy link
Contributor Author

@Fryguy can we get this in within the sprint?

@Fryguy Fryguy merged commit 2382218 into ManageIQ:master Feb 14, 2017
@Fryguy Fryguy added this to the Sprint 55 Ending Feb 27, 2017 milestone Feb 14, 2017
@jameswnl jameswnl deleted the tower-migrate-2 branch February 15, 2017 14:52
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.

4 participants