diff --git a/src/tests/ofc24/_old/README.md b/src/tests/ofc24/_old/README.md new file mode 100644 index 0000000000000000000000000000000000000000..93e95fc642273bf852c829d6fae14cddf8ccba96 --- /dev/null +++ b/src/tests/ofc24/_old/README.md @@ -0,0 +1,21 @@ +# OFC'24 - Test scenario + +## Start Topology +Topology is composed of 2 transponders managed through OpenConfig and 2 Multi-granular ROAMDS +Strat the topology executing the following command: +```bash +sudo ./start_topo.sh +``` + +## Populate the TFS context and topology +Pushing the JSON files following the file indexes, i.e, 1, 2, 3, ... +The last JSON file with ID 7 is the service. +To check the service is onboarded successfully go into the TFS WebUI and check the `Service` tab. + +## Check configuration in devices +Check if the devices are configured properly. +To check that, run, for each device (X={1, 2, 3, 4}): +```bash +screen -r tX +``` +To release the terminal, press `Ctrl + A + D` diff --git a/src/tests/ofc24/startExtraNetConfigAgent.sh b/src/tests/ofc24/_old/startExtraNetConfigAgent.sh similarity index 100% rename from src/tests/ofc24/startExtraNetConfigAgent.sh rename to src/tests/ofc24/_old/startExtraNetConfigAgent.sh diff --git a/src/tests/ofc24/start_topo.sh b/src/tests/ofc24/_old/start_topo.sh similarity index 100% rename from src/tests/ofc24/start_topo.sh rename to src/tests/ofc24/_old/start_topo.sh diff --git a/src/tests/ofc24/deploy-node-agents.sh b/src/tests/ofc24/deploy-node-agents.sh index d0d32e07938e4c27fab0a414147e0e11e906249e..1c1e455268ecb542eecc8f4292e931575145f415 100755 --- a/src/tests/ofc24/deploy-node-agents.sh +++ b/src/tests/ofc24/deploy-node-agents.sh @@ -17,8 +17,8 @@ TEST_NAME="ofc24" echo -echo "Pre-deploy clean-up:" -echo "--------------------" +echo "Clean-up:" +echo "---------" docker rm -f na-t1 na-t2 na-r1 na-r2 docker network rm na-br @@ -34,35 +34,33 @@ echo echo "Create Management Network and Node Agents:" echo "------------------------------------------" docker network create -d bridge --subnet=172.254.253.0/24 --gateway=172.254.253.254 --ip-range=172.254.253.0/24 na-br -docker run -d --name na-t1 --network=na-br --ip 172.254.253.1 \ - --volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/platform_t1.xml:/confd/examples.confd/OC23/demoECOC21.xml" \ +docker run -dit --init --name na-t1 --network=na-br --ip 172.254.253.101 \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-tp.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_t1.xml:/confd/examples.confd/OC23/platform.xml" \ asgamb1/oc23bgp.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh - #--volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/startNetconfAgent.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ -docker run -d --name na-t2 --network=na-br --ip 172.254.253.2 \ - --volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/platform_t2.xml:/confd/examples.confd/OC23/demoECOC21.xml" \ +docker run -dit --init --name na-t2 --network=na-br --ip 172.254.253.102 \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-tp.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_t2.xml:/confd/examples.confd/OC23/platform.xml" \ asgamb1/oc23bgp.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh - #--volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/startNetconfAgent.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ -docker run -d --name na-r1 --network=na-br --ip 172.254.253.101 \ - --volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/platform_r1.xml:/confd/examples.confd/OC23/init_openconfig-platform.xml" \ +docker run -dit --init --name na-r1 --network=na-br --ip 172.254.253.201 \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-mg-on.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_r1.xml:/confd/examples.confd/OC23/platform.xml" \ asgamb1/flexscale-node.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh - #--volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/startNetconfAgent.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ -docker run -d --name na-r2 --network=na-br --ip 172.254.253.102 \ - --volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/platform_r2.xml:/confd/examples.confd/OC23/init_openconfig-platform.xml" \ +docker run -dit --init --name na-r2 --network=na-br --ip 172.254.253.202 \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/startNetconfAgent-mg-on.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ + --volume "$PWD/src/tests/${TEST_NAME}/node-agents-config/platform_r2.xml:/confd/examples.confd/OC23/platform.xml" \ asgamb1/flexscale-node.img:latest /confd/examples.confd/OC23/startNetconfAgent.sh - #--volume "$PWD/src/tests/${TEST_NAME}/tempOC/files/startNetconfAgent.sh:/confd/examples.confd/OC23/startNetconfAgent.sh" \ echo echo "Waiting for initialization..." echo "-----------------------------" docker ps -a -sleep 5 -docker ps -a while ! docker logs na-t1 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done while ! docker logs na-t2 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done while ! docker logs na-r1 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done while ! docker logs na-r2 2>&1 | grep -q '*** ConfD OpenConfig NETCONF agent ***'; do sleep 1; done -sleep 2 +sleep 3 docker ps -a @@ -70,16 +68,10 @@ echo echo "Dump Node Agent status:" echo "-----------------------" docker ps -a -#docker logs na-t1 -#docker logs na-t2 -#docker logs na-r1 -#docker logs na-r2 - +docker logs na-t1 +docker logs na-t2 +docker logs na-r1 +docker logs na-r2 -#echo -#echo "Post-test clean-up:" -#echo "-------------------" -#docker rm -f na-t1 na-t2 na-r1 na-r2 -#docker network rm na-br echo "Done!" diff --git a/src/tests/ofc24/7.service-bidir.json b/src/tests/ofc24/descriptors/7.service-bidir.json similarity index 100% rename from src/tests/ofc24/7.service-bidir.json rename to src/tests/ofc24/descriptors/7.service-bidir.json diff --git a/src/tests/ofc24/7.service-unidir.json b/src/tests/ofc24/descriptors/7.service-unidir.json similarity index 100% rename from src/tests/ofc24/7.service-unidir.json rename to src/tests/ofc24/descriptors/7.service-unidir.json diff --git a/src/tests/ofc24/descriptors_topology.json b/src/tests/ofc24/descriptors/descriptors_topology.json similarity index 100% rename from src/tests/ofc24/descriptors_topology.json rename to src/tests/ofc24/descriptors/descriptors_topology.json diff --git a/src/tests/ofc24/1.context.json b/src/tests/ofc24/descriptors/old/1.context.json similarity index 100% rename from src/tests/ofc24/1.context.json rename to src/tests/ofc24/descriptors/old/1.context.json diff --git a/src/tests/ofc24/2.device1.json b/src/tests/ofc24/descriptors/old/2.device1.json similarity index 100% rename from src/tests/ofc24/2.device1.json rename to src/tests/ofc24/descriptors/old/2.device1.json diff --git a/src/tests/ofc24/3.device2.json b/src/tests/ofc24/descriptors/old/3.device2.json similarity index 100% rename from src/tests/ofc24/3.device2.json rename to src/tests/ofc24/descriptors/old/3.device2.json diff --git a/src/tests/ofc24/4.device3_R1.json b/src/tests/ofc24/descriptors/old/4.device3_R1.json similarity index 100% rename from src/tests/ofc24/4.device3_R1.json rename to src/tests/ofc24/descriptors/old/4.device3_R1.json diff --git a/src/tests/ofc24/5.device4_R2.json b/src/tests/ofc24/descriptors/old/5.device4_R2.json similarity index 100% rename from src/tests/ofc24/5.device4_R2.json rename to src/tests/ofc24/descriptors/old/5.device4_R2.json diff --git a/src/tests/ofc24/6.links.json b/src/tests/ofc24/descriptors/old/6.links.json similarity index 100% rename from src/tests/ofc24/6.links.json rename to src/tests/ofc24/descriptors/old/6.links.json diff --git a/src/tests/ofc24/destroy-node-agents.sh b/src/tests/ofc24/destroy-node-agents.sh new file mode 100755 index 0000000000000000000000000000000000000000..19e7fc9a9398734aa967cfb5618d125c545500a2 --- /dev/null +++ b/src/tests/ofc24/destroy-node-agents.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +echo +echo "Clean-up:" +echo "---------" +docker rm -f na-t1 na-t2 na-r1 na-r2 +docker network rm na-br + +echo "Done!" diff --git a/src/tests/ofc24/tempOC/files/platform_r1.xml b/src/tests/ofc24/node-agents-config/platform_r1.xml similarity index 100% rename from src/tests/ofc24/tempOC/files/platform_r1.xml rename to src/tests/ofc24/node-agents-config/platform_r1.xml diff --git a/src/tests/ofc24/tempOC/files/platform_r2.xml b/src/tests/ofc24/node-agents-config/platform_r2.xml similarity index 100% rename from src/tests/ofc24/tempOC/files/platform_r2.xml rename to src/tests/ofc24/node-agents-config/platform_r2.xml diff --git a/src/tests/ofc24/tempOC/files/platform_t1.xml b/src/tests/ofc24/node-agents-config/platform_t1.xml similarity index 100% rename from src/tests/ofc24/tempOC/files/platform_t1.xml rename to src/tests/ofc24/node-agents-config/platform_t1.xml diff --git a/src/tests/ofc24/tempOC/files/platform_t2.xml b/src/tests/ofc24/node-agents-config/platform_t2.xml similarity index 100% rename from src/tests/ofc24/tempOC/files/platform_t2.xml rename to src/tests/ofc24/node-agents-config/platform_t2.xml diff --git a/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh b/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh new file mode 100755 index 0000000000000000000000000000000000000000..fe5ad56189f18ba2694037a2e3e06546aba96b1f --- /dev/null +++ b/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo 'Cleaning...' +make clean + +echo 'Rebuilding...' +make all + +echo 'Initializing database...' +cp platform.xml confd-cdb/ + +echo 'Starting ConfD...' +make start2 + +echo 'ConfD Ready!!' diff --git a/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh b/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh new file mode 100755 index 0000000000000000000000000000000000000000..afc28cee7b178985d18dfaf779103f23fa9c6a43 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +echo 'Cleaning...' +make clean + +echo 'Rebuilding...' +make all + +echo 'Initializing database...' +cp platform.xml confd-cdb/ +cp interfaces.xml confd-cdb/ +cp bgp.xml confd-cdb/ + +echo 'Starting ConfD...' +make start2 + +echo 'ConfD Ready!!' diff --git a/src/tests/ofc24/tempOC/files/startNetconfAgent.sh b/src/tests/ofc24/tempOC/files/startNetconfAgent.sh deleted file mode 100644 index 10b721883799c4fd257e1f627ff1480259037702..0000000000000000000000000000000000000000 --- a/src/tests/ofc24/tempOC/files/startNetconfAgent.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -make clean -make all -#make init -cp init_openconfig-platform.xml confd-cdb/ -#cp init_flex-scale-mg-on.xml confd-cdb/ -make start2