diff options
author | Chereau Natacha <natacha.chereau@orange.com> | 2021-01-13 10:54:46 +0100 |
---|---|---|
committer | Chereau Natacha <natacha.chereau@orange.com> | 2021-01-15 11:01:19 +0100 |
commit | ff24de49ef658ffe0aa13d494e8201bd181bce2c (patch) | |
tree | b4425e2240fd1cd1e760053f49fc161f71208595 /run_basic_onboard.py | |
parent | d089e89005df1b4b3b6238a2937e23791c07d9ae (diff) |
[PythonSDK-tests] Add basic_onboard testcase
Issue-ID: TEST-288
Signed-off-by: Chereau Natacha <natacha.chereau@orange.com>
Change-Id: Ide7267428b5ca694dc3ca44a4c81730233610b78
Diffstat (limited to 'run_basic_onboard.py')
-rw-r--r-- | run_basic_onboard.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/run_basic_onboard.py b/run_basic_onboard.py new file mode 100644 index 0000000..835c661 --- /dev/null +++ b/run_basic_onboard.py @@ -0,0 +1,20 @@ +import logging.config +import onaptests.utils.exceptions as onap_test_exceptions +from onapsdk.configuration import settings +from onaptests.steps.onboard.service import YamlTemplateServiceOnboardStep + + + +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 Onboard") + + basic_vm_onboard = YamlTemplateServiceOnboardStep( + cleanup=settings.CLEANUP_FLAG) + try: + basic_vm_onboard.execute() + except onap_test_exceptions.TestConfigurationException: + logger.error("Basic Onboard configuration error") + basic_vm_onboard.reports_collection.generate_report() |