[RM] Add get_hardware_info
method to the Hardware Components
#1643
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to go with the similar efforts of #1623, the idea is to protect the critical variables of the hardware components interfaces, as these variables are actively used within the ResourceManager inorder to call and define the components and it's group,. Modifying them might cause undesired behaviour and this is something we should strive to avoid happening.
To give some context, until Iron, the
on_init
method was supposed to be overwritten and the user is kinda responsible to also call the base class implementation to set thisinfo_
variable, and if the user forgets to do this callback, this will affect the whole internal schema as it creates a new Hardware component internally with empty name etc.This PR aims to solve this by adding this new method, so users can get the hardware info from there, and then eventually move the
info_
andlifecycle_state_
to private context to avoid such misuses or modifying the information.Thank you