-
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
Add relationship between [physical switch and physical chassis] and event stream #17661
Conversation
304590a
to
7b963b6
Compare
Checked commit felipedf@4dc96ee with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
rest looks good
@@ -27,6 +27,8 @@ class EventStream < ApplicationRecord | |||
|
|||
belongs_to :middleware_server, :foreign_key => :middleware_server_id | |||
belongs_to :physical_server | |||
belongs_to :physical_chassis, :inverse_of => :event_streams | |||
belongs_to :physical_switch, :inverse_of => :event_streams |
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.
I think I'm missing something here.
I didn't find physical_switch_id
or physical_chassis_id
in event_streams
table.
Is it through physical_server
?
(Not sure how many fields we can add to event_streams
without things going seriously downhill)
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.
My bad here @kbrock, it is depended on another PR, added it to the description
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.
(Not sure how many fields we can add to event_streams without things going seriously downhill)
Agree, I guess it was decided to keep things this way while we design a better architecture for events.
@agrare am I right?
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.
Yeah the proposed solution was worse than the problem IMO and if this really becomes an issue we can always delete the middleware relationship keys.
ManageIQ/manageiq-schema#229 Merged |
@@ -1,10 +1,14 @@ | |||
class PhysicalChassis < ApplicationRecord | |||
include SupportsFeatureMixin |
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.
Is this related to adding the relationship to ems_events?
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.
It is, as EventMixin
tries to execute some method from SupportsFeatureMixin
on its super class, in that context PhysicalChassis
https://github.com/ManageIQ/manageiq/blob/master/app/models/mixins/event_mixin.rb#L6
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.
Ahh okay thanks @felipedf
@@ -1,10 +1,14 @@ | |||
class PhysicalSwitch < Switch | |||
include SupportsFeatureMixin |
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.
Same
This PR is able to add a relationship between
physical_switch
-event_stream
andphysical_chassis
-event_stream
Depends on:
ManageIQ/manageiq-schema#229