Use factory pattern to register plugin's events

Registered by Masahito Muroi on 2017-10-06

The current behavior of some event methods can be configurable, but all codes are placed in one method and divided by if-statement. It doesn't have good maintenanceability and hard to add new options. For instance, the before_end method[1] shouldn't use if-statement to decide its behavior.

 Suggested changes: using factory design pattern to create/register event actions for blazar-manager service. The change enables developers to implements new events action or differenct behaviors easily.

1. https://github.com/openstack/blazar/blob/master/blazar/plugins/oshosts/host_plugin.py#L158

Blueprint information

Status:
Not started
Approver:
None
Priority:
Low
Drafter:
Masahito Muroi
Direction:
Needs approval
Assignee:
Masahito Muroi
Definition:
New
Series goal:
Accepted for train
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.