-
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
Adds structure to hardware relationship, parse_hardware and missed attributes #35
Conversation
Adding structure needed to relationship between physical server and hardware, such as: 1. `parse_hardware` method 2. `has_one` relationship into PhysicalServer model 3. adding some missed attributes into `parse_nodes` method
@odravison unrecognized command 'add_labe', ignoring... Accepted commands are: add_label, assign, close_issue, move_issue, remove_label, rm_label, set_milestone |
@miq-bot add_label WIP |
Checked commits odravison/manageiq-providers-lenovo@f8696d3~...a5e6aad with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@miq-bot remove_label WIP |
@@ -1,5 +1,7 @@ | |||
module ManageIQ::Providers | |||
class Lenovo::PhysicalInfraManager::PhysicalServer < ::PhysicalServer | |||
has_one :hardware |
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 isn't needed here, as this Lenovo::PhysicalInfraManager::PhysicalServer
inherits from PhysicalServer
in the main ManageIQ repo. That model has the dependencies. See this PR ManageIQ/manageiq#14430
@@ -69,23 +88,43 @@ def parse_firmware(firmware, uuid) | |||
} | |||
end | |||
|
|||
def parse_hardware(node) |
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 is great, I wasn't sure what data we needed to be parsed. 👍
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.
The data that we need parse are: total memory in node.memoryModules
, total CPU cores and the maximum processor frequency in node.processors
, as you can see in the method. It was decided during a meeting with Lenovo guys.
This pull request is not mergeable. Please rebase and repush. |
This PR should be closed. |
:macAddresses => node.macAddress.split(",").flatten, | ||
:ipv4Addresses => node.ipv4Addresses.split.flatten, | ||
:ipv6Addresses => node.ipv6Addresses.split.flatten | ||
:type => ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalServer.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.
This needs rebasing now that #34 has been merged.
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 PR should be closed and splited in two others:
- Parse hardware informations(Parse provider and save(MIQ) Processor and memory infomation #39)
- Add missing attributes
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.
The second one PR was opened: #40
Odravison can you close this PR? |
@juliancheal can you close this PR? Odravison don't work with us anymore. |
Adding structure needed to relationship between physical server and hardware, such as:
parse_hardware
methodhas_one
relationship into PhysicalServer modelparse_nodes
methodDepends on: #34