The instanciation of the above classes is now ONLY done by the Collections class initialization, nowhere else.
The Collections class now only exposes a single dict with all available operations, all other previous operations properties are removed (e.g. dag_operations, other_operations, etc.). Specific operation types can now be obtained using the new Operations implementation (available at Collections.operations) which define a get_by_class method. For example, to retrieve a list of all operation from the DAG that are not forged during the Collections initialization:
Which issue(s) this PR fixes
Fixes None
Additional comments
Transform the
Operation
class to an abstract class that is declined in several implementations:PlaybookOperation(Operation)
OperationNoop(Operation, ABC)
DagOperation(Operation, ABC)
DagOperationNoop(DagOperation, OperationNoop)
DagOperationWithPlaybook(DagOperation, PlaybookOperation)
ForgedDagOperation(DagOperation, ABC)
ForgedDagOperationNoop(DagOperationNoop, ForgedDagOperation)
ForgedDagOperationWithPlaybook(DagOperationWithPlaybook, ForgedDagOperation)
OtherPlaybookOperation(PlaybookOperation)
The instanciation of the above classes is now ONLY done by the
Collections
class initialization, nowhere else.The
Collections
class now only exposes a single dict with all available operations, all other previous operations properties are removed (e.g.dag_operations
,other_operations
, etc.). Specific operation types can now be obtained using the newOperations
implementation (available atCollections.operations
) which define aget_by_class
method. For example, to retrieve a list of all operation from the DAG that are not forged during theCollections
initialization:Collections
andOperation
usage in the code have been refactored to match those new definitions, without affecting the existing logic.Agreements