-
Notifications
You must be signed in to change notification settings - Fork 897
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
Fixing Computer System relationship on Physical Storage #17945
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,14 @@ class PhysicalStorage < ApplicationRecord | |
has_one :asset_detail, :as => :resource, :dependent => :destroy, :inverse_of => false | ||
|
||
has_many :canisters, :dependent => :destroy, :inverse_of => false | ||
has_many :computer_system, :through => :canisters | ||
has_many :hardware, :through => :computer_system | ||
has_many :guest_devices, :through => :canisters | ||
|
||
has_many :physical_disks, :dependent => :destroy, :inverse_of => :physical_storage | ||
|
||
has_one :computer_system, :as => :managed_entity, :dependent => :destroy | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're still missing the previous relations (:hardware, :guest_devices) IMO this should go back to before #17706 and just add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @agrare Fixed it, and put |
||
has_one :hardware, :through => :computer_system | ||
|
||
has_many :canister_computer_systems, :through => :canisters, :source => :computer_system | ||
has_many :guest_devices, :through => :hardware | ||
|
||
supports :refresh_ems | ||
|
||
def my_zone | ||
|
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.
Do you need to delete these? Thought you just had to change to `:computer_systems
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 Initially I thought that just fix the pluralization would do the job, but talking with the team we noted that it didn't make sense to let these relationships on PhysicalStorage since they're already in Canister. So I updated this PR title and description to fit the changes.
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.
from the UI side, no problem with this, the failing test caused by the other PR was really just the rename, fixed in ManageIQ/manageiq-ui-classic#4602 (so we're no longer touching
PhysicalStorage#computer_system
at all)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 the disruption @himdel