aboutsummaryrefslogtreecommitdiffstats
path: root/run_multi_vnf_ubuntu.py
diff options
context:
space:
mode:
authorJulien Fontaine <julien.fontaine@bell.ca>2021-08-04 15:52:02 -0400
committerOleg Mitsura <oleg.mitsura@amdocs.com>2021-10-19 06:44:23 -0400
commitc3ef82f489b915095b7464fb119daf43b84f67f8 (patch)
tree5d6ce5b4896e4b0b0844dfccb0ebd59f2c72f244 /run_multi_vnf_ubuntu.py
parent062f7ed7f73ed61dc3990c3a23403fd544ae6261 (diff)
[TEST] Added support for multi-vnf macro instantiation
Decoupled service YAML template into a model YAML template and a (SO) service YAML template. Model YAML template will be used during the onboarding steps and service YAML template will be used to generate payload when sending instantiation request to SO. Service YAML template reference model name to use for its VNF/VF-Modules using "model_name" field. This provide more flexibility to design the testcase and enables to setup more complex testcases like instantiating several VNF/VF-MOdules using the same SDC model infos. This patch aims to provide backward compatibility for existing testcases based on YAML template. Issue-ID: TEST-358 Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca> Change-Id: I69d370eff4d383d5af135206476c65e4a56e4ee5
Diffstat (limited to 'run_multi_vnf_ubuntu.py')
-rw-r--r--run_multi_vnf_ubuntu.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/run_multi_vnf_ubuntu.py b/run_multi_vnf_ubuntu.py
new file mode 100644
index 0000000..e8ca7fa
--- /dev/null
+++ b/run_multi_vnf_ubuntu.py
@@ -0,0 +1,32 @@
+import logging.config
+import time
+import onaptests.utils.exceptions as onap_test_exceptions
+from onapsdk.configuration import settings
+from onaptests.scenario.multi_vnf_macro import MultiVnfUbuntuMacroStep
+
+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("Instantiate Ubuntu multi VNF without multicloud")
+ step = MultiVnfUbuntuMacroStep(cleanup=settings.CLEANUP_FLAG)
+ try:
+ step.execute()
+ if settings.CLEANUP_FLAG:
+ logger.info("Starting to clean up in {} seconds".format(settings.CLEANUP_ACTIVITY_TIMER))
+ time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
+ step.cleanup()
+ except onap_test_exceptions.TestConfigurationException:
+ logger.error("Ubuntu NSO VM configuration error")
+ except onap_test_exceptions.ServiceInstantiateException:
+ logger.error("Ubuntu NSO VM instantiation error")
+ except onap_test_exceptions.ServiceCleanupException:
+ logger.error("Ubuntu NSO VM instance cleanup error")
+ except onap_test_exceptions.VnfInstantiateException:
+ logger.error("Ubuntu NSO VM Vnf instantiation error")
+ except onap_test_exceptions.VnfCleanupException:
+ logger.error("Ubuntu NSO VM Vnf instance cleanup error")
+ except onap_test_exceptions.VfModuleInstantiateException:
+ logger.error("Ubuntu NSO VM Module instantiation error")
+ except onap_test_exceptions.VfModuleCleanupException:
+ logger.error("Ubuntu NSO VM Module cleanup error")