diff --git a/src/tests/ofc24/get_all.sh b/src/tests/ofc24/get_all.sh index 2f0412d460e07c29e3b4f1feb43528f9925709ca..ceb96a34c98823e122a65b38ccef57e9ed2f1ec0 100755 --- a/src/tests/ofc24/get_all.sh +++ b/src/tests/ofc24/get_all.sh @@ -1,6 +1,18 @@ #!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 - ~/tfs-ctrl/src/tests/ofc24/get_bands.sh > bands.json - ~/tfs-ctrl/src/tests/ofc24/get_links.sh > links.json - ~/tfs-ctrl/src/tests/ofc24/get_lightpath.sh > lightpath.json - +~/tfs-ctrl/src/tests/ofc24/get_bands.sh > bands.json +~/tfs-ctrl/src/tests/ofc24/get_links.sh > links.json +~/tfs-ctrl/src/tests/ofc24/get_lightpath.sh > lightpath.json diff --git a/src/tests/ofc24/get_bands.sh b/src/tests/ofc24/get_bands.sh index d4f01357df1b79f8b6b23320394c0ec1d9d596c7..c63461e44d8363f768fa1770b88b916e4d5689f7 100755 --- a/src/tests/ofc24/get_bands.sh +++ b/src/tests/ofc24/get_bands.sh @@ -1,11 +1,22 @@ #!/bin/bash -ip=$(sudo kubectl get all --all-namespaces | grep service/opticalcontrollerservice | awk '{print $4}') +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 $ip +ip=$(sudo kubectl get all --all-namespaces | grep service/opticalcontrollerservice | awk '{print $4}') +echo $ip #push=$(curl -X GET "http://$ip:10060/OpticalTFS/GetTopology/admin/admin") - links=$(curl -X GET "http://$ip:10060/OpticalTFS/GetOpticalBands") - -echo $links \ No newline at end of file +echo $links diff --git a/src/tests/ofc24/get_lightpath.sh b/src/tests/ofc24/get_lightpath.sh index f5c7206e756a05138d5ec054ca1e6298b88cde5d..eefd46c0ed5ee1435e3b0dc5fa601d7d4a8f9243 100755 --- a/src/tests/ofc24/get_lightpath.sh +++ b/src/tests/ofc24/get_lightpath.sh @@ -1,11 +1,22 @@ #!/bin/bash -ip=$(sudo kubectl get all --all-namespaces | grep service/opticalcontrollerservice | awk '{print $4}') +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 $ip +ip=$(sudo kubectl get all --all-namespaces | grep service/opticalcontrollerservice | awk '{print $4}') +echo $ip #push=$(curl -X GET "http://$ip:10060/OpticalTFS/GetTopology/admin/admin") - links=$(curl -X GET "http://$ip:10060/OpticalTFS/GetLightpaths") - -echo $links \ No newline at end of file +echo $links diff --git a/src/tests/ofc24/get_links.sh b/src/tests/ofc24/get_links.sh index 2799934ad8d927e40607c3285cc2ff447d4e48d7..f1146b4eac873114282a58445c3aad1b33002dd9 100755 --- a/src/tests/ofc24/get_links.sh +++ b/src/tests/ofc24/get_links.sh @@ -1,11 +1,22 @@ #!/bin/bash -ip=$(sudo kubectl get all --all-namespaces | grep service/opticalcontrollerservice | awk '{print $4}') +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 $ip +ip=$(sudo kubectl get all --all-namespaces | grep service/opticalcontrollerservice | awk '{print $4}') +echo $ip #push=$(curl -X GET "http://$ip:10060/OpticalTFS/GetTopology/admin/admin") - links=$(curl -X GET "http://$ip:10060/OpticalTFS/GetLinks") - -echo $links \ No newline at end of file +echo $links diff --git a/src/tests/ofc24/r_t.sh b/src/tests/ofc24/r_t.sh index a8c1ae2766e9d3184d01be719f00dc6c5ac672c0..eef73563fbec2aa60e1133d0790e2821867fe997 100755 --- a/src/tests/ofc24/r_t.sh +++ b/src/tests/ofc24/r_t.sh @@ -28,4 +28,4 @@ docker rm na2 screen -dmS t1 -T xterm sh -c "docker run --name t1 -p 10.0.2.4:2023:2022 -v /home/tfs/tfs-ctrl/src/tests/ofc24/tempOC/files:/files -it asgamb1/oc23bgp.img:latest bash -c 'cp /files/transponders_x4.xml demoECOC21.xml ; ./startNetconfAgent.sh'" screen -dmS t3 -T xterm sh -c "docker run --name na3 -p 10.0.2.4:2025:2022 -v /home/tfs/tfs-ctrl/src/tests/ofc24/tempOC/files:/files -it asgamb1/flexscale-node.img:latest bash -c 'cp /files/platform_r1.xml init_openconfig-platform.xml ; ./startNetconfAgent.sh'" screen -dmS t2 -T xterm sh -c "docker run --name t2 -p 10.0.2.4:2024:2022 -v /home/tfs/tfs-ctrl/src/tests/ofc24/tempOC/files:/files -it asgamb1/oc23bgp.img:latest bash -c 'cp /files/transponders_x4_2.xml demoECOC21.xml ; ./startNetconfAgent.sh'" -screen -dmS t4 -T xterm sh -c "docker run --name na2 -p 10.0.2.4:2026:2022 -v /home/tfs/tfs-ctrl/src/tests/ofc24/tempOC/files:/files -it asgamb1/flexscale-node.img:latest bash -c 'cp /files/platform_r2.xml init_openconfig-platform.xml ; ./startNetconfAgent.sh'" \ No newline at end of file +screen -dmS t4 -T xterm sh -c "docker run --name na2 -p 10.0.2.4:2026:2022 -v /home/tfs/tfs-ctrl/src/tests/ofc24/tempOC/files:/files -it asgamb1/flexscale-node.img:latest bash -c 'cp /files/platform_r2.xml init_openconfig-platform.xml ; ./startNetconfAgent.sh'" diff --git a/src/tests/ofc24/run_test.sh b/src/tests/ofc24/run_test.sh index a4cb46bb4e2448cad7e563719102c63503251771..b1cbe33c9c9169375b2f88fe5590347d85dd5552 100644 --- a/src/tests/ofc24/run_test.sh +++ b/src/tests/ofc24/run_test.sh @@ -1,17 +1,24 @@ #!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 + docker stop na1 docker rm na1 - screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.10:2023:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na1 -it asgamb1/oc23bgp.img:latest -" - sleep 2 - if [ "$( docker container inspect -f '{{.State.Running}}' na1)" = "true" ]; then - - - - docker exec na1 sh -c " cp /files/platform_t1.xml demoECOC21.xml ; - - /confd/examples.confd/OC23/startNetconfAgent.sh; " - else - echo "your container is not running yet" - fi - +screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.10:2023:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na1 -it asgamb1/oc23bgp.img:latest" +sleep 2 +if [ "$( docker container inspect -f '{{.State.Running}}' na1)" = "true" ]; then + docker exec na1 sh -c " cp /files/platform_t1.xml demoECOC21.xml ; /confd/examples.confd/OC23/startNetconfAgent.sh; " +else + echo "your container is not running yet" +fi diff --git a/src/tests/ofc24/tempOC/files/startNetconfAgent.sh b/src/tests/ofc24/tempOC/files/startNetconfAgent.sh index 10b721883799c4fd257e1f627ff1480259037702..35c95b6574bca3e0b620c356ea0f393137ec1b90 100644 --- a/src/tests/ofc24/tempOC/files/startNetconfAgent.sh +++ b/src/tests/ofc24/tempOC/files/startNetconfAgent.sh @@ -1,4 +1,18 @@ #!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (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 + make clean make all #make init