Rework hooks interface for v2.0.0
I'd like to use backward-
1. cached_node (aka NodeInfo) is not passed into plugins, thus they can't change e.g. options
2. return value with patches is extremely vague
3. it's impossible to add new arguments without breaking existing plugins
4. hook namespace assumes there will be only one type of hooks
5. confusion between 2 use cases of "node info"
I.
node_cache.NodeInfo class will be modified to carry node and ports attributes.
Optional arguments node and ports are added to __init__.
Accessors node and ports are added to the class. They will either use node and ports provided into __init__, or load them from Ironic and cache.
II.
before_update interface is modified:
def before_update(self, introspection_data, node_info, node_patches, ports_patches, **kwargs) -> None
III.
before_processing is modified:
def before_
addition of **kwargs will make future updates possible.
IV.
change hook namespace to ironic_
Blueprint information
- Status:
- Complete
- Approver:
- Dmitry Tantsur
- Priority:
- Essential
- Drafter:
- Dmitry Tantsur
- Direction:
- Approved
- Assignee:
- Dmitry Tantsur
- Definition:
- Approved
- Series goal:
- Accepted for liberty
- Implementation:
- Implemented
- Milestone target:
- 2.0.0
- Started by
- Dmitry Tantsur
- Completed by
- Dmitry Tantsur
Related branches
Related bugs
Sprints
Whiteboard
Work Items
Dependency tree
* Blueprints in grey have been implemented.