aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/reports_collection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/onaptests/steps/reports_collection.py')
-rw-r--r--src/onaptests/steps/reports_collection.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/onaptests/steps/reports_collection.py b/src/onaptests/steps/reports_collection.py
new file mode 100644
index 0000000..b61b571
--- /dev/null
+++ b/src/onaptests/steps/reports_collection.py
@@ -0,0 +1,35 @@
+from typing import Dict
+
+
+class ReportsCollection:
+ """Collection to store steps execution statuses."""
+
+ def __init__(self) -> None:
+ """Initialize collection."""
+ self._collection: list = []
+
+ def put(self, item: Dict[str, str]) -> None:
+ """Put execution status dictionary.
+
+ Args:
+ item (Dict[str, str]): Step name with status dictionary
+
+ """
+ self._collection.append(item)
+
+ @property
+ def report(self) -> Dict[str, str]:
+ """Get report.
+
+ Build a dictionary with execution statuses.
+
+ Returns:
+ Dict[str, str]: Steps name with status dictionary
+
+ """
+ report: Dict[str, str] = {}
+ for element in self._collection[::-1]:
+ print(element)
+ print(type(element))
+ report.update(element)
+ return report