diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2023-01-18 13:24:23 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2023-02-02 16:04:15 +0000 |
commit | 698fb766ab97734f0e6b72405a333bec657a47a4 (patch) | |
tree | 17d3969aa25249fded2fd7a5b0e0926ddd7564b6 /run_basic_cps.py | |
parent | b723ad3518ee635cdb2c5e1b9b5bc507bad1703c (diff) |
[CPS] Create basic_cps test
Create test to check if creating basic cps resources (dataspace, schema-set, anchor) works
and it's possible to create a node on an anchor.
Issue-ID: INT-2194
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I86c5a80da65b90e2f1a228fcc7fc46a54bee92bc
Diffstat (limited to 'run_basic_cps.py')
-rw-r--r-- | run_basic_cps.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/run_basic_cps.py b/run_basic_cps.py new file mode 100644 index 0000000..53deda2 --- /dev/null +++ b/run_basic_cps.py @@ -0,0 +1,21 @@ +import logging.config +import onaptests.utils.exceptions as onap_test_exceptions +from onapsdk.configuration import settings +from onaptests.steps.onboard.cps import CreateCpsAnchorStep, CreateCpsSchemaSetStep, CreateCpsDataspaceStep, CreateCpsAnchorNodeStep + + + +if __name__ == "__main__": + # logging configuration for onapsdk, it is not requested for onaptests + # Correction requested in onapsdk to avoid having this duplicate code + logging.config.dictConfig(settings.LOG_CONFIG) + logger = logging.getLogger("Basic CPS") + + basic_cps = CreateCpsAnchorNodeStep( + cleanup=settings.CLEANUP_FLAG) + try: + basic_cps.execute() + basic_cps.cleanup() + except onap_test_exceptions.TestConfigurationException: + logger.error("Basic CPS configuration error") + basic_cps.reports_collection.generate_report() |