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

Inventory and inventory target abstraction for refreshes with new strategies #13407

Conversation

Ladas
Copy link
Contributor

@Ladas Ladas commented Jan 9, 2017

Inventory and inventory target abstraction for refreshes with new strategies needed for the inventory refresh.

Ladas added 8 commits January 9, 2017 15:53
A proper init for the db_cached_all InventoryCollection,
the inventory collection must behave the same regardless the source
of the data coming from the DB or the API.
RefreshParserInventoryObject base class with Inventory
Add strategy local_db_find_one allowing to find one in the DB.
This strategy is effective for targetted refresh, where we
load small number of relations.
Allow to disable changed? check before updating record, we need
to disable it e.g. for AWS Vms, since we can change what images
we collect. Changing of vm's image, is not caught by changed?
Add also strategy name to inventory_collection inspect
Find should handle nil gracefully
This strategy is comes handy when we do targeted refresh of
a inventory_collection while there is a lazy_link to record
present only in the DB.

E.g. we refresh a VM and Hardware, but hardware has a lazy link
to hardware owned by Vm's image.
Fix save_inventory helper log messages
@miq-bot
Copy link
Member

miq-bot commented Jan 9, 2017

Checked commits Ladas/manageiq@cb7ba93~...b2ad914 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
3 files checked, 4 offenses detected

app/models/manager_refresh/inventory_collection.rb

@Ladas
Copy link
Contributor Author

Ladas commented Jan 9, 2017

@miq-bot assign @agrare

@miq-bot miq-bot assigned agrare and unassigned blomquisg Jan 9, 2017
@agrare agrare merged commit d557f19 into ManageIQ:master Jan 12, 2017
@agrare agrare added this to the Sprint 52 Ending Jan 16, 2017 milestone Jan 12, 2017
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