- karaf_log = os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- "..", "..", "..", "karaf", "target", "assembly", "data", "log", "karaf.log")
- searched_expr = re.escape("Blueprint container for bundle "
- "org.opendaylight.netconf.restconf") + ".* was successfully created"
- found = test_utils.wait_until_log_contains(karaf_log, searched_expr, time_to_wait=60)
- cls.init_failed = not found
- if not cls.init_failed:
- print("opendaylight started")
- print("installing tapi feature...")
- result = test_utils.install_karaf_feature("odl-transportpce-tapi")
- if result.returncode != 0:
- cls.init_failed = True
- print("Restarting opendaylight...")
- test_utils.shutdown_process(cls.odl_process)
- cls.odl_process = test_utils.start_tpce()
- found = test_utils.wait_until_log_contains(karaf_log, searched_expr, time_to_wait=60)
- cls.init_failed = not found
- if not cls.init_failed:
- print("starting XPDRA...")
- cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
-
- print("starting ROADMA...")
- cls.honeynode_process2 = test_utils.start_roadma_honeynode()
-
- print("starting ROADMC...")
- cls.honeynode_process3 = test_utils.start_roadmc_honeynode()
-
- print("starting XPDRC...")
- cls.honeynode_process4 = test_utils.start_xpdrc_honeynode()
-
- print("starting SPDRA...")
- cls.honeynode_process5 = test_utils.start_spdra_honeynode()
- print("all honeynodes started")
+ print("installing tapi feature...")
+ result = test_utils.install_karaf_feature("odl-transportpce-tapi")
+ if result.returncode != 0:
+ cls.init_failed = True
+ print("Restarting OpenDaylight...")
+ test_utils.shutdown_process(cls.processes[0])
+ cls.processes[0] = test_utils.start_karaf()
+ test_utils.process_list[0] = cls.processes[0]
+ cls.init_failed = not test_utils.wait_until_log_contains(
+ test_utils.KARAF_LOG, test_utils.KARAF_OK_START_MSG, time_to_wait=60)
+ if cls.init_failed:
+ print("tapi installation feature failed...")
+ test_utils.shutdown_process(cls.processes[0])
+ sys.exit(2)
+ cls.processes = test_utils.start_sims(['xpdra', 'roadma', 'roadmc', 'xpdrc', 'spdra'])