-
Notifications
You must be signed in to change notification settings - Fork 66
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
Parsing physical rack #147
Conversation
26c0f3a
to
f77f8b3
Compare
69dadb8
to
daf0b35
Compare
daf0b35
to
b796f2a
Compare
The Travis error is due the server[:rack] field that is not deleted after parsing, this is done here ManageIQ/manageiq#16853 and will be ok after merge. @agrare |
This pull request is not mergeable. Please rebase and repush. |
Can you rebase this with master? |
feb33c9
to
08acf5f
Compare
Done |
08acf5f
to
082a09a
Compare
@felipedf can you add some tests to the full refresh test to check for the physical racks and the association between the physical servers and the physical racks? Convention here would be to add a |
has_many :physical_racks, :foreign_key => "ems_id", :dependent => :destroy, :inverse_of => :ext_management_system, | ||
:class_name => "ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalRack" | ||
has_many :physical_servers, :foreign_key => "ems_id", :dependent => :destroy, :inverse_of => :ext_management_system, | ||
:class_name => "ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalServer" |
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.
Shouldn't the physical_racks and physical_servers associations be on the core physical_infra_manager? And you shouldn't need the class name as long as the assoc name matches the base class name
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, all should be on base models
:class_name => "ManageIQ::Providers::Lenovo::PhysicalInfraManager" | ||
|
||
belongs_to :physical_rack, :dependent => :destroy, :inverse_of => :physical_servers, | ||
:class_name => "ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalRack" |
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.
Again I think all of these associations should be defined on the base models without the class_name, not here
:class_name => "ManageIQ::Providers::Lenovo::PhysicalInfraManager" | ||
|
||
has_many :physical_servers, :dependent => :destroy, :inverse_of => :physical_rack, | ||
:class_name => "ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalServer" |
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 should be in the base model
545f851
to
384f67f
Compare
Parsing physical rack
384f67f
to
dc44ffa
Compare
Checked commit felipedf@dc44ffa with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Parse info from a PhysicalRack