2 """Simple CDS blueprint erichment test scenario."""
7 from onapsdk.configuration import settings
8 from onapsdk.exceptions import SDKException
9 from xtesting.core import testcase
11 from onaptests.steps.onboard.cds import CbaEnrichStep
12 from onaptests.utils.exceptions import OnapTestException
15 class CDSBlueprintEnrichment(testcase.TestCase):
16 """Enrich simple blueprint using CDS blueprintprocessor."""
18 __logger = logging.getLogger(__name__)
20 def __init__(self, **kwargs):
21 """Init CDS blueprint enrichment use case."""
22 if "case_name" not in kwargs:
23 kwargs["case_name"] = 'basic_cds'
24 super(CDSBlueprintEnrichment, self).__init__(**kwargs)
25 self.__logger.debug("CDS blueprint enrichment initialization")
26 self.test = CbaEnrichStep(
27 cleanup=settings.CLEANUP_FLAG)
28 self.start_time = None
33 self.__logger.debug("CDS blueprint enrichment run")
34 self.start_time = time.time()
38 except OnapTestException as exc:
40 self.__logger.error(exc.error_message)
43 self.__logger.error("SDK Exception")
45 self.stop_time = time.time()
48 """Clean Additional resources if needed."""
49 self.__logger.info("Generate Test report")
50 self.test.reports_collection.generate_report()