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

Add computer systems to inventory #8

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

tadeboro
Copy link
Contributor

@tadeboro tadeboro commented Jun 8, 2018

Since computer systems are in 1:1 relation with the physical servers
and carry no data on its own, we add them to the database at the same
time as the servers.

@miq-bot assign @gtanzillo
@miq-bot add_reviewer @gberginc
@miq-bot add_reviewer @matejart

@tadeboro
Copy link
Contributor Author

tadeboro commented Jun 8, 2018

I am marking this pull request as wip since needs ManageIQ/manageiq#17557 merged first.

@miq-bot add_label wip

@miq-bot miq-bot changed the title Add computer systems to inventory [WIP] Add computer systems to inventory Jun 8, 2018
@miq-bot miq-bot added the wip label Jun 8, 2018
Since computer systems are in 1:1 relation with the physical servers
and carry no data on its own, we add them to the database at the same
time as the servers.
@tadeboro tadeboro force-pushed the store-computer-systems branch from 3d5721d to 260a668 Compare June 11, 2018 11:42
@miq-bot
Copy link
Member

miq-bot commented Jun 11, 2018

Checked commit xlab-si@260a668 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. ⭐

@tadeboro tadeboro closed this Jun 12, 2018
@tadeboro tadeboro reopened this Jun 12, 2018
@tadeboro
Copy link
Contributor Author

@miq-bot remove_label wip

@miq-bot miq-bot changed the title [WIP] Add computer systems to inventory Add computer systems to inventory Jun 12, 2018
@miq-bot miq-bot removed the wip label Jun 12, 2018
Copy link
Contributor

@gberginc gberginc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment regarding additional test, if necessary.

Otherwise LGTM

@@ -24,6 +24,7 @@ def assert_ems
expect(ems.physical_servers.count).to eq(1)
expect(ems.physical_servers.map(&:ems_ref)).to match_array([server_id])
expect(ems.physical_server_details.count).to eq(1)
expect(ems.computer_systems.count).to eq(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a simple assert for the computer_system?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not add it because there is not much to check here, since ComputerSystem model only contains two fields: id and type of its managed entity. I can check if those fields match the server's, but this only checks if the refresh system is working as expected and has nothing to do with Redfish provider.

@gberginc
Copy link
Contributor

Thanks for the clarification @tadeboro. I am fine with the change.

@Ladas can you review, please?

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@agrare agrare merged commit 260a668 into ManageIQ:master Jun 13, 2018
agrare added a commit that referenced this pull request Jun 13, 2018
Add computer systems to inventory
@agrare agrare added this to the Sprint 88 Ending Jun 18, 2018 milestone Jun 13, 2018
@agrare agrare added the enhancement New feature or request label Jun 13, 2018
@tadeboro tadeboro deleted the store-computer-systems branch June 14, 2018 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants