2 """Basic CNF test case."""
6 from xtesting.core import testcase
7 from onapsdk.configuration import settings
8 from onaptests.steps.instantiate.vf_module_ala_carte import YamlTemplateVfModuleAlaCarteInstantiateStep
10 class BasicCNF(testcase.TestCase):
11 """Onboard then instantiate a simple CNF with ONAP."""
13 __logger = logging.getLogger(__name__)
15 def __init__(self, **kwargs):
17 if "case_name" not in kwargs:
18 kwargs["case_name"] = 'basic_cnf'
19 super(BasicCNF, self).__init__(**kwargs)
20 self.__logger.debug("BasicCNF init started")
21 self.test = YamlTemplateVfModuleAlaCarteInstantiateStep(
22 cleanup=settings.CLEANUP_FLAG)
23 self.start_time = None
28 """Run onap_tests with basic_cnf VM."""
29 self.start_time = time.time()
30 self.__logger.debug("start time")
32 self.__logger.info("basic_cnf successfully created")
33 self.stop_time = time.time()
34 # The cleanup is part of the test, not only a teardown action
35 if settings.CLEANUP_FLAG:
36 self.__logger.info("basic_cnf cleanup called")
37 time.sleep(settings.CLEANUP_ACTIVITY_TIMER)
41 self.__logger.info("No cleanup requested. Test completed.")
46 """Clean Additional resources if needed."""