#!/bin/bash
cd ..
-patch -p0 <lighty/patch_ordm41_deviations.diff
-mvn clean install -DskipTests
-#git checkout -- ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
+#mvn clean install -DskipTests
git clone https://github.com/PantheonTechnologies/lighty-core.git
cd lighty-core
git checkout master
cd ../lighty
mvn clean install
cd target
-unzip lighty-transportpce-11.0.0-SNAPSHOT-bin.zip
+unzip lighty-transportpce-12.0.0-SNAPSHOT-bin.zip
cd ..
-# rm -rf ../lighty-core
+rm -rf ../lighty-core
+++ /dev/null
-diff --git ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-index 9928281..3ad3749 100644
---- ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-+++ ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
-@@ -110,64 +110,6 @@ module org-openroadm-network-topology {
- "Version 2.0";
- }
-
-- deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
-- deviate add {
-- must
-- "(not /nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or
-- (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and
-- (../cnet:node-type = 'DEGREE' or ../cnet:node-type = 'SRG' or ../cnet:node-type = 'TPDR' or ../cnet:node-type = 'SWITCH' or
-- ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI' or ../cnet:node-type = 'EXT-PLUGGABLE' or
-- ../cnet:node-type = 'MUXPDR'))" {
-- error-message "Invalid node type for openroadm-topology";
-- description
-- "The valid node types in the ROADM topology are 'SRG', 'DEGREE',
-- 'TPDR', 'SWITCH', 'REGEN', 'REGEN-UNI', 'EXT-PLUGGABLE' and 'MUXPDR'";
-- }
-- }
-- }
-- deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" {
-- description
-- "Defines which TP types can be instantiated on which Node types";
-- deviate add {
-- must
-- "/nd:network/nd:node/cnet:node-type != 'DEGREE' or (../../cnet:node-type = 'DEGREE' and
-- (../cnet:tp-type = 'DEGREE-TX-TTP' or ../cnet:tp-type = 'DEGREE-RX-TTP' or ../cnet:tp-type = 'DEGREE-TXRX-TTP' or
-- ../cnet:tp-type = 'DEGREE-TX-CTP' or ../cnet:tp-type = 'DEGREE-RX-CTP' or ../cnet:tp-type = 'DEGREE-TXRX-CTP'))" {
-- error-message "Invalid TP for node type 'DEGREE'";
-- }
-- must
-- "/nd:network/nd:node/cnet:node-type != 'SRG' or (../../cnet:node-type = 'SRG' and
-- (../cnet:tp-type = 'SRG-TX-CP' or ../cnet:tp-type = 'SRG-RX-CP' or ../cnet:tp-type = 'SRG-TXRX-CP' or
-- ../cnet:tp-type = 'SRG-RX-PP' or ../cnet:tp-type = 'SRG-TX-PP' or ../cnet:tp-type = 'SRG-TXRX-PP'))" {
-- error-message "Invalid TP for node type 'SRG'";
-- }
-- must
-- " (/nd:network/nd:node/cnet:node-type != 'TPDR' and ../../cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'REGEN' and
-- ../../cnet:node-type != 'REGEN-UNI' and ../../cnet:node-type != 'SWITCH')
-- or ((../../cnet:node-type = 'TPDR' or ../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'REGEN' or
-- ../../cnet:node-type = 'REGEN-UNI' or ../../cnet:node-type = 'SWITCH') and
-- (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" {
-- error-message "Invalid TP for node type 'XPONDER'";
-- }
-- must "/nd:network/nd:node/cnet:node-type != 'EXT-PLUGGABLE' or (../../cnet:node-type = 'EXT-PLUGGABLE' and ../cnet:tp-type = 'EXT-PLUGGABLE-TP')" {
-- error-message "Invalid TP for node type 'EXT-PLUGGABLE'";
-- }
-- }
-- }
-- deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" {
-- deviate add {
-- must
-- "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology) or
-- (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-topology and
-- (../cnet:link-type = 'ROADM-TO-ROADM' or ../cnet:link-type = 'ADD-LINK' or ../cnet:link-type = 'DROP-LINK' or
-- ../cnet:link-type = 'EXPRESS-LINK' or ../cnet:link-type = 'XPONDER-INPUT' or ../cnet:link-type = 'XPONDER-OUTPUT'))" {
-- error-message "Invalid link type for openroadm-topology";
-- description
-- "The valid link types in the ROADM topology are 'ROADM-TO-ROADM', 'ADD-LINK',
-- 'DROP-LINK', 'EXPRESS-LINK', 'XPONDER-INPUT', 'XPONDER-OUTPUT'";
-- }
-- }
-- }
- augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
- description
- "Introduce new network type for the Open ROADM optical
-diff --git ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-index a236b88..ce5a8d9 100644
---- ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-+++ ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
-@@ -104,18 +104,6 @@ module org-openroadm-network {
- "Version 1.2";
- }
-
-- deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
-- deviate add {
-- must
-- "(not /nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network) or
-- (/nd:network/nd:network-types/cnet:openroadm-common-network/openroadm-network and
-- (../cnet:node-type = 'ROADM' or ../cnet:node-type = 'XPONDER' or ../cnet:node-type = 'EXT-PLUGGABLE'))" {
-- error-message "Invalid node type for openroadm-network";
-- description
-- "The valid node types in the ROADM network are XPONDER, EXT-PLUGGABLE and ROADM.";
-- }
-- }
-- }
- augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
- description
- "Introduce new network type for the Open ROADM optical network";
-diff --git ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-index 756f4df..fd2d1f1 100644
---- ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-+++ ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
-@@ -90,44 +90,6 @@ module org-openroadm-otn-network-topology {
- "Version 2.1";
- }
-
-- deviation "/nd:networks/nd:network/nd:node/cnet:node-type" {
-- deviate add {
-- must
-- "(not /nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology) or
-- (/nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology and
-- (../cnet:node-type = 'SWITCH' or ../cnet:node-type = 'MUXPDR' or ../cnet:node-type = 'TPDR' or
-- ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI'))" {
-- error-message "Invalid node type for otn-topology";
-- description
-- "The type of a node in the OTN topology. Valid node types are 'MUXPDR', 'TPDR' and 'SWITCH'";
-- }
-- }
-- }
-- deviation "/nd:networks/nd:network/nd:node/nwt:termination-point/cnet:tp-type" {
-- description
-- "Defines which TP types can be instantiated on which Node types";
-- deviate add {
-- must
-- "(/nd:network/nd:node/cnet:node-type != 'MUXPDR' and ../../cnet:node-type != 'SWITCH' and ../../cnet:node-type != 'TPDR'
-- and ../cnet:node-type != 'REGEN' and ../cnet:node-type != 'REGEN-UNI') or
-- ((../../cnet:node-type = 'MUXPDR' or ../../cnet:node-type = 'SWITCH' or ../../cnet:node-type = 'TPDR' or
-- ../cnet:node-type = 'REGEN' or ../cnet:node-type = 'REGEN-UNI') and
-- (../cnet:tp-type = 'XPONDER-NETWORK' or ../cnet:tp-type = 'XPONDER-CLIENT' or ../cnet:tp-type = 'XPONDER-PORT'))" {
-- error-message "Invalid TP for node type Xponder";
-- }
-- }
-- }
-- deviation "/nd:networks/nd:network/nwt:link/cnet:link-type" {
-- deviate add {
-- must
-- "(not /nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology) or
-- (/nd:network/nd:network-types/cnet:openroadm-common-network/otn-topology and ../cnet:link-type = 'OTN-LINK')" {
-- error-message "Invalid link type for otn-topology";
-- description
-- "The valid link type in the OTN topology is 'OTN-LINK'";
-- }
-- }
-- }
- augment "/nd:networks/nd:network/nd:network-types/cnet:openroadm-common-network" {
- description
- "Introduce new network type for the Open ROADM OTN network topology";
<parent>
<groupId>io.lighty.core</groupId>
<artifactId>lighty-app-parent</artifactId>
- <version>11.0.0-SNAPSHOT</version>
+ <version>12.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>io.lighty.examples.controllers</groupId>
<artifactId>lighty-transportpce</artifactId>
- <version>11.0.0-SNAPSHOT</version>
+ <version>12.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
--- /dev/null
+#!/bin/bash
+
+BASEDIR=$(dirname "$0")
+#echo "${BASEDIR}"
+cd ${BASEDIR}
+
+rm -rf cache
+rm -rf target
+
+#start controller
+java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.0.0-SNAPSHOT.jar
cd ${BASEDIR}
#start controller
-java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-11.0.0-SNAPSHOT.jar
+java -ms128m -mx128m -XX:MaxMetaspaceSize=128m -jar lighty-transportpce-12.0.0-SNAPSHOT.jar
--- /dev/null
+#!/bin/bash
+
+echo "Starting openroadm 2.2.1 end2end tests with lighty build..."
+export USE_LIGHTY="True"
+tox -e end2end221
import subprocess
import time
import unittest
+import test_utils
class TransportPCEFulltesting(unittest.TestCase):
#START_IGNORE_XTESTING
@classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17821", "sample_configs/openroadm/2.1/oper-ROADMA-full.xml"],
- stdout=outfile)
+ def setUpClass(cls):
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode3(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode3.log', 'w') as outfile:
- cls.honeynode_process3 = subprocess.Popen(
- [executable, "17823", "sample_configs/openroadm/2.1/oper-ROADMC-full.xml"],
- stdout=outfile)
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_full_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode4(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode4.log', 'w') as outfile:
- cls.honeynode_process4 = subprocess.Popen(
- [executable, "17834", "sample_configs/openroadm/2.1/oper-XPDRC.xml"],
- stdout=outfile)
+ print ("starting honeynode3...")
+ cls.honeynode_process3 = test_utils.start_roadmc_full_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
+ print ("starting honeynode4...")
+ cls.honeynode_process4 = test_utils.start_xpdrc_honeynode()
+ time.sleep(20)
+ print ("all honeynodes started")
- @classmethod
- def setUpClass(cls):
- print ("starting honeynode1")
- cls.__start_honeynode1()
- time.sleep(40)
- print ("starting honeynode2")
- cls.__start_honeynode2()
- time.sleep(40)
- print ("starting honeynode3")
- cls.__start_honeynode3()
- time.sleep(40)
- print ("starting honeynode4")
- cls.__start_honeynode4()
- time.sleep(40)
- print ("starting opendaylight")
- cls.__start_odl()
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(80)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import time
import unittest
import logging
+import test_utils
class TransportGNPYtesting(unittest.TestCase):
if os.path.isfile("./transportpce_tests/gnpy.log"):
os.remove("transportpce_tests/gnpy.log")
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('transportpce_tests/odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_odl()
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(30)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import psutil
import shutil
from unittest.result import failfast
+import test_utils
class TransportOlmTesting(unittest.TestCase):
#START_IGNORE_XTESTING
@classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
- stdout=outfile)
+ def setUpClass(cls):
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17821", "sample_configs/openroadm/2.1/oper-ROADMA-full.xml"],
- stdout=outfile)
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_full_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode3(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode3.log', 'w') as outfile:
- cls.honeynode_process3 = subprocess.Popen(
- [executable, "17823", "sample_configs/openroadm/2.1/oper-ROADMC-full.xml"],
- stdout=outfile)
- @classmethod
- def __start_honeynode4(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode4.log', 'w') as outfile:
- cls.honeynode_process4 = subprocess.Popen(
- [executable, "17834", "sample_configs/openroadm/2.1/oper-XPDRC.xml"],
- stdout=outfile)
+ print ("starting honeynode3...")
+ cls.honeynode_process3 = test_utils.start_roadmc_full_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
+ print ("starting honeynode4...")
+ cls.honeynode_process4 = test_utils.start_xpdrc_honeynode()
+ time.sleep(20)
+ print ("all honeynodes started")
- @classmethod
- def setUpClass(cls):
- cls.__start_honeynode1()
- time.sleep(30)
- cls.__start_honeynode2()
- time.sleep(30)
- cls.__start_honeynode3()
- time.sleep(30)
- cls.__start_honeynode4()
- time.sleep(30)
- cls.__start_odl()
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import subprocess
import time
import unittest
+import test_utils
class TransportPCEtesting(unittest.TestCase):
with open(topo_uni_dir_complex_file, 'r') as topo_uni_dir_complex:
cls.complex_topo_uni_dir_data = topo_uni_dir_complex.read();
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls): # a class method called before tests in an individual class run.
cls._get_file()
- cls.__start_odl()
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(90)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import subprocess
import time
import unittest
+import test_utils
class TransportPCEPortMappingTesting(unittest.TestCase):
#START_IGNORE_XTESTING
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_odl()
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import psutil
import shutil
from unittest.result import failfast
+import test_utils
class TransportPCERendererTesting(unittest.TestCase):
#START_IGNORE_XTESTING
@classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
- stdout=outfile)
+ def setUpClass(cls):
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
+ time.sleep(20)
- @classmethod
- def setUpClass(cls):
- cls.__start_honeynode1()
- time.sleep(40)
- cls.__start_honeynode2()
- time.sleep(40)
- cls.__start_odl()
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import time
import unittest
import logging
+import test_utils
class TransportPCEtesting(unittest.TestCase):
#START_IGNORE_XTESTING
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_odl()
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import time
import unittest
import logging
+import test_utils
class TransportPCETopologyTesting(unittest.TestCase):
#START_IGNORE_XTESTING
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode3(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode3.log', 'w') as outfile:
- cls.honeynode_process3 = subprocess.Popen(
- [executable, "17832", "sample_configs/openroadm/2.1/oper-ROADMB.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode4(cls):
- executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode4.log', 'w') as outfile:
- cls.honeynode_process4 = subprocess.Popen(
- [executable, "17833", "sample_configs/openroadm/2.1/oper-ROADMC.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_honeynode3()
+
+ print ("starting honeynode3...")
+ cls.honeynode_process3 = test_utils.start_roadmb_honeynode()
time.sleep(20)
- cls.__start_honeynode4()
+
+ print ("starting honeynode4...")
+ cls.honeynode_process4 = test_utils.start_roadmc_honeynode()
time.sleep(20)
- cls.__start_odl()
+ print ("all honeynodes started")
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
--- /dev/null
+import os
+import subprocess
+
+def start_xpdra_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode1.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
+ stdout=outfile)
+
+def start_roadma_full_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode2.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17821", "sample_configs/openroadm/2.1/oper-ROADMA-full.xml"],
+ stdout=outfile)
+
+def start_roadma_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode2.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA.xml"],
+ stdout=outfile)
+
+def start_roadmb_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode3.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17832", "sample_configs/openroadm/2.1/oper-ROADMB.xml"],
+ stdout=outfile)
+
+def start_roadmc_full_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode3.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17823", "sample_configs/openroadm/2.1/oper-ROADMC-full.xml"],
+ stdout=outfile)
+
+def start_roadmc_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode4.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17833", "sample_configs/openroadm/2.1/oper-ROADMC.xml"],
+ stdout=outfile)
+
+def start_xpdrc_honeynode():
+ executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode4.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17834", "sample_configs/openroadm/2.1/oper-XPDRC.xml"],
+ stdout=outfile)
+
+def start_tpce():
+ if "USE_LIGHTY" in os.environ and os.environ['USE_LIGHTY'] == 'True':
+ print ("starting LIGHTY.IO TransportPCE build...")
+ executable = "../lighty/target/lighty-transportpce-12.0.0-SNAPSHOT/clean-start-controller.sh"
+ with open('odl.log', 'w') as outfile:
+ return subprocess.Popen(
+ ["bash", executable], stdout=outfile,
+ stdin=open(os.devnull))
+ else:
+ print ("starting KARAF TransportPCE build...")
+ executable = "../karaf/target/assembly/bin/karaf"
+ with open('odl.log', 'w') as outfile:
+ return subprocess.Popen(
+ ["bash", executable, "server"], stdout=outfile,
+ stdin=open(os.devnull))
import subprocess
import time
import unittest
+import test_utils
class TransportPCEFulltesting(unittest.TestCase):
#START_IGNORE_XTESTING
@classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
- stdout=outfile)
+ def setUpClass(cls):
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode3(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode3.log', 'w') as outfile:
- cls.honeynode_process3 = subprocess.Popen(
- [executable, "17843", "sample_configs/openroadm/2.2.1/oper-ROADMC.xml"],
- stdout=outfile)
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode4(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode4.log', 'w') as outfile:
- cls.honeynode_process4 = subprocess.Popen(
- [executable, "17844", "sample_configs/openroadm/2.2.1/oper-XPDRC.xml"],
- stdout=outfile)
+ print ("starting honeynode3...")
+ cls.honeynode_process3 = test_utils.start_roadmc_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
+ print ("starting honeynode4...")
+ cls.honeynode_process4 = test_utils.start_xpdrc_honeynode()
+ time.sleep(20)
+ print ("all honeynodes started")
- @classmethod
- def setUpClass(cls):
- print ("starting honeynode1")
- cls.__start_honeynode1()
- time.sleep(40)
- print ("starting honeynode2")
- cls.__start_honeynode2()
- time.sleep(40)
- print ("starting honeynode3")
- cls.__start_honeynode3()
- time.sleep(40)
- print ("starting honeynode4")
- cls.__start_honeynode4()
- time.sleep(40)
- print ("starting opendaylight")
- cls.__start_odl()
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(80)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import psutil
import shutil
from unittest.result import failfast
+import test_utils
class TransportOlmTesting(unittest.TestCase):
#START_IGNORE_XTESTING
@classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
- stdout=outfile)
+ def setUpClass(cls):
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
- stdout=outfile)
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_honeynode3(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode3.log', 'w') as outfile:
- cls.honeynode_process3 = subprocess.Popen(
- [executable, "17843", "sample_configs/openroadm/2.2.1/oper-ROADMC.xml"],
- stdout=outfile)
- @classmethod
- def __start_honeynode4(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode4.log', 'w') as outfile:
- cls.honeynode_process4 = subprocess.Popen(
- [executable, "17844", "sample_configs/openroadm/2.2.1/oper-XPDRC.xml"],
- stdout=outfile)
+ print ("starting honeynode3...")
+ cls.honeynode_process3 = test_utils.start_roadmc_honeynode()
+ time.sleep(20)
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
+ print ("starting honeynode4...")
+ cls.honeynode_process4 = test_utils.start_xpdrc_honeynode()
+ time.sleep(20)
- @classmethod
- def setUpClass(cls):
- cls.__start_honeynode1()
- time.sleep(30)
- cls.__start_honeynode2()
- time.sleep(30)
- cls.__start_honeynode3()
- time.sleep(30)
- cls.__start_honeynode4()
- time.sleep(30)
- cls.__start_odl()
+ print ("all honeynodes started")
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import subprocess
import time
import unittest
+import test_utils
class TransportPCEPortMappingTesting(unittest.TestCase):
odl_process = None
restconf_baseurl = "http://localhost:8181/restconf"
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_odl()
+ print ("all honeynodes started")
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import psutil
import shutil
from unittest.result import failfast
+import test_utils
class TransportPCERendererTesting(unittest.TestCase):
#START_IGNORE_XTESTING
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_odl()
+ print ("all honeynodes started")
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import time
import unittest
import logging
+import test_utils
class TransportPCEtesting(unittest.TestCase):
#START_IGNORE_XTESTING
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_odl()
+ print ("all honeynodes started")
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
import time
import unittest
import logging
+import test_utils
class TransportPCEtesting(unittest.TestCase):
#START_IGNORE_XTESTING
- @classmethod
- def __start_honeynode1(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process1 = subprocess.Popen(
- [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode2(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process2 = subprocess.Popen(
- [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode3(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode1.log', 'w') as outfile:
- cls.honeynode_process3 = subprocess.Popen(
- [executable, "17842", "sample_configs/openroadm/2.2.1/oper-ROADMB.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_honeynode4(cls):
- executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
- "/honeynode-distribution-1.18.01/honeycomb-tpce")
- if os.path.isfile(executable):
- with open('honeynode2.log', 'w') as outfile:
- cls.honeynode_process4 = subprocess.Popen(
- [executable, "17843", "sample_configs/openroadm/2.2.1/oper-ROADMC.xml"],
- stdout=outfile)
-
- @classmethod
- def __start_odl(cls):
- executable = "../karaf/target/assembly/bin/karaf"
- with open('odl.log', 'w') as outfile:
- cls.odl_process = subprocess.Popen(
- ["bash", executable, "server"], stdout=outfile,
- stdin=open(os.devnull))
-
@classmethod
def setUpClass(cls):
- cls.__start_honeynode1()
+ print ("starting honeynode1...")
+ cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
time.sleep(20)
- cls.__start_honeynode2()
+
+ print ("starting honeynode2...")
+ cls.honeynode_process2 = test_utils.start_roadma_honeynode()
time.sleep(20)
- cls.__start_honeynode3()
+
+ print ("starting honeynode3...")
+ cls.honeynode_process3 = test_utils.start_roadmb_honeynode()
time.sleep(20)
- cls.__start_honeynode4()
+
+ print ("starting honeynode4...")
+ cls.honeynode_process4 = test_utils.start_roadmc_honeynode()
time.sleep(20)
- cls.__start_odl()
+ print ("all honeynodes started")
+
+ print ("starting opendaylight...")
+ cls.odl_process = test_utils.start_tpce()
time.sleep(60)
+ print ("opendaylight started")
@classmethod
def tearDownClass(cls):
--- /dev/null
+import os
+import subprocess
+
+def start_xpdra_honeynode():
+ executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode1.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
+ stdout=outfile)
+
+def start_roadma_honeynode():
+ executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode2.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
+ stdout=outfile)
+
+def start_roadmb_honeynode():
+ executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode5.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17842", "sample_configs/openroadm/2.2.1/oper-ROADMB.xml"],
+ stdout=outfile)
+
+def start_roadmc_honeynode():
+ executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode3.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17843", "sample_configs/openroadm/2.2.1/oper-ROADMC.xml"],
+ stdout=outfile)
+
+def start_xpdrc_honeynode():
+ executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+ "/honeynode-distribution-1.18.01/honeycomb-tpce")
+ if os.path.isfile(executable):
+ with open('honeynode4.log', 'w') as outfile:
+ return subprocess.Popen(
+ [executable, "17844", "sample_configs/openroadm/2.2.1/oper-XPDRC.xml"],
+ stdout=outfile)
+
+def start_tpce():
+ if "USE_LIGHTY" in os.environ and os.environ['USE_LIGHTY'] == 'True':
+ print ("starting LIGHTY.IO TransportPCE build...")
+ executable = "../lighty/target/lighty-transportpce-12.0.0-SNAPSHOT/clean-start-controller.sh"
+ with open('odl.log', 'w') as outfile:
+ return subprocess.Popen(
+ ["bash", executable], stdout=outfile,
+ stdin=open(os.devnull))
+ else:
+ print ("starting KARAF TransportPCE build...")
+ executable = "../karaf/target/assembly/bin/karaf"
+ with open('odl.log', 'w') as outfile:
+ return subprocess.Popen(
+ ["bash", executable, "server"], stdout=outfile,
+ stdin=open(os.devnull))
setupdir = tests/
[testenv]
+passenv = USE_LIGHTY
usedevelop = True
basepython = python2.7
deps =
{py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c "if [ ! `which mvn` ]; then ./installMavenCentOS.sh ; fi"
{py27,portmapping,topoPortMapping,rspn,topology,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c "sed 's@=.*//#FUNCTESTVAL=@=@g' ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java >/tmp/pivot; mv /tmp/pivot ../olm/src/main/java/org/opendaylight/transportpce/olm/util/OlmUtils.java"
{py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c "(cd .. && mvn clean install -s tests/odl_settings.xml -DskipTests -Dmaven.javadoc.skip=true)"
+ {py27,portmapping,topoPortMapping,rspn,topology,pce,olm,end2end,portmapping221,rspn221,topology221,olm221,end2end221,gnpy}: - bash -c 'if [ "$USE_LIGHTY" == "True" ]; then (cd ../lighty && ./build.sh); fi'
{py27,portmapping,topoPortMapping,rspn,topology,olm,end2end}: - ./buildHoneynode.sh
{py27,portmapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_portmapping.py
{py27,topoPortMapping}: nosetests --with-xunit transportpce_tests/1.2.1/test_topoPortMapping.py