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

Develop IPMI Extension #114

Closed
26 tasks done
NassimBtk opened this issue Mar 15, 2024 · 0 comments · Fixed by #156
Closed
26 tasks done

Develop IPMI Extension #114

NassimBtk opened this issue Mar 15, 2024 · 0 comments · Fixed by #156
Assignees

Comments

@NassimBtk
Copy link
Member

NassimBtk commented Mar 15, 2024

Description

Check List

Agent

  • Remove the IpmiProtocolConfig class.
  • Remove ConfigHelperTest#testValidateIpmiInfo() because the validation will be moved to the IpmiConfiguration class in the metricshub-ipmi-extension.
  • In ConfigHelper move the validateIpmiInfo() method content to the IpmiConfiguration class which is located in the metricshub-ipmi-extension. And adapt the ConfigHelper code so that we call IConfiguration#validateConfiguration (ipmiConfiguration) to validate the content of the Ipmi configuration.
  • Add the IConfiguration instance for ipmi to the final Map<Class<? extends IConfiguration>, IConfiguration> protocolConfigurations map which is built in ConfigHelper#buildHostConfiguration.
  • In the MetricsHub CLI, adapt the IpmiConfigCli class.
  • Re-write IpmiConfigCli.toProtocol to call the extensionManager instance responsible of building the right IConfiguration for Ipmi protocol.
  • If it is required to build a new configuration for IPMI in the unit tests then create a IpmiTestConfiguration class and create its extension IpmiTestExtension.
  • Adapt the TaskSchedulingServiceTest to replace the removed classes by the extension classes E.g. IpmiTestConfiguration.
  • Adapt the IpmiConfigCliTest tests. Probably Static Mocks will be involved.

Engine

  • Remove the org.sentrysoftware:ipmi dependency from metricshub-engine POM.
  • Move IpmiConfiguration.java to metricshub-ipmi-extension module.
  • Move the IpmiConfigurationTest class to the extension unit tests.
  • Remove IpmiConfiguration.class mapping from the HostConfiguration#CONFIGURATION_TO_SOURCES_MAP map.
  • Move ClientsExecutor.executeIpmi code to the metricshub-ipmi-extension. Make sure to remove the call from the ClientsExecutor.executeWql method and adapt the caller (SourceProcessor CriterionProcessor) to invoke the extensionManager correctly.
  • Move ProtocolHealthCheckStrategy#checkIpmiHealth to IpmiExtension located at the metricshub-ipmi-extension module. Make sure to remove the unused constants and methods.
  • Move the code of the processOutOfBandIpmiSource method invoked by the method: SourceProcessor#process(@SpanAttribute("source.definition") final IpmiSource ipmiSource) to the appropriate class in the metricshub-ipmi-extension module and call the extensionManager in this process method to execute the OOB source previously done by the moved method processOutOfBandIpmiSource.
  • Move the code of the processOutOfBandIpmiDetection method invoked by the method: CriterionProcessor#CriterionTestResult process(@SpanAttribute("criterion.definition") IpmiCriterion IpmiCriterion) to the appropriate class in the metricshub-ipmi-extension module and call the extensionManager in this process method to execute the OOB criterion previously done by the moved method processOutOfBandIpmiDetection.
  • Adapt correct engine unit tests because the code is moved to another module.

Extension

  • Make sure to include the required dependencies (org.sentrysoftware:ipmi and org.sentrysoftware:metricshub-ipmi-extension)
  • Add the metricshub-engine,lombok, jupiter,jackson (all the necessary dependencies) in the extension project's POM.
  • Implement the IProtocolExtension class.
  • Make sure to define the /metricshub-ipmi-extension/src/main/resources/META-INF/services/org.sentrysoftware.metricshub.engine.extension.IProtocolExtension file so that the ServiceLoader loads the extension implementation correctly at runtime.
  • Make sure to create a jar using the maven-shade-plugin (POM)
  • Develop unit tests.

Packaging Windows and Linux

  • Add the metricshub-ipmi-extension as dependency.
  • Update the maven-dependency-plugin, execution-id: unpack-extensions and add the artifactItem defining the metricshub-ipmi-extension.
alexdgilbert added a commit that referenced this issue Apr 12, 2024
Developed IPMI extension, pending final work on extension tests.
alexdgilbert added a commit that referenced this issue Apr 15, 2024
Issue #114: Last modification and tests
alexdgilbert added a commit that referenced this issue Apr 15, 2024
Issue #114: Developed IPMI extension

Developed IPMI extension.
alexdgilbert added a commit that referenced this issue Apr 18, 2024
Further developed unit tests
@alexdgilbert alexdgilbert linked a pull request Apr 18, 2024 that will close this issue
alexdgilbert added a commit that referenced this issue Apr 18, 2024
Code review changes
alexdgilbert added a commit that referenced this issue Apr 18, 2024
Post-merge fixes
NassimBtk added a commit that referenced this issue Apr 23, 2024
* Various updates before EPIC merge.
NassimBtk added a commit that referenced this issue Apr 23, 2024
NassimBtk added a commit that referenced this issue Apr 23, 2024
* Fixed IPMI configuration setup in ConfigHelper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants