-
Notifications
You must be signed in to change notification settings - Fork 898
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
Save Canister Model #17706
Save Canister Model #17706
Conversation
251802e
to
077a112
Compare
This pull request is not mergeable. Please rebase and repush. |
077a112
to
73c027b
Compare
@EsdrasVP can you add an entry in the Persister for PhysicalInfraManager for this? https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/inventory/persister/builder/physical_infra_manager.rb |
73c027b
to
5b8eadd
Compare
@agrare I updated it with Canisters and PhysicalStorages, since both of them are related. |
# | ||
# Saves the canister information of a storage | ||
# | ||
def save_canister_inventory(parent, hash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a canister can only belong to a physical storage it'd be better to call this physical_storage
instead of parent
. We use parent
if something can belong to more than one type of parent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agrare Fear enough, I put it just in case this change in the future, but I'm changing it to physical_storage
.
5b8eadd
to
237a1c9
Compare
@EsdrasVP looks like it is failing for an unrelated reason, I pinged the maintainer of those tests about it and when he fixes it i'll restart these tests and merge. |
237a1c9
to
4fc696d
Compare
Checked commit EsdrasVP@4fc696d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@agrare Now I think everything is fine. |
has_many :guest_devices, :through => :hardware | ||
|
||
has_many :canisters, :dependent => :destroy, :inverse_of => false | ||
has_many :computer_system, :through => :canisters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks surprising.. shouldn't this be computer_systems
? (plural because has_many..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh you're right I missed that, @EsdrasVP can you push a PR to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that, fixed it on ManageIQ/manageiq#17945
This PR is able to:
Depends on:
ManageIQ/manageiq-schema#233 - MergedManageIQ/manageiq#17700 - Merged