diff --git a/.gitignore b/.gitignore index a0ac78095a9f275ae35060a584c5df2151aa7d0e..db47387c8c8ff9900a59107642221960134aa1f1 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ MANIFEST # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest +.manifest/ *.spec # Installer logs diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 873b2ac4b22143b37a96fd3ded467f586d61c8ac..2fe4057332cb87e4014d2a9dd2fef04c9c118c9b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/clean_testing_environment.sh b/clean_testing_environment.sh index f037a2a39309abb192c36943c014c4a3b893dd98..8384549f5f201da0d8592c522d8ed79555154dbe 100755 --- a/clean_testing_environment.sh +++ b/clean_testing_environment.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/common_requirements.in b/common_requirements.in index 3aa30e174f43d6f8758f49b3104a20cc8580a7ff..b277265768c9726f17ab046d8aa932167615f523 100644 --- a/common_requirements.in +++ b/common_requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -15,6 +15,7 @@ coverage==6.3 grpcio==1.47.* grpcio-health-checking==1.47.* +grpcio-reflection==1.47.* grpcio-tools==1.47.* grpclib==0.4.4 prettytable==3.5.0 diff --git a/coverage/.coveragerc.template b/coverage/.coveragerc.template index 3d8065acabefc65daad28fd4bd2e166b84d11d8b..ba25f55db56a42bf7590e26207243677a425b207 100644 --- a/coverage/.coveragerc.template +++ b/coverage/.coveragerc.template @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/MW/generate.sh b/data/perf/old/MW/generate.sh index ccef4e113b3216bc4e4dddcd4be793c2bba32501..ca87cfcf962a77eac0181ed2cdff897a5f758827 100755 --- a/data/perf/old/MW/generate.sh +++ b/data/perf/old/MW/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/MW/generate_plot.py b/data/perf/old/MW/generate_plot.py index 22befef305bf33b4aa150bf60fbd39fac3c61402..2386a74231b935017cf400fee7f0998c8c3c4995 100644 --- a/data/perf/old/MW/generate_plot.py +++ b/data/perf/old/MW/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/OpenConfig/generate.sh b/data/perf/old/OpenConfig/generate.sh index 5147d49626143919814a6184e02cbabdaf32b5cf..2d3819deb455e32a62f09079f8bd637cee6d5e53 100755 --- a/data/perf/old/OpenConfig/generate.sh +++ b/data/perf/old/OpenConfig/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/OpenConfig/generate_plot.py b/data/perf/old/OpenConfig/generate_plot.py index 8d50ab81fd41d5dc8963aa3a9dc317bd3487fd54..40b43ce071056d4c4969b1037eaa2bca6ec0c535 100644 --- a/data/perf/old/OpenConfig/generate_plot.py +++ b/data/perf/old/OpenConfig/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/TE/te-cdf.py b/data/perf/old/TE/te-cdf.py index a3e7cc53006f5b1f513ee2b3b23938d33cb93fcd..e1e4975a690f8e7b91820ade172d5315051b7f9a 100644 --- a/data/perf/old/TE/te-cdf.py +++ b/data/perf/old/TE/te-cdf.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/XR/generate.sh b/data/perf/old/XR/generate.sh index d5b70476331f3a3e6ffcaa77cd3f2ef68008bc67..7c99afce876133bae8ad315e02a27955ce4c4756 100755 --- a/data/perf/old/XR/generate.sh +++ b/data/perf/old/XR/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/XR/generate_plot.py b/data/perf/old/XR/generate_plot.py index f27c37e53a287d90c209620282a25d5f92152f1e..7acbc5d829e910e3e2f25ebd5f1f59c0fb4a0e73 100644 --- a/data/perf/old/XR/generate_plot.py +++ b/data/perf/old/XR/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/emulated/generate.sh b/data/perf/old/emulated/generate.sh index 7b978c1fd4f2962693926f9cf443a6d03ee17161..c239eb7131e9d78754faf5afff7beb95e97beeac 100755 --- a/data/perf/old/emulated/generate.sh +++ b/data/perf/old/emulated/generate.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/data/perf/old/emulated/generate_plot.py b/data/perf/old/emulated/generate_plot.py index d049386c3cf010ae53e8f2a91a8354bdd54f910b..456e28d5b06070929545cabe15d20942b937deca 100644 --- a/data/perf/old/emulated/generate_plot.py +++ b/data/perf/old/emulated/generate_plot.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/all.sh b/deploy/all.sh index 06b8ee701530f56381080879d0e2941b664e5197..97f4db37d53f4a7fcca850c51a5bfe6cc7653cb4 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -103,9 +103,6 @@ export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} # If not already set, set the database user's password to be used by Context. export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"} -# If not already set, set the database name to be used by Context. -export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"} - # If not already set, set CockroachDB installation mode. Accepted values are: 'single' and 'cluster'. # - If CRDB_DEPLOY_MODE is "single", CockroachDB is deployed in single node mode. It is convenient for # development and testing purposes and should fit in a VM. IT SHOULD NOT BE USED IN PRODUCTION ENVIRONMENTS. @@ -118,7 +115,7 @@ export CRDB_DEPLOY_MODE=${CRDB_DEPLOY_MODE:-"single"} # If not already set, disable flag for dropping database, if it exists. # WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE DATABASE INFORMATION! -# If CRDB_DROP_DATABASE_IF_EXISTS is "YES", the database pointed by variable CRDB_DATABASE will be dropped while +# If CRDB_DROP_DATABASE_IF_EXISTS is "YES", the databases starting with "tfs_" will be dropped while # checking/deploying CockroachDB. export CRDB_DROP_DATABASE_IF_EXISTS=${CRDB_DROP_DATABASE_IF_EXISTS:-""} diff --git a/deploy/component.sh b/deploy/component.sh index 89d2383d7c62393753de27abf9d0a15f67066c76..74aca0c4ef40a2abcd88a233325ccc0c0a73ba67 100755 --- a/deploy/component.sh +++ b/deploy/component.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/crdb.sh b/deploy/crdb.sh index 42b49fe984d08c8fb2cae14e68f0a6d2a7a726dd..ad0bdd30b6d01c8c70ad454220ee7d19f23468b8 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -33,9 +33,6 @@ export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} # If not already set, set the database user's password to be used by Context. export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"} -# If not already set, set the database name to be used by Context. -export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"} - # If not already set, set CockroachDB installation mode. Accepted values are: 'single' and 'cluster'. # - If CRDB_DEPLOY_MODE is "single", CockroachDB is deployed in single node mode. It is convenient for # development and testing purposes and should fit in a VM. IT SHOULD NOT BE USED IN PRODUCTION ENVIRONMENTS. @@ -48,7 +45,7 @@ export CRDB_DEPLOY_MODE=${CRDB_DEPLOY_MODE:-"single"} # If not already set, disable flag for dropping database, if it exists. # WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE DATABASE INFORMATION! -# If CRDB_DROP_DATABASE_IF_EXISTS is "YES", the database pointed by variable CRDB_DATABASE will be dropped while +# If CRDB_DROP_DATABASE_IF_EXISTS is "YES", the databases starting with "tfs_" will be dropped while # checking/deploying CockroachDB. export CRDB_DROP_DATABASE_IF_EXISTS=${CRDB_DROP_DATABASE_IF_EXISTS:-""} @@ -84,7 +81,6 @@ function crdb_deploy_single() { else echo ">>> Deploy CockroachDB" cp "${CRDB_MANIFESTS_PATH}/single-node.yaml" "${TMP_MANIFESTS_FOLDER}/crdb_single_node.yaml" - sed -i "s/%CRDB_DATABASE%/${CRDB_DATABASE}/g" "${TMP_MANIFESTS_FOLDER}/crdb_single_node.yaml" sed -i "s/%CRDB_USERNAME%/${CRDB_USERNAME}/g" "${TMP_MANIFESTS_FOLDER}/crdb_single_node.yaml" sed -i "s/%CRDB_PASSWORD%/${CRDB_PASSWORD}/g" "${TMP_MANIFESTS_FOLDER}/crdb_single_node.yaml" kubectl apply --namespace ${CRDB_NAMESPACE} -f "${TMP_MANIFESTS_FOLDER}/crdb_single_node.yaml" @@ -157,16 +153,8 @@ function crdb_undeploy_single() { function crdb_drop_databases_single() { echo "Drop TFS databases, if exist" - if [[ -z "${GITLAB_CI}" ]]; then - #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml - CRDB_HOST=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') - CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - else - CRDB_HOST="127.0.0.1" - CRDB_PORT=${CRDB_EXT_PORT_SQL} - fi - - CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require" + CRDB_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_PORT}/defaultdb?sslmode=require" echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" DATABASES=$( @@ -387,6 +375,7 @@ if [ "$CRDB_DEPLOY_MODE" == "single" ]; then fi crdb_deploy_single + sleep 3 if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then crdb_drop_databases_single @@ -397,6 +386,7 @@ elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then fi crdb_deploy_cluster + sleep 3 if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then crdb_drop_databases_cluster diff --git a/deploy/expose_dashboard.sh b/deploy/expose_dashboard.sh index f2391ab5d5b028bed11f23a2f95c06054d1f0cbc..296014ee3c3764a0e3f8af36af665a10365ef54f 100755 --- a/deploy/expose_dashboard.sh +++ b/deploy/expose_dashboard.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/kafka.sh b/deploy/kafka.sh index 4cbcdb7014c983eeda9bab1d6655fa042751b931..e426069034364d2d7a745b0633d531c7db811176 100755 --- a/deploy/kafka.sh +++ b/deploy/kafka.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/mock_blockchain.sh b/deploy/mock_blockchain.sh index fafa435b10f7c027e088435997ec01ebf1858d0f..7ba4b6de285859863683ce5c27c6bcfc140d9749 100755 --- a/deploy/mock_blockchain.sh +++ b/deploy/mock_blockchain.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/nats.sh b/deploy/nats.sh index e9cef883ee7b909255d44551919771ebc49f524b..b6df8066b2eb78263335a8a7831579e0e036b37a 100755 --- a/deploy/nats.sh +++ b/deploy/nats.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -69,8 +69,7 @@ function nats_deploy_single() { echo ">>> NATS is present; skipping step." else echo ">>> Deploy NATS" - helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine --set config.cluster.enabled=true --set config.cluster.tls.enabled=true - + helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine echo ">>> Waiting NATS statefulset to be created..." while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do diff --git a/deploy/qdb.sh b/deploy/qdb.sh index ebb75dce9ad3007145a5129df3a4037a9392e875..4fac6a3ce254a766b06b0081e45427b3fa0e318b 100755 --- a/deploy/qdb.sh +++ b/deploy/qdb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/show.sh b/deploy/show.sh index 4fa1ce3a6dac5194e967ccbe0826a6ed9a64e3f8..1bd7d5bf98def0d4a0675883fa05cd1937974eba 100755 --- a/deploy/show.sh +++ b/deploy/show.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/deploy/tfs.sh b/deploy/tfs.sh index 6c0ddcb63e71abd2e713e4809aeb7795b43053fa..a1429e443eaa70252ab2dd1f673ce46826b28744 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -63,9 +63,6 @@ export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} # If not already set, set the database user's password to be used by Context. export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"} -# If not already set, set the database name to be used by Context. -export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"} - # ----- NATS ------------------------------------------------------------------- @@ -156,7 +153,7 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type= --from-literal=CRDB_SSLMODE=require printf "\n" -echo ">>> Create Secret with Apache Kakfa..." +echo ">>> Create Secret with Apache Kafka..." KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ @@ -518,7 +515,7 @@ if [[ "$TFS_COMPONENTS" == *"monitoring"* ]] && [[ "$TFS_COMPONENTS" == *"webui" "type" : "postgres", "name" : "cockroachdb", "url" : "'cockroachdb-public.${CRDB_NAMESPACE}.svc.cluster.local:${CRDB_SQL_PORT}'", - "database" : "'${CRDB_DATABASE}'", + "database" : "tfs_context", "user" : "'${CRDB_USERNAME}'", "basicAuth": false, "isDefault": false, diff --git a/hackfest/containerlab/tfs-scenario.clab.yml b/hackfest/containerlab/tfs-scenario.clab.yml index c715a1a539b59d807cd13c03f75f7de2e7bae084..5bb7b973f3e39b95b9099d4b2160ce9198cdf170 100644 --- a/hackfest/containerlab/tfs-scenario.clab.yml +++ b/hackfest/containerlab/tfs-scenario.clab.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/gnmi/srlinux.clab.yml b/hackfest/gnmi/srlinux.clab.yml index 6cfeb6108cd88cb52bd5925a374ea8c6724f4c69..84c23c64ae36988c3bf0230e02a89d73fc36101e 100644 --- a/hackfest/gnmi/srlinux.clab.yml +++ b/hackfest/gnmi/srlinux.clab.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connection.proto b/hackfest/grpc/connection.proto index 0da1059f3d65357f520b5123cc29d4c6230e8388..d9d04f8ef95a9153560011f2556e799618b9b7cf 100644 --- a/hackfest/grpc/connection.proto +++ b/hackfest/grpc/connection.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connection/create.py b/hackfest/grpc/connection/create.py index 9e32dd8d4e3c89555c039d417b5aab2f6d9ef321..f286ac903e33e0809f55850001687300decf4a79 100644 --- a/hackfest/grpc/connection/create.py +++ b/hackfest/grpc/connection/create.py @@ -1,5 +1,5 @@ #! /usr/bin/env python3 -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connection/list.py b/hackfest/grpc/connection/list.py index e852b69b7cee16e02ca2021db83bbc11cd9c7538..41e5b4958dfb3a90f779d1d25b10701c47bde44b 100644 --- a/hackfest/grpc/connection/list.py +++ b/hackfest/grpc/connection/list.py @@ -1,5 +1,5 @@ #! /usr/bin/env python3 -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connectionService.proto b/hackfest/grpc/connectionService.proto index 0a80f2c1a49056ce76766e720b427283fd63969d..681150addab6ee817c209d653e24c20ca715b1cf 100644 --- a/hackfest/grpc/connectionService.proto +++ b/hackfest/grpc/connectionService.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connectionService/connectionService_client.py b/hackfest/grpc/connectionService/connectionService_client.py index 2ed97ae97c4ef50c036635f8d5fb5812ad92c5b5..1d28689285fefb36ea50d0fcdb320c9583b5e5ab 100644 --- a/hackfest/grpc/connectionService/connectionService_client.py +++ b/hackfest/grpc/connectionService/connectionService_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connectionService/connectionService_server.py b/hackfest/grpc/connectionService/connectionService_server.py index ff991f44c16ac12ec7042f922dc9558ec08fcfbe..322da23754f657cfeecfac24d6898accdbec8a85 100644 --- a/hackfest/grpc/connectionService/connectionService_server.py +++ b/hackfest/grpc/connectionService/connectionService_server.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connectionServiceWithNotif.proto b/hackfest/grpc/connectionServiceWithNotif.proto index 778203e2619aa938194107d855ea4949fdf550da..e864bdb990eff2cf038ca94e3238bf51108d9ddf 100644 --- a/hackfest/grpc/connectionServiceWithNotif.proto +++ b/hackfest/grpc/connectionServiceWithNotif.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py index 2503f424f4dd3445d91c82daa235f4677e6f910a..d7c669639bc9d85612dd6d5982c3e3b4bdd8a997 100644 --- a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py +++ b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py index d5c413064968c9ef30e015cf818e66066d45ceb9..b67070efd1693ec34f5e1726b7385b2979dec807 100644 --- a/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py +++ b/hackfest/grpc/connectionServiceWithNotif/connectionServiceWithNotif_server.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/topologyService.proto b/hackfest/grpc/topologyService.proto index 6a38bf9c7dd1762743eda91b01c639f9bc5ae3ab..b9e5763a400257faba15e06811b775ccfd31918e 100644 --- a/hackfest/grpc/topologyService.proto +++ b/hackfest/grpc/topologyService.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/topologyService/topologyService_client.py b/hackfest/grpc/topologyService/topologyService_client.py index aa1ffc2bf6269ebd7495c9f01438cfc73315c687..a2372426ab416389685db026a911359cdf337ca3 100644 --- a/hackfest/grpc/topologyService/topologyService_client.py +++ b/hackfest/grpc/topologyService/topologyService_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/grpc/topologyService/topologyService_server.py b/hackfest/grpc/topologyService/topologyService_server.py index dfd62aa13adf189c10477840c747fb34b610d5fc..4654a9a325bc77fd503a7da43b4deecd5f21fdf4 100644 --- a/hackfest/grpc/topologyService/topologyService_server.py +++ b/hackfest/grpc/topologyService/topologyService_server.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/kafka/pub.py b/hackfest/kafka/pub.py index 77564dfcb710677ecbd8fa9b2cbe8e6145c5baac..1b6b4c8e6a5c0fa0511ce51bd08c7a11b84bfe86 100644 --- a/hackfest/kafka/pub.py +++ b/hackfest/kafka/pub.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/kafka/sub.py b/hackfest/kafka/sub.py index 2253c64674ce421d288344315649fbee64058432..170803af5d77a49829167f39e25760e775607290 100644 --- a/hackfest/kafka/sub.py +++ b/hackfest/kafka/sub.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/mock_osm/MockOSM.py b/hackfest/mock_osm/MockOSM.py index 7ced57d3efa64038d09f5cea21fb7098b8ceb2ba..54a123dc40d235f047c99845c00707c82ed0928f 100644 --- a/hackfest/mock_osm/MockOSM.py +++ b/hackfest/mock_osm/MockOSM.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/mock_osm/__init__.py b/hackfest/mock_osm/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/hackfest/mock_osm/__init__.py +++ b/hackfest/mock_osm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/mock_osm/__main__.py b/hackfest/mock_osm/__main__.py index 48866fb2db7ac92c37f57561abc58c2d45df810a..81f2345024d6efb47fd123c94a69f57d0886f64c 100644 --- a/hackfest/mock_osm/__main__.py +++ b/hackfest/mock_osm/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf-oc/device_definition.py b/hackfest/netconf-oc/device_definition.py index ecd3dd6ce5a7091d5223153ddd0f6e3cca7fc39d..2c0088523908b21de5b9df19fe1a92f276b31b82 100644 --- a/hackfest/netconf-oc/device_definition.py +++ b/hackfest/netconf-oc/device_definition.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf-oc/interfaces.xml b/hackfest/netconf-oc/interfaces.xml index f04504bd408a7735ccdaa55c63c85ba25a7bde2d..c94118095ad08651375b6dfbcf3633a82041bc85 100644 --- a/hackfest/netconf-oc/interfaces.xml +++ b/hackfest/netconf-oc/interfaces.xml @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf-oc/platform.xml b/hackfest/netconf-oc/platform.xml index e99144d7126721888eba33c39645d4aaf6a5018d..7a4296c823e06bebdea3e4af98360828784d7c18 100644 --- a/hackfest/netconf-oc/platform.xml +++ b/hackfest/netconf-oc/platform.xml @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf-oc/server_openconfig.py b/hackfest/netconf-oc/server_openconfig.py index f5a29671ebe5cb85b94b46908892073a8e61c167..e1ab4870a5b186b83b30049dbdc65e8a87279f36 100644 --- a/hackfest/netconf-oc/server_openconfig.py +++ b/hackfest/netconf-oc/server_openconfig.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf/client_topology.py b/hackfest/netconf/client_topology.py index 6f3870db020a5d3ac9f0b696ee2228ae0ef7ebaf..bd24dfe30987058ae0b80bb349e30bb1ebc23893 100644 --- a/hackfest/netconf/client_topology.py +++ b/hackfest/netconf/client_topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf/connection/client_connection.py b/hackfest/netconf/connection/client_connection.py index 9015f26f909bd00789e31e579895770965bb89e0..c73ff7c93088f9c2ac4af9c03cab9bc354936b44 100644 --- a/hackfest/netconf/connection/client_connection.py +++ b/hackfest/netconf/connection/client_connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf/connection/server_topology_connection.py b/hackfest/netconf/connection/server_topology_connection.py index 4a9a849c967d8b3f627555fe361d53adb4670d18..b745c6111a38ff5792241129409c250031b84fc8 100644 --- a/hackfest/netconf/connection/server_topology_connection.py +++ b/hackfest/netconf/connection/server_topology_connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf/connection/topology.xml b/hackfest/netconf/connection/topology.xml index 50e31d6cf09bbd8e99742e25d3201eddfcd84257..a4806cb6c76ff4726c1217745fad2273a7c4fe39 100644 --- a/hackfest/netconf/connection/topology.xml +++ b/hackfest/netconf/connection/topology.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf/server_topology.py b/hackfest/netconf/server_topology.py index 15039bdf1876592985d7a1499548446d502804fa..b4ebfa5d33dea152ad929e8346ae3b761ba008db 100644 --- a/hackfest/netconf/server_topology.py +++ b/hackfest/netconf/server_topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/netconf/topology.xml b/hackfest/netconf/topology.xml index 50e31d6cf09bbd8e99742e25d3201eddfcd84257..a4806cb6c76ff4726c1217745fad2273a7c4fe39 100644 --- a/hackfest/netconf/topology.xml +++ b/hackfest/netconf/topology.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/hackfest/onos_api/onos_flows.py b/hackfest/onos_api/onos_flows.py index 4e635ab534e350112ed094095f9c8a3bd3a19a4c..25bb46fffbf0d43374e360655de1e5646a0dc3e4 100644 --- a/hackfest/onos_api/onos_flows.py +++ b/hackfest/onos_api/onos_flows.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/onos_api/onos_topology.py b/hackfest/onos_api/onos_topology.py index 488edc50e7091b449da3950e870f9bc8531fa47e..f6ab06c40a4ca217487cab06a4bd457f1ade8ca8 100644 --- a/hackfest/onos_api/onos_topology.py +++ b/hackfest/onos_api/onos_topology.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/openconfig/generated.go b/hackfest/openconfig/generated.go index 8acc911d630d38f52addab68a6edf13c6e1e302f..db8ff004a32477fb4f90db2d455b3113dcf10d4f 100644 --- a/hackfest/openconfig/generated.go +++ b/hackfest/openconfig/generated.go @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/__init__.py b/hackfest/p4/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/hackfest/p4/__init__.py +++ b/hackfest/p4/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/deploy_specs.sh b/hackfest/p4/deploy_specs.sh index 5a3097610d2ac386f80541b8628c841479c44226..8004973e6210c4cec00792d7d605a276443712ca 100755 --- a/hackfest/p4/deploy_specs.sh +++ b/hackfest/p4/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/run_test_01_bootstrap.sh b/hackfest/p4/run_test_01_bootstrap.sh index e7d7c971a66ea594a279eeabc7705f33bd00b1b2..577c798ca43c3c1d88388a5360d23655fc9561d0 100755 --- a/hackfest/p4/run_test_01_bootstrap.sh +++ b/hackfest/p4/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/run_test_02_create_service.sh b/hackfest/p4/run_test_02_create_service.sh index 527b569481f139f6cdd7fa0f841ee00f71a34284..372df7e02cb3fc8d40565b83552337431c9413b2 100755 --- a/hackfest/p4/run_test_02_create_service.sh +++ b/hackfest/p4/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/run_test_03_delete_service.sh b/hackfest/p4/run_test_03_delete_service.sh index 771540f89f3de788626e2bea727fc63d0f3c39dc..0c0914a2d84e2c4b9f9edabdc27545a95b565d9e 100755 --- a/hackfest/p4/run_test_03_delete_service.sh +++ b/hackfest/p4/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/run_test_04_cleanup.sh b/hackfest/p4/run_test_04_cleanup.sh index 9b13eb24dd451b122b7c4d785ae9bdd47cd9ac5b..f89e79d90b934c1c348548caaf5b5471b128de8a 100755 --- a/hackfest/p4/run_test_04_cleanup.sh +++ b/hackfest/p4/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/setup.sh b/hackfest/p4/setup.sh index 2dc63d5385e258cd7a6bd9d8bafbbe78faacc99b..a4fe69a75da89fa9d496d561948772dc9f54523a 100755 --- a/hackfest/p4/setup.sh +++ b/hackfest/p4/setup.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/BuildDescriptors.py b/hackfest/p4/tests/BuildDescriptors.py index cfd29eea0cb80306f402ef71530016599b570eb1..c0f01ee7537e88883704e3af36f6c51b672a607e 100644 --- a/hackfest/p4/tests/BuildDescriptors.py +++ b/hackfest/p4/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/LoadDescriptors.py b/hackfest/p4/tests/LoadDescriptors.py index 407d5b6dc6b46ba7dd920cb1f60be391f839bda7..c47bea18d43c3a71656169cbb3855bd1602240fd 100644 --- a/hackfest/p4/tests/LoadDescriptors.py +++ b/hackfest/p4/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/Objects.py b/hackfest/p4/tests/Objects.py index 793529cebd0feef3d855a30a9773f3c87c87169c..9060662f5dac5fa9e226a1d9d64631e3e83d549c 100644 --- a/hackfest/p4/tests/Objects.py +++ b/hackfest/p4/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/__init__.py b/hackfest/p4/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/hackfest/p4/tests/__init__.py +++ b/hackfest/p4/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/test_functional_bootstrap.py b/hackfest/p4/tests/test_functional_bootstrap.py index 6a2b2024f0484fb6ea524672929cec408e11144b..07ee88486294051de83feb6cd32b683529567dc4 100644 --- a/hackfest/p4/tests/test_functional_bootstrap.py +++ b/hackfest/p4/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/test_functional_cleanup.py b/hackfest/p4/tests/test_functional_cleanup.py index b4ebdaebdcab0e8fe21072d8b97e26ea445d0996..e048420012e0b608125bd7a54189f493206dff5f 100644 --- a/hackfest/p4/tests/test_functional_cleanup.py +++ b/hackfest/p4/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/test_functional_create_service.py b/hackfest/p4/tests/test_functional_create_service.py index e870debcd0e82b4546916fe7606ec810530b7979..94257fefd64bc69b4cfc1cc46ae07cfdf0f54308 100644 --- a/hackfest/p4/tests/test_functional_create_service.py +++ b/hackfest/p4/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/p4/tests/test_functional_delete_service.py b/hackfest/p4/tests/test_functional_delete_service.py index 0db277d06f8a3d17d732b2e17a2ed488146287ae..1ce9b87813d35b401eae10cee992ebb3a843850a 100644 --- a/hackfest/p4/tests/test_functional_delete_service.py +++ b/hackfest/p4/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/restconf/connection.yaml b/hackfest/restconf/connection.yaml index ec02e3aba54fd63dee850c541a8af7b552198a7c..daea2b7142c819711f02619a9497d5beb625932a 100644 --- a/hackfest/restconf/connection.yaml +++ b/hackfest/restconf/connection.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/restconf/connectionserver/swagger_server/database.py b/hackfest/restconf/connectionserver/swagger_server/database.py index 2eb27b6c5e570c7bbf4842a001dfed0609df1b2d..08f12467c441bb1563cd2a477cf973652cb64a56 100644 --- a/hackfest/restconf/connectionserver/swagger_server/database.py +++ b/hackfest/restconf/connectionserver/swagger_server/database.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/restconf/connectionserver/swagger_server/swagger/swagger.yaml b/hackfest/restconf/connectionserver/swagger_server/swagger/swagger.yaml index 314e8ed372062f5c19e19d1ea33eef473cbfc270..6ddbb48cf288ac1e7504c8e6e2b385b7d59f3e46 100644 --- a/hackfest/restconf/connectionserver/swagger_server/swagger/swagger.yaml +++ b/hackfest/restconf/connectionserver/swagger_server/swagger/swagger.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/restconf/topology.yaml b/hackfest/restconf/topology.yaml index d118feb0fa9edcb1a42b38cf99b27ce5ab11a287..a6a463b464af5120cf5e88a9cb32d0825b7fda14 100644 --- a/hackfest/restconf/topology.yaml +++ b/hackfest/restconf/topology.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/restconf/topologyserver/swagger_server/swagger/swagger.yaml b/hackfest/restconf/topologyserver/swagger_server/swagger/swagger.yaml index 6b8b9063062a20023ad95c2c8802a4ee23dc65b1..fc3d72f439847e46346a4f4a29e27d0d98ab8534 100644 --- a/hackfest/restconf/topologyserver/swagger_server/swagger/swagger.yaml +++ b/hackfest/restconf/topologyserver/swagger_server/swagger/swagger.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/tapi/client/tapi-client.sh b/hackfest/tapi/client/tapi-client.sh index 528028f8c326e7d8e5db0b48f6f580e6cb5db7a4..433436a940c4a004ad1d8e4935ca7ae11a7f140f 100755 --- a/hackfest/tapi/client/tapi-client.sh +++ b/hackfest/tapi/client/tapi-client.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/tapi/server/run.sh b/hackfest/tapi/server/run.sh index a5b60680d85ac84215f160e4e4940a4f88dfe8cd..13b06b3877c19ae1d41398cf51e3b4d9ad70b1f2 100755 --- a/hackfest/tapi/server/run.sh +++ b/hackfest/tapi/server/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/tapi/tapi-connectivity.yaml b/hackfest/tapi/tapi-connectivity.yaml index 744d462bb39943510d99d6c5dc3e8e2b430cdc3b..566727a6274045a0fe88b2984cc902f059933cda 100644 --- a/hackfest/tapi/tapi-connectivity.yaml +++ b/hackfest/tapi/tapi-connectivity.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/tapi/tapi_app/requirements.sh b/hackfest/tapi/tapi_app/requirements.sh index 5cc5b327b7e28486dbd6be21d42ece361cf517cb..bcb3205191e7c4eac2262aa12fcdecd02033fba3 100755 --- a/hackfest/tapi/tapi_app/requirements.sh +++ b/hackfest/tapi/tapi_app/requirements.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/tapi/tapi_app/tapi_app.py b/hackfest/tapi/tapi_app/tapi_app.py index fa1b63d790b50af309aa3842d5f30fe53e4933ed..7db1e3e2b32d0bda9163c7a3d2a5c43266e4a941 100644 --- a/hackfest/tapi/tapi_app/tapi_app.py +++ b/hackfest/tapi/tapi_app/tapi_app.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/yang/connection/connection.py b/hackfest/yang/connection/connection.py index 3c00de729a6a197a1ccadc30455c91ac1509a6e5..eb2be262ef821c1ac3b154a961994c494ca55cf9 100644 --- a/hackfest/yang/connection/connection.py +++ b/hackfest/yang/connection/connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/yang/topology.py b/hackfest/yang/topology.py index 996feaafa5054faf41182be8b959207b96b47730..7503450fe1c1cd7a2f812df5d50de1a820d5822a 100644 --- a/hackfest/yang/topology.py +++ b/hackfest/yang/topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/hackfest/yang/topology.xml b/hackfest/yang/topology.xml index 50e31d6cf09bbd8e99742e25d3201eddfcd84257..a4806cb6c76ff4726c1217745fad2273a7c4fe39 100644 --- a/hackfest/yang/topology.xml +++ b/hackfest/yang/topology.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/hackfest5/.gitignore b/hackfest5/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0ba4756f172b9aa58e2deebb9f62243d0b91e006 --- /dev/null +++ b/hackfest5/.gitignore @@ -0,0 +1,4 @@ +clab-*/ +*.clab.yml.bak +*.tar +*.tar.gz diff --git a/hackfest5/README.md b/hackfest5/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1906a500583945142300256c55f70b06ec210a72 --- /dev/null +++ b/hackfest5/README.md @@ -0,0 +1,187 @@ +# Hackfest 5 - Control an Emulated DataPlane through TeraFlowSDN + + +## Prepare your VM +```bash +cd ~/tfs-ctrl +git checkout feat/hackfest5 +git pull +``` + + + +## ContainerLab Commands + +### Download and install ContainerLab +```bash +sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0 +``` + +### Check available images in Docker +```bash +docker images | grep -E "ceos|multitool" +``` + +### Download hackfest5 cEOS image and create Docker image [already done] +- Note: Image to be downloaded for free from [Arista](https://www.arista.com/en/login) website. +```bash +docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.31.5M.tar ceos:4.31.5M +docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.32.2F.tar ceos:4.32.2F +``` + +### Deploy scenario +```bash +~/tfs-ctrl/hackfest5/clab-deploy.sh +``` + +### Inspect scenario +```bash +~/tfs-ctrl/hackfest5/clab-inspect.sh +``` + +### Show scenario's topology +```bash +~/tfs-ctrl/hackfest5/clab-graph.sh +``` + +### Destroy scenario +```bash +~/tfs-ctrl/hackfest5/clab-destroy.sh +``` + +### Access cEOS CLI +```bash +~/tfs-ctrl/hackfest5/clab-cli-r1.sh +``` + +### Access DC CLI +```bash +~/tfs-ctrl/hackfest5/clab-cli-dc1.sh +``` + +### Start pinging remote DC +```bash +~/tfs-ctrl/hackfest5/clab-cli-dc1.sh + ping 192.168.2.10 +``` + + + +## TeraFlowSDN Commands + +### Check status of MicroK8s +```bash +microk8s.status --wait-ready +``` + +### Start MicroK8s +```bash +microk8s.start +``` + +### Periodically report status of MicroK8s every second +```bash +watch -n 1 microk8s.status --wait-ready +``` + +### Periodically report status of workload in MicroK8s every second +```bash +watch -n 1 kubectl get all --all-namespaces +``` + +### Re-Deploy TeraFlowSDN +```bash +~/tfs-ctrl/hackfest5/redeploy-tfs.sh +``` + +### Show TeraFlowSDN Deployment status +```bash +source ~/tfs-ctrl/hackfest5/deploy_specs.sh +./deploy/show.sh +``` + +### Show log of a TeraFlowSDN component +```bash +source ~/tfs-ctrl/hackfest5/deploy_specs.sh +~/tfs-ctrl/scripts/show_logs_device.sh +``` + + + +## L3VPN Commands + +### Create a new IETF L3VPN through TeraFlowSDN NBI +```bash +cd ~/tfs-ctrl/hackfest5/data +curl -X POST \ + --header "Content-Type: application/json" \ + --data @ietf-l3vpn-service.json \ + --user "admin:admin" \ + http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services +``` + +### Get UUID of a IETF L3VPN through TeraFlowSDN NBI +```bash +curl --user "admin:admin" \ + http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-svc/ +``` + +### Delete a IETF L3VPN through TeraFlowSDN NBI +```bash +curl -X DELETE --user "admin:admin" \ + http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-svc/ +``` + +### Start pinging remote DC +```bash +~/tfs-ctrl/hackfest5/clab-cli-dc1.sh + ping 192.168.2.10 +``` + + + + +## gNMIc Commands + +### Install gNMIc +```bash +sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" +``` + +### gNMI Capabilities request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure capabilities +``` + +### gNMI Get request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json +``` + +### gNMI Set request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value "my-r1" +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname +``` + +### Subscribe request +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ + +# In another terminal, you can generate traffic opening SSH connection +ssh admin@clab-hackfest5-r1 +``` + +### Check configurations done: +```bash +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json +gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json +``` + +### Delete elements: +```bash +--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' +--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' +--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' +``` diff --git a/hackfest5/clab-cli-dc1.sh b/hackfest5/clab-cli-dc1.sh new file mode 100755 index 0000000000000000000000000000000000000000..44631fa227462996b2b924e01d32f5d148610e4b --- /dev/null +++ b/hackfest5/clab-cli-dc1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-hackfest5-dc1 bash diff --git a/hackfest5/clab-cli-dc2.sh b/hackfest5/clab-cli-dc2.sh new file mode 100755 index 0000000000000000000000000000000000000000..56e1520142f3749069582bd519e1f425bacd3e4f --- /dev/null +++ b/hackfest5/clab-cli-dc2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-hackfest5-dc2 bash diff --git a/hackfest5/clab-cli-r1.sh b/hackfest5/clab-cli-r1.sh new file mode 100755 index 0000000000000000000000000000000000000000..f921809bfea80dffbc66b4a35fcbb7e786a90cdd --- /dev/null +++ b/hackfest5/clab-cli-r1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-hackfest5-r1 Cli diff --git a/hackfest5/clab-cli-r2.sh b/hackfest5/clab-cli-r2.sh new file mode 100755 index 0000000000000000000000000000000000000000..154179a636981ecd6d7831f7498873eca8d94274 --- /dev/null +++ b/hackfest5/clab-cli-r2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-hackfest5-r2 Cli diff --git a/hackfest5/clab-deploy.sh b/hackfest5/clab-deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..84b4d2c221f1f11cc46efd13818b37b5d0e492d3 --- /dev/null +++ b/hackfest5/clab-deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab deploy --topo hackfest5.clab.yml diff --git a/hackfest5/clab-destroy.sh b/hackfest5/clab-destroy.sh new file mode 100755 index 0000000000000000000000000000000000000000..dc65a82e7cfd263fc25760b224403e0a31c68188 --- /dev/null +++ b/hackfest5/clab-destroy.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab destroy --topo hackfest5.clab.yml +sudo rm -rf clab-hackfest5/ .hackfest5.clab.yml.bak diff --git a/hackfest5/clab-graph.sh b/hackfest5/clab-graph.sh new file mode 100755 index 0000000000000000000000000000000000000000..f0ad9693296970dbafab9abaa1f41af2c5ee5f4e --- /dev/null +++ b/hackfest5/clab-graph.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab graph --topo hackfest5.clab.yml diff --git a/hackfest5/clab-inspect.sh b/hackfest5/clab-inspect.sh new file mode 100755 index 0000000000000000000000000000000000000000..5e1fc7a623796c1c427abaae334352c38d98addb --- /dev/null +++ b/hackfest5/clab-inspect.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/hackfest5 +sudo containerlab inspect --topo hackfest5.clab.yml diff --git a/hackfest5/data/ietf-l3vpn-service.json b/hackfest5/data/ietf-l3vpn-service.json new file mode 100644 index 0000000000000000000000000000000000000000..9eb70db5465af56e9877eecf664da0aa7d1313ba --- /dev/null +++ b/hackfest5/data/ietf-l3vpn-service.json @@ -0,0 +1,83 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-svc"}]}, + "sites": { + "site": [ + { + "site-id": "site_DC1", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "DC1"}]}, + "devices": {"device": [{"device-id": "dc1", "location": "DC1"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "dc1", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:spoke-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "192.168.1.1", + "customer-address": "192.168.1.10", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + }, + { + "site-id": "site_DC2", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "DC2"}]}, + "devices": {"device": [{"device-id": "dc2", "location": "DC2"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "dc2", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:hub-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "192.168.2.1", + "customer-address": "192.168.2.10", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + } + ] + } + } +} diff --git a/hackfest5/data/tfs-service.json b/hackfest5/data/tfs-service.json new file mode 100644 index 0000000000000000000000000000000000000000..397fc84789111932da047acd22c7bc787888657f --- /dev/null +++ b/hackfest5/data/tfs-service.json @@ -0,0 +1,26 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "tfs-l3vpn-svc"} + }, + "service_type": "SERVICETYPE_L3NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "int"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "int"}} + ], + "service_constraints": [], + "service_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[dc1]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "192.168.1.10", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[dc2]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "192.168.2.10", "address_prefix": 24, "index": 0} + }} + ]} + } + ] +} diff --git a/hackfest5/data/tfs-topology.json b/hackfest5/data/tfs-topology.json new file mode 100644 index 0000000000000000000000000000000000000000..49df9de4244651d1eb08c24ca3fcbb53d41d2e34 --- /dev/null +++ b/hackfest5/data/tfs-topology.json @@ -0,0 +1,100 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "dc1"}}, "device_type": "emu-datacenter", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "dc2"}}, "device_type": "emu-datacenter", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==dc1/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "dc1/eth1==r1/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet10==dc2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "dc2/eth1==r2/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + } + ] +} diff --git a/hackfest5/deploy_specs.sh b/hackfest5/deploy_specs.sh new file mode 100755 index 0000000000000000000000000000000000000000..e9565218a725fbd416ac9fd2e7a9ca432ef20a96 --- /dev/null +++ b/hackfest5/deploy_specs.sh @@ -0,0 +1,208 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service nbi webui" + +# Uncomment to activate Monitoring (old) +export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9009" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +#export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +#export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +#export KFK_REDEPLOY="" diff --git a/hackfest5/hackfest5.clab.yml b/hackfest5/hackfest5.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..acc58e9d01c245108e85ca786427eeac5442203f --- /dev/null +++ b/hackfest5/hackfest5.clab.yml @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI 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 - Arista devices + Linux clients + +name: hackfest5 + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + #image: ceos:4.31.2F + image: ceos:4.31.5M + #image: ceos:4.32.0F + #image: ceos:4.32.2F + #image: ceos:4.32.2.1F + linux: + kind: linux + image: ghcr.io/hellt/network-multitool:latest + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + startup-config: r1-startup.cfg + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + startup-config: r2-startup.cfg + + dc1: + kind: linux + mgmt-ipv4: 172.20.20.201 + exec: + - ip link set address 00:c1:ab:00:01:01 dev eth1 + - ip address add 192.168.1.10/24 dev eth1 + - ip route add 192.168.2.0/24 via 192.168.1.1 + + dc2: + kind: linux + mgmt-ipv4: 172.20.20.202 + exec: + - ip link set address 00:c1:ab:00:02:01 dev eth1 + - ip address add 192.168.2.10/24 dev eth1 + - ip route add 192.168.1.0/24 via 192.168.2.1 + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r1:eth10", "dc1:eth1"] + - endpoints: ["r2:eth10", "dc2:eth1"] diff --git a/hackfest5/images/arista/.gitignore b/hackfest5/images/arista/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..284b64ce5902e2c74c656fb0c7256bc11a59575d --- /dev/null +++ b/hackfest5/images/arista/.gitignore @@ -0,0 +1,3 @@ +!.gitkeep +*.tar +*.tar.gz diff --git a/hackfest5/images/arista/.gitkeep b/hackfest5/images/arista/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/hackfest5/r1-startup.cfg b/hackfest5/r1-startup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2d1964f5f6505411674890acafeb05e574f49aa5 --- /dev/null +++ b/hackfest5/r1-startup.cfg @@ -0,0 +1,39 @@ +! device: r1 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$tUMBMqI5iPca5XcJ$5QU/R83S.zjpHQyeB3H63BGWOgxewjqZ1NsxdaWPo3gLwRXVTrgYvMmwwZlzjYoqrD7yp7e9YD073/.FKLYEY1 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r1 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.101/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +end diff --git a/hackfest5/r2-startup.cfg b/hackfest5/r2-startup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..7acd56bf64ebc45a437b438f1b13c4aa4182b794 --- /dev/null +++ b/hackfest5/r2-startup.cfg @@ -0,0 +1,39 @@ +! device: r2 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$Z/om4jI3S5BmwxfB$igaSOaJnh3m36TbSMHKCusA77m07CU8JJxalupXIUFuy7HaGt6k.C1kfSJsPqjn1AhLaL.LvLkt/hcqTFgpjG. +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r2 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet1 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.102/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +end diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh new file mode 100755 index 0000000000000000000000000000000000000000..ff55bed3f55e355293e842b2f92c5547715cb247 --- /dev/null +++ b/hackfest5/redeploy-tfs.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source ~/tfs-ctrl/hackfest5/deploy_specs.sh + +echo "Cleaning-up old NATS and Kafka deployments..." +helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE} +kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found +kubectl delete namespace kafka --ignore-not-found +printf "\n" + +echo "Deployting TeraFlowSDN..." + +# Deploy CockroachDB +./deploy/crdb.sh + +# Deploy NATS +./deploy/nats.sh + +# Deploy QuestDB +./deploy/qdb.sh + +# Expose Dashboard +./deploy/expose_dashboard.sh + +# Deploy TeraFlowSDN +./deploy/tfs.sh + +# Show deploy summary +./deploy/show.sh + +printf "\n" + +echo "Waiting for Context to be subscribed to NATS..." +while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do + printf "%c" "." + sleep 1 +done +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server +printf "\n" diff --git a/install_requirements.sh b/install_requirements.sh index 54b660a521dadc08a344d2f79f2db15271131a21..8d94df1b9cc391fa59e64bb603128ccda67c2626 100755 --- a/install_requirements.sh +++ b/install_requirements.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/.gitlab-ci.yml b/manifests/.gitlab-ci.yml index 516394fd1264608172034fb33fb4dc3961c59899..89e0d4d425a7515a0ddd6d2927dcb73ee759616b 100644 --- a/manifests/.gitlab-ci.yml +++ b/manifests/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/analyticsservice.yaml b/manifests/analyticsservice.yaml index 536bb185286ba5444ad22d17d00706a066172e4c..d47ad95fb0c8fe7caa3dfc05db19889aaf9b788c 100644 --- a/manifests/analyticsservice.yaml +++ b/manifests/analyticsservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/automationservice.yaml b/manifests/automationservice.yaml index f6c97f7fb7635e4b04431d41dbf20ca3edc51475..ef6d2ea23a9c7e20383ca5230f1681620fa1e61c 100644 --- a/manifests/automationservice.yaml +++ b/manifests/automationservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/bgpls_speakerservice.yaml b/manifests/bgpls_speakerservice.yaml index 0c51262598802181e4e6f8f81d51b32e549dbd60..82e183572b2d476a050f416aef3c02d2c8373ca9 100644 --- a/manifests/bgpls_speakerservice.yaml +++ b/manifests/bgpls_speakerservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/cachingservice.yaml b/manifests/cachingservice.yaml index a3f8a662b559a49411c104b4dcc0ed3f2dca2c3f..66381c8cc8103606dc959ab8e22e6e18d02cf914 100644 --- a/manifests/cachingservice.yaml +++ b/manifests/cachingservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/cockroachdb/single-node.yaml b/manifests/cockroachdb/single-node.yaml index 909ede6615d409e88c707780ba63de5d3e59f2a7..7abc468d7ccbca0103ca3e8cb19599c0bc5c9281 100644 --- a/manifests/cockroachdb/single-node.yaml +++ b/manifests/cockroachdb/single-node.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -71,7 +71,7 @@ spec: name: sql env: - name: COCKROACH_DATABASE - value: "%CRDB_DATABASE%" + value: "tfs_context" - name: COCKROACH_USER value: "%CRDB_USERNAME%" - name: COCKROACH_PASSWORD diff --git a/manifests/contextservice.yaml b/manifests/contextservice.yaml index 0fc8a1c44f7358a962276ebcf38a165d2db986cd..568c3a51dfe0b6908c0055ef2d44c2d183e166a8 100644 --- a/manifests/contextservice.yaml +++ b/manifests/contextservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/dbscanservingservice.yaml b/manifests/dbscanservingservice.yaml index 04b9419fb5d091be94fa727aad09305679ed69fa..03e48ae62c6e194aa6f0d0fd7b3dff1c5150c224 100644 --- a/manifests/dbscanservingservice.yaml +++ b/manifests/dbscanservingservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/deviceservice.yaml b/manifests/deviceservice.yaml index e49ba23995b07f4e7e956a69f8d5383c8e976e89..950b984420a4cb4d50a455312ecb306752a406fe 100644 --- a/manifests/deviceservice.yaml +++ b/manifests/deviceservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/dltservice.yaml b/manifests/dltservice.yaml index 66bd3724c7a6244ea553d7199968c900bce0611c..79f0d7f0996429328f53e0e890d45d3b1f2f5c89 100644 --- a/manifests/dltservice.yaml +++ b/manifests/dltservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/e2e_orchestratorservice.yaml b/manifests/e2e_orchestratorservice.yaml index 893f3464fabea2d1151c007a612e781d1f999093..c4f0f112f8bbc34e6e79f470c3974ec317a85637 100644 --- a/manifests/e2e_orchestratorservice.yaml +++ b/manifests/e2e_orchestratorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/forecasterservice.yaml b/manifests/forecasterservice.yaml index 3bb58a775327a43949cc06993b06ea96d51cc995..3d1e7bf98386db9b5712136b57b0ed0cca0aa19e 100644 --- a/manifests/forecasterservice.yaml +++ b/manifests/forecasterservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/interdomainservice.yaml b/manifests/interdomainservice.yaml index 8926dcdafdea90ad7dea41eca854cbcb30853553..547da3a073d21326bdee1bb146e91ec8d8ac0b87 100644 --- a/manifests/interdomainservice.yaml +++ b/manifests/interdomainservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/kpi_managerservice.yaml b/manifests/kpi_managerservice.yaml index f8ee8ff821ec1acb689cbe8d0bb8f8f407c971e3..786d54f6a723b7ad899c3a914c27fcafe2e24c3c 100644 --- a/manifests/kpi_managerservice.yaml +++ b/manifests/kpi_managerservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/kpi_value_apiservice.yaml b/manifests/kpi_value_apiservice.yaml index e4dcb00545ffaa33de39fd29c029780b777ea91f..eb5b12b84f39ecec378de6c9ddc7995fda9c9932 100644 --- a/manifests/kpi_value_apiservice.yaml +++ b/manifests/kpi_value_apiservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/kpi_value_writerservice.yaml b/manifests/kpi_value_writerservice.yaml index e21e36f48ba08999f142e8548fed61cd2dfef0cc..f98be462990fff4d678e41144511a284e2dd4f6c 100644 --- a/manifests/kpi_value_writerservice.yaml +++ b/manifests/kpi_value_writerservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/l3_attackmitigatorservice.yaml b/manifests/l3_attackmitigatorservice.yaml index 49df5a6750170219888f5769bbf6fe6c4eecc093..3f85f58a7c508cff159595281f3e04b594b54aa6 100644 --- a/manifests/l3_attackmitigatorservice.yaml +++ b/manifests/l3_attackmitigatorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/l3_centralizedattackdetectorservice.yaml b/manifests/l3_centralizedattackdetectorservice.yaml index a82929a56b7697d5f8ac262dd51e0179bc1f3386..3b1adea7b62a2abf75b8166aa700bb508ff69b84 100644 --- a/manifests/l3_centralizedattackdetectorservice.yaml +++ b/manifests/l3_centralizedattackdetectorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/l3_distributedattackdetectorservice.yaml b/manifests/l3_distributedattackdetectorservice.yaml index 941f79a6c76bf3e6ea6fc99f7c765f692fc84613..63e2dab129f3a82647421dd888c93ac117d0a54e 100644 --- a/manifests/l3_distributedattackdetectorservice.yaml +++ b/manifests/l3_distributedattackdetectorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/load_generatorservice.yaml b/manifests/load_generatorservice.yaml index e76dd0bdb9e394d733b1b5e88ef4f52df42fa436..13c55c65cc509da8c86b29ef198898b51e42cf79 100644 --- a/manifests/load_generatorservice.yaml +++ b/manifests/load_generatorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/mock_blockchain.yaml b/manifests/mock_blockchain.yaml index 0ad46eaeffbb6cdff3a531a6792c904a02728d9d..7eb3a9f972cae65ee5bd751643cc28654033e91f 100644 --- a/manifests/mock_blockchain.yaml +++ b/manifests/mock_blockchain.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/monitoringservice.yaml b/manifests/monitoringservice.yaml index 1540db0a12ba65e9fdb48cd73ea4a0a63fddf5e7..3178b487e3227ba14a36b200f6eed80a33f9fe6c 100644 --- a/manifests/monitoringservice.yaml +++ b/manifests/monitoringservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/nats/cluster.yaml b/manifests/nats/cluster.yaml index 00dbef17fca74ca906d4f97ee6e8751c03ef493f..913520f2234d2a6b244379493a91a7b9f75844ca 100644 --- a/manifests/nats/cluster.yaml +++ b/manifests/nats/cluster.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index 72cfde514341b0ef89b3b8eb91ab01b23a27c14b..55accdc44dd6ec34ac379d2e09bb0df77406e3fa 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/nginx_ingress_http.yaml b/manifests/nginx_ingress_http.yaml index 619d85f7a82af48c71464038bf14a833903d1a58..5b77ed052f26eb28cb07ebecf70e163aeba9d642 100644 --- a/manifests/nginx_ingress_http.yaml +++ b/manifests/nginx_ingress_http.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/opticalattackdetectorservice.yaml b/manifests/opticalattackdetectorservice.yaml index 825f4eb9abce328f8eadc596b2497470c57fa01f..bf8f59802fd017c5919fa0b67c1b439450019f92 100644 --- a/manifests/opticalattackdetectorservice.yaml +++ b/manifests/opticalattackdetectorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/opticalattackmanagerservice.yaml b/manifests/opticalattackmanagerservice.yaml index e781d9a09b7ae9c96f79010ab9e5c8122b2f177c..866ea690ad6ec913450079e6162fb39a8d4450fe 100644 --- a/manifests/opticalattackmanagerservice.yaml +++ b/manifests/opticalattackmanagerservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/opticalattackmitigatorservice.yaml b/manifests/opticalattackmitigatorservice.yaml index e010a1c33c35b006fdbc7058b3153fb2d14194df..d3553dfe8379f50551c87741625059776c9caa93 100644 --- a/manifests/opticalattackmitigatorservice.yaml +++ b/manifests/opticalattackmitigatorservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/opticalcontrollerservice.yaml b/manifests/opticalcontrollerservice.yaml index 05b7a2f68d85f363e7aaf76380ad919279915b7d..d537076fe21ee0074118f09c07c0ff7df99f77d4 100644 --- a/manifests/opticalcontrollerservice.yaml +++ b/manifests/opticalcontrollerservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/pathcompservice.yaml b/manifests/pathcompservice.yaml index 1f54c569ce861a9ac957a2e276eb0e5f227d514a..0cac6cc18604f346214ebe44e7eb7d2d64763cbd 100644 --- a/manifests/pathcompservice.yaml +++ b/manifests/pathcompservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/policyservice.yaml b/manifests/policyservice.yaml index cb66a330057a8d2dd28697fba15830fb144d8cd6..0829e898e87d30899699e97c9b6d79e191ca5b12 100644 --- a/manifests/policyservice.yaml +++ b/manifests/policyservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/prometheus.yaml b/manifests/prometheus.yaml index af75e9957ce029fb9ea5331b1a78e8a9dd9ec3cc..cfa09e5fd7f20f7941ce058400c7d4c0a15fb0d8 100644 --- a/manifests/prometheus.yaml +++ b/manifests/prometheus.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/qkd_appservice.yaml b/manifests/qkd_appservice.yaml index ba02e2e1da34ac670f68e17c28e9847603401d3a..49ee65710b7bba58f3a14ca3def19b767ee31f56 100644 --- a/manifests/qkd_appservice.yaml +++ b/manifests/qkd_appservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/qos_profileservice.yaml b/manifests/qos_profileservice.yaml index 801607880bbcd9a51bacbec396f797dda7132d81..01b8adf764b188afec345a77ada61117699009cb 100644 --- a/manifests/qos_profileservice.yaml +++ b/manifests/qos_profileservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/questdb/manifest.yaml b/manifests/questdb/manifest.yaml index 002d9613ca42700015da80b4b5d618b9e8b849ef..1f12a9a66ae3537b96a9ae79f30cd7470b21f7ac 100644 --- a/manifests/questdb/manifest.yaml +++ b/manifests/questdb/manifest.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/servicemonitors.yaml b/manifests/servicemonitors.yaml index 8a8fe6f39eff87d12582f2f83734c07dc695cea3..fa6aed0f927efa21d55ff65b18b401070e411bf4 100644 --- a/manifests/servicemonitors.yaml +++ b/manifests/servicemonitors.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -575,9 +575,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: namespace: monitoring # namespace where prometheus is running - name: tfs-kpi_value_apiservice-metric + name: tfs-kpi-value-apiservice-metric labels: - app: kpi_value_apiservice + app: kpi-value-apiservice #release: prometheus #release: prom # name of the release # ( VERY IMPORTANT: You need to know the correct release name by viewing @@ -588,7 +588,7 @@ spec: matchLabels: # Target app service #namespace: tfs - app: kpi_value_apiservice # same as above + app: kpi-value-apiservice # same as above #release: prometheus # same as above endpoints: - port: metrics # named port in target app @@ -604,9 +604,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: namespace: monitoring # namespace where prometheus is running - name: tfs-kpi_value_writerservice-metric + name: tfs-kpi-value-writerservice-metric labels: - app: kpi_value_writerservice + app: kpi-value-writerservice #release: prometheus #release: prom # name of the release # ( VERY IMPORTANT: You need to know the correct release name by viewing @@ -617,7 +617,7 @@ spec: matchLabels: # Target app service #namespace: tfs - app: kpi_value_writerservice # same as above + app: kpi-value-writerservice # same as above #release: prometheus # same as above endpoints: - port: metrics # named port in target app diff --git a/manifests/serviceservice.yaml b/manifests/serviceservice.yaml index 1dd383d615bb167ae6de15ae03c404a50bdee942..aa94e4269daae85872573d2dc32a5d56da89673b 100644 --- a/manifests/serviceservice.yaml +++ b/manifests/serviceservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/sliceservice.yaml b/manifests/sliceservice.yaml index 96a324fdffc3c1aa249d5ec592b08fe90b710313..37f275b6ee4ad5883d38ac1496a7874408425831 100644 --- a/manifests/sliceservice.yaml +++ b/manifests/sliceservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/telemetryservice.yaml b/manifests/telemetryservice.yaml index 86d864157838513dd68f10679d44d11b074c422c..a7fe4f4d10e7ac6988bc0305be2c9b917471e7c2 100644 --- a/manifests/telemetryservice.yaml +++ b/manifests/telemetryservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/teservice.yaml b/manifests/teservice.yaml index c59969442dd3985b17d286c0369ee164f298dd84..3f15d684cab1cf1aea230f7c2c9dfb013593ae9c 100644 --- a/manifests/teservice.yaml +++ b/manifests/teservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/vnt_managerservice.yaml b/manifests/vnt_managerservice.yaml index 62c575139e972d9d7ae26f1218f78f725291cc5b..41735a589f9e5b74d089bb9eef0e1ff362a3d12a 100644 --- a/manifests/vnt_managerservice.yaml +++ b/manifests/vnt_managerservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/manifests/webuiservice.yaml b/manifests/webuiservice.yaml index 19317323f2a60293a33d740b28b3795627846642..5a321c33e33e83b5eb67b9bacf8b9ce8f1edf304 100644 --- a/manifests/webuiservice.yaml +++ b/manifests/webuiservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,6 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: grafana-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -99,6 +110,13 @@ spec: limits: cpu: 500m memory: 1024Mi + volumeMounts: + - mountPath: /var/lib/grafana + name: grafana-pv + volumes: + - name: grafana-pv + persistentVolumeClaim: + claimName: grafana-pvc --- apiVersion: v1 kind: Service diff --git a/manifests/ztpservice.yaml b/manifests/ztpservice.yaml index 64b1a4505744b47f5cd2d8b427fd03a0dcbf4026..b362e7c052a832ac51ca0b3ec1294a33a94ef2bb 100644 --- a/manifests/ztpservice.yaml +++ b/manifests/ztpservice.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/my_deploy.sh b/my_deploy.sh index f74d4982ecf7ba79fa42534647758876c8098b1e..409dc98f242dba7930f574693276e76489615c72 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -129,9 +129,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/proto/acl.proto b/proto/acl.proto index b45d46226d2706396f6d4c0e73ce72e15a75f2d5..ec35a05f9940df65e5e22e1555dc8497b4ba315f 100644 --- a/proto/acl.proto +++ b/proto/acl.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/analytics_frontend.proto b/proto/analytics_frontend.proto index bb6afb2e424b646fd8d9a6810c38a8a6863c230f..6895819c04afae523d54e176d02a737d18963f40 100644 --- a/proto/analytics_frontend.proto +++ b/proto/analytics_frontend.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/attack_mitigator.proto b/proto/attack_mitigator.proto index 4b270bda0a25f472c8978ea9c26a43e1844226e6..07d5e80973a2a49852014747dfd62348bfababe6 100644 --- a/proto/attack_mitigator.proto +++ b/proto/attack_mitigator.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/automation.proto b/proto/automation.proto index edb1ef404171270e740e2b30944151d98607292c..2a19933e144686c29c91d1a67ea3ec67326fc3b8 100644 --- a/proto/automation.proto +++ b/proto/automation.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/bgpls.proto b/proto/bgpls.proto index ee0f05d2fca7d52d69e6cecb3225e07e3155746b..0f3f519465cd34b1f26e9e01d02c7717c49660f3 100644 --- a/proto/bgpls.proto +++ b/proto/bgpls.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/context.proto b/proto/context.proto index d3888e77b0256f63fb4b4eb10b987137057a0aa7..4d61572df1db6c95b64e9ce1cbfdd9e0db111078 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. @@ -77,13 +77,19 @@ service ContextService { // ------------------------------ Experimental ----------------------------- - rpc GetOpticalConfig (Empty ) returns (OpticalConfigList ) {} - rpc SetOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} - rpc SelectOpticalConfig(OpticalConfigId) returns (OpticalConfig ) {} + rpc GetOpticalConfig (Empty ) returns (OpticalConfigList) {} + rpc SetOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} + rpc UpdateOpticalConfig (OpticalConfig ) returns (OpticalConfigId ) {} + rpc SelectOpticalConfig (OpticalConfigId ) returns (OpticalConfig ) {} + rpc DeleteOpticalConfig (OpticalConfigId ) returns (Empty ) {} + rpc DeleteOpticalChannel (OpticalConfig ) returns (Empty ) {} - rpc SetOpticalLink (OpticalLink ) returns (Empty ) {} - rpc GetOpticalLink (OpticalLinkId ) returns (OpticalLink ) {} - rpc GetFiber (FiberId ) returns (Fiber ) {} + rpc SetOpticalLink (OpticalLink ) returns (Empty ) {} + rpc GetOpticalLink (LinkId ) returns (OpticalLink ) {} + rpc DeleteOpticalLink (LinkId ) returns (Empty ) {} + rpc GetOpticalLinkList (Empty ) returns (OpticalLinkList ) {} + + rpc DeleteServiceConfigRule(ServiceConfigRule) returns (Empty ) {} } // ----- Generic ------------------------------------------------------------------------------------------------------- @@ -148,6 +154,7 @@ message Topology { string name = 2; repeated DeviceId device_ids = 3; repeated LinkId link_ids = 4; + repeated LinkId optical_link_ids = 5; } message TopologyDetails { @@ -155,6 +162,7 @@ message TopologyDetails { string name = 2; repeated Device devices = 3; repeated Link links = 4; + repeated OpticalLink optical_links = 5; } message TopologyIdList { @@ -250,6 +258,14 @@ message LinkId { Uuid link_uuid = 1; } +enum LinkTypeEnum { + LINKTYPE_UNKNOWN = 0; + LINKTYPE_COPPER = 1; + LINKTYPE_FIBER = 2; + LINKTYPE_RADIO = 3; + LINKTYPE_VIRTUAL = 4; +} + message LinkAttributes { float total_capacity_gbps = 1; float used_capacity_gbps = 2; @@ -258,9 +274,9 @@ message LinkAttributes { message Link { LinkId link_id = 1; string name = 2; - repeated EndPointId link_endpoint_ids = 3; - LinkAttributes attributes = 4; - LinkTypeEnum link_type = 5; + LinkTypeEnum link_type = 3; + repeated EndPointId link_endpoint_ids = 4; + LinkAttributes attributes = 5; } message LinkIdList { @@ -276,14 +292,6 @@ message LinkEvent { LinkId link_id = 2; } -enum LinkTypeEnum { - LINKTYPE_UNKNOWN = 0; - LINKTYPE_COPPER = 1; - LINKTYPE_VIRTUAL_COPPER = 2; - LINKTYPE_OPTICAL = 3; - LINKTYPE_VIRTUAL_OPTICAL = 4; -} - // ----- Service ------------------------------------------------------------------------------------------------------- message ServiceId { ContextId context_id = 1; @@ -557,6 +565,9 @@ message Location { oneof location { string region = 1; GPS_Position gps_position = 2; + + string interface=3; + string circuit_pack=4; } } @@ -653,45 +664,57 @@ message OpticalConfigId { message OpticalConfig { OpticalConfigId opticalconfig_id = 1; string config = 2; + DeviceId device_id = 3; } message OpticalConfigList { repeated OpticalConfig opticalconfigs = 1; } +message OpticalConfigEvent { + Event event = 1; + OpticalConfigId opticalconfig_id = 2; +} + + // ---- Optical Link ---- -message OpticalLinkId { - Uuid optical_link_uuid = 1; +message OpticalEndPointId { + DeviceId device_id = 2; + Uuid endpoint_uuid = 3; } -message FiberId { - Uuid fiber_uuid = 1; -} -message Fiber { - string ID = 10; - string src_port = 1; - string dst_port = 2; - string local_peer_port = 3; - string remote_peer_port = 4; - repeated int32 c_slots = 5; - repeated int32 l_slots = 6; - repeated int32 s_slots = 7; - float length = 8; - bool used = 9; - FiberId fiber_uuid = 11; - +message OpticalLinkList { + repeated OpticalLink optical_links = 1; } + + + message OpticalLinkDetails { float length = 1; - string source = 2; - string target = 3; - repeated Fiber fibers = 4; + string src_port = 2; + string dst_port = 3; + string local_peer_port = 4; + string remote_peer_port = 5 ; + bool used = 6 ; + map<string, int32> c_slots = 7; + map<string, int32> l_slots = 8; + map<string, int32> s_slots = 9; } message OpticalLink { string name = 1; - OpticalLinkDetails details = 2; - OpticalLinkId optical_link_uuid = 3; + OpticalLinkDetails optical_details = 2; + LinkId link_id = 3; + repeated EndPointId link_endpoint_ids=4; +} + + + +////////////////// Config Rule Delete //////////// + +message ServiceConfigRule { + ServiceId service_id =1; + ConfigRule_Custom configrule_custom =2; } diff --git a/proto/context_policy.proto b/proto/context_policy.proto index 099cb374634bbbd3632ee32e2f59e6176460b5e4..183e48353889cbe750401232fd828aa7ff8dc2c2 100644 --- a/proto/context_policy.proto +++ b/proto/context_policy.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/dbscanserving.proto b/proto/dbscanserving.proto index fd66acc2f659ca2328bf086102316de4b49684c3..63d4600479cf642d1493caa44a0bb0d28b9b73b6 100644 --- a/proto/dbscanserving.proto +++ b/proto/dbscanserving.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/device.proto b/proto/device.proto index a1882f33f8e177502c456672a0517928f0259ef5..5bd0a48a5b5e0af420bc9dbd84af8d19f287544a 100644 --- a/proto/device.proto +++ b/proto/device.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/distributed_cybersecurity.proto b/proto/distributed_cybersecurity.proto index 9b5fdb7d877fcaab89be63f86ea478919048711f..ea8452f1c255b4744e1df5ab89488d176f993fe0 100644 --- a/proto/distributed_cybersecurity.proto +++ b/proto/distributed_cybersecurity.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/dlt_connector.proto b/proto/dlt_connector.proto index 72d52afe2a8a37bb17e46c53e145c61731541a82..86de504cd0c8e6a66e625951b6f254ac365e781b 100644 --- a/proto/dlt_connector.proto +++ b/proto/dlt_connector.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/dlt_gateway.proto b/proto/dlt_gateway.proto index 9f6da08f5f457e1c5ba173db68c0d4ad5ff88cef..db90e7e52c782d9a70641ae7422aad5eeb8669bb 100644 --- a/proto/dlt_gateway.proto +++ b/proto/dlt_gateway.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/e2eorchestrator.proto b/proto/e2eorchestrator.proto index 731016934300a45e6664b90e73ba458cb03ecfb7..d00d8433fc23875567a63ca8c9c08ef0d13edce3 100644 --- a/proto/e2eorchestrator.proto +++ b/proto/e2eorchestrator.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/forecaster.proto b/proto/forecaster.proto index 0c4e5087c56dda36b8c36434d45ede13a2957bba..b45824ea07f57ba7114d5bcf4f487c4f01fee1e2 100644 --- a/proto/forecaster.proto +++ b/proto/forecaster.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/generate_code_erlang.sh b/proto/generate_code_erlang.sh index 2c2baf0ca1a80ce10e239fed87116da2f84df2ea..71a97930c2a7cc22984411431358b7de7bb9f5ae 100755 --- a/proto/generate_code_erlang.sh +++ b/proto/generate_code_erlang.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/proto/generate_code_java.sh b/proto/generate_code_java.sh index 0196eb2c0c75f53eceba68ac99c3c0f95776d623..84a6c807a042d45fddf5f24f3322514aeda1f3b1 100755 --- a/proto/generate_code_java.sh +++ b/proto/generate_code_java.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/proto/generate_code_python.sh b/proto/generate_code_python.sh index 38d290e82eb4ee16d34f806b9d036fc25564f6b2..2954e72a1257c5c59225bafe94d95c49886ed9b7 100755 --- a/proto/generate_code_python.sh +++ b/proto/generate_code_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -20,7 +20,7 @@ mkdir -p src/python rm -rf src/python/*.py tee src/python/__init__.py << EOF > /dev/null -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/proto/generate_uml.sh b/proto/generate_uml.sh index 6e87137092b64de387572164ee52194f0f97a237..b9e33611af7da9e168325f37cb7f98a7a42855f1 100755 --- a/proto/generate_uml.sh +++ b/proto/generate_uml.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/proto/health.proto b/proto/health.proto index 9c89c46c2814e3e44e6fc758d1337fa5a822faea..8f6cdb4428353d1ef49d529b84257fbc0ece1972 100644 --- a/proto/health.proto +++ b/proto/health.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/interdomain.proto b/proto/interdomain.proto index 368bd224c68ed9ead15674759a919d026eb7ff2e..48c4236cc67ad4592739e32ebb5e8ddf6e6519d3 100644 --- a/proto/interdomain.proto +++ b/proto/interdomain.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/kpi_manager.proto b/proto/kpi_manager.proto index 2640b58c60f004e51c8aeacc0ed76963f0436956..e2591f5faf627d116196d8c009f4b85f73e32206 100644 --- a/proto/kpi_manager.proto +++ b/proto/kpi_manager.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/kpi_sample_types.proto b/proto/kpi_sample_types.proto index 47519b90aa9d70f887acf28f34d0117741ad5e13..0a9800d9e5839205e1e45f84e4c8bdafbe93f32f 100644 --- a/proto/kpi_sample_types.proto +++ b/proto/kpi_sample_types.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/kpi_value_api.proto b/proto/kpi_value_api.proto index a97b0ae2b023dfe0a535aa3cb1ba63b00b418371..b08bcb6b9c1cbdb2fbbe664a603cbbdf9de0cec1 100644 --- a/proto/kpi_value_api.proto +++ b/proto/kpi_value_api.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/l3_attackmitigator.proto b/proto/l3_attackmitigator.proto index 0692a52fd8f5a5a7e66ea8eb191dc3011025648e..c98b07ec8dabb1064c3f38ee31d38ac91a721c3e 100644 --- a/proto/l3_attackmitigator.proto +++ b/proto/l3_attackmitigator.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/l3_centralizedattackdetector.proto b/proto/l3_centralizedattackdetector.proto index 278fb4e6a5b462cea81a5189d1d1aa2761a62686..9584f79a5d1193978576e519588e4cb92b775662 100644 --- a/proto/l3_centralizedattackdetector.proto +++ b/proto/l3_centralizedattackdetector.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/load_generator.proto b/proto/load_generator.proto index 280eb4f606d9cfebf3ef0d125b770de4be990589..b960bd59029a5c5c85999019c047ec61a2a4bb1e 100644 --- a/proto/load_generator.proto +++ b/proto/load_generator.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/monitoring.proto b/proto/monitoring.proto index 083bd82854547478d3a8f4a8935fdf75e9070d9d..257c87a89bded53c6bcfec370292dfa9ee40dd37 100755 --- a/proto/monitoring.proto +++ b/proto/monitoring.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/nbi.proto b/proto/nbi.proto index 4ff9bafee39249953b7165659be8188b0805e028..a81df70ef20e0e3389047a9fd8a6bab927b74114 100644 --- a/proto/nbi.proto +++ b/proto/nbi.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/optical_attack_detector.proto b/proto/optical_attack_detector.proto index f74eea68b8c5a588f5ecc06a59916058cb8d9695..46d3e22e20fc312d3d5f1ac95b8c5f3de5cfbf6a 100644 --- a/proto/optical_attack_detector.proto +++ b/proto/optical_attack_detector.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/optical_attack_mitigator.proto b/proto/optical_attack_mitigator.proto index 99fa4eb13fd986a83fc412c4d1e1ec07e9fc27b7..b28e0608e8ecb46782886dfcdb62323d07fb8036 100644 --- a/proto/optical_attack_mitigator.proto +++ b/proto/optical_attack_mitigator.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/openconfig_device.proto b/proto/optical_device.proto similarity index 57% rename from proto/openconfig_device.proto rename to proto/optical_device.proto index 8ed3a900b6b157e096308c9f476e3c0ab1f575c1..c946d4be031cff6d4f52422c70e1f33b9f91d2d9 100644 --- a/proto/openconfig_device.proto +++ b/proto/optical_device.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. @@ -13,11 +13,13 @@ // limitations under the License. syntax = "proto3"; -package openconfig_device; +package optical_device; import "context.proto"; service OpenConfigService { - rpc AddOpenConfigDevice (context.OpticalConfig) returns (context.OpticalConfigId) {} - rpc ConfigureOpticalDevice(context.OpticalConfig) returns (context.Empty ) {} + rpc AddOpenConfigDevice (context.OpticalConfig ) returns (context.OpticalConfigId) {} + rpc ConfigureOpticalDevice(context.OpticalConfig ) returns (context.Empty ) {} + rpc DisableOpticalDevice (context.OpticalConfig ) returns (context.Empty ) {} + rpc GetDeviceConfiguration(context.OpticalConfigList) returns (context.Empty ) {} } diff --git a/proto/pathcomp.proto b/proto/pathcomp.proto index e8a5be06c192ff58c93b61a6acf75c106f52b354..335d92fae453b7b9a5cfa7e180f80fd379136ddb 100644 --- a/proto/pathcomp.proto +++ b/proto/pathcomp.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/policy.proto b/proto/policy.proto index 27b4ad1687bcd2155a041c358fddb6a431acb0a9..5b0b6d378b6e68ca80dc035964807e367442264e 100644 --- a/proto/policy.proto +++ b/proto/policy.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/policy_action.proto b/proto/policy_action.proto index ae2487be642c87be7a637203acc2e60fc013e7a4..5dba12ac6c2c7cf1b13d760ca364cffadb7379b3 100644 --- a/proto/policy_action.proto +++ b/proto/policy_action.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/policy_condition.proto b/proto/policy_condition.proto index 612dcb1af8eb8adb0db65b8ae47301c87ad6b9ef..eef238ee6b534183d74fa8f7e05e3f06c1febbe9 100644 --- a/proto/policy_condition.proto +++ b/proto/policy_condition.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/qkd_app.proto b/proto/qkd_app.proto index b22948d6cd3040146677d378a080283786d44f96..502f461e915c7e05ef2f4df33c45293cf4b36dd0 100644 --- a/proto/qkd_app.proto +++ b/proto/qkd_app.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/qos_profile.proto b/proto/qos_profile.proto index d032addf4889c8a7a19c260c23df6c74c8ffe55b..e0b61ff17af3dc0758788d5f71b0b93ef1549e72 100644 --- a/proto/qos_profile.proto +++ b/proto/qos_profile.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/service.proto b/proto/service.proto index 4aa1bfe3da41b72edd9ab0509346e200f0ab1c17..8a6c074475fde0b552338f23d832bbad28c5d369 100644 --- a/proto/service.proto +++ b/proto/service.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/slice.proto b/proto/slice.proto index 64dadca9141d53b7945e0cc1d1a1ec0acbc90fd8..ebfd69ed007709bd594e6c2f00a357357a1a85e5 100644 --- a/proto/slice.proto +++ b/proto/slice.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/src/erlang/rebar.config b/proto/src/erlang/rebar.config index 13eb56811ac8383b1e0f6a0b90868013e7d71106..c945da77fc2ec5f175024ce96ea0a580adb1c2d0 100644 --- a/proto/src/erlang/rebar.config +++ b/proto/src/erlang/rebar.config @@ -1,4 +1,4 @@ -% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI 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. diff --git a/proto/src/erlang/src/tfpb.app.src b/proto/src/erlang/src/tfpb.app.src index 51d347fc0c986cfc6bd2bcd73322def6b7a39d5c..8949cdf759e3bf3fb7190d6e7573525934ada3cd 100644 --- a/proto/src/erlang/src/tfpb.app.src +++ b/proto/src/erlang/src/tfpb.app.src @@ -1,4 +1,4 @@ -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/proto/src/python/__init__.py b/proto/src/python/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/proto/src/python/__init__.py +++ b/proto/src/python/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/proto/te.proto b/proto/te.proto index 03ae391b90cd5095d451078ae730a59ae5b6e1a4..add03dd2d2c403e0e0098b96bbf8ec71ff1aca3d 100644 --- a/proto/te.proto +++ b/proto/te.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/telemetry_frontend.proto b/proto/telemetry_frontend.proto index 614d10cf06cdbb1ff4fba6e51a39286eb5132688..b2d75108c92dbe7fba0d2ee0ac94857b52e25fcc 100644 --- a/proto/telemetry_frontend.proto +++ b/proto/telemetry_frontend.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/vnt_manager.proto b/proto/vnt_manager.proto index 1e1d67e122fa0cbb7088b366c5001a712a38a1f0..6442e7b90e021404a8ff76ef67f4f68c377f49d3 100644 --- a/proto/vnt_manager.proto +++ b/proto/vnt_manager.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/proto/ztp.proto b/proto/ztp.proto index 175279ce3303654ff22c946158e614f7a72d3105..ef696167a972c379ccbc6a01e1e13dfe4de1e3d3 100644 --- a/proto/ztp.proto +++ b/proto/ztp.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/scripts/add_license_header_to_files.sh b/scripts/add_license_header_to_files.sh index dd9b89aad823b78e02131010586adb94bd17ac0f..79320a0b197d69153d9ac07a2a181c7caa6154f1 100755 --- a/scripts/add_license_header_to_files.sh +++ b/scripts/add_license_header_to_files.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,7 +16,7 @@ docker pull ghcr.io/google/addlicense:latest docker run -it -v ${PWD}:/src ghcr.io/google/addlicense \ - -l apache -c "ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)" -y 2022-2024 \ + -l apache -c "ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)" -y 2022-2024 \ -ignore "data/*" -ignore "data/**" -ignore "tmp/*" -ignore "tmp/**" -ignore "manifests/cttc-ols/*" \ -ignore "coverage/*" -ignore "coverage/**" -ignore ".vscode/*" -ignore ".vscode/**" \ -ignore ".git/*" -ignore ".git/**" -ignore "proto/uml/*" -ignore "proto/uml/**" \ diff --git a/scripts/build_run_report_tests_locally.sh b/scripts/build_run_report_tests_locally.sh index eccb090a804bc0717b2c32fb3b090f348300473c..f914b26efa74c6092032c63eec26c0fd086c34db 100755 --- a/scripts/build_run_report_tests_locally.sh +++ b/scripts/build_run_report_tests_locally.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/cockroachdb_client.sh b/scripts/cockroachdb_client.sh index 63243ec3eccb725e90760bbe5d8f6945d440e837..07f4963376363d771521e5cba448d96a27ed4e69 100755 --- a/scripts/cockroachdb_client.sh +++ b/scripts/cockroachdb_client.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -27,9 +27,6 @@ export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} # If not already set, set the database user's password to be used by Context. export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"} -# If not already set, set the database name to be used by Context. -export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"} - # If not already set, set CockroachDB installation mode. Accepted values are: 'single' and 'cluster'. export CRDB_DEPLOY_MODE=${CRDB_DEPLOY_MODE:-"single"} diff --git a/scripts/create_component.sh b/scripts/create_component.sh index 2aaeafbc76ca85ad77e31478289045fbeb110c23..dcb826c08138b04cdb197ea4de64ee164a0ddc74 100755 --- a/scripts/create_component.sh +++ b/scripts/create_component.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/dump_logs.sh b/scripts/dump_logs.sh index 4bd9f364d9240989fd403bc789d9f81cc81d8ad7..52e7521a912790ed202436f0a86bebd1a000e321 100755 --- a/scripts/dump_logs.sh +++ b/scripts/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/expose_ingress_grpc.sh b/scripts/expose_ingress_grpc.sh index 8f621cc1d5ebd896f80bc4498bc6d619285d5800..1e4d96b2b5c47d631ed12465302f72f042203850 100755 --- a/scripts/expose_ingress_grpc.sh +++ b/scripts/expose_ingress_grpc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/grpcurl_inspect_context.sh b/scripts/grpcurl_inspect_context.sh new file mode 100755 index 0000000000000000000000000000000000000000..dda920a7a1899a9d8cdc3e1d1c7c576463c66fed --- /dev/null +++ b/scripts/grpcurl_inspect_context.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$CONTEXTSERVICE_SERVICE_HOST:$CONTEXTSERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_device.sh b/scripts/grpcurl_inspect_device.sh new file mode 100755 index 0000000000000000000000000000000000000000..0e1202fb6ed3b0306f3dfe03cd60eeb55c7abe83 --- /dev/null +++ b/scripts/grpcurl_inspect_device.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$DEVICESERVICE_SERVICE_HOST:$DEVICESERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_pathcomp_frontend.sh b/scripts/grpcurl_inspect_pathcomp_frontend.sh new file mode 100755 index 0000000000000000000000000000000000000000..686f7ae1e46aed2c60a33cd7fc7265ff1b5a3762 --- /dev/null +++ b/scripts/grpcurl_inspect_pathcomp_frontend.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$PATHCOMPSERVICE_SERVICE_HOST:$PATHCOMPSERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_service.sh b/scripts/grpcurl_inspect_service.sh new file mode 100755 index 0000000000000000000000000000000000000000..f1b674ee5aa8d7f0a1878840cc1f674d61b51ea5 --- /dev/null +++ b/scripts/grpcurl_inspect_service.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$SERVICESERVICE_SERVICE_HOST:$SERVICESERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/grpcurl_inspect_slice.sh b/scripts/grpcurl_inspect_slice.sh new file mode 100755 index 0000000000000000000000000000000000000000..170be7bf567c5f7adb0d84db62416ecc0d512f21 --- /dev/null +++ b/scripts/grpcurl_inspect_slice.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +# Ref: https://github.com/fullstorydev/grpcurl + +source tfs_runtime_env_vars.sh + +GRPC_ENDPOINT="$SLICESERVICE_SERVICE_HOST:$SLICESERVICE_SERVICE_PORT_GRPC" +GRP_CURL_CMD="docker run fullstorydev/grpcurl --plaintext $GRPC_ENDPOINT" + +GRPC_SERVICES=`$GRP_CURL_CMD list` +echo "gRPC Services found in $GRPC_ENDPOINT:" +printf "\n" + +for GRPC_SERVICE in $GRPC_SERVICES; do + echo "gRPC Service: $GRPC_SERVICE" + $GRP_CURL_CMD describe $GRPC_SERVICE + printf "\n" +done + +echo "Done!" diff --git a/scripts/old/configure_dashboards_in_kubernetes.sh b/scripts/old/configure_dashboards_in_kubernetes.sh index f8a95917fa139cc7ff52b4ead3438061a0e90611..eb3f22179149010dd14866ce4ad64fd6a5f0a447 100755 --- a/scripts/old/configure_dashboards_in_kubernetes.sh +++ b/scripts/old/configure_dashboards_in_kubernetes.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/old/deploy_in_kubernetes.sh b/scripts/old/deploy_in_kubernetes.sh index ba5117df87fb7418a639505c2509524a08a33029..66d10049fd40094270e40452eaa4c9791712f952 100755 --- a/scripts/old/deploy_in_kubernetes.sh +++ b/scripts/old/deploy_in_kubernetes.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/old/open_dashboard.sh b/scripts/old/open_dashboard.sh index 4c472794d13e50a96d91f6c1c0d77be1700ced45..d28da2784912d699e7b7c9a25522d9e719ae090c 100644 --- a/scripts/old/open_dashboard.sh +++ b/scripts/old/open_dashboard.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/old/open_webui.sh b/scripts/old/open_webui.sh index 87965a5f8258158393692c6006c8a31a6834c1c0..2a057789a00586d4bc130d8219753dad32915349 100755 --- a/scripts/old/open_webui.sh +++ b/scripts/old/open_webui.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_all.sh b/scripts/report_coverage_all.sh index 0cfa5bd943e2793bea536db2ba26ba4c4fdea1cd..4f018c1998cbc9eccfb1a42c8f6d299d78dc65a3 100755 --- a/scripts/report_coverage_all.sh +++ b/scripts/report_coverage_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_common.sh b/scripts/report_coverage_common.sh index dc2ea251b4476345042b889f66873b8ae3188bfe..789de1d4c123b9cfcea38d9a183d61259f23a127 100755 --- a/scripts/report_coverage_common.sh +++ b/scripts/report_coverage_common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_context.sh b/scripts/report_coverage_context.sh index b948a6397c4a4e9bd1ae8ae936fc4d4306336c24..54ec5eaf703c60c9b38a92c11eccbb60a9038fe2 100755 --- a/scripts/report_coverage_context.sh +++ b/scripts/report_coverage_context.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_device.sh b/scripts/report_coverage_device.sh index 1f9e1e1988200fc3766b1372c75cafeabd06c3e6..d316ffcbb5e41564d464773d7d0f03def14d234f 100755 --- a/scripts/report_coverage_device.sh +++ b/scripts/report_coverage_device.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_l3_attackmitigator.sh b/scripts/report_coverage_l3_attackmitigator.sh index 7938aaff4e9203c5059517992394d3102da98cfb..1e78a9f62bc66083122edb8ae3f4d1d8cff15caa 100755 --- a/scripts/report_coverage_l3_attackmitigator.sh +++ b/scripts/report_coverage_l3_attackmitigator.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_l3_centralizedattackdetector.sh b/scripts/report_coverage_l3_centralizedattackdetector.sh index fa9b2a0a97b844147e0ce75b07fa5260830c4068..b62e7cfe8b1b3eaaf50f99bf3d613fde687b0b7b 100755 --- a/scripts/report_coverage_l3_centralizedattackdetector.sh +++ b/scripts/report_coverage_l3_centralizedattackdetector.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_l3_distributedattackdetector.sh b/scripts/report_coverage_l3_distributedattackdetector.sh index 5ea51fbe761557002e81dc34ec209cdb81cadcc8..3c791e2bd53f7a0462865db0adfb64249788928e 100755 --- a/scripts/report_coverage_l3_distributedattackdetector.sh +++ b/scripts/report_coverage_l3_distributedattackdetector.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_nbi.sh b/scripts/report_coverage_nbi.sh index 4703bb076e58cb263c94d89b90a350d26298775a..f6bf8d65cda4f2bdb35cd7ceb50e6ef0534a9b02 100755 --- a/scripts/report_coverage_nbi.sh +++ b/scripts/report_coverage_nbi.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_pathcomp.sh b/scripts/report_coverage_pathcomp.sh index 4e14cc10c76477fc566c0760c36d4c2d75893b4b..02693cb84c811cede668cf33c3c2872e83094db0 100755 --- a/scripts/report_coverage_pathcomp.sh +++ b/scripts/report_coverage_pathcomp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_service.sh b/scripts/report_coverage_service.sh index 49436be39d892ecda67af6919c64211ca1a24925..5d5aff3c005225ca058d0c9e29df6246aab5cbc5 100755 --- a/scripts/report_coverage_service.sh +++ b/scripts/report_coverage_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/report_coverage_slice.sh b/scripts/report_coverage_slice.sh index 44aa2fabc0e2a05e1cfa7453945547ca2e3996b9..9a19a34a386c55e47aae60726b816a83f51908e4 100755 --- a/scripts/report_coverage_slice.sh +++ b/scripts/report_coverage_slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_docker.sh b/scripts/run_tests_docker.sh index a9f0a57dda49321a740ae33213d4ae88b4a65dd1..070f3051757cfd64214be690daa18d914f00cb4d 100755 --- a/scripts/run_tests_docker.sh +++ b/scripts/run_tests_docker.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-analytics-DB.sh b/scripts/run_tests_locally-analytics-DB.sh index 3efc8f97177ee821d7c4c1ce19ccb0a0f8731cce..122fde8eb0c94bb50c78a91d5890b5c46a88578a 100755 --- a/scripts/run_tests_locally-analytics-DB.sh +++ b/scripts/run_tests_locally-analytics-DB.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-analytics-backend.sh b/scripts/run_tests_locally-analytics-backend.sh index f2e0120278f07f01e41ccd90357a5ee863cb5698..1c3386c62084bb42d6ffa2e1349b6f4286820a52 100755 --- a/scripts/run_tests_locally-analytics-backend.sh +++ b/scripts/run_tests_locally-analytics-backend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-analytics-frontend.sh b/scripts/run_tests_locally-analytics-frontend.sh index ea04e0323b79c3308e279add86421bdc2d1a46bd..6e945406f0ff7b2670a35d5315d0ef428f701988 100755 --- a/scripts/run_tests_locally-analytics-frontend.sh +++ b/scripts/run_tests_locally-analytics-frontend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-context.sh b/scripts/run_tests_locally-context.sh index 93fccef7c250c1f9514429a9776155893b9b8bc0..76cdf156f9ffc6d243f11fb34293d21b8d40b01a 100755 --- a/scripts/run_tests_locally-context.sh +++ b/scripts/run_tests_locally-context.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-all.sh b/scripts/run_tests_locally-device-all.sh index 395ce96677aa8db4fa24f4d5b6a34b9c5779265b..78eef92c52bb8774e10d82efe39ebe9b2fad8a86 100755 --- a/scripts/run_tests_locally-device-all.sh +++ b/scripts/run_tests_locally-device-all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-emulated.sh b/scripts/run_tests_locally-device-emulated.sh index bc79518e7b908fe78ac1f7a0441677d9e0e5c1c4..81fca98eb1713386d5502e77e65f195ff256dd5a 100755 --- a/scripts/run_tests_locally-device-emulated.sh +++ b/scripts/run_tests_locally-device-emulated.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-gnmi-openconfig.sh b/scripts/run_tests_locally-device-gnmi-openconfig.sh new file mode 100755 index 0000000000000000000000000000000000000000..203da6c30876dc3a9fb24125ced62f4d2c9563bc --- /dev/null +++ b/scripts/run_tests_locally-device-gnmi-openconfig.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 +coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ + device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig.py diff --git a/scripts/run_tests_locally-device-ietf-actn.sh b/scripts/run_tests_locally-device-ietf-actn.sh index 4ed305028a1e30bf28f074cd57034c8b2d6a46d8..f4179c994f708990a46af9e0f7f38e5b18bbf02f 100755 --- a/scripts/run_tests_locally-device-ietf-actn.sh +++ b/scripts/run_tests_locally-device-ietf-actn.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-microwave.sh b/scripts/run_tests_locally-device-microwave.sh index 3fda42f7fc6c0e9ece5de1d7a2b1f94c00d64172..8577dea37514916285966826caf4c3de898e54e9 100755 --- a/scripts/run_tests_locally-device-microwave.sh +++ b/scripts/run_tests_locally-device-microwave.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-openconfig-arista-l2vpn.sh b/scripts/run_tests_locally-device-openconfig-arista-l2vpn.sh new file mode 100755 index 0000000000000000000000000000000000000000..e6b4b3c7ea6e11cc2f88192fea275c28d483e145 --- /dev/null +++ b/scripts/run_tests_locally-device-openconfig-arista-l2vpn.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc + +# Run unitary tests and analyze coverage of code at same time +# helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 +coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO -o log_cli=true --verbose \ + device/tests/test_unitary_openconfig_arista_l2vpn.py diff --git a/scripts/run_tests_locally-device-openconfig-ocnos.sh b/scripts/run_tests_locally-device-openconfig-ocnos.sh index 60af6768d37199c957d17c6804c8af1072d0b0e1..d39e698db896adbb1215726febd669446f56a9f4 100755 --- a/scripts/run_tests_locally-device-openconfig-ocnos.sh +++ b/scripts/run_tests_locally-device-openconfig-ocnos.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-openconfig.sh b/scripts/run_tests_locally-device-openconfig.sh index e600c7af3bcb9944f0da7e02109e70f4e3c919b8..054e6aef853e0747fb11b266fea3a2ae5fbfc333 100755 --- a/scripts/run_tests_locally-device-openconfig.sh +++ b/scripts/run_tests_locally-device-openconfig.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-p4.sh b/scripts/run_tests_locally-device-p4.sh index 84cf5db01611d62c24ada6333eefec98a30a22f2..8609400c1c0d124bfa8ac8a3b969ff08c387daf7 100755 --- a/scripts/run_tests_locally-device-p4.sh +++ b/scripts/run_tests_locally-device-p4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-device-tapi.sh b/scripts/run_tests_locally-device-tapi.sh index e97ac4d483a16799a9ad463b607eddaf2288a312..641f99898dc6c5f851d28d867bc9732841b57bee 100755 --- a/scripts/run_tests_locally-device-tapi.sh +++ b/scripts/run_tests_locally-device-tapi.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-forecaster.sh b/scripts/run_tests_locally-forecaster.sh index 979c688573f36ce3910ed66874c8f24168253bd4..947f4aacf3b8dc20fad83f09cf040569fa31f25e 100755 --- a/scripts/run_tests_locally-forecaster.sh +++ b/scripts/run_tests_locally-forecaster.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-interdomain-compute-domains.sh b/scripts/run_tests_locally-interdomain-compute-domains.sh index 49fb748543a89538ba44c67d4bf8e02840a81dc4..71a75f8579af39df75266a500aa67b6da4824bd6 100755 --- a/scripts/run_tests_locally-interdomain-compute-domains.sh +++ b/scripts/run_tests_locally-interdomain-compute-domains.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-interdomain-topology-abstractor.sh b/scripts/run_tests_locally-interdomain-topology-abstractor.sh index 3c7c2c1343576042462d2c98268e1bab0d51a8f7..56963c25f349b8f0bca93ddbea8b371b843fd79b 100755 --- a/scripts/run_tests_locally-interdomain-topology-abstractor.sh +++ b/scripts/run_tests_locally-interdomain-topology-abstractor.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-kpi-DB.sh b/scripts/run_tests_locally-kpi-DB.sh index 29c6595102c22bc47fa221eb80459aea934cbcd9..3f89ec03d9054f11e165c7a9a7c8b269342cf4d8 100755 --- a/scripts/run_tests_locally-kpi-DB.sh +++ b/scripts/run_tests_locally-kpi-DB.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-kpi-manager.sh b/scripts/run_tests_locally-kpi-manager.sh index 8a4ce8d95c74657451147078a1d93e891dfc2ac8..e681c0069ba716b591b8cb16430fe40a329702fb 100755 --- a/scripts/run_tests_locally-kpi-manager.sh +++ b/scripts/run_tests_locally-kpi-manager.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-kpi-prom-writer.sh b/scripts/run_tests_locally-kpi-prom-writer.sh index 8865a8a34495a032525c7585a409f4c32c7249df..96eed55188d5d077ce60fd19ddbecb689d4df20e 100755 --- a/scripts/run_tests_locally-kpi-prom-writer.sh +++ b/scripts/run_tests_locally-kpi-prom-writer.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-kpi-value-API.sh b/scripts/run_tests_locally-kpi-value-API.sh index 96ac558bad5f0bf6bc6f5ee90a26cd11fda69273..eea37dc2643259607cf57aa553103942a6030f48 100755 --- a/scripts/run_tests_locally-kpi-value-API.sh +++ b/scripts/run_tests_locally-kpi-value-API.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-kpi-value-writer.sh b/scripts/run_tests_locally-kpi-value-writer.sh index 6c3f16261a2d0e2083b17bcd205011b4347205be..cbeed3b784a2316a3261ee7950bb5e6cffbb7fbf 100755 --- a/scripts/run_tests_locally-kpi-value-writer.sh +++ b/scripts/run_tests_locally-kpi-value-writer.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-nbi-all.sh b/scripts/run_tests_locally-nbi-all.sh index 6890d30458e479f77e25dc011f3229ccdf11869f..fd05ab3b5a93d0734584831d7d38a6c2e6584206 100755 --- a/scripts/run_tests_locally-nbi-all.sh +++ b/scripts/run_tests_locally-nbi-all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-nbi-etsi-bwm.sh b/scripts/run_tests_locally-nbi-etsi-bwm.sh index 021c477bc9784757693ec90d2ab2bff13512b542..a335fbe4fd5f0157307535752bd03f73311e20b7 100755 --- a/scripts/run_tests_locally-nbi-etsi-bwm.sh +++ b/scripts/run_tests_locally-nbi-etsi-bwm.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-nbi-ietf-l2vpn.sh b/scripts/run_tests_locally-nbi-ietf-l2vpn.sh index 40d4f0890f87ceb6b950d0233c1a74936e874fab..19556ddf0f610b5b8866cb035d33e106ac6dd1fc 100755 --- a/scripts/run_tests_locally-nbi-ietf-l2vpn.sh +++ b/scripts/run_tests_locally-nbi-ietf-l2vpn.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-nbi-ietf-l3vpn.sh b/scripts/run_tests_locally-nbi-ietf-l3vpn.sh index 8d47f8ce9cf8cecebe414ba0058b1377417f73b9..01cf5d975bc106212b69a9ca71b90f2a6e0b57ea 100755 --- a/scripts/run_tests_locally-nbi-ietf-l3vpn.sh +++ b/scripts/run_tests_locally-nbi-ietf-l3vpn.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-nbi-ietf-network.sh b/scripts/run_tests_locally-nbi-ietf-network.sh index 09e2b55cf79a540ebc5a01c0393caa46bb740eb2..401e2615c0efe7b083fde5afd3bf8c3c9e0bac34 100755 --- a/scripts/run_tests_locally-nbi-ietf-network.sh +++ b/scripts/run_tests_locally-nbi-ietf-network.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-nbi-tfs-api.sh b/scripts/run_tests_locally-nbi-tfs-api.sh index dc29e2806ede33fae10568ba6c93608d0156fbad..e27faa8c271617dcc67eb23c61f96a29144f56d2 100755 --- a/scripts/run_tests_locally-nbi-tfs-api.sh +++ b/scripts/run_tests_locally-nbi-tfs-api.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-optical-attack-detector.sh b/scripts/run_tests_locally-optical-attack-detector.sh index 3a95ab8d996c1a161206d06fa0a6f72130b16f93..ac7339ee03a85502137ab0d7d8e4d5a1ade8e551 100755 --- a/scripts/run_tests_locally-optical-attack-detector.sh +++ b/scripts/run_tests_locally-optical-attack-detector.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-pathcomp-frontend.sh b/scripts/run_tests_locally-pathcomp-frontend.sh index 17adb6bfcef0fead8437bc442b69b604559b15ce..bcedbd2f789500eef6bbd98d7cc1e825e6d165ae 100755 --- a/scripts/run_tests_locally-pathcomp-frontend.sh +++ b/scripts/run_tests_locally-pathcomp-frontend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-service.sh b/scripts/run_tests_locally-service.sh index cd31eb495121eb252dda499bcb4a04d36ec8938e..7b58698fcdd7992ede25fcd473381206ab1796e0 100755 --- a/scripts/run_tests_locally-service.sh +++ b/scripts/run_tests_locally-service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-slice.sh b/scripts/run_tests_locally-slice.sh index 7e28650563348026ccb0a705dd5c130fc653fd80..76fd9f901831295290c4d0fd61052fe14c39f262 100755 --- a/scripts/run_tests_locally-slice.sh +++ b/scripts/run_tests_locally-slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-telemetry-DB.sh b/scripts/run_tests_locally-telemetry-DB.sh index b9f86a208aab3fddbf243ba986de153775f30c2c..73238798b9ca419c86cb3c5051ef9c06b00a9a3b 100755 --- a/scripts/run_tests_locally-telemetry-DB.sh +++ b/scripts/run_tests_locally-telemetry-DB.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-telemetry-backend.sh b/scripts/run_tests_locally-telemetry-backend.sh index 89f22611fcebe7cab7524deb43b7b4de79d24760..f648a62520f2f7b23f30edb19bf54735f5d13e12 100755 --- a/scripts/run_tests_locally-telemetry-backend.sh +++ b/scripts/run_tests_locally-telemetry-backend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally-telemetry-frontend.sh b/scripts/run_tests_locally-telemetry-frontend.sh index 4bb7bc3fa8e198ead54224148f60044e079ccdf3..38822330ec3837ac1a101e2a7d46f4928c4b31e6 100755 --- a/scripts/run_tests_locally-telemetry-frontend.sh +++ b/scripts/run_tests_locally-telemetry-frontend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/run_tests_locally.sh b/scripts/run_tests_locally.sh index 5c1c54fe802e1222f33221fed455592717b5a885..fed8f36b30835fd9cb1c8509a5f3703fc2585a90 100755 --- a/scripts/run_tests_locally.sh +++ b/scripts/run_tests_locally.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_analytics_backend.sh b/scripts/show_logs_analytics_backend.sh index afb58567ca5ab250da48d2cfffa2c56abdff2db2..1ec689fe6f09988a0453f32aa7a0ba5a9d78291a 100755 --- a/scripts/show_logs_analytics_backend.sh +++ b/scripts/show_logs_analytics_backend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_analytics_frontend.sh b/scripts/show_logs_analytics_frontend.sh index 6d3fae10b366f0082d3a393c224e8f1cb7830721..3b9d62b1177b89b7af3e854e6b6d4092dbfb5bc8 100755 --- a/scripts/show_logs_analytics_frontend.sh +++ b/scripts/show_logs_analytics_frontend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_automation.sh b/scripts/show_logs_automation.sh index 26684298091403f4dc737fc0d1ca5b05d82ad374..d95ebf761d4c39be1081cadebec690158dc833a3 100755 --- a/scripts/show_logs_automation.sh +++ b/scripts/show_logs_automation.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_bgp.sh b/scripts/show_logs_bgp.sh index c376ece95ff1b66c54424e2be84f0fc80d35a83a..aa3f5e8780fefa0bf261988f911f9c50820209f6 100755 --- a/scripts/show_logs_bgp.sh +++ b/scripts/show_logs_bgp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_context.sh b/scripts/show_logs_context.sh index c9f3192909b292cf3195d187a04c90a9f5ac9362..e3996fc053c22784703e47f362b3aefe912e18ac 100755 --- a/scripts/show_logs_context.sh +++ b/scripts/show_logs_context.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_device.sh b/scripts/show_logs_device.sh index e6e884de436a8ec02a104152282ef610eb30362b..5af6bc18c8f535a1a9de817b1c52118a6c0db3cb 100755 --- a/scripts/show_logs_device.sh +++ b/scripts/show_logs_device.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_dlt_connector.sh b/scripts/show_logs_dlt_connector.sh index ff823256677108b257db2e249ea4ea1830e8cd96..2b3183b4ba7c6e14bcc0362563af0e8d0b872f8c 100755 --- a/scripts/show_logs_dlt_connector.sh +++ b/scripts/show_logs_dlt_connector.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_dlt_gateway.sh b/scripts/show_logs_dlt_gateway.sh index 0fe505392fbb4e50935a7f913af4734a3d73c035..213c88384540e4e0580846089623b4ddb4d90c2d 100755 --- a/scripts/show_logs_dlt_gateway.sh +++ b/scripts/show_logs_dlt_gateway.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_e2eorchestrator.sh b/scripts/show_logs_e2eorchestrator.sh index bf1fb5987e4a65fd231f057f71cc3ffcffc14655..37ccc41f3f135c6078c17b379375140b8a832527 100755 --- a/scripts/show_logs_e2eorchestrator.sh +++ b/scripts/show_logs_e2eorchestrator.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_forecaster.sh b/scripts/show_logs_forecaster.sh index 549a4517126270eefd7db61c93ce7ef5b6aff35e..d71aa11324dddb97d3a07ad896f616300b2f66ae 100755 --- a/scripts/show_logs_forecaster.sh +++ b/scripts/show_logs_forecaster.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_kpi_manager.sh b/scripts/show_logs_kpi_manager.sh index 86f084f69f6babf5a90957f432b214e35a08c461..c6313f26233fca93075bad1205d9752877d952a0 100755 --- a/scripts/show_logs_kpi_manager.sh +++ b/scripts/show_logs_kpi_manager.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_kpi_value_api.sh b/scripts/show_logs_kpi_value_api.sh index 041ad7f1ffb1a218af00d5d142024a5063d109c3..21387ccfff28d41ce7b9589dc854e6755e96e843 100755 --- a/scripts/show_logs_kpi_value_api.sh +++ b/scripts/show_logs_kpi_value_api.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_kpi_value_writer.sh b/scripts/show_logs_kpi_value_writer.sh index d62f3ea0a1a6961be4a5b6f4841c9ba4e1a89316..777ad7b24d688565cc93655562382526a87927e8 100755 --- a/scripts/show_logs_kpi_value_writer.sh +++ b/scripts/show_logs_kpi_value_writer.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_l3-attack-mitigator.sh b/scripts/show_logs_l3-attack-mitigator.sh index 58fac3e9ebdacf125d7306d7baae4b09e3943512..eaba25efbb43bfe778cb303c9e30c51f692a3e9e 100755 --- a/scripts/show_logs_l3-attack-mitigator.sh +++ b/scripts/show_logs_l3-attack-mitigator.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_l3-centralized-attack-detector.sh b/scripts/show_logs_l3-centralized-attack-detector.sh index cd3cdece0e4897b5777690fcefba414f5236606d..8b08aee253817375d49a192fa43f7b607150a20d 100755 --- a/scripts/show_logs_l3-centralized-attack-detector.sh +++ b/scripts/show_logs_l3-centralized-attack-detector.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_load_generator.sh b/scripts/show_logs_load_generator.sh index 42a54e0ff43916f104ee2d50e2f6c7b2772962d3..b3b87ab329b1d63ba405803294394e96f5de3082 100755 --- a/scripts/show_logs_load_generator.sh +++ b/scripts/show_logs_load_generator.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_monitoring.sh b/scripts/show_logs_monitoring.sh index 0d06859198d15aa6a405b80538954061fdb2b623..e2180dccc43cdaee896f30a3d57816e731b51e8e 100755 --- a/scripts/show_logs_monitoring.sh +++ b/scripts/show_logs_monitoring.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_nbi.sh b/scripts/show_logs_nbi.sh index 3229fb42a626159c5ac96472553a8fadaf7bce62..08c6133c76ac3839b66bb1a082ec61317b9ae347 100755 --- a/scripts/show_logs_nbi.sh +++ b/scripts/show_logs_nbi.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_opticalcontroller.sh b/scripts/show_logs_opticalcontroller.sh index 65cfef8954bec70e229b7de4c58d652b693b1d42..b819235c4755c851707aab99337079fed9aa6e21 100755 --- a/scripts/show_logs_opticalcontroller.sh +++ b/scripts/show_logs_opticalcontroller.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_pathcomp_backend.sh b/scripts/show_logs_pathcomp_backend.sh index a77533ee175c588da5a1a4173787870deec263e0..53b321d24db82bb645916f52023e509c09d8f30d 100755 --- a/scripts/show_logs_pathcomp_backend.sh +++ b/scripts/show_logs_pathcomp_backend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_pathcomp_frontend.sh b/scripts/show_logs_pathcomp_frontend.sh index cff5571cfa7d221a53dc162f2764f2e548b8d956..e242af711b4a6b5d9912b1a2443c45966a29ee7b 100755 --- a/scripts/show_logs_pathcomp_frontend.sh +++ b/scripts/show_logs_pathcomp_frontend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_qkd_app.sh b/scripts/show_logs_qkd_app.sh index f4f9ee6a13367c8d50eb4401a5d5f357726e5966..4101817ca24a1bd47c7bd3910202c47670fcbe7d 100755 --- a/scripts/show_logs_qkd_app.sh +++ b/scripts/show_logs_qkd_app.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_qos_profile.sh b/scripts/show_logs_qos_profile.sh index 744bed9a62af6c376e94d7d13492b796821ecc53..74c2c19ede435781dbb1cbb4871cd5ae76c63de3 100755 --- a/scripts/show_logs_qos_profile.sh +++ b/scripts/show_logs_qos_profile.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_service.sh b/scripts/show_logs_service.sh index de6a3a96579059821927fe0b38dbd73886b15ed8..5f5b3949a3c26cae8abfc229073ba598fa64100b 100755 --- a/scripts/show_logs_service.sh +++ b/scripts/show_logs_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_slice.sh b/scripts/show_logs_slice.sh index e7ca710fdcefed9990a737a81f080230114b5958..f033e1d2627e9ac57777b92c24ef47ef3cf1d5ae 100755 --- a/scripts/show_logs_slice.sh +++ b/scripts/show_logs_slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_telemetry-DB.sh b/scripts/show_logs_telemetry-DB.sh index 84fc875d01e18eae9b144edaf220d5cb74017ea4..da6709ce6296c549f45f52276b778d72f7e33ace 100755 --- a/scripts/show_logs_telemetry-DB.sh +++ b/scripts/show_logs_telemetry-DB.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_telemetry-backend.sh b/scripts/show_logs_telemetry-backend.sh index c28083dcbf5c7056145d1a0696116da66b5e9828..39659d9eb987d7fc477d455bf8eeed6bcb818569 100755 --- a/scripts/show_logs_telemetry-backend.sh +++ b/scripts/show_logs_telemetry-backend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_telemetry-frontend.sh b/scripts/show_logs_telemetry-frontend.sh index 821dc275b22ebf7ffc63d2e8c41dfab684407895..0f8aeff7ab7fa4c24f3c1337e5faf80f210b2508 100755 --- a/scripts/show_logs_telemetry-frontend.sh +++ b/scripts/show_logs_telemetry-frontend.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_vntmanager.sh b/scripts/show_logs_vntmanager.sh index 0dba86567bd5118b685c72fd17b1904acfe698cc..a1ac7eaeb89e2495be0f8e4cccc5290a8da5496b 100755 --- a/scripts/show_logs_vntmanager.sh +++ b/scripts/show_logs_vntmanager.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/show_logs_webui.sh b/scripts/show_logs_webui.sh index 69044f28cc70f4479b6909bcc9cf029151a0ab8d..ee302f495247b4cd812fc3b9107f45a8c9cbfdad 100755 --- a/scripts/show_logs_webui.sh +++ b/scripts/show_logs_webui.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/start_webui_dev_mode.sh b/scripts/start_webui_dev_mode.sh index c123545626c45c5fd15f5aceb4d2a96bbf46535f..868e32c5a15b73ced7e36f7281beafd49fa4a8f6 100755 --- a/scripts/start_webui_dev_mode.sh +++ b/scripts/start_webui_dev_mode.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/scripts/update_license_headers.py b/scripts/update_license_headers.py index 34d620ed8bc1a0817509916c2d1f857979cdd431..3332a13d26212738fbdc36b18b58b38e445faee3 100644 --- a/scripts/update_license_headers.py +++ b/scripts/update_license_headers.py @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI TeraFlowSDN - TFS OSG/SDG (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -27,12 +27,14 @@ FILE_PATH_SKIPPED = 'out-skipped.txt' FILE_PATH_NO_HEADER = 'out-no-header.txt' FILE_PATH_UPDATED = 'out-updated.txt' -STR_NEW_COPYRIGHT = 'Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)' +STR_NEW_COPYRIGHT = 'Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)' RE_OLD_COPYRIGHTS = [ r'Copyright\ 2021\-2023\ H2020\ TeraFlow\ \(https\:\/\/www\.teraflow\-h2020\.eu\/\)', r'Copyright\ 2022\-2023\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)', r'Copyright\ 2022\-2024\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)', + r'Copyright\ 2022\-2024\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\/SDG\ \(https\:\/\/tfs\.etsi\.org\/\)', + r'Copyright\ 2022\-2024\ ETSI\ OSG\/SDG\ TeraFlowSDN\ \(TFS\)\ \(https\:\/\/tfs\.etsi\.org\/\)', ] RE_OLD_COPYRIGHTS = [ (re.compile(r'.*{}.*'.format(re_old_copyright)), re.compile(re_old_copyright)) @@ -51,6 +53,7 @@ def skip_file(file_path : str) -> bool: if file_path.endswith('.csv'): return True if file_path.endswith('.zip'): return True if file_path.endswith('.zip'): return True + if file_path.endswith('.tgz'): return True if file_path.endswith('.jar'): return True if file_path.endswith('.onnx'): return True if file_path.endswith('/tstat'): return True @@ -90,8 +93,8 @@ def skip_file(file_path : str) -> bool: if '/nbi/service/rest_server/nbi_plugins/ietf_network/yang/' in file_path: return True if '/ztp/target/' in file_path: return True if '/policy/target/' in file_path: return True - if '/dlt/gateway/Dockerfile' in file_path: return False - if '/dlt/gateway/' in file_path: return True + if '/dlt/gateway/_legacy' in file_path: return True + if '/proto/src/python/asyncio/' in file_path: return True if FILE_PATH_SKIPPED in file_path: return True if FILE_PATH_NO_HEADER in file_path: return True if FILE_PATH_UPDATED in file_path: return True diff --git a/scripts/wait_context_nats.sh b/scripts/wait_context_nats.sh index a4e47bd7bb44f725732dacae651d3e0d82abda93..03ad5c2169fc84af7f0e68bc98fafaba0f1aebf9 100755 --- a/scripts/wait_context_nats.sh +++ b/scripts/wait_context_nats.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/__init__.py b/src/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/.gitlab-ci.yml b/src/analytics/.gitlab-ci.yml index dfc5f2195eeee621e95465bbc996d5a9af3e6c9c..5f30c9aa81898a5729cc50fca6c7efd3bc5f4cb0 100644 --- a/src/analytics/.gitlab-ci.yml +++ b/src/analytics/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/README.md b/src/analytics/README.md index ece11ea969caf1cf92fb474ae1371c9979231ac2..7ae0dd5a59749c552d9818a050f257d5e74d527d 100644 --- a/src/analytics/README.md +++ b/src/analytics/README.md @@ -4,29 +4,25 @@ The following requirements should be fulfilled before the execuation of Analytics service. 1. A virtual enviornment exist with all the required packages listed in [requirements.in](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/analytics/frontend/requirements.in) sucessfully installed. -2. Verify the creation of required database and table. The -[Analytics DB test](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/analytics/tests/test_analytics_db.py) python file lists the functions to create tables and the database. -3. The Analytics backend service should be running. - -4. All required Kafka topics must exist. Call `create_all_topics` from the [Kafka class](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/common/tools/kafka/Variables.py) to create any topics that do not already exist. +2. The Analytics backend service should be running. +3. All required Kafka topics must exist. Call `create_all_topics` from the [Kafka class](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/common/tools/kafka/Variables.py) to create any topics that do not already exist. ``` from common.tools.kafka.Variables import KafkaTopic KafkaTopic.create_all_topics() ``` -5. There will be an input stream on the Kafka topic that the Spark Streamer will consume and apply a defined thresholds. +4. There will be an input stream on the Kafka topic that the Streamer class will consume and apply a defined thresholds. - A JSON encoded string should be generated in the following format: ``` '{"time_stamp": "2024-09-03T12:36:26Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 44.22}' ``` -- `kpi_value` should be float or int. - The Kafka producer key should be the UUID of the Analyzer used when creating it. -- Use the following Kafka topic to generate the stream: `KafkaTopic.ANALYTICS_RESPONSE.value`. +- Generate the stream on the following Kafka topic: `KafkaTopic.ANALYTICS_RESPONSE.value`. ## Steps to create and start Analyzer The analyzer can be declared as below but there are many other ways to declare: -The given object creation process for `_create_analyzer` involves defining an instance of the `Analyzer` message from the [gRPC definition](https://labs.etsi.org/rep/tfs/controller/-/blob/feat/194-unable-to-correctly-extract-the-aggregation-function-names-from-the-dictionary-received-as/proto/analytics_frontend.proto) and populating its fields. +The given object creation process for `_create_analyzer` involves defining an instance of the `Analyzer` message from the [gRPC definition](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/proto/analytics_frontend.proto) and populating its fields. ``` from common.proto.analytics_frontend_pb2 import AnalyzerId @@ -101,18 +97,5 @@ analytics_client_object = AnalyticsFrontendClient() analytics_client_object.StartAnalyzer(_create_analyzer_id) ``` -### **How to Receive Analyzer Responses** - - There is a non-gRPC method in the analyzer frontend called `StartResponseListener(<analyzer_uuid>)`. The `analyzer_uuid` is the UUID of the analyzer provided when calling `StartAnalyzer()`. The following code will log the responses: -```python -from analytics.frontend.service.AnalyticsFrontendServiceServicerImpl import AnalyticsFrontendServiceServicerImpl - -analytic_frontend_service_object = AnalyticsFrontendServiceServicerImpl() -for response in analytic_frontend_service_object.StartResponseListener(<analyzer_uuid>): - LOGGER.debug(response) -``` - -### **Understanding the Output of the Analyzer** -- **Output Column Names**: The output JSON string will include two keys for each defined threshold. For example, the `min_latency` threshold will generate two keys: `min_latency_THRESHOLD_FAIL` and `min_latency_THRESHOLD_RAISE`. - - `min_latency_THRESHOLD_FAIL` is triggered if the average latency calculated within the defined window size is less than the specified threshold range. - - `min_latency_THRESHOLD_RAISE` is triggered if the average latency calculated within the defined window size exceeds the specified threshold range. -- The thresholds `min_latency_THRESHOLD_FAIL` and `min_latency_THRESHOLD_RAISE` will have a value of `TRUE` if activated; otherwise, they will be set to `FALSE`. +### **How to Receive Analyzer Response** + - `GetAlarms(<kpi_id>) -> KpiAlarms` is a method in the `KPI Value Api` that retrieves alarms for a given KPI ID. This method returns a stream of alarms associated with the specified KPI. diff --git a/src/analytics/__init__.py b/src/analytics/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/analytics/__init__.py +++ b/src/analytics/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/Dockerfile b/src/analytics/backend/Dockerfile index 17adcd3ab1df5704cc7ef0c5a19b3cfb1539ee22..82eb9ca925f979c2d331ee7978ba0aef8bba45bd 100644 --- a/src/analytics/backend/Dockerfile +++ b/src/analytics/backend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/__init__.py b/src/analytics/backend/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/analytics/backend/__init__.py +++ b/src/analytics/backend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/requirements.in b/src/analytics/backend/requirements.in index 360d94f4668b19feba305df76a65ef70b26e091f..be61971730a0b5d39f15d4438eb3062f30d08027 100644 --- a/src/analytics/backend/requirements.in +++ b/src/analytics/backend/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 2e57e1e8a70d141474b395b5e13f21bd4840abc5..f3a58feaab8667b266052803dddd1641b8a690f3 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/service/DaskStreaming.py b/src/analytics/backend/service/DaskStreaming.py index cdfe10bd35f68264865d4847c0d292658c330eec..79dee7ef972a8b5546e3b38289c4fdb5b4bcc0d1 100644 --- a/src/analytics/backend/service/DaskStreaming.py +++ b/src/analytics/backend/service/DaskStreaming.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/service/SparkStreaming.py b/src/analytics/backend/service/SparkStreaming.py index f204c6247436177cd032c777c048ecb165051ec2..92535b7c98360824f0f87f8f6043d334b336603e 100644 --- a/src/analytics/backend/service/SparkStreaming.py +++ b/src/analytics/backend/service/SparkStreaming.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/service/__init__.py b/src/analytics/backend/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/analytics/backend/service/__init__.py +++ b/src/analytics/backend/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/service/__main__.py b/src/analytics/backend/service/__main__.py index 3c4c36b7c7bd952164bf9e48a45e22fb00575564..533761bab2ed225e3f8d82f5df7d9290f7fa01b8 100644 --- a/src/analytics/backend/service/__main__.py +++ b/src/analytics/backend/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/tests/__init__.py b/src/analytics/backend/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/analytics/backend/tests/__init__.py +++ b/src/analytics/backend/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/tests/messages.py b/src/analytics/backend/tests/messages.py index b3780d29bada491311fb9662934f2d6c234abc93..55d966dfbbae2318a5f774049b02f5b340070113 100644 --- a/src/analytics/backend/tests/messages.py +++ b/src/analytics/backend/tests/messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index 86de220a21b4c2c1c38d518c01ae13f33ee200d5..4aa9df5fae9849ee429361603a35b2fb8eaa4d23 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/database/AnalyzerModel.py b/src/analytics/database/AnalyzerModel.py index c33e396e06a8dce96a86951a64aa59b510931dfe..853bb65af6dc5bf0bd845c5acc6fd39216cb4d63 100644 --- a/src/analytics/database/AnalyzerModel.py +++ b/src/analytics/database/AnalyzerModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/database/Analyzer_DB.py b/src/analytics/database/Analyzer_DB.py index ab0b50f2ebba8e2590f1fcb4f2801f42a9c5d208..ff0fcc706996b199f6c222afb1bf8bbaeab4f14d 100644 --- a/src/analytics/database/Analyzer_DB.py +++ b/src/analytics/database/Analyzer_DB.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/database/__init__.py b/src/analytics/database/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/analytics/database/__init__.py +++ b/src/analytics/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/Dockerfile b/src/analytics/frontend/Dockerfile index 10499713f318a23e1aeab49c96e8163a5ec147fa..bfc727d3e75ef6325f00731e0fba3f158ae463c5 100644 --- a/src/analytics/frontend/Dockerfile +++ b/src/analytics/frontend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/__init__.py b/src/analytics/frontend/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/analytics/frontend/__init__.py +++ b/src/analytics/frontend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/client/AnalyticsFrontendClient.py b/src/analytics/frontend/client/AnalyticsFrontendClient.py index 809c957ea48a07a657fe1edc244c9c0f125e9058..fb53440406e1bbe8eae5f17dba02afc638fbfa7e 100644 --- a/src/analytics/frontend/client/AnalyticsFrontendClient.py +++ b/src/analytics/frontend/client/AnalyticsFrontendClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/client/__init__.py b/src/analytics/frontend/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/analytics/frontend/client/__init__.py +++ b/src/analytics/frontend/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/requirements.in b/src/analytics/frontend/requirements.in index 0b1ec921b8bb77c0d26e8240585a19ef165f0eec..6363d8a97cf22b9ef0531647df4f841140c27f9c 100644 --- a/src/analytics/frontend/requirements.in +++ b/src/analytics/frontend/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/service/AnalyticsFrontendService.py b/src/analytics/frontend/service/AnalyticsFrontendService.py index 8d2536fe091459d6026941f4eae52f58f7cd3f3a..193e4115b022970610cae5339161fcdcf28ea5bf 100644 --- a/src/analytics/frontend/service/AnalyticsFrontendService.py +++ b/src/analytics/frontend/service/AnalyticsFrontendService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py index 219821ac9bf9bf05e7c599480795d988d1015605..fd5bcd185b1f9945eccf583c33af2a243fe729be 100644 --- a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py +++ b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/service/__init__.py b/src/analytics/frontend/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/analytics/frontend/service/__init__.py +++ b/src/analytics/frontend/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/service/__main__.py b/src/analytics/frontend/service/__main__.py index 1df996785ec636592cf5197144d916a89257d9af..edf94c4fdd828c9a195d8695b0ba52b544b6a863 100644 --- a/src/analytics/frontend/service/__main__.py +++ b/src/analytics/frontend/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/tests/__init__.py b/src/analytics/frontend/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/analytics/frontend/tests/__init__.py +++ b/src/analytics/frontend/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/tests/messages.py b/src/analytics/frontend/tests/messages.py index e2d39585e434b58c0d48d0061e105a5ebaabe6b9..4df6070bedffd91402953bbbbbec16ce0118008c 100644 --- a/src/analytics/frontend/tests/messages.py +++ b/src/analytics/frontend/tests/messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/frontend/tests/test_frontend.py b/src/analytics/frontend/tests/test_frontend.py index 74fef6c79cc2328b65671b392220ae86106e9d5d..134871fb77719e4747b6fc3ae6cfd21dd317a31f 100644 --- a/src/analytics/frontend/tests/test_frontend.py +++ b/src/analytics/frontend/tests/test_frontend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/requirements.in b/src/analytics/requirements.in index 231dc04e820387c95ffea72cbe67b9f0a9a0865a..5ca81a10fbe1c0137ee8e83848371a4dbccd4271 100644 --- a/src/analytics/requirements.in +++ b/src/analytics/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/tests/__init__.py b/src/analytics/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/analytics/tests/__init__.py +++ b/src/analytics/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/analytics/tests/test_analytics_db.py b/src/analytics/tests/test_analytics_db.py index 2794edb4a051b38d4cef902fd09aaad5db966179..44fef9b4163a074a4357051b10d1dfa9b7e42d1c 100644 --- a/src/analytics/tests/test_analytics_db.py +++ b/src/analytics/tests/test_analytics_db.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/.gitlab-ci.yml b/src/automation/.gitlab-ci.yml index f52dda3f4e3fd7cd4de6f4d03a8ada164796f404..c5f803df4b2d91667d8b6a3de2a38914519d09b6 100644 --- a/src/automation/.gitlab-ci.yml +++ b/src/automation/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/Config.py b/src/automation/Config.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/automation/Config.py +++ b/src/automation/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/Dockerfile b/src/automation/Dockerfile index deef6b36fb4ab324e75a687bc3ce8c297c186c8f..1818284c9553faa1c6ae962e59ea102ea1bc56b7 100644 --- a/src/automation/Dockerfile +++ b/src/automation/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/__init__.py b/src/automation/__init__.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/automation/__init__.py +++ b/src/automation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/client/PolicyClient.py b/src/automation/client/PolicyClient.py index f2b25f2429d790c9cb25b5d70e1e737594586133..5c0224b464fa3ada2579da8ca465cb6575c166b3 100644 --- a/src/automation/client/PolicyClient.py +++ b/src/automation/client/PolicyClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -19,7 +19,7 @@ from common.proto.policy_pb2 import PolicyRuleService, PolicyRuleState from common.proto.policy_pb2_grpc import PolicyServiceStub from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string -from common.proto.openconfig_device_pb2_grpc import OpenConfigServiceStub + LOGGER = logging.getLogger(__name__) MAX_RETRIES = 15 DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) @@ -40,7 +40,6 @@ class PolicyClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) self.stub = PolicyServiceStub(self.channel) - self.openconfig_stub=OpenConfigServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() diff --git a/src/automation/client/__init__.py b/src/automation/client/__init__.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/automation/client/__init__.py +++ b/src/automation/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/requirements.in b/src/automation/requirements.in index d81b9ddbeafeff94c830d48ca5594e775b9ce240..0f291eca8b84f4965c6832b9c4b691380dfcb75e 100644 --- a/src/automation/requirements.in +++ b/src/automation/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/service/AutomationService.py b/src/automation/service/AutomationService.py index 4ff0beb3aea14bc6e3ed014d9cc73e72e856c438..52eca553f9eed9f8134d8a8c1a0a27a924c49c97 100644 --- a/src/automation/service/AutomationService.py +++ b/src/automation/service/AutomationService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/service/AutomationServiceServicerImpl.py b/src/automation/service/AutomationServiceServicerImpl.py index 94550157e09a316f5705ce2b052a8837d75cd1b7..521b07ce0d8734c2016b222420e45b910d314ded 100644 --- a/src/automation/service/AutomationServiceServicerImpl.py +++ b/src/automation/service/AutomationServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/service/EventEngine.py b/src/automation/service/EventEngine.py index 26c2b28cbe35230beec90dd9df4112d4ad131876..b9666db9ea9b5b659cf271025a58fd8b7982d60f 100644 --- a/src/automation/service/EventEngine.py +++ b/src/automation/service/EventEngine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/service/Tools.py b/src/automation/service/Tools.py index 6a63475ca23c576a6fe946d6d149b70465ff1e1f..2f5f6e8568c8d2bfcda566109b2c90a652d0544b 100644 --- a/src/automation/service/Tools.py +++ b/src/automation/service/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/service/__init__.py b/src/automation/service/__init__.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/automation/service/__init__.py +++ b/src/automation/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/service/__main__.py b/src/automation/service/__main__.py index 3baa0bd30b19fb624c5dcf0b236642704e42ab9f..22113f975eacf70a4ef76362d58eae1890796061 100644 --- a/src/automation/service/__main__.py +++ b/src/automation/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/tests/__init__.py b/src/automation/tests/__init__.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/automation/tests/__init__.py +++ b/src/automation/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/tests/test_unitary_emulated.py b/src/automation/tests/test_unitary_emulated.py index dee3c4fabed496e50a7c7ee5dafa9a98be1d474d..696327731dda35823e762a209929fe5605452be4 100644 --- a/src/automation/tests/test_unitary_emulated.py +++ b/src/automation/tests/test_unitary_emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/automation/tests/test_unitary_ietf_actn.py b/src/automation/tests/test_unitary_ietf_actn.py index 37a5ac4968c9bb39682b84b3e061ff4a35dbe0f1..5f1b4eef86482472312b2506d816007e5bd79906 100644 --- a/src/automation/tests/test_unitary_ietf_actn.py +++ b/src/automation/tests/test_unitary_ietf_actn.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/.gitlab-ci.yml b/src/bgpls_speaker/.gitlab-ci.yml index b1e3c1ae1a7006667ab78d4b31f15d4877503097..927454042998269468d4b7b850d831b604eef239 100644 --- a/src/bgpls_speaker/.gitlab-ci.yml +++ b/src/bgpls_speaker/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/Config.py b/src/bgpls_speaker/Config.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/bgpls_speaker/Config.py +++ b/src/bgpls_speaker/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/Dockerfile b/src/bgpls_speaker/Dockerfile index 32743ae48061d87a2a1c9305dee8ece037648482..eefeb9a1dc9e21658319046b955a286cbb78c68e 100644 --- a/src/bgpls_speaker/Dockerfile +++ b/src/bgpls_speaker/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/__init__.py b/src/bgpls_speaker/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/bgpls_speaker/__init__.py +++ b/src/bgpls_speaker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/client/BgplsClient.py b/src/bgpls_speaker/client/BgplsClient.py index 2fb17c5724c95a54efd429bfc5586bf61ed04905..6f3c6e0f997835598605a010ff91ced061e9b7a7 100644 --- a/src/bgpls_speaker/client/BgplsClient.py +++ b/src/bgpls_speaker/client/BgplsClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/client/__init__.py b/src/bgpls_speaker/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/bgpls_speaker/client/__init__.py +++ b/src/bgpls_speaker/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/quick_deploy.sh b/src/bgpls_speaker/quick_deploy.sh index ab76c2ff6e8a640ee3591de6b19ed9dec38547ec..544ff5ee9e2339e658d52a4b262b05419f1f4303 100644 --- a/src/bgpls_speaker/quick_deploy.sh +++ b/src/bgpls_speaker/quick_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -60,9 +60,6 @@ export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} # If not already set, set the database user's password to be used by Context. export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"} -# If not already set, set the database name to be used by Context. -export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"} - # ----- NATS ------------------------------------------------------------------- @@ -112,7 +109,6 @@ CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-pu kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \ --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \ - --from-literal=CRDB_DATABASE=${CRDB_DATABASE} \ --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \ --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \ --from-literal=CRDB_SSLMODE=require diff --git a/src/bgpls_speaker/requirements.in b/src/bgpls_speaker/requirements.in index 9ec39a9e026bfdbd03e2d1950df476860dca0a5b..5fbf034d5b7349880620abcb693c732153328fee 100644 --- a/src/bgpls_speaker/requirements.in +++ b/src/bgpls_speaker/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/BgplsService.py b/src/bgpls_speaker/service/BgplsService.py index f2f77d08b6e3430ecc5fbaba6c10d20d19a4d373..e2acb9a6edd72fe7eeebce9ffea7c8215cda089f 100644 --- a/src/bgpls_speaker/service/BgplsService.py +++ b/src/bgpls_speaker/service/BgplsService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/BgplsServiceServicerImpl.py b/src/bgpls_speaker/service/BgplsServiceServicerImpl.py index 5e661c6aad19f82f943b9e9a7707b3354edf580f..eee42f7ff274d8bf80d6edf1f816f91448d2a091 100644 --- a/src/bgpls_speaker/service/BgplsServiceServicerImpl.py +++ b/src/bgpls_speaker/service/BgplsServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/__init__.py b/src/bgpls_speaker/service/__init__.py index 839e45e3b646bc60de7edd81fcfb91b7b38feadf..d1eba8e41fdc0b7257b50bf411869c7b2baa2e00 100644 --- a/src/bgpls_speaker/service/__init__.py +++ b/src/bgpls_speaker/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/__main__.py b/src/bgpls_speaker/service/__main__.py index 564711b3b2766ddd79f555679d9eea94e718a85a..79f52f838b40e8a9fb1d4dc7a8de4ca15092c65f 100644 --- a/src/bgpls_speaker/service/__main__.py +++ b/src/bgpls_speaker/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/BGP4Parameters_3.xml b/src/bgpls_speaker/service/java/BGP4Parameters_3.xml index b945caa8307e89447a8ec1230d440e9dab6a43c4..1b5c674cf0ada4082ad3eaa50c991ff3855e4bfa 100644 --- a/src/bgpls_speaker/service/java/BGP4Parameters_3.xml +++ b/src/bgpls_speaker/service/java/BGP4Parameters_3.xml @@ -1,4 +1,4 @@ - <!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + <!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/exec_speakear_java.sh b/src/bgpls_speaker/service/java/exec_speakear_java.sh index 4e38174fb070070106a8f0f7951d72ffb3f93fa0..cc420d57d457057e511e3a1a0ee14c2c55489a59 100644 --- a/src/bgpls_speaker/service/java/exec_speakear_java.sh +++ b/src/bgpls_speaker/service/java/exec_speakear_java.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml b/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml index 50dce7ed17613cd9fa4d8f612751e4c045b30cab..25ad6dd86b001076793fd2a1ab11d3335e55da04 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG b/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG index 01a2b22efe4a23f2381d01d8b295dc34d8a7fda5..396a93846c24d3a64f81d8baa983e6b340668139 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG +++ b/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml index 47cf97472ebc0ab692e33da88c70a762c1bb429c..d9eb64641ad9debe92edf8e01517cf53c0fe57ec 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/pom.xml b/src/bgpls_speaker/service/java/netphony-topology/pom.xml index 0b83a126198f9b5a082bedac224f01ffe486e059..042662844c86f16ba59d7fe8e7240b9a50885a37 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/pom.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/pom.xml @@ -13,7 +13,7 @@ <license> <name>Apache License 2.0</name> <url>http://www.apache.org/licenses/LICENSE-2.0</url> - <!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) --> + <!-- Copyright 2022-2024 ETSI 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. --> diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java index 9651d78761d267fdb10bcb1994aa0a90d9c17cf8..f3d35e03abeee62dd6c66f3ae985af6781790d15 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java index 0c1a656c4b2f74c63ffc09143ec93a274116d5f1..e5f26de90199af5008105158d01851ccfc945d60 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java index b96359b6cb00fae27e50ac08b7e3fe07772275eb..130a055a2b75030555e0f1ab28a22383c873933e 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java index 4f6f4af856ad4293d5c999cc2cc8cde6203b60f0..c4968a4e7fabd3ee785feeb9b3c098ada4e88058 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java index 963406700f327ec47eb213ec943f29476714f76c..cdca5a4ed8bed12481575918a411e1b2daa4f925 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java index 5a1a5119a6fc213c0c923673dd6dbdaa108b755c..aa526197d08c70d56a43c16a271fd998be08f955 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java index 0eba7b30963ec9254ba8b892a057b6d4996513a5..b4f618b998077f97c5abaa1aecf453405e024d34 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java index ee9dd662320914cec0afb7fff9ebed74a4f06756..ffcee3274639352cca335fda288c934bcc03095e 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java index c42423affbb415a40e6697a56285e9f77f55c59c..4f9903f0c5ab4e15d9126b2826cc656b8d9b1ba8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java index 32112e01bd99bb5371e4cc966255ad7ff8b425ba..9533b74e954096ef16b41e34bb1f5efbcaba471c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java index 94e39fb19c927c4dd6c4c89f222dbbab9e4e48a4..30a76680673dd34d8b8b4e5ff95890e0e2a8f165 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java index fbb9aca1adb8448c837ce0e437684f4b4e1999a9..fe7dd53264a3a01a7d29b43ff0527bc0ff72cbf1 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java index 02cfbaf91bc0e6652ab8f558f48c68e707f15a3b..c92c10aa1fa1c6a73575dbe768328fafbd631ad0 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java index ca9b13007bc3ed427bf89fd1f1847d511b7af0d7..55490689d3d308a9d8390453ebd734a5283a7a50 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java index e9dff709fabd84fe14426e52057542e70e496e1d..2f4381650ecf97b223914725b6feb274ffe4edcc 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java index f4bdcc587d7f56c8d690a2e69ba5944c670e2b91..15dec092076d3466f913f7806dd3dc6a5b8baee4 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java index 3a813e93678f6e92002543cf92b3092957c23a42..0bbc3c9f602b32e88d25ff87bd3f209a3fbb8bb3 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java index 476628728a45176791e364c42469086fed7a03e6..41ebdf1bb4d96520efff91226a1ed52cca18a840 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java index fb9a08d7e9be664cd712d148c1edda69661ddf2f..f361ac3efb0cdefe159f2c7a0ea7fe19e67aaa2b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java @@ -1,5 +1,5 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java index d206cf7e234fb8bcd936a192a5dd68f05dc062c0..f847aedaec05b537415159f7aa357567d1ce0ef4 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java index 4f036b8a1ec89b1dd14f07d194d6af6f84dbcab1..d8252a76349c4e0ccb15f42700607c61a4735315 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java index aba3dcef54c813bce1e0093c5f1289ad42902101..ec0acafe2fa326455689f8bada4dc8edd7258035 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java index e274a87aaaf31c4eeff4592ea71f4408d6dfde43..acc84cdf810c4cbd59c09a7edabff1ca0f76c7d8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java index 6bd951501bb09d3de40cfc5e7c3bc43cf259cfee..def0bc5244a78a4b4ea2ac1bfd3802cb88f375c8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java index d751622ee03bb80099e1ab88914945fe4f04c29b..d03f07f55bca56e2e161400ee548683fb540f7ad 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java index 3c83a9a776f88a85e165f70fc23bb3aa62c0f33b..a1746cea2c2575173303c5460e36e1ae9b90ee04 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java index 9e54e64c1cbda7fb77ffec543d2f1977cb635fa6..d37d1c21c9e6f3576ebc3f2ee3684c0d188f3fe9 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java index 0d337bb6140841bd27e37fcbd3c238445c0797d2..12c313737e89267eab5d62da223d9ff99395cec9 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java index 9894a89663bcc7b64df18e10083d2fe560a2bcca..b29b52082f0d754e7d1873516b58dc4d000f4b43 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java index aa2a5cc6a0b371eb29615a200f5a1c71505f2a75..405964c3321aa6681d308497a31cec38fc015a1f 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java index d66f2485d4f7f04d92f6d61e17c7fa49836ea25e..8a67375d577e7bc1bc2dd9b41f34c3dca7a9db74 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java index 5bfeae8e2764151671034754682c6082b98b62ca..cfd11fc5433c749913de6d885122269486def72e 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java index cbea17cc524ee98088573cf133004087519ad064..ab5edde7cbbf634aa8658da248d18c19ec07e327 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java index 19aad7115d5fab5d14824a3e26df01996c3458e5..35f17165552c6d1c3b1b812f4541652357be5158 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java index 22319122a7a154fe048b47ea6457ef8dd63d2264..ddb7fb40faeb8d93cfaf2d3b20bd4ab6e068c07a 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java index 0da582030271a0ca0beed213d5c03d29086927b9..f8efa971f5631af7be78f9d2844e549cfd9d4a89 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java index bf7a0b84a31c80f694c1dfeaf7fad44fc85882ff..fc140335669faefc1f3f2a137bc9a4d3a082b0c8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java index 26d876c17fe01de9bfc474ea6d3367119354ae37..ad386cf3db956f2b12967bc86b716b59f56d55eb 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java index 4c0fd13800b30f3b6b77407b95acda5fc71f5618..b4bb4f3f55215cde835908d8535f9d908dea746e 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java index 436263a47ca453b6f7454d08e14976d13dc03cb8..b0eb267dcef6ac2c8d869353c744bf730539f443 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java index 44d2973b2ae3463031d3bba42bbe9f754e193c90..393d7ab6a20f82237ae4f4e7750b58e50bea7ec4 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java index 79ad7f82c5159c6f18e21afaba493ee2a0b31357..30cefeedbe6306cfa5eca9d4e2d515913b6a2a54 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java index 16ba2de9b5ddc43de899adb996abad2541cb4020..603d9791c34a29eeb4c64ff26c674beb8b56771e 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java index dac19068fa67be60b200262e0bbc7396238943c5..040a83562361dbd3d5d508fcdc8831d903c8572c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java index 187b212051c5b229d0c5b7e5b413f263c8ceef0b..11071c517d2468729b143a76290d0ad655919a0f 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java index 09eeedd497433d6b3f7efa71e777c57f36613a31..023ec305376510a2d05020dc2efa2b2168882355 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java index 63052028b4a510ff84dbf4803d015f50d530f6f1..1f7d49e026c3d80807d7d7a7e9d0c3eb9aee59ca 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java index 96d0c0c2e3464a8b792216c4cccbfd9a3e2aa4a9..b87deed6b17094fe3c4b014a740f9f60a89b761e 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java index b8e671de21ac6f8324eb4fbd8f2530e12da84baf..13b7cd9ffe47d3848018a06ee1d74446460e651c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java index 746338df2e4b02787e56f0ce88f338c3a0dcfaa8..36e3d2632463d8adaa0292509762b0d3bb03c0b7 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java index bed570fedf5cca39a8a580521d7918f76b773cc8..31f9c17b1aaef9629d029e9372ad46b0d5394a2d 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java index b0f3bb3acaba9f1d5c915cf64e9f44241f8456a8..f9b73e6354c289b4c1031d8b7618fbb2305f42ba 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java index e65a0ec3f0a27d27640e3437d144044374775a20..beb8187e7a0d4b5e148f0dca3fe495327a436dad 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java index 161d27f1f8b87c0e20c3f2425c060362dea37eb6..5f2dd6d30fe3b2043e6f6ee2337231fb2893d34a 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java index 78a234ee1320a463b7fd7cbea4d3c3d591fde159..6cdda3757352670073114587b9319d9837f0ba1c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java index 22b91b98614f9256a7b829a6196c43e3e161a996..d771931e3ffbe02135be5bc0130bb69216a9db55 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java index 4e74e445b04ba27e04bfbe2ecdab8d2672bcb468..3181e48ba38028effa6016400dc3cd00b7af516b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java index ca937a5aa603aefdd796c0165a33bdb419f0a6f6..45064f2811fcbe1da80b0a500ba5ad748496ba92 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java index 6b0aa6176e733704993686629d2bb5c7563957e7..168c7ff56da1be5eda43d308b3de8a41d2b34d70 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java index ec1b2e650c56de37ed1289aa864c643a58134da2..3cb52fbe0e7fef435aa6e19b66341e9e3be7b899 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java index f1842a6ced8f8788e6242c0e4d15805be48718eb..dfb890d74e9f2dce611e9c628068b21ae42e95d8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java index 2b344a342c320101bba2b21c3dc4a7b828022600..767fdf55c52ee7764dd74426b2310c4c40599e4c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java index a802fae9e029c34f91000d6d37866e81026f5a16..b0e21c1869e04cc5c430eaf67d5cf51f0d79457f 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java index 853aa217e264924c395b37439e53e528241f10a5..83ac7a7111b30497453ed742585ecdecc71a8512 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java index 401e4bc9ca25017f1ceb3d8a32332965cbc60121..574ca12dfd931e9fbd7a313ab45486796fa32464 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java index 5b8e65f0c3dc751b6513a8248f6a445a721a78ce..21a32d2234ff03ca2e72b0f69c5c8ac8f1c06eb2 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java index 1bdbc624d06482763638af631e906ce483d9fc3d..f50d845c56eafb24a170d02c85709b2540a57bf3 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java index 74b0a1f4e6b9e3dda9d7163c739e2df820b7332e..11766f0bff75060eeb593faf2d45382cf2d5319d 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java index ac11500b7c3c34655996a07e67a49633a35e678a..3815582320e3e0f2c62118cbe2fc953f12b108f6 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java index 223c1940efbed133f7633ec3aca75815f8b4d38e..e784a9c0b9696dfc734f217562318b96b2967fff 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java index fd5f7aa882effab93ab24dd598260447822ff0e6..ddb0d5c1768226fad7b7912ed361fdf260e8e5bb 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java index 37fab22972d14c23739c910b8d23d2fc29a2f22b..10e1329d1781a76cca152d9c499561e538100325 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java index 845bcf416f0977bd3e619768fe6cb02159b9301d..c602ddc48f1bf920cae98747908cb707f615a1b6 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java index 0c56d240c3560885782ea00c5ed621c91de290df..b8ef307f1e010d6bca10830c34ae294d9b2430dd 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java index 57010b9997870f1aaadc1e389eaad1fbf0c6c656..7a7f9e46a4e1fdfba887aff0982a58d0bf65cc1f 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java index 1daaf21242dcaea9b656c2d9a7cbdab11b64b844..423f7d65f00cf0848df8dee77fdebf0c9fbc9070 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java index 35b3e9c22398f554f96903f4b1b7262128ed3329..27270d28a013bb3ba84a38e8b4d3c4eada5e3796 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java index 311387bc3ca6fe3ca9de665854c840097663f645..ce7b3ab0ae35bdc184fee96a37c92b173680e2c2 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java index 596dedb9ae27a6b0e20c1275f65071f630cd6a39..a18a75e1c53069b70bfdedf220b36b475558a489 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java index 4b06f38680f5289620a22aaa49c82c98a4fe13c2..23f55da5a884c1fa3db634a8326d2ce1384b111d 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java index d77a7039774239d55c07d5a3b1dfff7a7f4b9d39..42aafb1dc9f3b198a85b521fc18c76e909001438 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java index 739508b41f44ddbf122354b33fb05e6830eebdf8..ae234a64773cde44a2826a00bfde7c53deb50836 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java index 71cd098a5d0e12ea9f9117805f4162846475c555..2c4ca43e8ddf697dda3f11d5c8e139882d85d959 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java index 037e6a1eb8eba8a43f8c9ef38dd574f74a4c5379..e3624685c6aebdd38440118ecb875c7f24f62468 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java index a60bb60ffca8f5e1f39492365e1dfe179e41d61d..01e54c9733fcc9a375964e82a6e49a6c2c3b2154 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java index efae987626a62cc01bb6c07105d8d9e2fa70723f..e01bdfe55430241cb170645ef8c4a8f77ef0fd1c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto index 89ab745e1fe6eb32b2038ef2ed89d3ee70c14aee..7c994427b8bcde3402470e945db8eed22518bb2d 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml index c83d4ec1a146d5742b7a422c0fd4b7658dea4f32..c1d9ab31c877fbd5b99f27701843dfbad944be1c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml index aa4efaa720a89915cfc775a5d745932dcce878c6..6b262f7234f04befbc968666007887b244f86c92 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml index c00e1f2df7e76757c11957b9599d8b3ea076e92a..1f1806abc2ce1a5dc6f298f58e54590020155b32 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml index 9309064a165227fc3e8b25879a62def1deeac1bd..a450b4a5a6e6e61f7f6203cb7c21270ee7e7f99c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml index a472b7855e3d05fb66c08a93b4e872a572185c7d..921e9967da26a267192a6120cb995644ff2f60b8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml index 2059250b51dccde80d448e6e46f1e3ebac6608bd..06fb422cbe3d7bfab862386beaff33065794142b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml index aa4efaa720a89915cfc775a5d745932dcce878c6..6b262f7234f04befbc968666007887b244f86c92 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml index 584b8ea7fda5990c4f34c00ec4517e9b50b575da..4d12686f0c306e4d3e9cc8d3f0ba9becdbd7baa2 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml index 81ec02ead7aba875c10203b24388f17b481834fd..7308a2ab5794cbdc8671a4857998ee3ed2292ad1 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml index 22d32b1cfad88852e7815cadfcf6999a75537610..7080a390d97831d00f7a64466204e110685c3fea 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml index cf5f3e7e991ffc5b3445d109f898ebc76611cad7..a8597bad5d9bd3d1dde053fc4221ddec6f420227 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml index d34a2e7eb869af59741a9f4f0ef5650cb3d5a674..7011f0d5d977ca5c3d090fd63fd555d758123330 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml index a26f7affa0e8b4f3a5f9868a8d0181112364eb5a..48f44d12fc19f99f321561c0f9d67d07a7cfdb49 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml index 2472142f4c9207c36b7cd92028147b8590fa5800..8caf07fd3df37cb8dafd4ce1f3c3df43e7bb1209 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml index 7c986efc2e3a9b337380716232a3c2427390e89c..91dd0584515f87f4e5b1b6b554813604f91b2e00 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml index 9f039172f7dbbe1d9e9eaa657dc733b2b2426fc8..85a5c31a4d7615619a0258fa6622fa52847dd072 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml index 562bf78cc39af45028251802c8108e25e7823556..9ce9c950e89b0d9edb37c05ac1b0d21039161747 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml index 35b19221998485c04cf46733439103e8970050d0..afa323a639697cf14b53dcab23a41a5d7d382fb1 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml index a9bcac60932370c873b1c3431d2fd6a4a4a8c990..00d00c40473d86ec83e33ef69aae40eb34764b40 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml index 108f214b3160cc7713cea775dc9e1c1519242cc0..72422d4fb775ca746b0bbcabcfbdcfe28aac6b3d 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README index 56bebb238a6c413d8880ad3d2644b7097e616bc2..39b0d199bb08117a83e3eb0a23bb6c89267ce700 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml index 7f46c6c44ca34a00af46c0048f706fe534420a1f..0ad38ec5f307ddaf77d0870b893a376f09fb8ee1 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml index 851f0281d43f1b59fac7fb10bf2e5f9431977b96..3571e11f3e0eec97c46039cc9f00cdf05cff7ce4 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml index 1348ed615c313dc5ca4605fae7a9a801dd97f51f..05c9eeff756cb4f78c8cea3ac0b17be2eadc2ff9 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml index 981697a3548ea0eb0028c7ae8c5913a454e64280..f2a164cd8b19a7283c769040fc7ba0f4570ad299 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml index 9f039172f7dbbe1d9e9eaa657dc733b2b2426fc8..85a5c31a4d7615619a0258fa6622fa52847dd072 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml index 562bf78cc39af45028251802c8108e25e7823556..9ce9c950e89b0d9edb37c05ac1b0d21039161747 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml index 9b1cf5aad9d3887d9fc70832686ac6697915e463..c3f9d7129112eb0d41e852195e28eb2b4de40cde 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml index 70aa79dd0bfce5a675ed11a4b87e9b62eff4a1b7..4067fe3fe0f2daef25a2989bc77eeac930220284 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml index 8ed9e8fd34ba38f942d3cd0f6df64a377998f04a..2c582768182b66ec8b08d3c1abac9de661ce04d8 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml index 0379914fdf33b137a0833d120e179eabfdab3d87..2594d43eb9009442b6fc5dab6d27cb3f426a7847 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml index fd3c0745258c6bedfd081a41eff5202af14a4df5..2713e8df212a412ec60dbdb1d1a17a9c97aa15cd 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml index 80b0186452a14c08259f1caa8260151cc9a1ea30..02f2094721a60da4a29bd47b9ad7c7f05db73d18 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml index 2059250b51dccde80d448e6e46f1e3ebac6608bd..06fb422cbe3d7bfab862386beaff33065794142b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml index 616a97b3448dffcf936f7c2cd94e4eb5e63e726f..2c3a4edd6ca06590639cc6f130a8222fb246e832 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml index 37903eac45ed7d468ee600fac26376b54e3fa62f..275371c8701457c1a9670f6681547405ebd19e8a 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml index d56d9db29ed3db3c944c75eb39ee6cb409f6ebc8..cf68f7033750dbb45bc88989623baf32cffb2fe2 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml index 87196b5e0efb513d6f4aee4840dc80a54d5990f7..30a8834dfccc35096bcf662d8e48056b6a528a6c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml index d1c670cfc42b86851a57e76315e211829423b4eb..902523e0d17854450a097acc2ba819c8384b03b9 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml index 69b61f93a80732437130e218af28dd62598285f1..bf42515a251f6fa1ced1e1348dc7d57df06cbf97 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml index caf6d59506e4d0f7b98953826e8e2228c383593c..133eb6eadad694ea7ce453966aa933caaf2c10f0 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml index b698140819bbf9dd9650bdd4658514e192765bc0..f5b0fd77fe49045b8cbbee6435e54ad6b9bdb07b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml index 862588bb0427c8a3f1573380a8f6cb0988a4f9f8..0915686be10b545a9356d11a39790567769418c4 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml index 038be7480de38bdd222f6bae87d8cf347257f0ed..f7d52938b6bd5ad3584de8c3c1a2e1ba1b564200 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml index 4ec8b8530c6c6037d490da4567c2e79ae589a2b0..b1263436e612d11ae4ef2378588f82819bf58a31 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml index d1c670cfc42b86851a57e76315e211829423b4eb..902523e0d17854450a097acc2ba819c8384b03b9 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml index 60ff89ddc08062411e36b09e18682462cb7dbbff..a1cc29bfc6da24bd7e1d3bc28428dc532885e9fb 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml index 28e69211460d77ccfc4b3e4d9d0dd51c73167386..e22cf56d14ceb7aeb4d730a8277651c64775e57a 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml index 12466fdd0386d81aba8a49082bc600a050a56957..74a77b96682a52e38c8f61d87367c3cb68486bb2 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml index d6c68fbc9829a40ef936b94525e46aa434e49699..68a70469303a1633faf259ef651463380b5f1144 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml index c1c8cbbfc849ae9917da0f1b1a585ca61befaf29..367ae45b19a1ad91bd641e5ef890d897faceb5cb 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java b/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java index 9c23d708d91b25c867d074a091636e0a8b59051c..c1fc8f03a4d7c0c083134d1edb91f47339e78bfc 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml index fd3c0745258c6bedfd081a41eff5202af14a4df5..2713e8df212a412ec60dbdb1d1a17a9c97aa15cd 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml index 80b0186452a14c08259f1caa8260151cc9a1ea30..02f2094721a60da4a29bd47b9ad7c7f05db73d18 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml index 2059250b51dccde80d448e6e46f1e3ebac6608bd..06fb422cbe3d7bfab862386beaff33065794142b 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml index d56d9db29ed3db3c944c75eb39ee6cb409f6ebc8..cf68f7033750dbb45bc88989623baf32cffb2fe2 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml index 87196b5e0efb513d6f4aee4840dc80a54d5990f7..30a8834dfccc35096bcf662d8e48056b6a528a6c 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml index e2b01769b5e250fdb38e0262a97a6cc406226a86..6a04ce2842b25c281719fb24d2ada2b85e5c2b1a 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml index 6ee18e6a041605d3dca576a860560144742076aa..6f75f2be034c558fe7b2b618ea0b1eceb71fe829 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml +++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java index a069d6c0b72a5450ea385c542982175beccd8d65..69b474c9a9106d304c4af0e5458fe4bd6b04fdf9 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java +++ b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/java/netphony-topology/topology.iml b/src/bgpls_speaker/service/java/netphony-topology/topology.iml index dacd0b12903059bdfd5b0afedaf87ecf5b3dac60..bf7f2292ed09c1cc2d6916b8a36417b324dc2988 100644 --- a/src/bgpls_speaker/service/java/netphony-topology/topology.iml +++ b/src/bgpls_speaker/service/java/netphony-topology/topology.iml @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/DiscoveredDBManager.py b/src/bgpls_speaker/service/tools/DiscoveredDBManager.py index eacc75e594c3bbb74d91d525833b4f2b75bb6dcf..692ed22a54a398c3b1e00c2bf15aceb5a981d116 100644 --- a/src/bgpls_speaker/service/tools/DiscoveredDBManager.py +++ b/src/bgpls_speaker/service/tools/DiscoveredDBManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/GrpcServer.py b/src/bgpls_speaker/service/tools/GrpcServer.py index 998b50f26262ea1b2391d14496f95569a75e923e..a77b77046c1d771edd0c4ad60a3efac9201b407e 100644 --- a/src/bgpls_speaker/service/tools/GrpcServer.py +++ b/src/bgpls_speaker/service/tools/GrpcServer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/JavaRunner.py b/src/bgpls_speaker/service/tools/JavaRunner.py index 10634f52f00a6c40f1853a43207084371642ca6f..c4118efef28e85490ed3d7a51c0160a5e8b78ace 100644 --- a/src/bgpls_speaker/service/tools/JavaRunner.py +++ b/src/bgpls_speaker/service/tools/JavaRunner.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/Tools.py b/src/bgpls_speaker/service/tools/Tools.py index 3d67c4518f62d2ade80f257c12d972179015dde2..2ba0d7aa0bf5756aee6e0cc07db1c0e1cae5d9b3 100644 --- a/src/bgpls_speaker/service/tools/Tools.py +++ b/src/bgpls_speaker/service/tools/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/__init__.py b/src/bgpls_speaker/service/tools/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/bgpls_speaker/service/tools/__init__.py +++ b/src/bgpls_speaker/service/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/json_loader.py b/src/bgpls_speaker/service/tools/json_loader.py index 9781c8e8dae39763ad7153f78567141f1aaa44f7..b3db263df9b1864610213aaf5cbf670119b12379 100644 --- a/src/bgpls_speaker/service/tools/json_loader.py +++ b/src/bgpls_speaker/service/tools/json_loader.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/service/tools/protos/grpcService.proto b/src/bgpls_speaker/service/tools/protos/grpcService.proto index fe135de011c675f857508dd1b6ebc8ca11a18f73..368b1aa1ed6a22327ffebddbe00f55be72779071 100644 --- a/src/bgpls_speaker/service/tools/protos/grpcService.proto +++ b/src/bgpls_speaker/service/tools/protos/grpcService.proto @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/tests/__init__.py b/src/bgpls_speaker/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/bgpls_speaker/tests/__init__.py +++ b/src/bgpls_speaker/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/bgpls_speaker/tests/test_unitary.py b/src/bgpls_speaker/tests/test_unitary.py index aeb81df67b9689d2fdc70b2bbc991600aeb9b66c..1c511527df0ac1be63ba11a8e2fee8b3756d9020 100644 --- a/src/bgpls_speaker/tests/test_unitary.py +++ b/src/bgpls_speaker/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/Constants.py b/src/common/Constants.py index aa15d66c5937c3f5a589ddf9cbb432d08c4b49b0..68200764610b5fded328dbec741fdbbf70bc0930 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index 23ebe19d681bd0ba774c8f3f4435c233369d0e28..eb315352b47bbe501f66868c0181a0d34cd6cfed 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -48,6 +48,7 @@ class DeviceTypeEnum(Enum): PACKET_SWITCH = 'packet-switch' XR_CONSTELLATION = 'xr-constellation' QKD_NODE = 'qkd-node' + OPEN_ROADM = 'openroadm' # ETSI TeraFlowSDN controller TERAFLOWSDN_CONTROLLER = 'teraflowsdn' diff --git a/src/common/Settings.py b/src/common/Settings.py index 5845ee5221be69e5d5cf00b60d9376a7fd6fcec3..fa5dce955a5f4b9acebf8a71ea789321e9cd2210 100644 --- a/src/common/Settings.py +++ b/src/common/Settings.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/__init__.py b/src/common/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/__init__.py +++ b/src/common/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/logger.py b/src/common/logger.py index 39cf9a1670089be303a4161494958c86f30a5b59..a0b4b47266949f25c1812de1c4f5c283546ce81a 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/Constants.py b/src/common/message_broker/Constants.py index 82339df6543368eb1205cd75423af4c859101479..3ab9f466b241f4d220bce01e8d2e559542db1c39 100644 --- a/src/common/message_broker/Constants.py +++ b/src/common/message_broker/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/Factory.py b/src/common/message_broker/Factory.py index 7bb1a717f1c30de24db7a4a6beb886a248e83e34..acf6d2aa87499a10c628f84ba0642d22cb0cea54 100644 --- a/src/common/message_broker/Factory.py +++ b/src/common/message_broker/Factory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/Message.py b/src/common/message_broker/Message.py index 0bc8e5d06490fa80f3e41c270819149a5251ec34..edd41a9d2c92b0e9ee746360a16b72ddf275a729 100644 --- a/src/common/message_broker/Message.py +++ b/src/common/message_broker/Message.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/MessageBroker.py b/src/common/message_broker/MessageBroker.py index 83df0e460c9ab17c59d1ef8101e9d3441a544bfc..12a970512c53a4af46a84d27dc52e17a659e0e9f 100644 --- a/src/common/message_broker/MessageBroker.py +++ b/src/common/message_broker/MessageBroker.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/__init__.py b/src/common/message_broker/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/message_broker/__init__.py +++ b/src/common/message_broker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/BackendEnum.py b/src/common/message_broker/backend/BackendEnum.py index ab6156deba45968c82daaeda7a3a6003d700ae8e..84715e8fadd88924af3c0b0b4e95428a7a9adaa7 100644 --- a/src/common/message_broker/backend/BackendEnum.py +++ b/src/common/message_broker/backend/BackendEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/_Backend.py b/src/common/message_broker/backend/_Backend.py index 68ee9b9d22518c8fbb919e0c4365157cb2cbfb46..4c1e17e501f1b38cd8edb934842dbb124a7af23d 100644 --- a/src/common/message_broker/backend/_Backend.py +++ b/src/common/message_broker/backend/_Backend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/__init__.py b/src/common/message_broker/backend/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/message_broker/backend/__init__.py +++ b/src/common/message_broker/backend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/inmemory/InMemoryBackend.py b/src/common/message_broker/backend/inmemory/InMemoryBackend.py index 0d5e18b40a21a0ae7d0b92c55e3bd3284c163121..1f52837ac0bf413a6419eda0ef238378224cbb1e 100644 --- a/src/common/message_broker/backend/inmemory/InMemoryBackend.py +++ b/src/common/message_broker/backend/inmemory/InMemoryBackend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/inmemory/__init__.py b/src/common/message_broker/backend/inmemory/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/message_broker/backend/inmemory/__init__.py +++ b/src/common/message_broker/backend/inmemory/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/nats/NatsBackend.py b/src/common/message_broker/backend/nats/NatsBackend.py index a8f2c7d28bf1956368e4a1af2dab657fbb9fb484..6b55ddc53f7d164187d2853cb5773ac2e4a9ecf7 100644 --- a/src/common/message_broker/backend/nats/NatsBackend.py +++ b/src/common/message_broker/backend/nats/NatsBackend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/nats/NatsBackendThread.py b/src/common/message_broker/backend/nats/NatsBackendThread.py index ced4f383ba72a0f96e636a9d41af8198fa6c1a07..1705878866b5286a8373c7f18c7daa986d4536a4 100644 --- a/src/common/message_broker/backend/nats/NatsBackendThread.py +++ b/src/common/message_broker/backend/nats/NatsBackendThread.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/nats/__init__.py b/src/common/message_broker/backend/nats/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/message_broker/backend/nats/__init__.py +++ b/src/common/message_broker/backend/nats/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/redis/RedisBackend.py b/src/common/message_broker/backend/redis/RedisBackend.py index d0e6b7966d666f39f13e7240869b95c48c1928fe..81a2e29766297d6f6c8c1dd9dd1a1d9c889756ff 100644 --- a/src/common/message_broker/backend/redis/RedisBackend.py +++ b/src/common/message_broker/backend/redis/RedisBackend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/backend/redis/__init__.py b/src/common/message_broker/backend/redis/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/message_broker/backend/redis/__init__.py +++ b/src/common/message_broker/backend/redis/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/tests/__init__.py b/src/common/message_broker/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/message_broker/tests/__init__.py +++ b/src/common/message_broker/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/message_broker/tests/test_unitary.py b/src/common/message_broker/tests/test_unitary.py index c1f37632cab4ea7c2295e0fcee366353252449b8..698170b68af40aa37a80e627b412021705b115ee 100644 --- a/src/common/message_broker/tests/test_unitary.py +++ b/src/common/message_broker/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/Decorator.py b/src/common/method_wrappers/Decorator.py index d86a769ef8f2ab120b42d0b12f93530e8c71c2a3..102bb062fc7dd3a721957d7178a545b585357960 100644 --- a/src/common/method_wrappers/Decorator.py +++ b/src/common/method_wrappers/Decorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/ServiceExceptions.py b/src/common/method_wrappers/ServiceExceptions.py index 6f78c28ac8778dc77f010920bba5b8762cbbba99..2ee98f852f27871438383a117d9616de1785355e 100644 --- a/src/common/method_wrappers/ServiceExceptions.py +++ b/src/common/method_wrappers/ServiceExceptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/__init__.py b/src/common/method_wrappers/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/method_wrappers/__init__.py +++ b/src/common/method_wrappers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/tests/DummyDeviceDriver.py b/src/common/method_wrappers/tests/DummyDeviceDriver.py index f1c51fcf9192c8328a8ce19edae1d055ab4b24d2..fab8d6e13fe3cf139942c2c92cfcafc9f18843f5 100644 --- a/src/common/method_wrappers/tests/DummyDeviceDriver.py +++ b/src/common/method_wrappers/tests/DummyDeviceDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/tests/__init__.py b/src/common/method_wrappers/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/method_wrappers/tests/__init__.py +++ b/src/common/method_wrappers/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/tests/__main__.py b/src/common/method_wrappers/tests/__main__.py index 9cb2fe2b09e27cd88902fdb6abc291da166dcd08..134f5cbca6f184113622861ea26fa1f9f7c37a75 100644 --- a/src/common/method_wrappers/tests/__main__.py +++ b/src/common/method_wrappers/tests/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/tests/deploy_specs.sh b/src/common/method_wrappers/tests/deploy_specs.sh index c185c05f563b6e39237f6982e28df576821af985..e50ef246f19ba377acf7367bbabac4e686697bbe 100755 --- a/src/common/method_wrappers/tests/deploy_specs.sh +++ b/src/common/method_wrappers/tests/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -49,9 +49,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/common/method_wrappers/tests/old/docker_grafana.sh b/src/common/method_wrappers/tests/old/docker_grafana.sh index 43fd40b57c3917be6e2a1c0151e7e36f3dc3ab6a..03c71e55a4cdeef52f49320e26b31420b056919c 100755 --- a/src/common/method_wrappers/tests/old/docker_grafana.sh +++ b/src/common/method_wrappers/tests/old/docker_grafana.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/tests/old/prometheus.yml b/src/common/method_wrappers/tests/old/prometheus.yml index 5fbb0ae3135e1a5bcbe6fb77829330a4fc7f2df2..ff0aa6f70a5fbbcf74b10a63cfd76d26f7888a18 100644 --- a/src/common/method_wrappers/tests/old/prometheus.yml +++ b/src/common/method_wrappers/tests/old/prometheus.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/method_wrappers/tests/test_unitary.py b/src/common/method_wrappers/tests/test_unitary.py index 31d676f02106609ebe575ed9bd6c41b5039f5698..4fa1754a1186861213ed0964f5084717563e4394 100644 --- a/src/common/method_wrappers/tests/test_unitary.py +++ b/src/common/method_wrappers/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/EventTools.py b/src/common/tests/EventTools.py index fd1b972f006faa1e8b6cfdffc75e1fdf9fa5b209..5c13b76669c84f73d62ff3a91eb462824d4f43e1 100644 --- a/src/common/tests/EventTools.py +++ b/src/common/tests/EventTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/InMemoryObjectDatabase.py b/src/common/tests/InMemoryObjectDatabase.py index ceaeb6fdcc84d52965abe6fc763914b91721d039..0728671475d85fc42a37245b72f4ea8087ba573d 100644 --- a/src/common/tests/InMemoryObjectDatabase.py +++ b/src/common/tests/InMemoryObjectDatabase.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/InMemoryTimeSeriesDatabase.py b/src/common/tests/InMemoryTimeSeriesDatabase.py index 0ebbc454743cda1abb2be025da9d04b529a400e4..30e98a2d582d1c933ce19297b514b023cb1f8499 100644 --- a/src/common/tests/InMemoryTimeSeriesDatabase.py +++ b/src/common/tests/InMemoryTimeSeriesDatabase.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/MockMessageBroker.py b/src/common/tests/MockMessageBroker.py index 373a299a90d61be17ab43326fa356a5c6178cf9e..4c09699a6953232a49d14038aafc96249279cebc 100644 --- a/src/common/tests/MockMessageBroker.py +++ b/src/common/tests/MockMessageBroker.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/MockServicerImpl_Context.py b/src/common/tests/MockServicerImpl_Context.py index 03098dae138793958dc2fa2c4ddaebd7ff03c2e5..83fb752b0fa9889be943d3538f4dd304b00b9276 100644 --- a/src/common/tests/MockServicerImpl_Context.py +++ b/src/common/tests/MockServicerImpl_Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -21,9 +21,11 @@ from common.proto.context_pb2 import ( Device, DeviceEvent, DeviceFilter, DeviceId, DeviceIdList, DeviceList, Empty, EventTypeEnum, Link, LinkEvent, LinkId, LinkIdList, LinkList, + OpticalLink, OpticalLinkList, Service, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList, Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList, - Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList) + Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList +) from common.proto.context_pb2_grpc import ContextServiceServicer from common.proto.policy_pb2 import PolicyRule, PolicyRuleId, PolicyRuleIdList, PolicyRuleList from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string @@ -31,8 +33,10 @@ from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Link import json_link_id from .InMemoryObjectDatabase import InMemoryObjectDatabase from .MockMessageBroker import ( - TOPIC_CONNECTION, TOPIC_CONTEXT, TOPIC_DEVICE, TOPIC_LINK, TOPIC_SERVICE, TOPIC_SLICE, TOPIC_TOPOLOGY, TOPIC_POLICY, - MockMessageBroker, notify_event) + TOPIC_CONNECTION, TOPIC_CONTEXT, TOPIC_DEVICE, TOPIC_LINK, + TOPIC_SERVICE, TOPIC_SLICE, TOPIC_TOPOLOGY, TOPIC_POLICY, + MockMessageBroker, notify_event +) LOGGER = logging.getLogger(__name__) @@ -579,6 +583,7 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[SelectService] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply + # ----- Connection ------------------------------------------------------------------------------------------------- def ListConnectionIds(self, request : ServiceId, context : grpc.ServicerContext) -> ConnectionIdList: @@ -628,6 +633,9 @@ class MockServicerImpl_Context(ContextServiceServicer): LOGGER.debug('[GetConnectionEvents] request={:s}'.format(grpc_message_to_json_string(request))) for message in self.msg_broker.consume({TOPIC_CONNECTION}): yield ConnectionEvent(**json.loads(message.content)) + + # ----- Policy Rule ------------------------------------------------------------------------------------------------ + def ListPolicyRuleIds(self, request : Empty, context : grpc.ServicerContext): # pylint: disable=unused-argument LOGGER.debug('[ListPolicyRuleIds] request={:s}'.format(grpc_message_to_json_string(request))) reply = PolicyRuleIdList(policyRuleIdList=[ @@ -666,3 +674,71 @@ class MockServicerImpl_Context(ContextServiceServicer): reply = self._del(request, 'policy', policy_uuid, rule_id_field, TOPIC_CONTEXT, context) LOGGER.debug('[RemovePolicyRule] reply={:s}'.format(grpc_message_to_json_string(reply))) return reply + + + # ----- Optical Link ----------------------------------------------------------------------------------------------- + + def GetOpticalLinkList(self, request : Empty, context : grpc.ServicerContext) -> OpticalLinkList: + LOGGER.debug('[GetOpticalLinkList] request={:s}'.format(grpc_message_to_json_string(request))) + reply = OpticalLinkList(optical_links=self.obj_db.get_entries('optical_link')) + LOGGER.debug('[GetOpticalLinkList] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def GetOpticalLink(self, request : LinkId, context : grpc.ServicerContext) -> OpticalLink: + LOGGER.debug('[GetOpticalLink] request={:s}'.format(grpc_message_to_json_string(request))) + reply = self.obj_db.get_entry('optical_link', request.link_uuid.uuid, context) + LOGGER.debug('[GetOpticalLink] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def SetOpticalLink(self, request : OpticalLink, context : grpc.ServicerContext) -> Empty: + LOGGER.debug('[SetOpticalLink] request={:s}'.format(grpc_message_to_json_string(request))) + link_uuid = request.link_id.link_uuid.uuid + reply, link = self._set(request, 'optical_link', link_uuid, 'link_id', TOPIC_LINK) + + context_topology_uuids : Set[Tuple[str, str]] = set() + context_topology_uuids.add((DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME)) + for endpoint_id in link.link_endpoint_ids: + endpoint_context_uuid = endpoint_id.topology_id.context_id.context_uuid.uuid + if len(endpoint_context_uuid) == 0: endpoint_context_uuid = DEFAULT_CONTEXT_NAME + endpoint_topology_uuid = endpoint_id.topology_id.topology_uuid.uuid + if len(endpoint_topology_uuid) == 0: endpoint_topology_uuid = DEFAULT_TOPOLOGY_NAME + context_topology_uuids.add((endpoint_context_uuid, endpoint_topology_uuid)) + + for context_uuid,topology_uuid in context_topology_uuids: + container_name = 'topology[{:s}]'.format(str(context_uuid)) + topology = self.obj_db.get_entry(container_name, topology_uuid, context) + for _optical_link_id in topology.optical_link_ids: + if _optical_link_id.link_uuid.uuid == link_uuid: break + else: + # link not found, add it + topology.optical_link_ids.add().link_uuid.uuid = link_uuid + + reply = Empty() + LOGGER.debug('[SetOpticalLink] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply + + def DeleteOpticalLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: + LOGGER.debug('[DeleteOpticalLink] request={:s}'.format(grpc_message_to_json_string(request))) + link_uuid = request.link_uuid.uuid + optical_link = self.obj_db.get_entry('optical_link', link_uuid, context) + reply = self._del(request, 'optical_link', link_uuid, 'link_id', TOPIC_LINK, context) + + context_topology_uuids : Set[Tuple[str, str]] = set() + context_topology_uuids.add((DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME)) + for endpoint_id in optical_link.link_endpoint_ids: + endpoint_context_uuid = endpoint_id.topology_id.context_id.context_uuid.uuid + if len(endpoint_context_uuid) == 0: endpoint_context_uuid = DEFAULT_CONTEXT_NAME + endpoint_topology_uuid = endpoint_id.topology_id.topology_uuid.uuid + if len(endpoint_topology_uuid) == 0: endpoint_topology_uuid = DEFAULT_TOPOLOGY_NAME + context_topology_uuids.add((endpoint_context_uuid, endpoint_topology_uuid)) + + for context_uuid,topology_uuid in context_topology_uuids: + container_name = 'topology[{:s}]'.format(str(context_uuid)) + topology = self.obj_db.get_entry(container_name, topology_uuid, context) + for optical_link_id in topology.optical_link_ids: + if optical_link_id.link_uuid.uuid == link_uuid: + topology.optical_link_ids.remove(optical_link_id) + break + + LOGGER.debug('[DeleteOpticalLink] reply={:s}'.format(grpc_message_to_json_string(reply))) + return reply diff --git a/src/common/tests/MockServicerImpl_Device.py b/src/common/tests/MockServicerImpl_Device.py index 04d1da457551984453b87bf2f248f7d74dbdf2aa..1264e86b2d7a312bfd15ccad13da20b674d00350 100644 --- a/src/common/tests/MockServicerImpl_Device.py +++ b/src/common/tests/MockServicerImpl_Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/MockServicerImpl_DltGateway.py b/src/common/tests/MockServicerImpl_DltGateway.py index f505420f9069830ce249f86718a0883745d06ea7..8ef3792029d0b5b26f05c292f96deacaf2fdb645 100644 --- a/src/common/tests/MockServicerImpl_DltGateway.py +++ b/src/common/tests/MockServicerImpl_DltGateway.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/MockServicerImpl_Monitoring.py b/src/common/tests/MockServicerImpl_Monitoring.py index b7fd422da623963c8af71e0ac0d477926c12a6c1..72cf47df6f9d2a45448dd63f3d460d414649f746 100644 --- a/src/common/tests/MockServicerImpl_Monitoring.py +++ b/src/common/tests/MockServicerImpl_Monitoring.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/MockServicerImpl_Service.py b/src/common/tests/MockServicerImpl_Service.py index a3d70d2280bf6641881516743f56c0284cb4a94d..dfc8e6a84bfad6059c343b7e3d96220686eecb1e 100644 --- a/src/common/tests/MockServicerImpl_Service.py +++ b/src/common/tests/MockServicerImpl_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/MockServicerImpl_Slice.py b/src/common/tests/MockServicerImpl_Slice.py index 72bd47b82b884d65b2b9722bcc3128768f45c7d8..aab72dbc7d290e368857b9997e67b912472205db 100644 --- a/src/common/tests/MockServicerImpl_Slice.py +++ b/src/common/tests/MockServicerImpl_Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/PytestGenerateTests.py b/src/common/tests/PytestGenerateTests.py index aff535028e7037b837f542cb6d3213fbba21a155..488b6aab49c13f9ea117e98d1447d8c9ef26b64e 100644 --- a/src/common/tests/PytestGenerateTests.py +++ b/src/common/tests/PytestGenerateTests.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tests/__init__.py b/src/common/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tests/__init__.py +++ b/src/common/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/__init__.py b/src/common/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/__init__.py +++ b/src/common/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/client/RetryDecorator.py b/src/common/tools/client/RetryDecorator.py index cddb4ec7237f2e45e459fb85e562a414dea3bd77..4750ff73ae4342ce2eb2a31941ff48b46e5be281 100644 --- a/src/common/tools/client/RetryDecorator.py +++ b/src/common/tools/client/RetryDecorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -51,24 +51,32 @@ LOGGER = logging.getLogger(__name__) def delay_linear(initial=0, increment=0, maximum=None): def compute(num_try): delay = initial + (num_try - 1) * increment - if maximum is not None: delay = max(delay, maximum) + if maximum is not None: + delay = max(delay, maximum) return delay return compute def delay_exponential(initial=1, increment=1, maximum=None): def compute(num_try): delay = initial * pow(increment, (num_try - 1)) - if maximum is not None: delay = max(delay, maximum) + if maximum is not None: + delay = max(delay, maximum) return delay return compute -def retry(max_retries=0, delay_function=delay_linear(initial=0, increment=0), - prepare_method_name=None, prepare_method_args=[], prepare_method_kwargs={}): +# pylint: disable=dangerous-default-value +def retry( + max_retries=0, delay_function=delay_linear(initial=0, increment=0), + prepare_method_name=None, prepare_method_args=list(), prepare_method_kwargs=dict() +): def _reconnect(func): def wrapper(self, *args, **kwargs): if prepare_method_name is not None: prepare_method = getattr(self, prepare_method_name, None) - if prepare_method is None: raise Exception('Prepare Method ({}) not found'.format(prepare_method_name)) + if prepare_method is None: + MSG = 'Prepare Method ({:s}) not found' + # pylint: disable=broad-exception-raised + raise Exception(MSG.format(prepare_method_name)) num_try, given_up = 0, False while not given_up: try: @@ -78,14 +86,29 @@ def retry(max_retries=0, delay_function=delay_linear(initial=0, increment=0), num_try += 1 given_up = num_try > max_retries - if given_up: raise Exception('Giving up... {:d} tries failed'.format(max_retries)) from e + if given_up: + MSG = '[{:s}:{:s}] Giving up... {:d} tries failed' + msg = MSG.format(func.__module__, func.__name__, max_retries) + # pylint: disable=broad-exception-raised + raise Exception(msg) from e if delay_function is not None: delay = delay_function(num_try) time.sleep(delay) - LOGGER.info('Retry {:d}/{:d} after {:f} seconds...'.format(num_try, max_retries, delay)) + MSG = '[{:s}:{:s}] Retry {:d}/{:d} after {:f} seconds...' + LOGGER.info(MSG.format( + func.__module__, func.__name__, num_try, max_retries, delay + )) else: - LOGGER.info('Retry {:d}/{:d} immediate...'.format(num_try, max_retries)) + MSG = '[{:s}:{:s}] Retry {:d}/{:d} immediate...' + LOGGER.info(MSG.format( + func.__module__, func.__name__, num_try, max_retries + )) - if prepare_method_name is not None: prepare_method(*prepare_method_args, **prepare_method_kwargs) + if prepare_method_name is not None: + MSG = '[{:s}:{:s}] Running prepare method...' + LOGGER.debug(MSG.format( + prepare_method.__module__, prepare_method.__name__ + )) + prepare_method(*prepare_method_args, **prepare_method_kwargs) return wrapper return _reconnect diff --git a/src/common/tools/client/__init__.py b/src/common/tools/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/client/__init__.py +++ b/src/common/tools/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/CheckType.py b/src/common/tools/context_queries/CheckType.py index 87d6142f4ef07b03a4d30fbc44d3f493807aa2ea..6eb67a09312ef0ee36ba574764aed53bdf4b17d7 100644 --- a/src/common/tools/context_queries/CheckType.py +++ b/src/common/tools/context_queries/CheckType.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/Connection.py b/src/common/tools/context_queries/Connection.py index 8edf15563b752313bb40ca480a1048d2449af693..9646e5a4bbf1b238be9d3412c9c3bbfff93a411a 100644 --- a/src/common/tools/context_queries/Connection.py +++ b/src/common/tools/context_queries/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/Context.py b/src/common/tools/context_queries/Context.py index ef8e17376e45c890aa34a39dab944beb9101d11f..818b28d70adaeb09032ead83d626e237edfe79be 100644 --- a/src/common/tools/context_queries/Context.py +++ b/src/common/tools/context_queries/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/Device.py b/src/common/tools/context_queries/Device.py index b5581a4e9eae2baf8e8533fbadd97f04fc421719..cdb1af073fdae940b676720eb58eabc8594c86e8 100644 --- a/src/common/tools/context_queries/Device.py +++ b/src/common/tools/context_queries/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/EndPoint.py b/src/common/tools/context_queries/EndPoint.py index 7a0ffe8ede8d9d29e5a1e27d08bd5f6cfdb8e818..5692d1ec78e5cf3cb5b6245a9319a9c44e10c001 100644 --- a/src/common/tools/context_queries/EndPoint.py +++ b/src/common/tools/context_queries/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/InterDomain.py b/src/common/tools/context_queries/InterDomain.py index 4e9f2caff20030ab32472697eedad4a99990fe31..128427577a179b10093f3120ca78abb5545e7f37 100644 --- a/src/common/tools/context_queries/InterDomain.py +++ b/src/common/tools/context_queries/InterDomain.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/InterDomain_old.py b/src/common/tools/context_queries/InterDomain_old.py index e541328143486598a1f5fb9da5772c1e0c14e7da..ef85a26ba86547574e05656298230274a48b3a0c 100644 --- a/src/common/tools/context_queries/InterDomain_old.py +++ b/src/common/tools/context_queries/InterDomain_old.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/Link.py b/src/common/tools/context_queries/Link.py index cc47371ab8fd1bdf6e2238aad42e1b89ca1982cc..60c924ad040ee914188b29226cb7efe22d32d0e3 100644 --- a/src/common/tools/context_queries/Link.py +++ b/src/common/tools/context_queries/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/OpticalConfig.py b/src/common/tools/context_queries/OpticalConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..00ccfa8a9046273d77f8b1ac628a231234420204 --- /dev/null +++ b/src/common/tools/context_queries/OpticalConfig.py @@ -0,0 +1,66 @@ +# Copyright 2022-2024 ETSI 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. + + +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from typing import Optional, Union +from uuid import UUID, uuid4, uuid5 + +# Generate a UUIDv5-like from the SHA-1 of "TFS" and no namespace to be used as the NAMESPACE for all +# the context UUIDs generated. For efficiency purposes, the UUID is hardcoded; however, it is produced +# using the following code: +# from hashlib import sha1 +# from uuid import UUID +# hash = sha1(bytes('TFS', 'utf-8')).digest() +# NAMESPACE_TFS = UUID(bytes=hash[:16], version=5) +NAMESPACE_TFS = UUID('200e3a1f-2223-534f-a100-758e29c37f40') + +def get_uuid_from_string(str_uuid_or_name : Union[str, UUID], prefix_for_name : Optional[str] = None) -> str: + # if UUID given, assume it is already a valid UUID + if isinstance(str_uuid_or_name, UUID): return str_uuid_or_name + if not isinstance(str_uuid_or_name, str): + MSG = 'Parameter({:s}) cannot be used to produce a UUID' + raise Exception(MSG.format(str(repr(str_uuid_or_name)))) + try: + # try to parse as UUID + return str(UUID(str_uuid_or_name)) + except: # pylint: disable=bare-except + # produce a UUID within TFS namespace from parameter + if prefix_for_name is not None: + str_uuid_or_name = '{:s}/{:s}'.format(prefix_for_name, str_uuid_or_name) + return str(uuid5(NAMESPACE_TFS, str_uuid_or_name)) + +def get_uuid_random() -> str: + # Generate random UUID. No need to use namespace since "namespace + random = random". + return str(uuid4()) + +def device_get_uuid (device_name) : + if (len(device_name)> 0): + return get_uuid_from_string(device_name) + raise InvalidArgumentsException([ + ('name', device_name), + ], extra_details=['Device Name is required to produce Device UUID']) + + +def opticalconfig_get_uuid( + device_name : str = '', allow_random : bool = False +) -> str: + if len(device_name) > 0: + device_uuid= device_get_uuid(device_name=device_name) + return get_uuid_from_string(f"{device_uuid}_opticalconfig") + if allow_random: return get_uuid_random() + + raise InvalidArgumentsException([ + ('name', device_name), + ], extra_details=['At least one is required to produce a OpticalConfig UUID']) diff --git a/src/common/tools/context_queries/Service.py b/src/common/tools/context_queries/Service.py index 1a43bdb3c832072327bf27fd5eb3676460dbd669..99184de6a513f926e9bc71ed24f00dbbcd0652df 100644 --- a/src/common/tools/context_queries/Service.py +++ b/src/common/tools/context_queries/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/Slice.py b/src/common/tools/context_queries/Slice.py index 4f69c3c17fe1e1b57bb1e4e43f9d08b1c1cf812d..c826c59ce79adbe1e399d674ffd46a421ddd9b5e 100644 --- a/src/common/tools/context_queries/Slice.py +++ b/src/common/tools/context_queries/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/Topology.py b/src/common/tools/context_queries/Topology.py index 350fc5467482898e2c08b53e0279c705fcd2835c..130da162469fc45f9c34e5ebb7e5c3c1413648df 100644 --- a/src/common/tools/context_queries/Topology.py +++ b/src/common/tools/context_queries/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/context_queries/__init__.py b/src/common/tools/context_queries/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/context_queries/__init__.py +++ b/src/common/tools/context_queries/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/database/GenericDatabase.py b/src/common/tools/database/GenericDatabase.py index 0cd41b9ef0c97263b56a5eda67b173f6ba61a997..2d3b48721609a1e1f1ed0d788e4ddb81b5cee855 100644 --- a/src/common/tools/database/GenericDatabase.py +++ b/src/common/tools/database/GenericDatabase.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/database/GenericEngine.py b/src/common/tools/database/GenericEngine.py index 18bb15360853524ed93606f3137972aa76aa850a..1d38a1f440af643c253d5d17bda8ca9e6c3fdc44 100644 --- a/src/common/tools/database/GenericEngine.py +++ b/src/common/tools/database/GenericEngine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/database/__init__.py b/src/common/tools/database/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/database/__init__.py +++ b/src/common/tools/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index 2fcc5b63a66ae3c3e96ab774d34958a110f0454a..4cdac3674b3b2e5598ddd65e25aa5cefc93306a9 100644 --- a/src/common/tools/descriptor/Loader.py +++ b/src/common/tools/descriptor/Loader.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -38,7 +38,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from common.proto.context_pb2 import ( Connection, Context, ContextId, Device, DeviceId, Empty, Link, LinkId, Service, ServiceId, Slice, SliceId, - Topology, TopologyId + Topology, TopologyId , OpticalLink ) from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient @@ -128,15 +128,16 @@ class DescriptorLoader: self.__num_workers = num_workers - self.__dummy_mode = self.__descriptors.get('dummy_mode' , False) - self.__contexts = self.__descriptors.get('contexts' , []) - self.__topologies = self.__descriptors.get('topologies' , []) - self.__devices = self.__descriptors.get('devices' , []) - self.__links = self.__descriptors.get('links' , []) - self.__services = self.__descriptors.get('services' , []) - self.__slices = self.__descriptors.get('slices' , []) - self.__ietf_slices = self.__descriptors.get('ietf-network-slice-service:network-slice-services', {}) - self.__connections = self.__descriptors.get('connections', []) + self.__dummy_mode = self.__descriptors.get('dummy_mode' , False) + self.__contexts = self.__descriptors.get('contexts' , []) + self.__topologies = self.__descriptors.get('topologies' , []) + self.__devices = self.__descriptors.get('devices' , []) + self.__links = self.__descriptors.get('links' , []) + self.__optical_links = self.__descriptors.get('optical_links',[]) + self.__services = self.__descriptors.get('services' , []) + self.__slices = self.__descriptors.get('slices' , []) + self.__ietf_slices = self.__descriptors.get('ietf-network-slice-service:network-slice-services', {}) + self.__connections = self.__descriptors.get('connections', []) if len(self.__ietf_slices) > 0: for slice_service in self.__ietf_slices["slice-service"]: @@ -248,6 +249,12 @@ class DescriptorLoader: @property def num_links(self) -> int: return len(self.__links) + @property + def optical_links(self) -> List[Dict]: return self.__optical_links + + @property + def num_optical_links(self) -> int: return len(self.__optical_links) + @property def services(self) -> Dict[str, List[Dict]]: _services = {} @@ -310,14 +317,15 @@ class DescriptorLoader: controllers, network_devices = split_controllers_and_network_devices(self.__devices) self.__ctx_cli.connect() - self._process_descr('context', 'add', self.__ctx_cli.SetContext, Context, self.__contexts_add ) - self._process_descr('topology', 'add', self.__ctx_cli.SetTopology, Topology, self.__topologies_add) - self._process_descr('controller', 'add', self.__ctx_cli.SetDevice, Device, controllers ) - self._process_descr('device', 'add', self.__ctx_cli.SetDevice, Device, network_devices ) - self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) - self._process_descr('service', 'add', self.__ctx_cli.SetService, Service, self.__services ) - self._process_descr('slice', 'add', self.__ctx_cli.SetSlice, Slice, self.__slices ) - self._process_descr('connection', 'add', self.__ctx_cli.SetConnection, Connection, self.__connections ) + self._process_descr('context', 'add', self.__ctx_cli.SetContext, Context, self.__contexts_add ) + self._process_descr('topology', 'add', self.__ctx_cli.SetTopology, Topology, self.__topologies_add) + self._process_descr('controller', 'add', self.__ctx_cli.SetDevice, Device, controllers ) + self._process_descr('device', 'add', self.__ctx_cli.SetDevice, Device, network_devices ) + self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) + self._process_descr('link', 'add', self.__ctx_cli.SetOpticalLink, OpticalLink, self.__optical_links ) + self._process_descr('service', 'add', self.__ctx_cli.SetService, Service, self.__services ) + self._process_descr('slice', 'add', self.__ctx_cli.SetSlice, Slice, self.__slices ) + self._process_descr('connection', 'add', self.__ctx_cli.SetConnection, Connection, self.__connections ) # By default the Context component automatically assigns devices and links to topologies based on their # endpoints, and assigns topologies, services, and slices to contexts based on their identifiers. @@ -348,16 +356,17 @@ class DescriptorLoader: self.__svc_cli.connect() self.__slc_cli.connect() - self._process_descr('context', 'add', self.__ctx_cli.SetContext, Context, self.__contexts_add ) - self._process_descr('topology', 'add', self.__ctx_cli.SetTopology, Topology, self.__topologies_add) - self._process_descr('controller', 'add', self.__dev_cli.AddDevice, Device, controllers_add ) - self._process_descr('device', 'add', self.__dev_cli.AddDevice, Device, network_devices_add ) - self._process_descr('device', 'config', self.__dev_cli.ConfigureDevice, Device, self.__devices_config) - self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) - self._process_descr('service', 'add', self.__svc_cli.CreateService, Service, self.__services_add ) - self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) - self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) - self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) + self._process_descr('context', 'add', self.__ctx_cli.SetContext, Context, self.__contexts_add ) + self._process_descr('topology', 'add', self.__ctx_cli.SetTopology, Topology, self.__topologies_add) + self._process_descr('controller', 'add', self.__dev_cli.AddDevice, Device, controllers_add ) + self._process_descr('device', 'add', self.__dev_cli.AddDevice, Device, network_devices_add ) + self._process_descr('device', 'config', self.__dev_cli.ConfigureDevice, Device, self.__devices_config) + self._process_descr('link', 'add', self.__ctx_cli.SetLink, Link, self.__links ) + self._process_descr('link', 'add', self.__ctx_cli.SetOpticalLink, OpticalLink, self.__optical_links ) + self._process_descr('service', 'add', self.__svc_cli.CreateService, Service, self.__services_add ) + self._process_descr('service', 'update', self.__svc_cli.UpdateService, Service, self.__services ) + self._process_descr('slice', 'add', self.__slc_cli.CreateSlice, Slice, self.__slices_add ) + self._process_descr('slice', 'update', self.__slc_cli.UpdateSlice, Slice, self.__slices ) # By default the Context component automatically assigns devices and links to topologies based on their # endpoints, and assigns topologies, services, and slices to contexts based on their identifiers. @@ -415,6 +424,9 @@ class DescriptorLoader: response = self.__ctx_cli.ListLinks(Empty()) assert len(response.links) == self.num_links + response = self.__ctx_cli.GetOpticalLinkList(Empty()) + assert len(response.optical_links) == self.num_optical_links + for context_uuid, num_services in self.num_services.items(): response = self.__ctx_cli.ListServices(ContextId(**json_context_id(context_uuid))) assert len(response.services) == num_services @@ -435,6 +447,9 @@ class DescriptorLoader: for service in service_list: self.__ctx_cli.RemoveService(ServiceId(**service['service_id'])) + for optical_link in self.optical_links: + self.__ctx_cli.DeleteOpticalLink(LinkId(**optical_link['link_id'])) + for link in self.links: self.__ctx_cli.RemoveLink(LinkId(**link['link_id'])) @@ -465,6 +480,9 @@ class DescriptorLoader: for service in service_list: self.__svc_cli.DeleteService(ServiceId(**service['service_id'])) + for optical_link in self.optical_links: + self.__ctx_cli.DeleteOpticalLink(LinkId(**optical_link['link_id'])) + for link in self.links: self.__ctx_cli.RemoveLink(LinkId(**link['link_id'])) @@ -519,3 +537,6 @@ def validate_empty_scenario(context_client : ContextClient) -> None: response = context_client.ListLinks(Empty()) assert len(response.links) == 0 + + response = context_client.GetOpticalLinkList(Empty()) + assert len(response.optical_links) == 0 diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index 531544313f5a2644472b76ffeb5c85b2f49e6a7f..c8807cef0d1357c732d34b11580d1f73e157501a 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/descriptor/__init__.py b/src/common/tools/descriptor/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/descriptor/__init__.py +++ b/src/common/tools/descriptor/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/descriptor/old/BuildDescriptors.py b/src/common/tools/descriptor/old/BuildDescriptors.py index cfd29eea0cb80306f402ef71530016599b570eb1..c0f01ee7537e88883704e3af36f6c51b672a607e 100644 --- a/src/common/tools/descriptor/old/BuildDescriptors.py +++ b/src/common/tools/descriptor/old/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/descriptor/old/LoadDescriptors.py b/src/common/tools/descriptor/old/LoadDescriptors.py index 39e45faed0b92a3fac41b2d17d03efac1babd4b0..a94cad49616081e68b7de02853788e5a17008630 100644 --- a/src/common/tools/descriptor/old/LoadDescriptors.py +++ b/src/common/tools/descriptor/old/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/BaseEventCollector.py b/src/common/tools/grpc/BaseEventCollector.py index 04dfb654963da1ae4f83a8a14feaaa8c17d1f128..3b6bf598c2c61ed33d6b94615356316a6949f7cf 100644 --- a/src/common/tools/grpc/BaseEventCollector.py +++ b/src/common/tools/grpc/BaseEventCollector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/BaseEventDispatcher.py b/src/common/tools/grpc/BaseEventDispatcher.py index c9ec292c994bb4728043bf3bfed73e176f4f748a..1ee1bad98807f6122c796dbeffc836c36f2e4619 100644 --- a/src/common/tools/grpc/BaseEventDispatcher.py +++ b/src/common/tools/grpc/BaseEventDispatcher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/ConfigRules.py b/src/common/tools/grpc/ConfigRules.py index b29744e02b096e8cfc2ebc8156c6079a1a0882ea..c8919273e65c6f6edb0f3e0ca6f060a5471e8f0e 100644 --- a/src/common/tools/grpc/ConfigRules.py +++ b/src/common/tools/grpc/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/Constraints.py b/src/common/tools/grpc/Constraints.py index 009ca7f9665446626c9a333341296e403d164f2f..b650662191cacf24a0d939fe4ff9445c07469e8d 100644 --- a/src/common/tools/grpc/Constraints.py +++ b/src/common/tools/grpc/Constraints.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/EndPointIds.py b/src/common/tools/grpc/EndPointIds.py index 24bee3f844cb1cca02cc2633e2c5b2301274d196..00db62aec2620f1b59a383c6e697e52e1c2a3f8c 100644 --- a/src/common/tools/grpc/EndPointIds.py +++ b/src/common/tools/grpc/EndPointIds.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/ExampleEventEngine.py b/src/common/tools/grpc/ExampleEventEngine.py index f27792497db09467c0225f07d036adc8c5b5ed84..63157ac240227b9f4c6097acd3fcde19214a3353 100644 --- a/src/common/tools/grpc/ExampleEventEngine.py +++ b/src/common/tools/grpc/ExampleEventEngine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/ServiceIds.py b/src/common/tools/grpc/ServiceIds.py index b1718a4e7b8d19c33df757cf348a8b9e6e391679..2d7ca3edbd0fff8ee32f9583a5fb9d1f3b9b8f84 100644 --- a/src/common/tools/grpc/ServiceIds.py +++ b/src/common/tools/grpc/ServiceIds.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/Tools.py b/src/common/tools/grpc/Tools.py index 02a23012ff45e1edcea77d65acd0a237a96f85f7..f0d0a9ea8bb1b7e6c50ffdabf9961216001ad9e1 100644 --- a/src/common/tools/grpc/Tools.py +++ b/src/common/tools/grpc/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/grpc/__init__.py b/src/common/tools/grpc/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/grpc/__init__.py +++ b/src/common/tools/grpc/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 9a1aec2738c02c00fd8dfab50ef88c02d2d1db8d..5c7501b6c07e6aaa26569e2817fca374e6b0c12e 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/mutex_queues/MutexQueues.py b/src/common/tools/mutex_queues/MutexQueues.py index 7f0ce386aedef76c984e2362a4a65cd0c0582683..ac8a04dfd197de587aa08a795e57ffe79ec19b86 100644 --- a/src/common/tools/mutex_queues/MutexQueues.py +++ b/src/common/tools/mutex_queues/MutexQueues.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/mutex_queues/__init__.py b/src/common/tools/mutex_queues/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/mutex_queues/__init__.py +++ b/src/common/tools/mutex_queues/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/ConfigRule.py b/src/common/tools/object_factory/ConfigRule.py index e098f0de3f445177145289927bf413eac3ccb212..9ba7066bd9f53963d715b2d34cc58227ddee0b05 100644 --- a/src/common/tools/object_factory/ConfigRule.py +++ b/src/common/tools/object_factory/ConfigRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Connection.py b/src/common/tools/object_factory/Connection.py index 4d05625213130bc3e9ee859cdca326826749ef08..958b508b30647a751217db00246d42594bea41a2 100644 --- a/src/common/tools/object_factory/Connection.py +++ b/src/common/tools/object_factory/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Constraint.py b/src/common/tools/object_factory/Constraint.py index aa454ccece248d048a7494104d07516552c491a0..dd7ed93070fb7153683b5064460f3f46373abc99 100644 --- a/src/common/tools/object_factory/Constraint.py +++ b/src/common/tools/object_factory/Constraint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Context.py b/src/common/tools/object_factory/Context.py index f93484ce59e329757b169a71af01404671682960..42129e231676a51470ac66c10791bf1f2e77aaed 100644 --- a/src/common/tools/object_factory/Context.py +++ b/src/common/tools/object_factory/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Device.py b/src/common/tools/object_factory/Device.py index f37141239afa6f9f440e38d0bcee5efed861fdba..61393a7e7b9a16a21ef332880374702ca6125edd 100644 --- a/src/common/tools/object_factory/Device.py +++ b/src/common/tools/object_factory/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/EndPoint.py b/src/common/tools/object_factory/EndPoint.py index 85a5d4494184567447d6d16fa7df2c530106c6ba..892e9ea4d838d705b11d8431a732dc8ae68270b4 100644 --- a/src/common/tools/object_factory/EndPoint.py +++ b/src/common/tools/object_factory/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -43,13 +43,14 @@ def json_endpoint_ids( def json_endpoint( device_id : Dict, endpoint_uuid : str, endpoint_type : str, topology_id : Optional[Dict] = None, - kpi_sample_types : List[int] = [], location : Optional[Dict] = None + name : Optional[str] = None, kpi_sample_types : List[int] = [], location : Optional[Dict] = None ): result = { 'endpoint_id': json_endpoint_id(device_id, endpoint_uuid, topology_id=topology_id), 'endpoint_type': endpoint_type, } + if name is not None: result['name'] = name if kpi_sample_types is not None and len(kpi_sample_types) > 0: result['kpi_sample_types'] = copy.deepcopy(kpi_sample_types) if location is not None: diff --git a/src/common/tools/object_factory/Link.py b/src/common/tools/object_factory/Link.py index 5865582466f5e61e4d955fd08b28063aeb0051a3..358a30b96c5080b74237526238df43ea2675c551 100644 --- a/src/common/tools/object_factory/Link.py +++ b/src/common/tools/object_factory/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Location.py b/src/common/tools/object_factory/Location.py index 05aa6ed334807e3e7f39422a41c86621dae1dbb5..d1d99edccfd2f858efec2cbe3f53a05c9902ab33 100644 --- a/src/common/tools/object_factory/Location.py +++ b/src/common/tools/object_factory/Location.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/OpticalLink.py b/src/common/tools/object_factory/OpticalLink.py new file mode 100644 index 0000000000000000000000000000000000000000..f878f22f26c8ded2c9e776b3cc21cf0311d63bed --- /dev/null +++ b/src/common/tools/object_factory/OpticalLink.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI 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. + +import copy + +def convert_to_dict(single_val:int)->dict: + slot= dict() + bin_num = bin(single_val) + sliced_num=bin_num[2:] + for i in range(len(sliced_num)): + slot[str(i+1)]=int(sliced_num[i]) + return slot + +def correct_slot(dic: dict) -> dict: + _dict = copy.deepcopy(dic) + keys_list = list(_dict.keys()) + if len(keys_list) < 20: + num_keys = [int(i) for i in keys_list] + if num_keys[-1] != 20: + missed_keys = [] + diff = 20 - len(num_keys) + #print(f"diff {diff}") + for i in range(diff+1): + missed_keys.append(num_keys[-1]+i) + #print(f"missed_keys {missed_keys}") + for key in missed_keys : + _dict[key]=1 + #print(f"result {_dict}") + return _dict diff --git a/src/common/tools/object_factory/PolicyRule.py b/src/common/tools/object_factory/PolicyRule.py index 64feacd4fa6055e571dea7c3f2f5f1aad5e50445..ce217141111fc3a9ffc7b26aab9bc0cdc2230026 100644 --- a/src/common/tools/object_factory/PolicyRule.py +++ b/src/common/tools/object_factory/PolicyRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/QKDApp.py b/src/common/tools/object_factory/QKDApp.py index 936a0f228302469ec51321623f8d8050f3daced0..f6477218ad03cc3970d4436489b9580df1217c8d 100644 --- a/src/common/tools/object_factory/QKDApp.py +++ b/src/common/tools/object_factory/QKDApp.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index b05821c7814ce250abca1819b111376af7c0430f..ab399adbe734adeb55f60c804aea0e4877072316 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Slice.py b/src/common/tools/object_factory/Slice.py index 1e1a96cc973cfe19f0293b7e5715c819c1ed38ca..afedabceb6a388811b403e1592e4cd01e213b61a 100644 --- a/src/common/tools/object_factory/Slice.py +++ b/src/common/tools/object_factory/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/Topology.py b/src/common/tools/object_factory/Topology.py index 55609024a5bedf21f0720feeeccb6237f1a297af..80264788abec407b98f77b9351e3bb56d819c4c8 100644 --- a/src/common/tools/object_factory/Topology.py +++ b/src/common/tools/object_factory/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/object_factory/__init__.py b/src/common/tools/object_factory/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/object_factory/__init__.py +++ b/src/common/tools/object_factory/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/service/GenericGrpcService.py b/src/common/tools/service/GenericGrpcService.py index 9a44721278fb6b18f37053eea79c20e8299bbaea..453309127ccf49272d004740c1e3be52cba26779 100644 --- a/src/common/tools/service/GenericGrpcService.py +++ b/src/common/tools/service/GenericGrpcService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,18 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional, Union import grpc, logging from concurrent import futures +from typing import Any, List, Optional, Union from grpc_health.v1.health import HealthServicer, OVERALL_HEALTH from grpc_health.v1.health_pb2 import HealthCheckResponse from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server +from grpc_reflection.v1alpha import reflection from common.Settings import get_grpc_bind_address, get_grpc_grace_period, get_grpc_max_workers class GenericGrpcService: def __init__( - self, bind_port : Union[str, int], bind_address : Optional[str] = None, max_workers : Optional[int] = None, - grace_period : Optional[int] = None, enable_health_servicer : bool = True, cls_name : str = __name__ + self, bind_port : Union[str, int], bind_address : Optional[str] = None, + max_workers : Optional[int] = None, grace_period : Optional[int] = None, + enable_health_servicer : bool = True, enable_reflection : bool = True, + cls_name : str = __name__ ) -> None: self.logger = logging.getLogger(cls_name) self.bind_port = bind_port @@ -31,6 +34,8 @@ class GenericGrpcService: self.max_workers = get_grpc_max_workers() if max_workers is None else max_workers self.grace_period = get_grpc_grace_period() if grace_period is None else grace_period self.enable_health_servicer = enable_health_servicer + self.enable_reflection = enable_reflection + self.reflection_service_names : List[str] = [reflection.SERVICE_NAME] self.endpoint = None self.health_servicer = None self.pool = None @@ -39,6 +44,11 @@ class GenericGrpcService: def install_servicers(self): pass + def add_reflection_service_name(self, service_descriptor : Any, service_name : str): + self.reflection_service_names.append( + service_descriptor.services_by_name[service_name].full_name + ) + def start(self): self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Starting Service (tentative endpoint: {:s}, max_workers: {:s})...'.format( @@ -54,6 +64,9 @@ class GenericGrpcService: experimental_non_blocking=True, experimental_thread_pool=futures.ThreadPoolExecutor(max_workers=1)) add_HealthServicer_to_server(self.health_servicer, self.server) + if self.enable_reflection: + reflection.enable_server_reflection(self.reflection_service_names, self.server) + self.bind_port = self.server.add_insecure_port(self.endpoint) self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Listening on {:s}...'.format(str(self.endpoint))) diff --git a/src/common/tools/service/GenericGrpcServiceAsync.py b/src/common/tools/service/GenericGrpcServiceAsync.py index 488d861777ee7200fc4331449f21dded6b2f6dac..551a3d568612f59c2bc26f692ab8d1d27dc4f4b3 100644 --- a/src/common/tools/service/GenericGrpcServiceAsync.py +++ b/src/common/tools/service/GenericGrpcServiceAsync.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,19 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional, Union -import grpc -import logging +import grpc, logging from concurrent import futures +from typing import Any, List, Optional, Union from grpc_health.v1.health import HealthServicer, OVERALL_HEALTH from grpc_health.v1.health_pb2 import HealthCheckResponse from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server +from grpc_reflection.v1alpha import reflection from common.Settings import get_grpc_bind_address, get_grpc_grace_period, get_grpc_max_workers class GenericGrpcServiceAsync: def __init__( - self, bind_port: Union[str, int], bind_address: Optional[str] = None, max_workers: Optional[int] = None, - grace_period: Optional[int] = None, enable_health_servicer: bool = True, cls_name: str = __name__ + self, bind_port : Union[str, int], bind_address : Optional[str] = None, + max_workers : Optional[int] = None, grace_period : Optional[int] = None, + enable_health_servicer : bool = True, enable_reflection : bool = True, + cls_name : str = __name__ ) -> None: self.logger = logging.getLogger(cls_name) self.bind_port = bind_port @@ -32,6 +34,8 @@ class GenericGrpcServiceAsync: self.max_workers = get_grpc_max_workers() if max_workers is None else max_workers self.grace_period = get_grpc_grace_period() if grace_period is None else grace_period self.enable_health_servicer = enable_health_servicer + self.enable_reflection = enable_reflection + self.reflection_service_names : List[str] = [reflection.SERVICE_NAME] self.endpoint = None self.health_servicer = None self.pool = None @@ -40,7 +44,12 @@ class GenericGrpcServiceAsync: async def install_servicers(self): pass - async def start(self): + def add_reflection_service_name(self, service_descriptor : Any, service_name : str): + self.reflection_service_names.append( + service_descriptor.services_by_name[service_name].full_name + ) + + def start(self): self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Starting Service (tentative endpoint: {:s}, max_workers: {:s})...'.format( str(self.endpoint), str(self.max_workers))) @@ -55,6 +64,9 @@ class GenericGrpcServiceAsync: experimental_non_blocking=True, experimental_thread_pool=futures.ThreadPoolExecutor(max_workers=1)) add_HealthServicer_to_server(self.health_servicer, self.server) + if self.enable_reflection: + reflection.enable_server_reflection(self.reflection_service_names, self.server) + self.bind_port = self.server.add_insecure_port(self.endpoint) self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) self.logger.info('Listening on {:s}...'.format(str(self.endpoint))) diff --git a/src/common/tools/service/GenericRestServer.py b/src/common/tools/service/GenericRestServer.py index 5dd2c1677a7a41ca2244ab38e1c84c1dd637d4d1..8ae381f163c8417c0058de5e101a03b5cb0d5de8 100644 --- a/src/common/tools/service/GenericRestServer.py +++ b/src/common/tools/service/GenericRestServer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/service/__init__.py b/src/common/tools/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/service/__init__.py +++ b/src/common/tools/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/timestamp/Converters.py b/src/common/tools/timestamp/Converters.py index eea5172cc22e051b283fa41ef745c8bf2c1daf9a..97b0382bcc11416b72ba5fc175669d5e55cdac1b 100644 --- a/src/common/tools/timestamp/Converters.py +++ b/src/common/tools/timestamp/Converters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/tools/timestamp/__init__.py b/src/common/tools/timestamp/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/tools/timestamp/__init__.py +++ b/src/common/tools/timestamp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/type_checkers/Assertions.py b/src/common/type_checkers/Assertions.py index 3934c9d89568be90129bb766c61b55a532d2f0b3..70f5c4220252a3515eab017c1c332af99b082813 100644 --- a/src/common/type_checkers/Assertions.py +++ b/src/common/type_checkers/Assertions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -451,7 +451,7 @@ def validate_slice(message): def validate_topology(message, num_devices=None, num_links=None): assert isinstance(message, dict) - assert len(message.keys()) == 4 + assert len(message.keys()) == 5 assert 'topology_id' in message validate_topology_id(message['topology_id']) assert 'name' in message @@ -464,6 +464,10 @@ def validate_topology(message, num_devices=None, num_links=None): assert isinstance(message['link_ids'], list) if num_links is not None: assert len(message['link_ids']) == num_links for link_id in message['link_ids']: validate_link_id(link_id) + assert 'optical_link_ids' in message + assert isinstance(message['optical_link_ids'], list) + #if num_links is not None: assert len(message['optical_link_ids']) == num_links + for link_id in message['optical_link_ids']: validate_link_id(link_id) def validate_endpoint(message): assert isinstance(message, dict) diff --git a/src/common/type_checkers/Checkers.py b/src/common/type_checkers/Checkers.py index 2ea6bdb3cc53ff8c49d7244e1a7ef7b60d925481..e1bbe3f06b75d0a1bfc5873019776b1517f50192 100644 --- a/src/common/type_checkers/Checkers.py +++ b/src/common/type_checkers/Checkers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/common/type_checkers/__init__.py b/src/common/type_checkers/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/common/type_checkers/__init__.py +++ b/src/common/type_checkers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/.gitlab-ci.yml b/src/context/.gitlab-ci.yml index f0558a2d22e0baf70768227b7728d4ff4ca23060..46f1d331d6acb59f016a83578289a39224e75563 100644 --- a/src/context/.gitlab-ci.yml +++ b/src/context/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/Config.py b/src/context/Config.py index cf5cb4c6b21012d17fef849d3563d7493fdecfa9..40f8e80a881ed165bea0a971538969d7cc0a6f8a 100644 --- a/src/context/Config.py +++ b/src/context/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/Dockerfile b/src/context/Dockerfile index b5c3cdb860c3a8a51b890ef201d2d14c4abda6a3..10986e1a152b9b515c0d9dda3d7dde7a3c683d35 100644 --- a/src/context/Dockerfile +++ b/src/context/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/__init__.py b/src/context/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/context/__init__.py +++ b/src/context/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/client/ContextClient.py b/src/context/client/ContextClient.py index 2776a0d294e9a9ee7b00e46bfd3fbb068133741f..b8eed67aa8ceee4e043aa0c654b6287cb2ebbf10 100644 --- a/src/context/client/ContextClient.py +++ b/src/context/client/ContextClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -24,10 +24,10 @@ from common.proto.context_pb2 import ( Device, DeviceEvent, DeviceFilter, DeviceId, DeviceIdList, DeviceList, Empty, EndPointIdList, EndPointNameList, Link, LinkEvent, LinkId, LinkIdList, LinkList, - Service, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList, + OpticalConfig, OpticalConfigId, OpticalConfigList , OpticalLink, OpticalLinkList, + Service, ServiceConfigRule, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList, Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList, Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList, - OpticalConfig, OpticalConfigId, OpticalConfigList ) from common.proto.context_pb2_grpc import ContextServiceStub from common.proto.context_policy_pb2_grpc import ContextPolicyServiceStub @@ -447,6 +447,14 @@ class ContextClient: response = self.stub.SetOpticalConfig(request) LOGGER.debug('SetOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) return response + + @RETRY_DECORATOR + def UpdateOpticalConfig(self, request : OpticalConfig) -> OpticalConfigId: + LOGGER.debug('SetOpticalConfig request: {:s}'.format(grpc_message_to_json_string(request))) + response_future = self.stub.UpdateOpticalConfig.future(request) + response = response_future.result() + LOGGER.debug('SetOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) + return response @RETRY_DECORATOR def GetOpticalConfig(self, request : Empty) -> OpticalConfigList: @@ -461,3 +469,55 @@ class ContextClient: response = self.stub.SelectOpticalConfig(request) LOGGER.debug('SelectOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) return response + + @RETRY_DECORATOR + def DeleteOpticalConfig(self,request : OpticalConfigId) -> Empty: + LOGGER.debug('DeleteOpticalConfig request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.DeleteOpticalConfig(request) + LOGGER.debug('DeleteOpticalConfig result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def DeleteOpticalChannel(self,request : OpticalConfig) -> Empty: + LOGGER.debug('DeleteOpticalChannel request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.DeleteOpticalChannel(request) + LOGGER.debug('DeleteOpticalChannel result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + #--------------------------- Optical Link ------------------------ + def GetOpticalLinkList(self, request: Empty) -> OpticalLinkList: + LOGGER.debug('ListOpticalLinks request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetOpticalLinkList(request) + LOGGER.debug('ListOpticalLinks result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetOpticalLink(self, request: LinkId) -> OpticalLink: + LOGGER.debug('GetOpticalLink request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetOpticalLink(request) + LOGGER.debug('GetOpticalLink result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def SetOpticalLink(self, request: OpticalLink) -> LinkId: + LOGGER.debug('SetOpticalLink request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.SetOpticalLink(request) + LOGGER.debug('SetOpticalLink result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def DeleteOpticalLink(self, request: LinkId) -> Empty: + LOGGER.debug('RemoveOpticalLink request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.DeleteOpticalLink(request) + LOGGER.debug('RemoveOpticalLink result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + + # --------------------------------- Service ConfigRule Deletion ------------------ + + @RETRY_DECORATOR + def DeleteServiceConfigRule(self, request: ServiceConfigRule) -> Empty: + LOGGER.debug('ServiceConfigRule Delete request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.DeleteServiceConfigRule(request) + LOGGER.debug('ServiceConfigRule Delete result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/context/client/EventsCollector.py b/src/context/client/EventsCollector.py index 9fb2fbd6901b6e91edad20bad316412f1ba1d6a7..5d18597ab9b7fc41846bf0abc937607ab53e1bf4 100644 --- a/src/context/client/EventsCollector.py +++ b/src/context/client/EventsCollector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/client/__init__.py b/src/context/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/context/client/__init__.py +++ b/src/context/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/data/cleanup_commands.sql b/src/context/data/cleanup_commands.sql index 506db2f34abdb71f55b56a5f2ff95c9fcde31eae..5f02b9b6f227b9c51fbb5687266f40b79df09c15 100644 --- a/src/context/data/cleanup_commands.sql +++ b/src/context/data/cleanup_commands.sql @@ -1,4 +1,4 @@ --- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +-- Copyright 2022-2024 ETSI 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. diff --git a/src/context/data/sql_hash_join_full_scan_tests.sql b/src/context/data/sql_hash_join_full_scan_tests.sql index 29ac593e2e7ba6df50ad0d94f40dd8da07db2e8f..c882d6d552060b1b165aa7f036b3d37bb90baca9 100644 --- a/src/context/data/sql_hash_join_full_scan_tests.sql +++ b/src/context/data/sql_hash_join_full_scan_tests.sql @@ -1,4 +1,4 @@ --- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +-- Copyright 2022-2024 ETSI 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. diff --git a/src/context/requirements.in b/src/context/requirements.in index 3800c30c75a05cdb0b681f646621331653225118..995485d55b79ce7550bba127e33eeb0a2bc33c74 100644 --- a/src/context/requirements.in +++ b/src/context/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/ContextService.py b/src/context/service/ContextService.py index 0f77288ef70e2e20e50136a73f44a533a3820d61..d633dea15a1e00316c9e8eac9d31ca69829f180f 100644 --- a/src/context/service/ContextService.py +++ b/src/context/service/ContextService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,7 +16,9 @@ import logging, sqlalchemy from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from common.message_broker.MessageBroker import MessageBroker +from common.proto.context_pb2 import DESCRIPTOR as CONTEXT_DESCRIPTOR from common.proto.context_pb2_grpc import add_ContextServiceServicer_to_server +from common.proto.context_policy_pb2 import DESCRIPTOR as CONTEXT_POLICY_DESCRIPTOR from common.proto.context_policy_pb2_grpc import add_ContextPolicyServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .ContextServiceServicerImpl import ContextServiceServicerImpl @@ -36,3 +38,6 @@ class ContextService(GenericGrpcService): def install_servicers(self): add_ContextServiceServicer_to_server(self.context_servicer, self.server) add_ContextPolicyServiceServicer_to_server(self.context_servicer, self.server) + + self.add_reflection_service_name(CONTEXT_DESCRIPTOR, 'ContextService') + self.add_reflection_service_name(CONTEXT_POLICY_DESCRIPTOR, 'ContextPolicyService') diff --git a/src/context/service/ContextServiceServicerImpl.py b/src/context/service/ContextServiceServicerImpl.py index be32372108e059625801d14c660d18cbe0df677f..fa6b6a34f1cb3d4be8b61859e98a33b92b884bff 100644 --- a/src/context/service/ContextServiceServicerImpl.py +++ b/src/context/service/ContextServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -24,29 +24,51 @@ from common.proto.context_pb2 import ( Service, ServiceEvent, ServiceFilter, ServiceId, ServiceIdList, ServiceList, Slice, SliceEvent, SliceFilter, SliceId, SliceIdList, SliceList, Topology, TopologyDetails, TopologyEvent, TopologyId, TopologyIdList, TopologyList, - OpticalConfigList, OpticalConfigId, OpticalConfig + OpticalConfigList, OpticalConfigId, OpticalConfig, OpticalLink, OpticalLinkList, + ServiceConfigRule ) from common.proto.policy_pb2 import PolicyRuleIdList, PolicyRuleId, PolicyRuleList, PolicyRule from common.proto.context_pb2_grpc import ContextServiceServicer from common.proto.context_policy_pb2_grpc import ContextPolicyServiceServicer from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from .database.Connection import ( - connection_delete, connection_get, connection_list_ids, connection_list_objs, connection_set) -from .database.Context import context_delete, context_get, context_list_ids, context_list_objs, context_set -from .database.Device import device_delete, device_get, device_list_ids, device_list_objs, device_select, device_set + connection_delete, connection_get, connection_list_ids, connection_list_objs, connection_set +) +from .database.Context import ( + context_delete, context_get, context_list_ids, context_list_objs, context_set +) +from .database.Device import ( + device_delete, device_get, device_list_ids, device_list_objs, device_select, device_set +) from .database.EndPoint import endpoint_list_names from .database.Events import EventTopicEnum, consume_events -from .database.Link import link_delete, link_get, link_list_ids, link_list_objs, link_set +from .database.Link import ( + link_delete, link_get, link_list_ids, link_list_objs, link_set +) from .database.PolicyRule import ( - policyrule_delete, policyrule_get, policyrule_list_ids, policyrule_list_objs, policyrule_set) + policyrule_delete, policyrule_get, policyrule_list_ids, policyrule_list_objs, + policyrule_set +) from .database.Service import ( - service_delete, service_get, service_list_ids, service_list_objs, service_select, service_set, service_unset) + service_delete, service_get, service_list_ids, service_list_objs, service_select, + service_set, service_unset +) from .database.Slice import ( - slice_delete, slice_get, slice_list_ids, slice_list_objs, slice_select, slice_set, slice_unset) + slice_delete, slice_get, slice_list_ids, slice_list_objs, slice_select, + slice_set, slice_unset +) from .database.Topology import ( - topology_delete, topology_get, topology_get_details, topology_list_ids, topology_list_objs, topology_set) -from .database.OpticalConfig import set_opticalconfig, select_opticalconfig, get_opticalconfig - + topology_delete, topology_get, topology_get_details, topology_list_ids, + topology_list_objs, topology_set +) +from .database.OpticalConfig import ( + set_opticalconfig, select_opticalconfig, get_opticalconfig, delete_opticalconfig, + update_opticalconfig, delete_opticalchannel +) +from .database.OpticalLink import ( + optical_link_delete, optical_link_get, optical_link_list_objs, optical_link_set +) +from .database.ConfigRule import delete_config_rule LOGGER = logging.getLogger(__name__) METRICS_POOL = MetricsPool('Context', 'RPC') @@ -312,7 +334,48 @@ class ContextServiceServicerImpl(ContextServiceServicer, ContextPolicyServiceSer result = set_opticalconfig(self.db_engine, request) return OpticalConfigId(**result) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def UpdateOpticalConfig(self, request : OpticalConfig, context : grpc.ServicerContext) -> OpticalConfigId: + result = update_opticalconfig(self.db_engine, request) + return OpticalConfigId(**result) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def SelectOpticalConfig(self, request : OpticalConfigId, context : grpc.ServicerContext) -> OpticalConfig: result = select_opticalconfig(self.db_engine, request) - return OpticalConfig(config=result.config, opticalconfig_id=result.opticalconfig_id) + optical_config_id = OpticalConfigId() + device_id = DeviceId() + optical_config_id.CopyFrom(result.opticalconfig_id) + device_id.CopyFrom(result.device_id) + return OpticalConfig(config=result.config, opticalconfig_id=optical_config_id , device_id=device_id) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DeleteOpticalConfig(self, request : OpticalConfigId, context : grpc.ServicerContext) -> Empty: + delete_opticalconfig(self.db_engine, self.messagebroker, request) + return Empty() + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DeleteOpticalChannel(self, request : OpticalConfig, context : grpc.ServicerContext) -> Empty: + delete_opticalchannel(self.db_engine, self.messagebroker, request) + return Empty() + + #--------------------- Experimental Optical Link ------------------- + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetOpticalLinkList(self, request : Empty, context : grpc.ServicerContext) -> OpticalLinkList: + return optical_link_list_objs(self.db_engine) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetOpticalLink(self, request : LinkId, context : grpc.ServicerContext) -> OpticalLink: + return optical_link_get(self.db_engine, request) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def SetOpticalLink(self, request : Link, context : grpc.ServicerContext) -> LinkId: + return optical_link_set(self.db_engine, self.messagebroker, request) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DeleteOpticalLink(self, request : LinkId, context : grpc.ServicerContext) -> Empty: + return optical_link_delete(self.db_engine, self.messagebroker, request) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DeleteServiceConfigRule(self, request : ServiceConfigRule, context : grpc.ServicerContext) -> Empty: + return delete_config_rule(self.db_engine, request) diff --git a/src/context/service/__init__.py b/src/context/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/context/service/__init__.py +++ b/src/context/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/__main__.py b/src/context/service/__main__.py index 21d0bf26e6cc5d5ff3328550e0852f4237b18264..f3f96565429868aba5dae9e8c6d47304887ae931 100644 --- a/src/context/service/__main__.py +++ b/src/context/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/Component.py b/src/context/service/database/Component.py index f165a83d060114ce9915d07c8c4fc5be2b5ff881..fde7bf777d2722fb4c432995ff61110fe4b80e66 100644 --- a/src/context/service/database/Component.py +++ b/src/context/service/database/Component.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/ConfigRule.py b/src/context/service/database/ConfigRule.py index 7d816b3e87803f71678511f4fadc6bbe7eba548e..4074eb9c01032612a272fdd80ebd6041c3f0a8ea 100644 --- a/src/context/service/database/ConfigRule.py +++ b/src/context/service/database/ConfigRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,15 +16,18 @@ import datetime, json, logging from sqlalchemy import delete #from sqlalchemy.dialects import postgresql from sqlalchemy.dialects.postgresql import insert +from sqlalchemy.engine import Engine from sqlalchemy.orm import Session from typing import Dict, List, Optional, Set -from common.proto.context_pb2 import ConfigRule +from common.proto.context_pb2 import ConfigRule, ServiceConfigRule, Empty from common.tools.grpc.Tools import grpc_message_to_json_string from .models.enums.ConfigAction import ORM_ConfigActionEnum, grpc_to_enum__config_action from .models.ConfigRuleModel import ( ConfigRuleKindEnum, DeviceConfigRuleModel, ServiceConfigRuleModel, SliceConfigRuleModel) from .uuids._Builder import get_uuid_from_string from .uuids.EndPoint import endpoint_get_uuid +from sqlalchemy_cockroachdb import run_transaction +from sqlalchemy.orm import Session, sessionmaker LOGGER = logging.getLogger(__name__) @@ -149,3 +152,16 @@ def upsert_config_rules( upsert_affected = any([(updated_at > created_at) for created_at,updated_at in configrule_updates]) return delete_affected or upsert_affected + + +def delete_config_rule(db_engine : Engine, request : ServiceConfigRule): + config_rule = request.configrule_custom + service_id = request.service_id + parent_uuid = service_id.service_uuid.uuid + configrule_name = 'service:custom:{:s}'.format( config_rule.resource_key) + configrule_uuid = get_uuid_from_string(configrule_name, prefix_for_name=parent_uuid) + def callback(session : Session) -> bool: + num_deleted = session.query(ServiceConfigRuleModel).filter_by(configrule_uuid=configrule_uuid).delete() + return num_deleted > 0 + deleted = run_transaction(sessionmaker(bind=db_engine), callback) + return Empty() diff --git a/src/context/service/database/Connection.py b/src/context/service/database/Connection.py index 2eaef31c563deddd3e914a118e66aac3c812d443..529c02d6e29b6434b3da0ec03593634b3ab87f08 100644 --- a/src/context/service/database/Connection.py +++ b/src/context/service/database/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -74,7 +74,7 @@ def connection_set(db_engine : Engine, messagebroker : MessageBroker, request : _,service_uuid = service_get_uuid(request.service_id, allow_random=False) settings = grpc_message_to_json_string(request.settings), - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) connection_data = [{ 'connection_uuid': connection_uuid, diff --git a/src/context/service/database/Constraint.py b/src/context/service/database/Constraint.py index 0b042219273f4a58e0bfc857ea2df6a3422d94cb..73de743d8d1f54161d82d551f5e789592ca21585 100644 --- a/src/context/service/database/Constraint.py +++ b/src/context/service/database/Constraint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/Context.py b/src/context/service/database/Context.py index a0de252aa0b6130294447d81a53a3b01071c610c..f3ef214c3715ac8c6110e3d5a18c2fb744d2d6db 100644 --- a/src/context/service/database/Context.py +++ b/src/context/service/database/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -82,7 +82,8 @@ def context_set(db_engine : Engine, messagebroker : MessageBroker, request : Con if len(request.slice_ids) > 0: # pragma: no cover LOGGER.warning('Items in field "slice_ids" ignored. This field is used for retrieval purposes only.') - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + context_data = [{ 'context_uuid': context_uuid, 'context_name': context_name, diff --git a/src/context/service/database/Device.py b/src/context/service/database/Device.py index beeae59c5967723f2cccfa365fca67dd3acd0096..7515f8d68227bd26f5d5384756186394492e5e53 100644 --- a/src/context/service/database/Device.py +++ b/src/context/service/database/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -92,7 +92,7 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi oper_status = grpc_to_enum__device_operational_status(request.device_operational_status) device_drivers = [grpc_to_enum__device_driver(d) for d in request.device_drivers] - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() @@ -106,6 +106,7 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi topology_uuids.add(topology_uuid) is_oc_driver = DeviceDriverEnum.DEVICEDRIVER_OC in set(request.device_drivers) + #optical_endpoints_data : List[Dict] = list() endpoints_data : List[Dict] = list() for i, endpoint in enumerate(request.device_endpoints): @@ -136,6 +137,18 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi 'created_at' : now, 'updated_at' : now, }) + # # ------------------- Experimental ----------------------- + + # if is_oc_driver: + + # optical_endpoints_data.append({ + # 'endpoint_uuid' : endpoint_uuid, + # 'device_uuid' : endpoint_device_uuid, + # 'name' : endpoint_name, + # 'endpoint_type' : endpoint.endpoint_type, + # 'created_at' : now, + # 'updated_at' : now, + # }) if endpoint_topology_uuid not in topology_uuids: related_topologies.append({ @@ -191,6 +204,23 @@ def device_set(db_engine : Engine, messagebroker : MessageBroker, request : Devi stmt = stmt.returning(EndPointModel.created_at, EndPointModel.updated_at) endpoint_updates = session.execute(stmt).fetchall() updated_endpoints = any([(updated_at > created_at) for created_at,updated_at in endpoint_updates]) + + #---------------------- Experimental --------------------------------- + + # if len(optical_endpoints_data) > 0: + # LOGGER.info(f"Optical endpoint data_ device_model {optical_endpoints_data}") + # stmt = insert(OpticalEndPointModel).values(optical_endpoints_data) + # stmt = stmt.on_conflict_do_update( + # index_elements=[OpticalEndPointModel.endpoint_uuid], + # set_=dict( + # name = stmt.excluded.name, + # endpoint_type = stmt.excluded.endpoint_type, + # updated_at = stmt.excluded.updated_at, + # ) + # ) + # stmt = stmt.returning(OpticalEndPointModel.created_at, OpticalEndPointModel.updated_at) + # optical_endpoint_updates = session.execute(stmt).fetchall() + # updated_optical_endpoints = any([(updated_at > created_at) for created_at,updated_at in endpoint_updates]) device_topology_ids = [] if not updated or len(related_topologies) > 1: diff --git a/src/context/service/database/EndPoint.py b/src/context/service/database/EndPoint.py index 48a8cf334c3967d5b84e8da70c9fbd99ca213d68..bde8fb3ea2809ef6858dcccf879a6e836d099e93 100644 --- a/src/context/service/database/EndPoint.py +++ b/src/context/service/database/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/Engine.py b/src/context/service/database/Engine.py index ec86618218cc396dea31404b88d33e46d320ed58..e4ebed9273efb2aa1d10adbf32673cab35cb36a8 100644 --- a/src/context/service/database/Engine.py +++ b/src/context/service/database/Engine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/Events.py b/src/context/service/database/Events.py index a88a4656a8cf078d2b90fe3a0c0ea22a4ec15a75..68d2da3eb6e7410d51d037abe824e9adc5b4e59b 100644 --- a/src/context/service/database/Events.py +++ b/src/context/service/database/Events.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -17,27 +17,32 @@ from typing import Dict, Iterator, Set from common.message_broker.Message import Message from common.message_broker.MessageBroker import MessageBroker from common.proto.context_pb2 import ( - ConnectionEvent, ContextEvent, DeviceEvent, EventTypeEnum, LinkEvent, ServiceEvent, SliceEvent, TopologyEvent) + ConnectionEvent, ContextEvent, DeviceEvent, EventTypeEnum, LinkEvent, + ServiceEvent, SliceEvent, TopologyEvent, OpticalConfigEvent +) class EventTopicEnum(enum.Enum): - CONNECTION = 'connection' - CONTEXT = 'context' - DEVICE = 'device' - LINK = 'link' - POLICY_RULE = 'policy-rule' - SERVICE = 'service' - SLICE = 'slice' - TOPOLOGY = 'topology' + CONNECTION = 'connection' + CONTEXT = 'context' + DEVICE = 'device' + LINK = 'link' + POLICY_RULE = 'policy-rule' + SERVICE = 'service' + SLICE = 'slice' + TOPOLOGY = 'topology' + OPTICALCONFIG = 'optical-config' + TOPIC_TO_EVENTCLASS = { - EventTopicEnum.CONNECTION.value : ConnectionEvent, - EventTopicEnum.CONTEXT.value : ContextEvent, - EventTopicEnum.DEVICE.value : DeviceEvent, - EventTopicEnum.LINK.value : LinkEvent, - #EventTopicEnum.POLICY_RULE.value : PolicyRuleEvent, # Not defined in proto files - EventTopicEnum.SERVICE.value : ServiceEvent, - EventTopicEnum.SLICE.value : SliceEvent, - EventTopicEnum.TOPOLOGY.value : TopologyEvent, + EventTopicEnum.CONNECTION.value : ConnectionEvent, + EventTopicEnum.CONTEXT.value : ContextEvent, + EventTopicEnum.DEVICE.value : DeviceEvent, + EventTopicEnum.LINK.value : LinkEvent, + #EventTopicEnum.POLICY_RULE.value : PolicyRuleEvent, # Not defined in proto files + EventTopicEnum.SERVICE.value : ServiceEvent, + EventTopicEnum.SLICE.value : SliceEvent, + EventTopicEnum.TOPOLOGY.value : TopologyEvent, + EventTopicEnum.OPTICALCONFIG.value : OpticalConfigEvent, } CONSUME_TIMEOUT = 0.5 # seconds @@ -61,6 +66,9 @@ def notify_event_topology(messagebroker : MessageBroker, event_type : EventTypeE def notify_event_device(messagebroker : MessageBroker, event_type : EventTypeEnum, device_id : Dict) -> None: notify_event(messagebroker, EventTopicEnum.DEVICE, event_type, {'device_id': device_id}) +def notify_event_opticalconfig(messagebroker : MessageBroker, event_type : EventTypeEnum, opticalconfig_id : Dict) -> None: + notify_event(messagebroker, EventTopicEnum.DEVICE, event_type, {'opticalconfig_id': opticalconfig_id}) + def notify_event_link(messagebroker : MessageBroker, event_type : EventTypeEnum, link_id : Dict) -> None: notify_event(messagebroker, EventTopicEnum.LINK, event_type, {'link_id': link_id}) diff --git a/src/context/service/database/Link.py b/src/context/service/database/Link.py index 8aa2563e4b3bb5b46ffdefe4644cdfe321f1e734..6244a8517f66280893acb10944a235666beb80d4 100644 --- a/src/context/service/database/Link.py +++ b/src/context/service/database/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -22,11 +22,12 @@ from common.proto.context_pb2 import Empty, EventTypeEnum, Link, LinkId, LinkIdL from common.message_broker.MessageBroker import MessageBroker from common.method_wrappers.ServiceExceptions import NotFoundException from common.tools.object_factory.Link import json_link_id -from context.service.database.uuids.Topology import topology_get_uuid +from .models.enums.LinkType import grpc_to_enum__link_type_enum from .models.LinkModel import LinkModel, LinkEndPointModel from .models.TopologyModel import TopologyLinkModel, TopologyModel from .uuids.EndPoint import endpoint_get_uuid from .uuids.Link import link_get_uuid +from .uuids.Topology import topology_get_uuid from .Events import notify_event_context, notify_event_link, notify_event_topology LOGGER = logging.getLogger(__name__) @@ -68,7 +69,9 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) link_name = raw_link_uuid if len(raw_link_name) == 0 else raw_link_name link_uuid = link_get_uuid(request.link_id, link_name=link_name, allow_random=True) - now = datetime.datetime.utcnow() + link_type = grpc_to_enum__link_type_enum(request.link_type) + + now = datetime.datetime.now(datetime.timezone.utc) topology_uuids : Set[str] = set() related_topologies : List[Dict] = list() @@ -117,6 +120,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) link_data = [{ 'link_uuid' : link_uuid, 'link_name' : link_name, + 'link_type' : link_type, 'total_capacity_gbps' : total_capacity_gbps, 'used_capacity_gbps' : used_capacity_gbps, 'created_at' : now, @@ -129,6 +133,7 @@ def link_set(db_engine : Engine, messagebroker : MessageBroker, request : Link) index_elements=[LinkModel.link_uuid], set_=dict( link_name = stmt.excluded.link_name, + link_type = stmt.excluded.link_type, total_capacity_gbps = stmt.excluded.total_capacity_gbps, used_capacity_gbps = stmt.excluded.used_capacity_gbps, updated_at = stmt.excluded.updated_at, diff --git a/src/context/service/database/OpticalConfig.py b/src/context/service/database/OpticalConfig.py index 663c3bd0b16ac8af20cb1acf9176764d719b3046..2876ff073e155e2cf0573ab0f7daa6812e7d2f8d 100644 --- a/src/context/service/database/OpticalConfig.py +++ b/src/context/service/database/OpticalConfig.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,11 +14,20 @@ import json, logging from sqlalchemy.dialects.postgresql import insert +from common.message_broker.MessageBroker import MessageBroker +from common.DeviceTypes import DeviceTypeEnum from sqlalchemy.engine import Engine from sqlalchemy.orm import Session, sessionmaker from sqlalchemy_cockroachdb import run_transaction -from common.proto.context_pb2 import OpticalConfig, OpticalConfigId -from .models.OpticalConfigModel import OpticalConfigModel +from common.proto.context_pb2 import OpticalConfig, OpticalConfigId, Empty, EventTypeEnum +from .models.OpticalConfig.OpticalConfigModel import OpticalConfigModel +from .models.OpticalConfig.TransponderModel import TransponderTypeModel, OpticalChannelModel +from .models.OpticalConfig.RoadmModel import RoadmTypeModel, ChannelModel, ORInterfaceModel +from context.service.database.uuids.OpticalConfig import ( + channel_get_uuid , opticalconfig_get_uuid ,transponder_get_uuid,roadm_get_uuid, + interface_get_uuid +) +from .Events import notify_event_opticalconfig LOGGER = logging.getLogger(__name__) @@ -28,8 +37,10 @@ def get_opticalconfig(db_engine : Engine): results = session.query(OpticalConfigModel).all() for obj in results: optical_config = OpticalConfig() - optical_config.config = json.dump(obj.config) - optical_config.opticalconfig_id.opticalconfig_uuid = obj.opticalconfig_uuid + optical_config.config = json.dumps(obj.dump()) + ids_obj = obj.dump_id() + optical_config.opticalconfig_id.opticalconfig_uuid = ids_obj["opticalconfig_uuid"] + optical_config.device_id.device_uuid.uuid=ids_obj["device_uuid"] optical_configs.append(optical_config) return optical_configs obj = run_transaction(sessionmaker(bind=db_engine), callback) @@ -37,33 +48,377 @@ def get_opticalconfig(db_engine : Engine): def set_opticalconfig(db_engine : Engine, request : OpticalConfig): opticalconfig_id = OpticalConfigId() - opticalconfig_id.opticalconfig_uuid = request.opticalconfig_id.opticalconfig_uuid - my_config_data = [] + device_id = request.device_id + device_uuid = request.device_id.device_uuid.uuid + channels = [] + interfaces = [] + transponder = [] + roadms = [] + channel_namespace = None + OpticalConfig_data = [] + config_type = None + #is_transpondre = False + opticalconfig_uuid = opticalconfig_get_uuid(device_id) + if request.config: - channels = [] - transceivers = [] config = json.loads(request.config) - if 'channels' in config and len(config['channels']) > 0: - channels = [channel['name']['index'] for channel in config['channels']] - if 'transceivers' in config and len(config['transceivers']['transceiver']) > 0: - transceivers = [transceiver for transceiver in config['transceivers']['transceiver']] - - my_config_data = [ - { - "opticalconfig_uuid": request.opticalconfig_id.opticalconfig_uuid, - "channels" : channels, - "transcievers" : transceivers, - "interfaces" : json.dumps(config["interfaces"]["interface"]), - "channel_namespace" : config["channel_namespace"], - "endpoints" : [json.dumps(endpoint) for endpoint in config["endpoints"]], - "frequency" : config["frequency"] if "frequency" in config else 0, - "operational_mode" : config["operational_mode"] if "operational_mode" in config else 0, - "output_power" : config["output_power"] if "output_power" in config else '', - } - ] + if 'channel_namespace' in config: + channel_namespace=config['channel_namespace'] + if "type" in config: + config_type= config["type"] + if config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + is_transpondre = True + transceivers = [] + if channel_namespace is None and 'channel_namespace' in config: + channel_namespace=config['channel_namespace'] + if 'transceivers' in config and len(config['transceivers']['transceiver']) > 0: + transceivers = [transceiver for transceiver in config ['transceivers']['transceiver']] + if 'channels' in config and len(config['channels']) > 0: + #channels = [channel['name']['index'] for channel in config['channels']] + for channel_params in config['channels']: + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "transponder_uuid" : transponder_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(channel_params['name']['index'],device_uuid), + "channel_name" : channel_params['name']['index'], + "frequency" : int(channel_params["frequency"]) if "frequency" in channel_params else 0, + "operational_mode" : int(channel_params["operational-mode"]) if "operational-mode" in channel_params else 0, + "target_output_power": channel_params["target-output-power"] if "target-output-power" in channel_params else '', + "status" : channel_params["status"] if "status" in channel_params else "" + }) + + transponder.append({ + "transponder_uuid" : transponder_get_uuid(device_id), + "transcievers" : transceivers, + "interfaces" : None, + "opticalconfig_uuid": opticalconfig_uuid, + }) + + if config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + if channel_namespace is None and 'channel_namespace' in config: + channel_namespace=config['channel_namespace'] + if 'media_channels' in config and len(config['media_channels']) > 0: + #channels = [channel['name']['index'] for channel in config['channels']] + channel_num = 0 + for channel_params in config['media_channels']: + channel_index = channel_params['channel_index'] if channel_params['channel_index'] is not None else None + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "roadm_uuid" : roadm_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(f'media_channel_{channel_index}',device_uuid), + "band_name" : channel_params['band_name'], + "lower_frequency" : int(channel_params["lower_frequency"]) if "lower_frequency" in channel_params else 0, + "upper_frequency" : int(channel_params["upper_frequency"]) if "upper_frequency" in channel_params else 0, + "dest_port" : channel_params["dest_port"] if "dest_port" in channel_params else '', + "src_port" : channel_params["src_port"] if "src_port" in channel_params else '', + "status" : channel_params["status"] if "status" in channel_params else "", + "type" : 'media_channel', + "optical_band_parent" : str(channel_params['optical_band_parent']) if 'optical_band_parent' in channel_params else None, + "channel_index" : channel_index if channel_index is not None else None, + }) + if 'optical_bands' in config and len(config['optical_bands']) > 0: + #channels = [channel['name']['index'] for channel in config['channels']] + channel_num = 0 + for channel_params in config['optical_bands']: + channel_num += 1 + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "roadm_uuid" : roadm_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(f'optical_bands_{channel_num}',device_uuid), + "band_name" : channel_params['band_name'], + "lower_frequency" : int(channel_params["lower_frequency"]) if "lower_frequency" in channel_params else 0, + "upper_frequency" : int(channel_params["upper_frequency"]) if "upper_frequency" in channel_params else 0, + "dest_port" : channel_params["dest_port"] if "dest_port" in channel_params else '', + "src_port" : channel_params["src_port"] if "src_port" in channel_params else '', + "status" : channel_params["status"] if "status" in channel_params else "", + "type" : 'optical_band', + "channel_index" : channel_params['channel_index'] if 'channel_index' in channel_params else None, + "optical_band_parent": None + }) + + roadms.append({ + "roadm_uuid" : roadm_get_uuid(device_id), + "opticalconfig_uuid" : opticalconfig_uuid, + }) + + if config_type == DeviceTypeEnum.OPEN_ROADM._value_: + if 'interfaces' in config: + for interface in config['interfaces']: + interfaces.append({ + "interface_uuid" : interface_get_uuid(interface['name']), + 'name' : interface["name"], + "type" : interface["type"], + "administrative_state": interface["administrative_state"], + "circuit_pack_name" : interface["circuit_pack_name"], + "port" : interface["port"], + "interface_list" : interface["interface_list"], + "frequency" : interface["frequency"], + "width" : interface["width"], + "roadm_uuid" : roadm_get_uuid(device_id), + }) + roadms.append({ + "roadm_uuid" : roadm_get_uuid(device_id), + "opticalconfig_uuid": opticalconfig_uuid, + }) + LOGGER.info(f"open_roadm") + + OpticalConfig_data.append({ + "opticalconfig_uuid" : opticalconfig_uuid, + # "transcievers" : transceivers, + # "interfaces" :"", + "channel_namespace" : channel_namespace , + "endpoints" : [json.dumps(endpoint) for endpoint in config.get("endpoints",[])], + "device_uuid" : device_uuid, + "type" : config_type + }) + + LOGGER.info(f"added OpticalConfig_data {OpticalConfig_data}") + LOGGER.info(f"added interfaces {interfaces}") + + def callback(session:Session)->bool: + stmt = insert(OpticalConfigModel).values(OpticalConfig_data) + stmt = stmt.on_conflict_do_update( + index_elements=[OpticalConfigModel.opticalconfig_uuid], + set_=dict( + channel_namespace = stmt.excluded.channel_namespace + ) + ) + stmt = stmt.returning(OpticalConfigModel.opticalconfig_uuid) + opticalconfig_id = session.execute(stmt).fetchone() + if config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + if (len(transponder)>0): + stmt = insert(TransponderTypeModel).values(transponder) + stmt = stmt.on_conflict_do_update( + index_elements=[TransponderTypeModel.transponder_uuid], + set_=dict( + transcievers = stmt.excluded.transcievers, + ) + ) + stmt = stmt.returning(TransponderTypeModel.transponder_uuid) + transponder_id = session.execute(stmt).fetchone() + + if len(channels) > 0: + stmt = insert(OpticalChannelModel).values(channels) + stmt = stmt.on_conflict_do_update( + index_elements=[OpticalChannelModel.channel_uuid], + set_=dict( + channel_name= stmt.excluded.channel_name , + frequency = stmt.excluded.frequency, + operational_mode=stmt.excluded.operational_mode, + target_output_power=stmt.excluded.target_output_power, + ) + ) + stmt = stmt.returning(OpticalChannelModel.channel_uuid) + opticalChannel_id = session.execute(stmt).fetchone() + + if config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + if len(roadms) > 0: + stmt = insert(RoadmTypeModel).values(roadms) + stmt = stmt.on_conflict_do_update( + index_elements=[RoadmTypeModel.roadm_uuid], + set_=dict( + opticalconfig_uuid = stmt.excluded.opticalconfig_uuid + ) + ) + stmt = stmt.returning(RoadmTypeModel.roadm_uuid) + roadm_id = session.execute(stmt).fetchone() + + if len(channels) > 0: + stmt = insert(ChannelModel).values(channels) + stmt = stmt.on_conflict_do_update( + index_elements=[ChannelModel.channel_uuid], + set_=dict( + band_name = stmt.excluded.band_name, + lower_frequency = stmt.excluded.lower_frequency, + upper_frequency = stmt.excluded.upper_frequency, + type = stmt.excluded.type, + status = stmt.excluded.status, + dest_port = stmt.excluded.dest_port, + src_port = stmt.excluded.src_port, + channel_index = stmt.excluded.channel_index, + optical_band_parent = stmt.excluded.optical_band_parent, + ) + ) + stmt = stmt.returning(ChannelModel.channel_uuid) + opticalChannel_id = session.execute(stmt).fetchone() + + if config_type == DeviceTypeEnum.OPEN_ROADM._value_: + if len(roadms) > 0: + stmt = insert(RoadmTypeModel).values(roadms) + stmt = stmt.on_conflict_do_update( + index_elements=[RoadmTypeModel.roadm_uuid], + set_=dict( + opticalconfig_uuid = stmt.excluded.opticalconfig_uuid + ) + ) + stmt = stmt.returning(RoadmTypeModel.roadm_uuid) + roadm_id = session.execute(stmt).fetchone() + + if len(interfaces) > 0: + stmt = insert(ORInterfaceModel).values(interfaces) + stmt = stmt.on_conflict_do_update( + index_elements=[ORInterfaceModel.interface_uuid], + set_=dict( + name = stmt.excluded.name, + frequency = stmt.excluded.frequency, + administrative_state = stmt.excluded.administrative_state, + type = stmt.excluded.type, + circuit_pack_name = stmt.excluded.circuit_pack_name, + port = stmt.excluded.port, + interface_list = stmt.excluded.interface_list, + width = stmt.excluded.width, + ) + ) + stmt = stmt.returning(ORInterfaceModel.interface_uuid) + opticalChannel_id = session.execute(stmt).fetchone() + + opticalconfig_id = run_transaction(sessionmaker(bind=db_engine), callback) + return {'opticalconfig_uuid': opticalconfig_id} + +def update_opticalconfig(db_engine : Engine, request : OpticalConfig): + opticalconfig_id = OpticalConfigId() + device_id = request.device_id + device_uuid = request.device_id.device_uuid.uuid + channels = [] + transponder = [] + roadms = [] + channel_namespace = None + OpticalConfig_data = [] + config_type = None + #is_transpondre = False + opticalconfig_uuid = opticalconfig_get_uuid(device_id) + + if request.config : + config = json.loads(request.config) + + if 'new_config' in config: + if 'type' in config: + config_type = config['type'] + if "type" in config['new_config'] and config_type is None: + config_type = config['new_config']["type"] + if 'channel_namespace' in config['new_config']: + channel_namespace = config['new_config'] ['channel_namespace'] + + if config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + is_transpondre = True + transceivers = [] + if channel_namespace is None and 'channel_namespace' in config: + channel_namespace=config['channel_namespace'] + + if 'transceivers' in config['new_config'] and len(config['new_config']['transceivers']['transceiver']) > 0: + transceivers = [transceiver for transceiver in config['new_config'] ['transceivers']['transceiver']] + + if 'channels' in config['new_config'] and len(config['new_config']['channels']) > 0: + #channels = [channel['name']['index'] for channel in config['channels']] + + for channel_params in config['new_config']['channels']: + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "transponder_uuid" : transponder_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(channel_params['name']['index'],device_uuid), + "channel_name" : channel_params['name']['index'], + "frequency" : int(channel_params["frequency"]) if "frequency" in channel_params else 0, + "operational_mode" : int(channel_params["operational-mode"]) if "operational-mode" in channel_params else 0, + "target_output_power" : channel_params["target-output-power"] if "target-output-power" in channel_params else '', + "status" : channel_params["status"] if "status" in channel_params else "" + }) + elif 'flow_handled' in config and 'new_config' in config : + target_config = config['new_config'] + dest_pair = None + src = None + dst = None + src_pair = config['flow_handled'][0] + + src, dst = src_pair + if src_pair is None and len(config['flow_handled'])>1 : + dest_pair = config['flow_handled'][1] + src, dst = dest_pair + channel_index = src if src is not None and src !='0' else dst + channel_name = f"channel-{channel_index}" + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "transponder_uuid" : transponder_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(channel_name,device_uuid), + "channel_name" : channel_name, + "frequency" : int(target_config["frequency"]) if "frequency" in target_config else 0, + "operational_mode" : int(target_config["operational-mode"]) if "operational-mode" in target_config else 0, + "target_output_power" : target_config["target-output-power"] if "target-output-power" in target_config else '', + "status" : target_config["status"] if "status" in target_config else "" + }) + + transponder.append({ + "transponder_uuid" : transponder_get_uuid(device_id), + "transcievers" : transceivers, + "interfaces" : None, + "opticalconfig_uuid": opticalconfig_uuid, + }) + + if config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + if channel_namespace is None and 'channel_namespace' in config['new_config']: + channel_namespace=config['new_config']['channel_namespace'] + if 'is_opticalband' in config and not config['is_opticalband']: + #channels = [channel['name']['index'] for channel in config['channels']] + if 'flow_handled' in config and len(config['flow_handled'])>0 : + num = 0 + flow_id = config["new_config"]["flow_id"] if 'flow_id' in config['new_config'] else None + for flow in config['flow_handled']: + src_port, dest_port = flow + channel_index = flow_id + num + num += 1 + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "roadm_uuid" : roadm_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(f'media_channel_{channel_index}',device_uuid), + "band_name" : config['new_config']['band_type'], + "lower_frequency" : int(int(config['new_config']['frequency']) - (int(config['new_config']['band'])/2)) if "frequency" in config['new_config'] else 0, + "upper_frequency" : int(int(config['new_config']['frequency']) + (int(config['new_config']['band'])/2)) if "frequency" in config['new_config'] else 0, + "dest_port" : dest_port, + "src_port" : src_port, + "status" : config['new_config']["status"] if "status" in config['new_config'] else "", + "type" : 'media_channel', + "optical_band_parent" : str( config['new_config']['ob_id']) if 'ob_id' in config['new_config'] else None, + "channel_index" : str(channel_index) if channel_index is not None else None + }) + if 'is_opticalband' in config and config['is_opticalband']: + #channels = [channel['name']['index'] for channel in config['channels']] + if 'flow_handled' in config and len(config['flow_handled']) > 0: + ob_id = config['new_config']['ob_id'] if 'ob_id' in config['new_config'] else None + num = 0 + for flow in config['flow_handled']: + src_port, dest_port = flow + channel_index = ob_id + num + num += 1 + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "roadm_uuid" : roadm_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(f'optical_bands_{channel_index}',device_uuid), + "band_name" : config['new_config']['band_type'], + "lower_frequency" : int(config['new_config']["low-freq"]) if "low-freq" in config['new_config'] else 0, + "upper_frequency" : int(config['new_config']["up-freq"]) if "up-freq" in config['new_config'] else 0, + "dest_port" : dest_port, + "src_port" : src_port, + "status" : config['new_config']["status"] if "status" in config['new_config'] else "", + "type" : 'optical_band', + "channel_index" : str( channel_index) if channel_index is not None else None + }) + + roadms.append({ + "roadm_uuid" : roadm_get_uuid(device_id), + "opticalconfig_uuid": opticalconfig_uuid, + }) + + OpticalConfig_data.append({ + "opticalconfig_uuid": opticalconfig_uuid, + # "transcievers" : transceivers, + # "interfaces" :"", + "channel_namespace" : channel_namespace , + "endpoints" : [json.dumps(endpoint) for endpoint in config['new_config'].get("endpoints",[])], + "device_uuid" : device_uuid, + "type" : config_type + }) def callback(session:Session)->bool: - stmt = insert(OpticalConfigModel).values(my_config_data) + stmt = insert(OpticalConfigModel).values(OpticalConfig_data) stmt = stmt.on_conflict_do_update( index_elements=[OpticalConfigModel.opticalconfig_uuid], set_=dict( @@ -71,11 +426,66 @@ def set_opticalconfig(db_engine : Engine, request : OpticalConfig): ) ) stmt = stmt.returning(OpticalConfigModel.opticalconfig_uuid) - id = session.execute(stmt).fetchone() + opticalconfig_id = session.execute(stmt).fetchone() + if config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + if (len(transponder)>0): + stmt = insert(TransponderTypeModel).values(transponder) + stmt = stmt.on_conflict_do_update( + index_elements=[TransponderTypeModel.transponder_uuid], + set_=dict( + transcievers = stmt.excluded.transcievers, + ) + ) + stmt = stmt.returning(TransponderTypeModel.transponder_uuid) + transponder_id = session.execute(stmt).fetchone() + + if len(channels) > 0: + stmt = insert(OpticalChannelModel).values(channels) + stmt = stmt.on_conflict_do_update( + index_elements=[OpticalChannelModel.channel_uuid], + set_=dict( + channel_name = stmt.excluded.channel_name, + frequency = stmt.excluded.frequency, + operational_mode = stmt.excluded.operational_mode, + target_output_power = stmt.excluded.target_output_power, + status = stmt.excluded.status, + ) + ) + stmt = stmt.returning(OpticalChannelModel.channel_uuid) + opticalChannel_id = session.execute(stmt).fetchone() + if config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + if len(roadms) > 0: + stmt = insert(RoadmTypeModel).values(roadms) + stmt = stmt.on_conflict_do_update( + index_elements=[RoadmTypeModel.roadm_uuid], + set_=dict( + circuits = stmt.excluded.circuits + ) + ) + stmt = stmt.returning(RoadmTypeModel.roadm_uuid) + roadm_id = session.execute(stmt).fetchone() + + if (channels is not None and len(channels) > 0): + stmt = insert(ChannelModel).values(channels) + stmt = stmt.on_conflict_do_update( + index_elements=[ChannelModel.channel_uuid ], + set_=dict( + band_name = stmt.excluded.band_name, + lower_frequency = stmt.excluded.lower_frequency, + upper_frequency = stmt.excluded.upper_frequency, + type = stmt.excluded.type, + status = stmt.excluded.status, + dest_port = stmt.excluded.dest_port, + src_port = stmt.excluded.src_port, + ) + ) + stmt = stmt.returning(ChannelModel.channel_uuid) + opticalChannel_id = session.execute(stmt).fetchone() + opticalconfig_id = run_transaction(sessionmaker(bind=db_engine), callback) return {'opticalconfig_uuid': opticalconfig_id} -def select_opticalconfig(db_engine:Engine,request:OpticalConfigId): +def select_opticalconfig(db_engine : Engine, request : OpticalConfigId): def callback(session : Session) -> OpticalConfig: result = OpticalConfig() stmt = session.query(OpticalConfigModel) @@ -83,6 +493,102 @@ def select_opticalconfig(db_engine:Engine,request:OpticalConfigId): obj = stmt.first() if obj is not None: result.config = json.dumps(obj.dump()) - result.opticalconfig_id.opticalconfig_uuid = obj.opticalconfig_uuid + ids_obj = obj.dump_id() + result.opticalconfig_id.opticalconfig_uuid = ids_obj["opticalconfig_uuid"] + result.device_id.device_uuid.uuid=ids_obj["device_uuid"] return result return run_transaction(sessionmaker(bind=db_engine, expire_on_commit=False), callback) + +def delete_opticalconfig(db_engine : Engine, messagebroker : MessageBroker, request : OpticalConfigId): + opticalconfig_uuid = request.opticalconfig_uuid + def callback(session : Session): + #query = session.query(OpticalConfigModel) + num_deleted = session.query(OpticalConfigModel).filter_by(opticalconfig_uuid=opticalconfig_uuid).delete() + return num_deleted > 0 + deleted = run_transaction(sessionmaker(bind=db_engine), callback) + if deleted: + notify_event_opticalconfig(messagebroker, EventTypeEnum.EVENTTYPE_REMOVE, opticalconfig_uuid) + return Empty() + +def delete_opticalchannel(db_engine : Engine, messagebroker : MessageBroker, request : OpticalConfig): + config = json.loads(request.config) + device_id = request.device_id + device_uuid = request.device_id.device_uuid.uuid + opticalconfig_uuid = request.opticalconfig_id.opticalconfig_uuid + channels = [] + config_type = None + + if "type" in config : + config_type= config["type"] + if 'new_config' in config: + if config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + for flow in config['flow']: + src,dest = flow + channel_index= src if src is not None and src!='0' else dest + channel_name= f"channel-{channel_index}" + channels.append({ + # "opticalconfig_uuid":opticalconfig_uuid, + "transponder_uuid" : transponder_get_uuid(device_id), + "channel_uuid" : channel_get_uuid(channel_name ,device_uuid), + "channel_name" : channel_name , + "frequency" : 0, + "operational_mode" : None, + "target_output_power": None, + "status" : "DISABLED" + }) + elif config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + channel_num = 0 + if 'flow' in config : + if 'is_opticalband' in config: + if config['is_opticalband']: + ob_id = config['new_config']['ob_id'] if 'ob_id' in config['new_config'] else None + if len(config['flow']) == 0: + channel_index = ob_id + channel_num + channel_name = f'optical_bands_{channel_index}' + channels.append(channel_get_uuid(channel_name, device_uuid)) + else: + for flow in config['flow']: + channel_index = ob_id+channel_num + channel_num +=1 + channel_name = f'optical_bands_{channel_index}' + channels.append(channel_get_uuid(channel_name, device_uuid)) + else: + if config['flow'] == 0: + channel_num = 1 + channel_name = f'media_channel_{channel_num}' + channels.append(channel_get_uuid(channel_name, device_uuid)) + else: + for flow in config['flow']: + channel_num += 1 + channel_name = f'media_channel_{channel_num}' + channels.append(channel_get_uuid(channel_name, device_uuid)) + + def callback(session : Session): + all_suceed = [] + if config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + for channel_uuid in channels: + num_deleted = session.query(ChannelModel).filter_by(channel_uuid=channel_uuid).delete() + all_suceed.append(num_deleted > 0) + elif config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + if len(channels) > 0: + stmt = insert(OpticalChannelModel).values(channels) + stmt = stmt.on_conflict_do_update( + index_elements=[OpticalChannelModel.channel_uuid ], + set_=dict( + channel_name= stmt.excluded.channel_name , + frequency = stmt.excluded.frequency, + operational_mode=stmt.excluded.operational_mode, + target_output_power=stmt.excluded.target_output_power, + status=stmt.excluded.status + ) + ) + stmt = stmt.returning(OpticalChannelModel.channel_uuid) + opticalChannel_id = session.execute(stmt).fetchone() + all_suceed.append(True) + return all_suceed + + all_deleted = run_transaction(sessionmaker(bind=db_engine), callback) + for stat in all_deleted: + if not stat: return + notify_event_opticalconfig(messagebroker, EventTypeEnum.EVENTTYPE_REMOVE, opticalconfig_uuid) + return Empty() diff --git a/src/context/service/database/OpticalLink.py b/src/context/service/database/OpticalLink.py new file mode 100644 index 0000000000000000000000000000000000000000..1f45daf43bb805e750b1742e6e4ea7e18039cc43 --- /dev/null +++ b/src/context/service/database/OpticalLink.py @@ -0,0 +1,183 @@ +# Copyright 2022-2024 ETSI 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. + +import datetime, logging +from sqlalchemy.dialects.postgresql import insert +from sqlalchemy.engine import Engine +from sqlalchemy.orm import Session, selectinload, sessionmaker +from sqlalchemy_cockroachdb import run_transaction +from typing import Dict, List, Optional, Set, Tuple +from common.proto.context_pb2 import ( + Empty, EventTypeEnum, OpticalLink, LinkId, OpticalLinkList, TopologyId +) +from common.message_broker.MessageBroker import MessageBroker +from common.method_wrappers.ServiceExceptions import NotFoundException +from common.tools.object_factory.Link import json_link_id +from .models.OpticalLinkModel import OpticalLinkModel,OpticalLinkEndPointModel +from .models.TopologyModel import TopologyOpticalLinkModel, TopologyModel +from .uuids.EndPoint import endpoint_get_uuid +from .uuids.Link import link_get_uuid +from .uuids.Topology import topology_get_uuid +from .Events import notify_event_link + +LOGGER = logging.getLogger(__name__) + + +def optical_link_list_objs(db_engine : Engine) -> OpticalLinkList: + def callback(session : Session) -> List[Dict]: + obj_list : List[OpticalLinkModel] = session.query(OpticalLinkModel)\ + .options(selectinload(OpticalLinkModel.opticallink_endpoints))\ + .all() + return [obj.dump() for obj in obj_list] + links = run_transaction(sessionmaker(bind=db_engine), callback) + return OpticalLinkList(optical_links=links) + +def optical_link_get(db_engine : Engine, request : LinkId) -> OpticalLink: + link_uuid = link_get_uuid(request, allow_random=False) + def callback(session : Session) -> Optional[Dict]: + obj : Optional[OpticalLinkModel] = session.query(OpticalLinkModel)\ + .options(selectinload(OpticalLinkModel.opticallink_endpoints))\ + .filter_by(opticallink_uuid=link_uuid).one_or_none() + return None if obj is None else obj.dump() + obj = run_transaction(sessionmaker(bind=db_engine), callback) + if obj is None: + raw_link_uuid = request.link_uuid.uuid + raise NotFoundException('Optical Link', raw_link_uuid, extra_details=[ + 'link_uuid generated was: {:s}'.format(link_uuid) + ]) + return OpticalLink(**obj) + +def optical_link_set(db_engine : Engine, messagebroker : MessageBroker, request : OpticalLink) -> LinkId: + raw_link_uuid = request.link_id.link_uuid.uuid + raw_link_name = request.name + link_name = raw_link_uuid if len(raw_link_name) == 0 else raw_link_name + link_uuid = link_get_uuid(request.link_id, link_name=link_name, allow_random=True) + + now = datetime.datetime.now(datetime.timezone.utc) + + # By default, always add link to default Context/Topology + topology_uuids : Set[str] = set() + related_topologies : List[Dict] = list() + _,topology_uuid = topology_get_uuid(TopologyId(), allow_random=False, allow_default=True) + related_topologies.append({ + 'topology_uuid': topology_uuid, + 'optical_link_uuid' : link_uuid, + }) + topology_uuids.add(topology_uuid) + + link_endpoints_data : List[Dict] = list() + + for i,endpoint_id in enumerate(request.link_endpoint_ids): + endpoint_topology_uuid, endpoint_device_uuid, endpoint_uuid = endpoint_get_uuid( + endpoint_id, endpoint_name="", allow_random=True) + + link_endpoints_data.append({ + 'link_uuid' : link_uuid, + 'endpoint_uuid': endpoint_uuid, + + }) + + if endpoint_topology_uuid not in topology_uuids: + related_topologies.append({ + 'topology_uuid': endpoint_topology_uuid, + 'optical_link_uuid' : link_uuid, + }) + topology_uuids.add(endpoint_topology_uuid) + + optical_link_data = [{ + 'opticallink_uuid' : link_uuid, + 'name' : link_name, + 'created_at' : now, + 'updated_at' : now, + 'length' : request.optical_details.length, + "src_port" : request.optical_details.src_port, + "dst_port" : request.optical_details.dst_port, + "local_peer_port" : request.optical_details.local_peer_port, + "remote_peer_port" : request.optical_details.remote_peer_port, + "used" : request.optical_details.used, + "c_slots" : request.optical_details.c_slots , + "l_slots" : request.optical_details.l_slots, + "s_slots" : request.optical_details.s_slots, + }] + + def callback(session : Session) -> Tuple[bool, List[Dict]]: + stmt = insert(OpticalLinkModel).values(optical_link_data) + stmt = stmt.on_conflict_do_update( + index_elements=[OpticalLinkModel.opticallink_uuid], + set_=dict( + updated_at = stmt.excluded.updated_at, + src_port = stmt.excluded.src_port, + dst_port = stmt.excluded.dst_port, + local_peer_port = stmt.excluded.local_peer_port, + remote_peer_port = stmt.excluded.remote_peer_port, + used = stmt.excluded.used , + c_slots = stmt.excluded.c_slots, + l_slots = stmt.excluded.l_slots, + s_slots = stmt.excluded.s_slots + ) + ) + stmt = stmt.returning(OpticalLinkModel.created_at, OpticalLinkModel.updated_at) + created_at,updated_at = session.execute(stmt).fetchone() + updated = updated_at > created_at + + updated_endpoints = False + if len(link_endpoints_data) > 0: + stmt = insert(OpticalLinkEndPointModel).values(link_endpoints_data) + stmt = stmt.on_conflict_do_nothing( + index_elements=[OpticalLinkEndPointModel.link_uuid, OpticalLinkEndPointModel.endpoint_uuid] + ) + link_endpoint_inserts = session.execute(stmt) + updated_endpoints = int(link_endpoint_inserts.rowcount) > 0 + + if not updated or len(related_topologies) > 1: + # Only update topology-link relations when link is created (not updated) or when endpoint_ids are + # modified (len(related_topologies) > 1). + stmt = insert(TopologyOpticalLinkModel).values(related_topologies) + stmt = stmt.on_conflict_do_nothing( + index_elements=[TopologyOpticalLinkModel.topology_uuid, TopologyOpticalLinkModel.optical_link_uuid] + ) + stmt = stmt.returning(TopologyOpticalLinkModel.topology_uuid) + topology_uuids = session.execute(stmt).fetchall() + + #LOGGER.warning('RAW topology_uuids={:s}'.format(str(topology_uuids))) + if len(topology_uuids) > 0: + topology_uuids = [topology_uuid[0] for topology_uuid in topology_uuids] + #LOGGER.warning('NEW topology_uuids={:s}'.format(str(topology_uuids))) + query = session.query(TopologyModel) + query = query.filter(TopologyModel.topology_uuid.in_(topology_uuids)) + link_topologies : List[TopologyModel] = query.all() + link_topology_ids = [obj.dump_id() for obj in link_topologies] + #LOGGER.warning('link_topology_ids={:s}'.format(str(link_topology_ids))) + return updated or updated_endpoints + + updated = run_transaction(sessionmaker(bind=db_engine), callback ) + link_id = json_link_id(link_uuid) + event_type = EventTypeEnum.EVENTTYPE_UPDATE if updated else EventTypeEnum.EVENTTYPE_CREATE + notify_event_link(messagebroker, event_type, link_id) + + return LinkId(**link_id) + +def optical_link_delete(db_engine : Engine, messagebroker : MessageBroker, request : LinkId) -> Empty: + link_uuid = link_get_uuid(request, allow_random=False) + + def callback(session : Session) -> bool: + num_deleted = session.query(OpticalLinkModel).filter_by(opticallink_uuid=link_uuid).delete() + return num_deleted > 0 + deleted = run_transaction(sessionmaker(bind=db_engine), callback) + + link_id = json_link_id(link_uuid) + if deleted: + notify_event_link(messagebroker, EventTypeEnum.EVENTTYPE_REMOVE, link_id) + + return Empty() diff --git a/src/context/service/database/PolicyRule.py b/src/context/service/database/PolicyRule.py index 46322188079bfd8e55514f23a02e6b9d71f36e10..ad38838fc127aaee1927f9e44ac0791cef105300 100644 --- a/src/context/service/database/PolicyRule.py +++ b/src/context/service/database/PolicyRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -84,7 +84,7 @@ def policyrule_set(db_engine : Engine, messagebroker : MessageBroker, request : 'actionList': json_policyrule_basic.get('actionList', []), }, sort_keys=True) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) policyrule_data = [{ 'policyrule_uuid' : policyrule_uuid, diff --git a/src/context/service/database/Service.py b/src/context/service/database/Service.py index ba042fe8fd079172df66526732edbea660d2d9fa..62f07e4fbe4f90af7834358cc79d4c8cb82934f4 100644 --- a/src/context/service/database/Service.py +++ b/src/context/service/database/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -91,7 +91,7 @@ def service_set(db_engine : Engine, messagebroker : MessageBroker, request : Ser service_status = grpc_to_enum__service_status(request.service_status.service_status) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) service_endpoints_data : List[Dict] = list() for i,endpoint_id in enumerate(request.service_endpoint_ids): @@ -180,7 +180,8 @@ def service_unset(db_engine : Engine, messagebroker : MessageBroker, request : S ['should be == request.service_id.context_id.context_uuid.uuid({:s})'.format(raw_context_uuid)]) service_endpoint_uuids.add(endpoint_get_uuid(endpoint_id, allow_random=False)[2]) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + constraints = compose_constraints_data(request.service_constraints, now, service_uuid=service_uuid) config_rules = compose_config_rules_data(request.service_config.config_rules, now, service_uuid=service_uuid) diff --git a/src/context/service/database/Slice.py b/src/context/service/database/Slice.py index 95116313dd6ec6db0853850ba5ecff15f6753a31..84e210e025e750613387a18c4c7eef4618cdfcdb 100644 --- a/src/context/service/database/Slice.py +++ b/src/context/service/database/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -89,7 +89,7 @@ def slice_set(db_engine : Engine, messagebroker : MessageBroker, request : Slice slice_status = grpc_to_enum__slice_status(request.slice_status.slice_status) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) slice_endpoints_data : List[Dict] = list() for i,endpoint_id in enumerate(request.slice_endpoint_ids): @@ -222,7 +222,8 @@ def slice_unset(db_engine : Engine, messagebroker : MessageBroker, request : Sli for subslice_id in request.slice_subslice_ids } - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + constraints = compose_constraints_data(request.slice_constraints, now, slice_uuid=slice_uuid) config_rules = compose_config_rules_data(request.slice_config.config_rules, now, slice_uuid=slice_uuid) diff --git a/src/context/service/database/Topology.py b/src/context/service/database/Topology.py index e1c59ea118915e2ad0d69d4b8cacf59c354b8297..1ee5d16422e94d2b9a2ed4dede461a14e97434ec 100644 --- a/src/context/service/database/Topology.py +++ b/src/context/service/database/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -27,7 +27,8 @@ from common.tools.object_factory.Topology import json_topology_id from context.Config import ALLOW_EXPLICIT_ADD_DEVICE_TO_TOPOLOGY, ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY from .models.DeviceModel import DeviceModel from .models.LinkModel import LinkModel -from .models.TopologyModel import TopologyDeviceModel, TopologyLinkModel, TopologyModel +from .models.OpticalLinkModel import OpticalLinkModel +from .models.TopologyModel import TopologyDeviceModel, TopologyLinkModel, TopologyModel, TopologyOpticalLinkModel from .uuids.Context import context_get_uuid from .uuids.Device import device_get_uuid from .uuids.Link import link_get_uuid @@ -79,6 +80,7 @@ def topology_get_details(db_engine : Engine, request : TopologyId) -> TopologyDe obj : Optional[TopologyModel] = session.query(TopologyModel)\ .options(selectinload(TopologyModel.topology_devices, TopologyDeviceModel.device, DeviceModel.endpoints))\ .options(selectinload(TopologyModel.topology_links, TopologyLinkModel.link, LinkModel.link_endpoints))\ + .options(selectinload(TopologyModel.topology_optical_links, TopologyOpticalLinkModel.optical_link, OpticalLinkModel.opticallink_endpoints))\ .filter_by(topology_uuid=topology_uuid).one_or_none() #.options(selectinload(DeviceModel.components))\ return None if obj is None else obj.dump_details() @@ -132,7 +134,8 @@ def topology_set(db_engine : Engine, messagebroker : MessageBroker, request : To MSG += 'Items in field "link_ids" ignored. This field is used for retrieval purposes only.' LOGGER.warning(MSG) - now = datetime.datetime.utcnow() + now = datetime.datetime.now(datetime.timezone.utc) + topology_data = [{ 'context_uuid' : context_uuid, 'topology_uuid': topology_uuid, diff --git a/src/context/service/database/__init__.py b/src/context/service/database/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/context/service/database/__init__.py +++ b/src/context/service/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/ComponentModel.py b/src/context/service/database/models/ComponentModel.py index 937d37e22e86d8034c9e33f137ae8a781f553b67..aba7c67ad96292a2dbb6c67335a46097c2b11218 100644 --- a/src/context/service/database/models/ComponentModel.py +++ b/src/context/service/database/models/ComponentModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/ConfigRuleModel.py b/src/context/service/database/models/ConfigRuleModel.py index f57c90b82b950e68103e1381c6ff0b118e6307df..029aa6867349e10eb56546ce65d2541065ec6a6f 100644 --- a/src/context/service/database/models/ConfigRuleModel.py +++ b/src/context/service/database/models/ConfigRuleModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/ConnectionModel.py b/src/context/service/database/models/ConnectionModel.py index 1659a55468285b76b5915e2c41e0332b6d82e257..d3075cb606b170524d1238861235d54d0e97fc0f 100644 --- a/src/context/service/database/models/ConnectionModel.py +++ b/src/context/service/database/models/ConnectionModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/ConstraintModel.py b/src/context/service/database/models/ConstraintModel.py index 3eef030fccccbe4e4806f12188161bf97018c5f5..c9cc76ff7bb6757e2cf3358b0327d202dd1cb9ec 100644 --- a/src/context/service/database/models/ConstraintModel.py +++ b/src/context/service/database/models/ConstraintModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/ContextModel.py b/src/context/service/database/models/ContextModel.py index 89d186e0e7c6f5225bdaf32c4318b0ba8b641092..51895ec3e2ee4e2a33a789f981a633374e6026a1 100644 --- a/src/context/service/database/models/ContextModel.py +++ b/src/context/service/database/models/ContextModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/DeviceModel.py b/src/context/service/database/models/DeviceModel.py index 2aeb90dfdeaa57ba96ff9c9ed095f363c5f8f0fb..10b618739d9adb6d9797a105c440ca621daa4cee 100644 --- a/src/context/service/database/models/DeviceModel.py +++ b/src/context/service/database/models/DeviceModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -34,10 +34,11 @@ class DeviceModel(_Base): updated_at = Column(DateTime, nullable=False) #topology_devices = relationship('TopologyDeviceModel', back_populates='device') - config_rules = relationship('DeviceConfigRuleModel', passive_deletes=True) # lazy='joined', back_populates='device' - endpoints = relationship('EndPointModel', passive_deletes=True) # lazy='joined', back_populates='device' - components = relationship('ComponentModel', passive_deletes=True) # lazy='joined', back_populates='device' - controller = relationship('DeviceModel', remote_side=[device_uuid], passive_deletes=True) # lazy='joined', back_populates='device' + config_rules = relationship('DeviceConfigRuleModel', passive_deletes=True) # lazy='joined', back_populates='device' + endpoints = relationship('EndPointModel', passive_deletes=True) # lazy='joined', back_populates='device' + components = relationship('ComponentModel', passive_deletes=True) # lazy='joined', back_populates='device' + controller = relationship('DeviceModel', remote_side=[device_uuid], passive_deletes=True) # lazy='joined', back_populates='device' + optical_config = relationship('OpticalConfigModel', passive_deletes=True) def dump_id(self) -> Dict: return {'device_uuid': {'uuid': self.device_uuid}} diff --git a/src/context/service/database/models/EndPointModel.py b/src/context/service/database/models/EndPointModel.py index 6355f14af453b3695bb688285aa19c8641aac4c0..80138733be97f7a60ff1ab8e010224a9297b5f58 100644 --- a/src/context/service/database/models/EndPointModel.py +++ b/src/context/service/database/models/EndPointModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -33,8 +33,9 @@ class EndPointModel(_Base): updated_at = Column(DateTime, nullable=False) endpoint_location = Column(String, nullable=True) - device = relationship('DeviceModel', back_populates='endpoints') # lazy='selectin' - topology = relationship('TopologyModel', lazy='selectin') + device = relationship('DeviceModel', back_populates='endpoints') # lazy='selectin' + topology = relationship('TopologyModel', lazy='selectin') + optical_link_endpoints = relationship('OpticalLinkEndPointModel', back_populates='endpoint' ) #link_endpoints = relationship('LinkEndPointModel', back_populates='endpoint' ) #service_endpoints = relationship('ServiceEndPointModel', back_populates='endpoint' ) diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index cece4cc163516bfaa4af46a9450410ff0875e966..1bfa532d843bce4e078ef087fa4659b6fec75ceb 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,17 +13,22 @@ # limitations under the License. import operator -from sqlalchemy import CheckConstraint, Column, DateTime, Float, ForeignKey, Integer, String +from sqlalchemy import ( + CheckConstraint, Column, DateTime, Enum, Float, ForeignKey, Integer, String +) from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from typing import Dict +from common.proto.context_pb2 import LinkTypeEnum from ._Base import _Base +from .enums.LinkType import ORM_LinkTypeEnum class LinkModel(_Base): __tablename__ = 'link' link_uuid = Column(UUID(as_uuid=False), primary_key=True) link_name = Column(String, nullable=False) + link_type = Column(Enum(ORM_LinkTypeEnum), nullable=False) total_capacity_gbps = Column(Float, nullable=True) used_capacity_gbps = Column(Float, nullable=True) created_at = Column(DateTime, nullable=False) @@ -44,11 +49,14 @@ class LinkModel(_Base): result = { 'link_id' : self.dump_id(), 'name' : self.link_name, + 'link_type' : self.link_type.value, 'link_endpoint_ids': [ link_endpoint.endpoint.dump_id() for link_endpoint in sorted(self.link_endpoints, key=operator.attrgetter('position')) ], } + if self.link_type is None: + self.link_type = LinkTypeEnum.LINKTYPE_UNKNOWN if self.total_capacity_gbps is not None: attributes : Dict = result.setdefault('attributes', dict()) attributes.setdefault('total_capacity_gbps', self.total_capacity_gbps) diff --git a/src/context/service/database/models/OpticalConfig/OpticalConfigModel.py b/src/context/service/database/models/OpticalConfig/OpticalConfigModel.py new file mode 100644 index 0000000000000000000000000000000000000000..2d52aff4b5dc79c921f0c2bee44ccbee01d45615 --- /dev/null +++ b/src/context/service/database/models/OpticalConfig/OpticalConfigModel.py @@ -0,0 +1,70 @@ +# Copyright 2022-2024 ETSI 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. + +import json +from sqlalchemy import Column, String, ForeignKey +from sqlalchemy.dialects.postgresql import ARRAY +from sqlalchemy.orm import relationship +from context.service.database.models._Base import _Base + +class OpticalConfigModel(_Base): + __tablename__ = 'optical_config' + opticalconfig_uuid = Column(String, primary_key = True) + channel_namespace = Column(String, nullable = True) + endpoints = Column(ARRAY(String), nullable = True) + type = Column(String, nullable = False) + + # transcievers = Column(ARRAY(String), nullable=True) + # interfaces = Column(String, nullable=True) + # channels = relationship("OpticalChannelModel") + transponders = relationship("TransponderTypeModel") + roadms = relationship("RoadmTypeModel") + + device_uuid = Column(ForeignKey("device.device_uuid",ondelete="CASCADE"),index=True ,nullable=False) + device = relationship("DeviceModel", back_populates='optical_config') + + def dump_id (self ): + return { + "opticalconfig_uuid":self.opticalconfig_uuid, + "device_uuid" :self.device_uuid + } + + def dump(self): + obj={ + # "channels" : [channel.dump() for channel in self.channels], + # "transceivers" : {"transceiver": [transciever for transciever in self.transcievers]}, + # "interfaces" : {"interface":json.loads(self.interfaces) if self.interfaces else ''}, + "channel_namespace" : self.channel_namespace, + "endpoints" : [json.loads(endpoint) for endpoint in self.endpoints if endpoint], + "device_name" : self.device.device_name, + "type" : self.type + } + if self.type =="optical-transponder" : + channels = [transponer.dump() for transponer in self.transponders][0] + obj['channels' ] = channels.get('channels', None) + obj['transceivers' ] = channels.get('transceivers', None) + obj['interfaces' ] = channels.get('interfaces', None) + obj['trasponder_uuid'] = channels.get('trasponder_uuid', None) + + if self.type =="optical-roadm" : + dev = [roadms.dump() for roadms in self.roadms][0] + obj['channels' ] = dev.get('channels', None) + obj['roadm_uuid'] = dev.get('roadm_uuid', None) + + if self.type =="openroadm" : + dev = [roadms.dump() for roadms in self.roadms][0] + obj['interfaces'] = dev.get('interfaces', None) + obj['roadm_uuid'] = dev.get('roadm_uuid', None) + + return obj diff --git a/src/context/service/database/models/OpticalConfig/RoadmModel.py b/src/context/service/database/models/OpticalConfig/RoadmModel.py new file mode 100644 index 0000000000000000000000000000000000000000..92a13ade00c806d0b29fe65dc81733193f2873ab --- /dev/null +++ b/src/context/service/database/models/OpticalConfig/RoadmModel.py @@ -0,0 +1,108 @@ +# Copyright 2022-2024 ETSI 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. + +import logging +from sqlalchemy import Column, String, Integer, ForeignKey, Float +from sqlalchemy.orm import relationship +from context.service.database.models._Base import _Base + +class RoadmTypeModel(_Base): + __tablename__ = 'roadm_type' + roadm_uuid = Column(String, primary_key=True) + circuits = Column(String, nullable=True) + opticalconfig_uuid = Column(ForeignKey('optical_config.opticalconfig_uuid', ondelete='CASCADE'), index=True, nullable=False) + channels = relationship("ChannelModel") + opticalconfig = relationship('OpticalConfigModel', back_populates='roadms') + interfaces = relationship("ORInterfaceModel") + + def dump_id (self): + return { + "roadm_uuid" : self.roadm_uuid + } + + def dump (self): + return { + "channels" : [channel.dump() for channel in self.channels], + "roadm_uuid" : self.dump_id(), + "interfaces" : [interface.dump() for interface in self.interfaces] + } + +class ChannelModel(_Base): + __tablename__ = 'channel' + + channel_uuid = Column(String, primary_key=True) + band_name = Column(String, nullable=True) + lower_frequency = Column(Integer, nullable=True) + upper_frequency = Column(Integer, nullable=True) + channel_index = Column(String, nullable=True) + status = Column(String, nullable=True) + src_port = Column(String, nullable=True) + dest_port = Column(String, nullable=True) + type = Column(String, nullable=False) + optical_band_parent = Column(String, nullable=True) + roadm_uuid = Column(ForeignKey('roadm_type.roadm_uuid', ondelete='CASCADE'), nullable=False) + roadm = relationship('RoadmTypeModel',back_populates='channels') + + # opticalconfig_uuid = Column(ForeignKey('optical_config.opticalconfig_uuid', ondelete='CASCADE'), primary_key=True) + # opticalconfig = relationship('OpticalConfigModel', back_populates='channels') + + def dump_id (self ): + return { + "channel_uuid": self.channel_uuid + } + + def dump(self): + return { + "band_name" : self.band_name, + "lower_frequency" : self.lower_frequency, + "upper_frequency" : self.upper_frequency, + "type" : self.type, + "src_port" : self.src_port, + "dest_port" : self.dest_port, + "status" : self.status, + "optical_band_parent" : self.optical_band_parent, + "channel_index" : self.channel_index, + } + +class ORInterfaceModel (_Base): + __tablename__ = 'open_roadm_interface' + + interface_uuid = Column(String, primary_key = True) + name = Column(String, nullable = False, unique = True) + type = Column(String, nullable = True) + administrative_state = Column(String, nullable = True) + circuit_pack_name = Column(String, nullable = True) + port = Column(String, nullable = True) + interface_list = Column(String, nullable = True) + frequency = Column(Float, nullable = True) + width = Column(Integer, nullable = True) + roadm_uuid = Column(ForeignKey('roadm_type.roadm_uuid', ondelete='CASCADE'), nullable=False) + roadm = relationship('RoadmTypeModel', back_populates='interfaces') + + def dump_id (self ): + return { + "interface_uuid": self.interface_uuid + } + + def dump(self): + return { + "name" : self.name, + "type" : self.type, + "administrative_state": self.administrative_state, + "circuit_pack_name" : self.circuit_pack_name, + "port" : self.port, + "interface_list" : self.interface_list, + "frequency" : self.frequency, + "width" : self.width + } diff --git a/src/context/service/database/models/OpticalConfig/TransponderModel.py b/src/context/service/database/models/OpticalConfig/TransponderModel.py new file mode 100644 index 0000000000000000000000000000000000000000..a35476df34802dc91f50524ec9405e19ce5002c0 --- /dev/null +++ b/src/context/service/database/models/OpticalConfig/TransponderModel.py @@ -0,0 +1,72 @@ +# Copyright 2022-2024 ETSI 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. + +import json +from sqlalchemy import Column, String, Integer , ForeignKey +from sqlalchemy.dialects.postgresql import ARRAY +from sqlalchemy.orm import relationship +from context.service.database.models._Base import _Base + +class TransponderTypeModel (_Base): + __tablename__ = 'transponder_type' + + transponder_uuid = Column(String, primary_key=True) + transcievers = Column(ARRAY(String), nullable=True) + interfaces = Column(String, nullable=True) + opticalconfig_uuid = Column(ForeignKey('optical_config.opticalconfig_uuid', ondelete='CASCADE'), index=True, nullable=False) + + channels = relationship("OpticalChannelModel") + opticalconfig = relationship('OpticalConfigModel', back_populates='transponders') + + def dump_id (self): + return { + "transponder_uuid": self.transponder_uuid + } + + def dump (self): + return { + "channels" : [channel.dump() for channel in self.channels], + "transceivers" : {"transceiver": [transciever for transciever in self.transcievers]}, + "interfaces" : {"interface":json.loads(self.interfaces) if self.interfaces else ''}, + "trasponder_uuid" : self.dump_id() + } + +class OpticalChannelModel(_Base): + __tablename__ = 'optical_channel' + + channel_uuid = Column(String, primary_key=True) + channel_name = Column(String, nullable=True) + frequency = Column(Integer, nullable=True) + operational_mode = Column(Integer, nullable=True) + status = Column(String, nullable=True) + target_output_power = Column(String, nullable=True) + transponder_uuid = Column(ForeignKey('transponder_type.transponder_uuid', ondelete='CASCADE'), nullable=False) + transponder = relationship('TransponderTypeModel', back_populates='channels') + + # opticalconfig_uuid = Column(ForeignKey('optical_config.opticalconfig_uuid', ondelete='CASCADE'), primary_key=True) + # opticalconfig = relationship('OpticalConfigModel', back_populates='channels') + + def dump_id (self ): + return { + "channel_uuid": self.channel_uuid + } + + def dump(self): + return { + "name" : {'index':self.channel_name}, + "frequency" : self.frequency, + "target-output-power" : self.target_output_power, + "operational-mode" : self.operational_mode, + "status" : self.status, + } diff --git a/src/context/service/database/models/OpticalConfig/__init__.py b/src/context/service/database/models/OpticalConfig/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..023830645e0fcb60e3f8583674a954810af222f2 --- /dev/null +++ b/src/context/service/database/models/OpticalConfig/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/OpticalConfigModel.py b/src/context/service/database/models/OpticalConfigModel.py deleted file mode 100644 index d7274da17070e0f21774d8173abcfad12e1dcae7..0000000000000000000000000000000000000000 --- a/src/context/service/database/models/OpticalConfigModel.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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. - -import json -from sqlalchemy import Column, String, Integer -from sqlalchemy.dialects.postgresql import ARRAY -from ._Base import _Base - -class OpticalConfigModel(_Base): - __tablename__ = 'optical_config' - opticalconfig_uuid = Column(String, primary_key=True) - channels = Column(ARRAY(String), nullable=True) - transcievers = Column(ARRAY(String), nullable=True) - interfaces = Column(String, nullable=True) - channel_namespace = Column(String, nullable=True) - endpoints = Column(ARRAY(String), nullable=True) - frequency = Column(Integer, nullable=True) - operational_mode = Column(Integer, nullable=True) - output_power = Column(String, nullable=True) - - def dump(self): - return { - "channels" : [{'name': {'index': channel}} for channel in self.channels], - "transceivers" : {"transceiver": [transciever for transciever in self.transcievers]}, - "interfaces" : {"interface": json.loads(self.interfaces)}, - "channel_namespace" : self.channel_namespace, - "endpoints" : [json.loads(endpoint) for endpoint in self.endpoints], - "frequency" : self.frequency, - "output_power" : self.output_power, - "operational_mode" : self.operational_mode, - } diff --git a/src/context/service/database/models/OpticalLinkModel.py b/src/context/service/database/models/OpticalLinkModel.py new file mode 100644 index 0000000000000000000000000000000000000000..930e8935c5af48793915c72df451ec48dc782a04 --- /dev/null +++ b/src/context/service/database/models/OpticalLinkModel.py @@ -0,0 +1,74 @@ +# Copyright 2022-2024 ETSI 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. + + +from sqlalchemy import Column, DateTime, ForeignKey, Integer, String ,Boolean +from sqlalchemy.dialects.postgresql import UUID +from sqlalchemy.orm import relationship +from typing import Dict +from ._Base import _Base +from .Slot import C_Slot ,S_Slot , L_Slot + +class OpticalLinkModel(_Base): + __tablename__ = 'opticallink' + + opticallink_uuid = Column(UUID(as_uuid=False), primary_key=True) + name = Column(String, nullable=False) + created_at = Column(DateTime, nullable=False) + updated_at = Column(DateTime, nullable=False) + length = Column(Integer, nullable=True) + src_port = Column(String, nullable=True) + dst_port = Column(String, nullable=True) + local_peer_port = Column(String, nullable=True) + remote_peer_port = Column(String, nullable=True) + used = Column(Boolean ,nullable=True) + c_slots = Column (C_Slot,nullable=True) + l_slots = Column (L_Slot,nullable=True) + s_slots = Column (S_Slot,nullable=True) + opticallink_endpoints = relationship('OpticalLinkEndPointModel') + topology_optical_links = relationship('TopologyOpticalLinkModel', back_populates='optical_link') + + def dump_id(self) -> Dict: + return {'link_uuid': {'uuid': self.opticallink_uuid}} + + def dump(self) -> Dict: + result = { + 'link_id' : self.dump_id(), + 'name' : self.name, + 'optical_details' : { + 'length' : self.length, + 'src_port' : self.src_port, + 'dst_port' : self.dst_port, + 'local_peer_port' : self.local_peer_port, + 'remote_peer_port' : self.remote_peer_port, + 'used' : self.used, + 'c_slots' : self.c_slots if self.c_slots is not None else {}, + 'l_slots' : self.l_slots if self.l_slots is not None else {}, + 's_slots' : self.s_slots if self.s_slots is not None else {}, + }, + 'link_endpoint_ids' : [ + optical_endpoint.endpoint.dump_id() + for optical_endpoint in self.opticallink_endpoints + ], + } + return result + +class OpticalLinkEndPointModel(_Base): + __tablename__ = 'opticallink_endpoint' + + link_uuid = Column(ForeignKey('opticallink.opticallink_uuid', ondelete='CASCADE' ), primary_key=True) + endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + + optical_link = relationship('OpticalLinkModel', back_populates='opticallink_endpoints') + endpoint = relationship('EndPointModel', lazy='selectin') diff --git a/src/context/service/database/models/PolicyRuleModel.py b/src/context/service/database/models/PolicyRuleModel.py index d54bfec1ad69ad740bb8308f21559f3c0d01fbe4..b2590708f0ddef86465bdf33c766a1d2777abaa5 100644 --- a/src/context/service/database/models/PolicyRuleModel.py +++ b/src/context/service/database/models/PolicyRuleModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/ServiceModel.py b/src/context/service/database/models/ServiceModel.py index 6ac287205d33b7a3b3336b1d6f388caff80598fd..98f8cff7cdd86a1b8a5ee65ab85a437a50210e4f 100644 --- a/src/context/service/database/models/ServiceModel.py +++ b/src/context/service/database/models/ServiceModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/SliceModel.py b/src/context/service/database/models/SliceModel.py index d952fec92ed83fc5077b5f511badc75c8840c3f5..e04ab03078a485a272971dad7d06dca5df1eab7a 100644 --- a/src/context/service/database/models/SliceModel.py +++ b/src/context/service/database/models/SliceModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/Slot.py b/src/context/service/database/models/Slot.py new file mode 100644 index 0000000000000000000000000000000000000000..09bfc17646e7819b4a1c94ebd555f314d6e90d46 --- /dev/null +++ b/src/context/service/database/models/Slot.py @@ -0,0 +1,80 @@ +# Copyright 2022-2024 ETSI 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. + +from sqlalchemy.types import TypeDecorator, Integer + +class SlotType(TypeDecorator): + impl = Integer + + def process_bind_param(self, value, dialect): + if value is not None: + bin_num = "0b" + for i,(key,val) in enumerate(value.items()): + bin_num =bin_num + f"{val}" + int_num = int(bin_num,2) + return int_num + + def process_result_value(self, value, dialect): + if value is not None: + slot = dict() + bin_num = bin(value) + sliced_num = bin_num[2:] + for i in range(len(sliced_num)): + slot[str(i+1)]=int(sliced_num[i]) + return slot + +class C_Slot(SlotType): + start_point = 0 + + def process_result_value(self, value, dialect): + if value is not None: + slot = dict() + bin_num = bin(value) + sliced_num = bin_num[2:] + if (len(sliced_num) != 20) : + for i in range(0,20 - len(sliced_num)): + sliced_num = '0' + sliced_num + for i in range(len(sliced_num)): + slot[str(self.start_point+i+1)]=int(sliced_num[i]) + return slot + +class L_Slot (SlotType): + start_point = 100 + + def process_result_value(self, value, dialect): + if value is not None: + slot = dict() + bin_num = bin(value) + sliced_num = bin_num[2:] + if (len(sliced_num) != 20) : + for i in range(0,20 - len(sliced_num)): + sliced_num='0'+sliced_num + for i in range(len(sliced_num)): + slot[str(self.start_point+i+1)]=int(sliced_num[i]) + return slot + +class S_Slot (SlotType): + start_point = 500 + + def process_result_value(self, value, dialect): + if value is not None: + slot= dict() + bin_num = bin(value) + sliced_num=bin_num[2:] + if (len(sliced_num) != 20) : + for i in range(0,20 - len(sliced_num)): + sliced_num='0'+sliced_num + for i in range(len(sliced_num)): + slot[str(self.start_point+i+1)]=int(sliced_num[i]) + return slot diff --git a/src/context/service/database/models/TopologyModel.py b/src/context/service/database/models/TopologyModel.py index 995abab3a40bfacb446360c55c784b0a5f4207ec..4c9efed0f622d60078550050e0cb570315e3786d 100644 --- a/src/context/service/database/models/TopologyModel.py +++ b/src/context/service/database/models/TopologyModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -27,9 +27,10 @@ class TopologyModel(_Base): created_at = Column(DateTime, nullable=False) updated_at = Column(DateTime, nullable=False) - context = relationship('ContextModel', back_populates='topologies', lazy='selectin') - topology_devices = relationship('TopologyDeviceModel') # back_populates='topology' - topology_links = relationship('TopologyLinkModel' ) # back_populates='topology' + context = relationship('ContextModel', back_populates='topologies', lazy='selectin') + topology_devices = relationship('TopologyDeviceModel') # back_populates='topology' + topology_links = relationship('TopologyLinkModel' ) # back_populates='topology' + topology_optical_links = relationship("TopologyOpticalLinkModel") def dump_id(self) -> Dict: return { @@ -39,10 +40,11 @@ class TopologyModel(_Base): def dump(self) -> Dict: return { - 'topology_id': self.dump_id(), - 'name' : self.topology_name, - 'device_ids' : [{'device_uuid': {'uuid': td.device_uuid}} for td in self.topology_devices], - 'link_ids' : [{'link_uuid' : {'uuid': tl.link_uuid }} for tl in self.topology_links ], + 'topology_id' : self.dump_id(), + 'name' : self.topology_name, + 'device_ids' : [{'device_uuid': {'uuid': td.device_uuid }} for td in self.topology_devices ], + 'link_ids' : [{'link_uuid' : {'uuid': tl.link_uuid }} for tl in self.topology_links ], + 'optical_link_ids': [{'link_uuid' : {'uuid': to.optical_link_uuid}} for to in self.topology_optical_links], } def dump_details(self) -> Dict: @@ -54,11 +56,16 @@ class TopologyModel(_Base): tl.link.dump() for tl in self.topology_links ] + optical_links=[ + ol.optical_link.dump() + for ol in self.topology_optical_links + ] return { - 'topology_id': self.dump_id(), - 'name' : self.topology_name, - 'devices' : devices, - 'links' : links, + 'topology_id' : self.dump_id(), + 'name' : self.topology_name, + 'devices' : devices, + 'links' : links, + 'optical_links': optical_links, } class TopologyDeviceModel(_Base): @@ -78,3 +85,14 @@ class TopologyLinkModel(_Base): topology = relationship('TopologyModel', lazy='selectin', viewonly=True) # back_populates='topology_links' link = relationship('LinkModel', lazy='selectin') # back_populates='topology_links' + +#---------------------------------------- Experimental --------------------------------------- + +class TopologyOpticalLinkModel(_Base): + __tablename__ = 'topology_optical_link' + + topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + optical_link_uuid = Column(ForeignKey('opticallink.opticallink_uuid', ondelete='CASCADE' ), primary_key=True, index=True) + + topology = relationship('TopologyModel', lazy='selectin', viewonly=True) # back_populates='topology_optical_links' + optical_link = relationship('OpticalLinkModel', lazy='selectin') # back_populates='topology_optical_links' diff --git a/src/context/service/database/models/_Base.py b/src/context/service/database/models/_Base.py index d73dda442ba1c3936370f1fa392f304a161080ff..89257393cad40042aef0076a2bf9eb0980e850f7 100644 --- a/src/context/service/database/models/_Base.py +++ b/src/context/service/database/models/_Base.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/__init__.py b/src/context/service/database/models/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/context/service/database/models/__init__.py +++ b/src/context/service/database/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/ConfigAction.py b/src/context/service/database/models/enums/ConfigAction.py index 3e06fc408e05f78d165670964b24a3e89e7b7b7e..b6821c54c73f9bc60bbcc91aec31e3ed10a35c3b 100644 --- a/src/context/service/database/models/enums/ConfigAction.py +++ b/src/context/service/database/models/enums/ConfigAction.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/ConstraintAction.py b/src/context/service/database/models/enums/ConstraintAction.py index efb1f12a221ae2c1599e514831240e823c9164d3..4f5768b99a84d8ba28b4f2d17cdfc5e794776787 100644 --- a/src/context/service/database/models/enums/ConstraintAction.py +++ b/src/context/service/database/models/enums/ConstraintAction.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index cf900ed6df3b4699a4e56f53873174ddd997cd53..5342f788a7b273aa7f6ae3c5779774165cd852bc 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/DeviceOperationalStatus.py b/src/context/service/database/models/enums/DeviceOperationalStatus.py index 3e1fd531d82b25719fffe1c9f9954ac6de692daa..9f963b1c5f313caf8057d355bcca4ce9d3a8cc3f 100644 --- a/src/context/service/database/models/enums/DeviceOperationalStatus.py +++ b/src/context/service/database/models/enums/DeviceOperationalStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/KpiSampleType.py b/src/context/service/database/models/enums/KpiSampleType.py index 7600c0fb575baefd765f607649bc99d99e1b2388..77b568dcfc809447851bd39fc5093ab60ca67892 100644 --- a/src/context/service/database/models/enums/KpiSampleType.py +++ b/src/context/service/database/models/enums/KpiSampleType.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/LinkType.py b/src/context/service/database/models/enums/LinkType.py new file mode 100644 index 0000000000000000000000000000000000000000..68624af845ea813aa5ca886de97861852a294516 --- /dev/null +++ b/src/context/service/database/models/enums/LinkType.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI 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. + +import enum, functools +from common.proto.context_pb2 import LinkTypeEnum +from ._GrpcToEnum import grpc_to_enum + +# IMPORTANT: Entries of enum class ORM_LinkTypeEnum should be named as in +# the proto files removing the prefixes. For example, proto item +# LinkTypeEnum.DEVICEDRIVER_COPPER should be included as COPPER. +# If item name does not match, automatic mapping of proto enums +# to database enums will fail. +class ORM_LinkTypeEnum(enum.Enum): + UNKNOWN = LinkTypeEnum.LINKTYPE_UNKNOWN + COPPER = LinkTypeEnum.LINKTYPE_COPPER + FIBER = LinkTypeEnum.LINKTYPE_FIBER + RADIO = LinkTypeEnum.LINKTYPE_RADIO + VIRTUAL = LinkTypeEnum.LINKTYPE_VIRTUAL + +grpc_to_enum__link_type_enum = functools.partial( + grpc_to_enum, LinkTypeEnum, ORM_LinkTypeEnum +) diff --git a/src/context/service/database/models/enums/PolicyRuleState.py b/src/context/service/database/models/enums/PolicyRuleState.py index 6905dd3b657bfee2f678e0dac82622e355b4b95c..99c04905573b9618329e81fd9de784a2d3d772e2 100644 --- a/src/context/service/database/models/enums/PolicyRuleState.py +++ b/src/context/service/database/models/enums/PolicyRuleState.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/ServiceStatus.py b/src/context/service/database/models/enums/ServiceStatus.py index 04d55a06527bc8bb299119df448131134b46b7fd..2438bc09ce6e369fb95c984a8931e04d1ac62e43 100644 --- a/src/context/service/database/models/enums/ServiceStatus.py +++ b/src/context/service/database/models/enums/ServiceStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/ServiceType.py b/src/context/service/database/models/enums/ServiceType.py index cd6819999a585b541ef716fa481910ae3b53ecbf..45f849a2643a328284e200f1718b02191fab9563 100644 --- a/src/context/service/database/models/enums/ServiceType.py +++ b/src/context/service/database/models/enums/ServiceType.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/SliceStatus.py b/src/context/service/database/models/enums/SliceStatus.py index deb3337de91fd13fb8f87208d3911f9b613c0c1d..b73e3f0bdb5f23d178564baa077ff03f6e5e1ed6 100644 --- a/src/context/service/database/models/enums/SliceStatus.py +++ b/src/context/service/database/models/enums/SliceStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/_GrpcToEnum.py b/src/context/service/database/models/enums/_GrpcToEnum.py index 27410f900af1df6e54571cc21f14db08cb959f50..5f2a3f82f5f95bc7c84299c90672965856e22806 100644 --- a/src/context/service/database/models/enums/_GrpcToEnum.py +++ b/src/context/service/database/models/enums/_GrpcToEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/models/enums/__init__.py b/src/context/service/database/models/enums/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/context/service/database/models/enums/__init__.py +++ b/src/context/service/database/models/enums/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/tools/FastHasher.py b/src/context/service/database/tools/FastHasher.py index 63e5d8682e0f05f282600bf228a865fa54c91ce5..69c57add7f415c901902431bf8849c63efefe54f 100644 --- a/src/context/service/database/tools/FastHasher.py +++ b/src/context/service/database/tools/FastHasher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/tools/__init__.py b/src/context/service/database/tools/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/context/service/database/tools/__init__.py +++ b/src/context/service/database/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Connection.py b/src/context/service/database/uuids/Connection.py index 83187c6432a5d3144d646a91e4a27d3a4328ef3d..947a2521322837c385af7313b8d93dc356408a4d 100644 --- a/src/context/service/database/uuids/Connection.py +++ b/src/context/service/database/uuids/Connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Context.py b/src/context/service/database/uuids/Context.py index 6af02de9af720c466206f87acb0e29b966a2f7b6..8ee8532a57bee4769b4c2351b59005de1cab1ca7 100644 --- a/src/context/service/database/uuids/Context.py +++ b/src/context/service/database/uuids/Context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Device.py b/src/context/service/database/uuids/Device.py index 5f67e63f5a970af4ea0427c55c1dc2f42c8e7892..51decee5cca638b7960ffac5b84f37963b16456a 100644 --- a/src/context/service/database/uuids/Device.py +++ b/src/context/service/database/uuids/Device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/EndPoint.py b/src/context/service/database/uuids/EndPoint.py index b8c97a1bbe584d927d8d5bab0ef9036794f3e9a8..84de1cd19ca993c020e6f6612890de19f856e297 100644 --- a/src/context/service/database/uuids/EndPoint.py +++ b/src/context/service/database/uuids/EndPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Link.py b/src/context/service/database/uuids/Link.py index 56d7791b54b435dcea94355e7f69d577a047f78f..375f738c0610c8e44d59435a9c597aad32c1478e 100644 --- a/src/context/service/database/uuids/Link.py +++ b/src/context/service/database/uuids/Link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/OpticalConfig.py b/src/context/service/database/uuids/OpticalConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..a23c1370e2541f8bfc5decf8c746543ec85c1f5e --- /dev/null +++ b/src/context/service/database/uuids/OpticalConfig.py @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI 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. + +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from common.proto.context_pb2 import DeviceId +from ._Builder import get_uuid_from_string, get_uuid_random + +def channel_get_uuid( + channel_name : str , device_id : str, allow_random : bool = False +) -> str: + if len(channel_name) > 0: + return get_uuid_from_string(channel_name) + device_id + if allow_random: return get_uuid_random() + + raise InvalidArgumentsException([ + ('channel uuid', channel_name), + ], extra_details=['Channel name is required to produce a channel UUID']) + +def interface_get_uuid( + interface_name :str , allow_random : bool = False +) -> str: + if len(interface_name) > 0: + return get_uuid_from_string(interface_name) + if allow_random: return get_uuid_random() + + raise InvalidArgumentsException([ + ('interface uuid', interface_name), + ], extra_details=['interface name is required to produce a interface UUID']) + +def transponder_get_uuid( + opticalconfig_id : str, allow_random : bool = False +) -> str: + if opticalconfig_id is not None: + return get_uuid_from_string(f"{opticalconfig_id}-transponder") + if allow_random: return get_uuid_random() + + raise InvalidArgumentsException([ + ('transponder uuid', opticalconfig_id), + + ], extra_details=['opticalconfig id is required to produce a transponder UUID']) + +def roadm_get_uuid( + opticalconfig_id : str, allow_random : bool = False +) -> str: + if opticalconfig_id is not None: + return get_uuid_from_string(f"{opticalconfig_id}-roadm") + if allow_random: return get_uuid_random() + + raise InvalidArgumentsException([ + ('roadm uuid', opticalconfig_id), + + ], extra_details=['opticalconfig id is required to produce a roadm UUID']) + +def opticalconfig_get_uuid( + device_id : DeviceId, allow_random : bool = False +) -> str: + device_uuid = device_id.device_uuid.uuid + if (len(device_uuid)>0): + return get_uuid_from_string(f"{device_uuid}_opticalconfig") + if allow_random: return get_uuid_random() + + raise InvalidArgumentsException([ + ('DeviceId ', device_id), + ], extra_details=['device_id is required to produce a OpticalConfig UUID']) diff --git a/src/context/service/database/uuids/OpticalEndPoint.py b/src/context/service/database/uuids/OpticalEndPoint.py new file mode 100644 index 0000000000000000000000000000000000000000..1fc62d4fa356066ef7e2b30a3df22ac4d4b47b60 --- /dev/null +++ b/src/context/service/database/uuids/OpticalEndPoint.py @@ -0,0 +1,38 @@ +# Copyright 2022-2024 ETSI 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. + +from typing import Tuple +from common.proto.context_pb2 import EndPointId +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from ._Builder import get_uuid_from_string, get_uuid_random +from .Device import device_get_uuid + +def optical_endpoint_get_uuid( + endpoint_id : EndPointId, endpoint_name : str = '', allow_random : bool = False +) -> Tuple[str, str, str]: + device_uuid = device_get_uuid(endpoint_id.device_id, allow_random=False) + raw_endpoint_uuid = endpoint_id.endpoint_uuid.uuid + if len(raw_endpoint_uuid) > 0: + prefix_for_name = '{:s}'.format( device_uuid) + return device_uuid, get_uuid_from_string(raw_endpoint_uuid, prefix_for_name=prefix_for_name) + if len(endpoint_name) > 0: + prefix_for_name = '{:s}'.format( device_uuid) + return device_uuid, get_uuid_from_string(endpoint_name, prefix_for_name=prefix_for_name) + if allow_random: + return device_uuid, get_uuid_random() + + raise InvalidArgumentsException([ + ('optical_endpoint_id.endpoint_uuid.uuid', raw_endpoint_uuid), + ('name', endpoint_name), + ], extra_details=['At least one is required to produce a OpticalEndPoint UUID']) diff --git a/src/context/service/database/uuids/OpticalLink.py b/src/context/service/database/uuids/OpticalLink.py new file mode 100644 index 0000000000000000000000000000000000000000..d1d1d9b62de4c1866ead7be821d9de632ca16191 --- /dev/null +++ b/src/context/service/database/uuids/OpticalLink.py @@ -0,0 +1,32 @@ +# Copyright 2022-2024 ETSI 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. + +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from common.proto.context_pb2 import LinkId +from ._Builder import get_uuid_from_string, get_uuid_random + +optical_detail_sp = "Optical_link_detail" + +def opticaldetail_get_uuid( + link_id : LinkId,allow_random=False +) -> str: + link_uuid = link_id.link_uuid.uuid + if len(link_uuid) > 0: + str_uuid=f"{link_uuid}{optical_detail_sp}" + return get_uuid_from_string(str_uuid) + + if allow_random: return get_uuid_random() + raise InvalidArgumentsException([ + ('link_id.link_uuid.uuid', link_uuid), + ], extra_details=['At least one is required to produce a Optical Link Detail UUID']) diff --git a/src/context/service/database/uuids/PolicuRule.py b/src/context/service/database/uuids/PolicuRule.py index 459f0d367f540a8b2ac5b3dc9c443742ecb8508b..f3fd9869193e255c75c020e564b0e3787b82433b 100644 --- a/src/context/service/database/uuids/PolicuRule.py +++ b/src/context/service/database/uuids/PolicuRule.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Service.py b/src/context/service/database/uuids/Service.py index 108e2e9007e603267abec279db108149f85591a3..64750b091f1b261f229878e3968b482b0ed55ac8 100644 --- a/src/context/service/database/uuids/Service.py +++ b/src/context/service/database/uuids/Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Slice.py b/src/context/service/database/uuids/Slice.py index 673a3415139892d34595df06fda45988ad162665..647e72a595b0fd8a1d7999cbe91f49451f4f257d 100644 --- a/src/context/service/database/uuids/Slice.py +++ b/src/context/service/database/uuids/Slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/Topology.py b/src/context/service/database/uuids/Topology.py index ae6859f6ccd6c669632edc75805b4dbada3ee6c3..658e6bedfecaa2176a13812c9cda4a4384b51dac 100644 --- a/src/context/service/database/uuids/Topology.py +++ b/src/context/service/database/uuids/Topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/_Builder.py b/src/context/service/database/uuids/_Builder.py index 39c98de69d577ce2722693e57c4ee678124f9e30..ca47bcc060330dad60070e4ee838fa513e171da4 100644 --- a/src/context/service/database/uuids/_Builder.py +++ b/src/context/service/database/uuids/_Builder.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/service/database/uuids/__init__.py b/src/context/service/database/uuids/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/context/service/database/uuids/__init__.py +++ b/src/context/service/database/uuids/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/Constants.py b/src/context/tests/Constants.py index 44c193fe70bde66ae0017d407fb1c5eb1ff2845f..4180a13a8003fb514a95783db61178ec3bea87c9 100644 --- a/src/context/tests/Constants.py +++ b/src/context/tests/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/Objects.py b/src/context/tests/Objects.py index 3d8db065bec0fffec432bde7c3d5e317e6628114..ff471edd6b88d9f1037ea5ea36a5ad8f59a39883 100644 --- a/src/context/tests/Objects.py +++ b/src/context/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/__init__.py b/src/context/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/context/tests/__init__.py +++ b/src/context/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/conftest.py b/src/context/tests/conftest.py index 108814c58c7d1f641c3fbcd5dc13a7c7f7159f48..5ecd9b30512a8a1a096045f203620ab5c0cf6493 100644 --- a/src/context/tests/conftest.py +++ b/src/context/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_connection.py b/src/context/tests/test_connection.py index 841f0cb35529d924ed239a538d7ac303b12de9ab..b1393c797be324b0ada1781afba2dfd8b8ca08b9 100644 --- a/src/context/tests/test_connection.py +++ b/src/context/tests/test_connection.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_context.py b/src/context/tests/test_context.py index b1392a810a635212c0c1d6b34696b3ed24300e44..c8209dfc2f683f46bdd70318bdf2f14a944e98df 100644 --- a/src/context/tests/test_context.py +++ b/src/context/tests/test_context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_device.py b/src/context/tests/test_device.py index 9f53be52bb8553572304b7a08928ec9e0e5ad3a6..d1f057c0adeca6ffe9eabadff54d8335de5b0551 100644 --- a/src/context/tests/test_device.py +++ b/src/context/tests/test_device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_hasher.py b/src/context/tests/test_hasher.py index 8e8fe92e2592dd7b02cc82b1f52384ae2a3b26c4..604c9b9fcc4bd2cdac5f232da6a784548f11f780 100644 --- a/src/context/tests/test_hasher.py +++ b/src/context/tests/test_hasher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_link.py b/src/context/tests/test_link.py index 49112a993ac6f651e6cd93517b317171bed13f9c..940bf07b0c4eedd167dfc75990e6e7731d7e1f56 100644 --- a/src/context/tests/test_link.py +++ b/src/context/tests/test_link.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_policy.py b/src/context/tests/test_policy.py index aa257b97272daab04faefb4b7b4a392e0a29b534..c9f20d2ed0be3e8dfa0da9bafb1c8a0930e4fb50 100644 --- a/src/context/tests/test_policy.py +++ b/src/context/tests/test_policy.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_service.py b/src/context/tests/test_service.py index 290ec31a2f8639c73297d893fb1a144b6a06d5c3..4a771bcd43322694064b8701be8db2e930882084 100644 --- a/src/context/tests/test_service.py +++ b/src/context/tests/test_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_slice.py b/src/context/tests/test_slice.py index a38d8ff4e3db38850eed9254ca955405910bd57e..bfa0a9225c233afff53c75d80163bcc00963fec5 100644 --- a/src/context/tests/test_slice.py +++ b/src/context/tests/test_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/context/tests/test_topology.py b/src/context/tests/test_topology.py index de5c593f4735c5fcca3ea0c242ab4d3d86f849a9..3e72c471eb3f0f042cd11a4e1c655916aa2bfbd7 100644 --- a/src/context/tests/test_topology.py +++ b/src/context/tests/test_topology.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/.gitlab-ci.yml b/src/dbscanserving/.gitlab-ci.yml index a9d99f41e8d32d596effe166a95ac38c7cfe991f..54f2092f2d6a3d408ad3e4f3eb78c42e3ba7356f 100644 --- a/src/dbscanserving/.gitlab-ci.yml +++ b/src/dbscanserving/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -30,6 +30,8 @@ build dbscanserving: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: + - src/common/**/*.py + - proto/*.proto - src/$IMAGE_NAME/**/*.{py,in,yml} - src/$IMAGE_NAME/Dockerfile - src/$IMAGE_NAME/tests/*.py @@ -48,25 +50,33 @@ unit_test dbscanserving: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME container is not in the system"; fi + - docker container prune -f script: - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" - - docker run --name $IMAGE_NAME -d -p 10008:10008 -v "$PWD/src/$IMAGE_NAME/tests:/home/${IMAGE_NAME}/results" --network=teraflowbridge --rm $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - - sleep 5 - - docker ps -a - - docker logs $IMAGE_NAME + - > + docker run --name $IMAGE_NAME -d -p 10008:10008 + --volume "$PWD/src/$IMAGE_NAME/tests:/opt/results" + --network=teraflowbridge + $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - docker ps -a - sleep 5 - docker logs $IMAGE_NAME - - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/home/${IMAGE_NAME}/results/${IMAGE_NAME}_report.xml" + - > + docker exec -i $IMAGE_NAME bash -c + "coverage run -m pytest --log-level=INFO --verbose --junitxml=/opt/results/${IMAGE_NAME}_report.xml $IMAGE_NAME/tests/test_unitary.py" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - docker rm -f $IMAGE_NAME - docker network rm teraflowbridge + - docker volume prune --force + - docker image prune --force rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' - changes: + - src/common/**/*.py + - proto/*.proto - src/$IMAGE_NAME/**/*.{py,in,yml} - src/$IMAGE_NAME/Dockerfile - src/$IMAGE_NAME/tests/*.py @@ -78,29 +88,28 @@ unit_test dbscanserving: reports: junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml - # Deployment of the dbscanserving service in Kubernetes Cluster -# deploy dbscanserving: -# variables: -# IMAGE_NAME: 'dbscanserving' # name of the microservice -# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) -# stage: deploy -# needs: -# - unit test dbscanserving -# # - integ_test execute -# script: -# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml' -# - kubectl version -# - kubectl get all -# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml" -# - kubectl get all -# # environment: -# # name: test -# # url: https://example.com -# # kubernetes: -# # namespace: test -# rules: -# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' -# when: manual -# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' -# when: manual \ No newline at end of file +#deploy dbscanserving: +# variables: +# IMAGE_NAME: 'dbscanserving' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: deploy +# needs: +# - unit test dbscanserving +# # - integ_test execute +# script: +# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml' +# - kubectl version +# - kubectl get all +# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml" +# - kubectl get all +# # environment: +# # name: test +# # url: https://example.com +# # kubernetes: +# # namespace: test +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# when: manual +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' +# when: manual diff --git a/src/dbscanserving/Config.py b/src/dbscanserving/Config.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dbscanserving/Config.py +++ b/src/dbscanserving/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/Dockerfile b/src/dbscanserving/Dockerfile index 703a36efaec97351581ac5a472295bb1959934cc..069b109a0211c06ee2a068d4603e39ea86c8d148 100644 --- a/src/dbscanserving/Dockerfile +++ b/src/dbscanserving/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -27,19 +27,6 @@ RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ chmod +x /bin/grpc_health_probe -# Creating a user for security reasons -RUN groupadd -r teraflow && useradd -u 1001 --no-log-init -r -m -g teraflow teraflow -USER teraflow - -# set working directory -RUN mkdir -p /home/teraflow/controller/common -WORKDIR /home/teraflow/controller - -# Get Python packages per module -ENV VIRTUAL_ENV=/home/teraflow/venv -RUN python3 -m venv ${VIRTUAL_ENV} -ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" - # Get generic Python packages RUN python3 -m pip install --upgrade pip RUN python3 -m pip install --upgrade setuptools wheel @@ -47,36 +34,35 @@ RUN python3 -m pip install --upgrade pip-tools # Get common Python packages # Note: this step enables sharing the previous Docker build steps among all the Python components -COPY --chown=teraflow:teraflow common_requirements.in common_requirements.in +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in RUN python3 -m pip install -r common_requirements.txt # Add common files into working directory -WORKDIR /home/teraflow/controller/common -COPY --chown=teraflow:teraflow src/common/. ./ +WORKDIR /var/teraflow/common +COPY src/common/. ./ RUN rm -rf proto # Create proto sub-folder, copy .proto files, and generate Python code -RUN mkdir -p /home/teraflow/controller/common/proto -WORKDIR /home/teraflow/controller/common/proto +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto RUN touch __init__.py -COPY --chown=teraflow:teraflow proto/*.proto ./ +COPY proto/*.proto ./ RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto RUN rm *.proto RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; -# Create module sub-folders -RUN mkdir -p /home/teraflow/controller/dbscanserving -WORKDIR /home/teraflow/controller - -# Get Python packages per module -COPY --chown=teraflow:teraflow ./src/dbscanserving/requirements.in dbscanserving/requirements.in -# consider common and specific requirements to avoid inconsistencies with dependencies -RUN pip-compile --quiet --output-file=dbscanserving/requirements.txt dbscanserving/requirements.in common_requirements.in -RUN python3 -m pip install -r dbscanserving/requirements.txt +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/dbscanserving +WORKDIR /var/teraflow/dbscanserving +COPY src/dbscanserving/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt # Add component files into working directory -COPY --chown=teraflow:teraflow ./src/dbscanserving/. dbscanserving +WORKDIR /var/teraflow +COPY src/dbscanserving/. dbscanserving/ # Start the service ENTRYPOINT ["python", "-m", "dbscanserving.service"] diff --git a/src/dbscanserving/__init__.py b/src/dbscanserving/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dbscanserving/__init__.py +++ b/src/dbscanserving/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/client/DbscanServingClient.py b/src/dbscanserving/client/DbscanServingClient.py index d834453eec772411c94529099dd6b21402c907a1..a4afad1ad10870fc9f40f62195c5177ed5c016ab 100644 --- a/src/dbscanserving/client/DbscanServingClient.py +++ b/src/dbscanserving/client/DbscanServingClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/client/__init__.py b/src/dbscanserving/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dbscanserving/client/__init__.py +++ b/src/dbscanserving/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/requirements.in b/src/dbscanserving/requirements.in index 83227dfcfea6e265be91a5be02d3873d97452344..2422522559a05d398be755cb1c8eeaf214f9a69e 100644 --- a/src/dbscanserving/requirements.in +++ b/src/dbscanserving/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/service/DbscanService.py b/src/dbscanserving/service/DbscanService.py index 28a1964a16fd682b7e4c89229d632b5ce94f09e0..86179e0257250490e0a7ed78b5c8c549bfd61228 100644 --- a/src/dbscanserving/service/DbscanService.py +++ b/src/dbscanserving/service/DbscanService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/service/DbscanServiceServicerImpl.py b/src/dbscanserving/service/DbscanServiceServicerImpl.py index d64d6ddb714940634ec42e94f2e16718aa7afa87..75bbad1d85ceac8570b60db4cef44a5ecdd2a280 100644 --- a/src/dbscanserving/service/DbscanServiceServicerImpl.py +++ b/src/dbscanserving/service/DbscanServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/service/__init__.py b/src/dbscanserving/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dbscanserving/service/__init__.py +++ b/src/dbscanserving/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/service/__main__.py b/src/dbscanserving/service/__main__.py index 792e390ad03c77c496e89aab9548ada5ee4c3cf8..66474a0b3cff3a9f34dbb7cc1f24040d33f6dd14 100644 --- a/src/dbscanserving/service/__main__.py +++ b/src/dbscanserving/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/tests/__init__.py b/src/dbscanserving/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dbscanserving/tests/__init__.py +++ b/src/dbscanserving/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dbscanserving/tests/test_unitary.py b/src/dbscanserving/tests/test_unitary.py index ccc14652be244505c4904a21b8b02f07d6540a0c..7ac55c8e67e78776b79c3acf71eddcf9567ee65d 100644 --- a/src/dbscanserving/tests/test_unitary.py +++ b/src/dbscanserving/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/.gitlab-ci.yml b/src/device/.gitlab-ci.yml index 3ae6b2b20d22d0a91d10b61acd20fd0d2d4a28ac..0c093b57005efbb604e1c316322942b2cdcb1c68 100644 --- a/src/device/.gitlab-ci.yml +++ b/src/device/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/Config.py b/src/device/Config.py index 7635da2d23fd798535c311583886123a73e58065..73c37610dcc7ba6e76760b567f699a8be575b3e3 100644 --- a/src/device/Config.py +++ b/src/device/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/Dockerfile b/src/device/Dockerfile index 42bf4335cc6b0c6337c166dae8680e18d46d1360..d760e0c70d44fb4b53455ae60799e61964f5b23f 100644 --- a/src/device/Dockerfile +++ b/src/device/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,9 +16,24 @@ FROM python:3.9-slim # Install dependencies RUN apt-get --yes --quiet --quiet update && \ - apt-get --yes --quiet --quiet install wget g++ git && \ + apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* +# Download, build and install libyang. Note that APT package is outdated +# - Ref: https://github.com/CESNET/libyang +# - Ref: https://github.com/CESNET/libyang-python/ +RUN mkdir -p /var/libyang +RUN git clone https://github.com/CESNET/libyang.git /var/libyang +WORKDIR /var/libyang +RUN git fetch +RUN git checkout v2.1.148 +RUN mkdir -p /var/libyang/build +WORKDIR /var/libyang/build +RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. +RUN make +RUN make install +RUN ldconfig + # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 @@ -62,17 +77,31 @@ RUN python3 -m pip install -r requirements.txt # Add component files into working directory WORKDIR /var/teraflow +COPY src/device/. device/ COPY src/context/__init__.py context/__init__.py COPY src/context/client/. context/client/ COPY src/monitoring/__init__.py monitoring/__init__.py COPY src/monitoring/client/. monitoring/client/ -COPY src/device/. device/ +# Clone test mock tools RUN mkdir -p tests/tools/mock_ietf_actn_sdn_ctrl RUN touch tests/__init__.py RUN touch tests/tools/__init__.py RUN touch tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py COPY src/tests/tools/mock_ietf_actn_sdn_ctrl/. tests/tools/mock_ietf_actn_sdn_ctrl/ +# Clone OpenConfig YANG models +RUN mkdir -p /tmp/openconfig +RUN git clone https://github.com/openconfig/public.git /tmp/openconfig +WORKDIR /tmp/openconfig +RUN git fetch +RUN git checkout v4.4.0 +RUN rm -rf /var/teraflow/device/service/drivers/gnmi_openconfig/git +RUN mkdir -p /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public +RUN mv /tmp/openconfig/release /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public +RUN mv /tmp/openconfig/third_party /var/teraflow/device/service/drivers/gnmi_openconfig/git/openconfig/public +RUN rm -rf /tmp/openconfig +WORKDIR /var/teraflow + # Start the service ENTRYPOINT ["python", "-m", "device.service"] diff --git a/src/device/__init__.py b/src/device/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/__init__.py +++ b/src/device/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/client/DeviceClient.py b/src/device/client/DeviceClient.py index d479b21cd1223e06abb48213cecc23db4fd651dc..e35e3b34fee271af1339f20e55d3325eda429c67 100644 --- a/src/device/client/DeviceClient.py +++ b/src/device/client/DeviceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -15,12 +15,16 @@ import grpc, logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.context_pb2 import Device, DeviceConfig, DeviceId, Empty,OpticalConfig,OpticalConfigId +from common.proto.context_pb2 import ( + Device, DeviceConfig, DeviceId, Empty, + OpticalConfig, OpticalConfigId, OpticalConfigList +) from common.proto.device_pb2 import MonitoringSettings from common.proto.device_pb2_grpc import DeviceServiceStub +from common.proto.optical_device_pb2_grpc import OpenConfigServiceStub from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string -from common.proto.openconfig_device_pb2_grpc import OpenConfigServiceStub + LOGGER = logging.getLogger(__name__) MAX_RETRIES = 15 DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) @@ -41,12 +45,13 @@ class DeviceClient: def connect(self): self.channel = grpc.insecure_channel(self.endpoint) self.stub = DeviceServiceStub(self.channel) - self.openconfig_stub=OpenConfigServiceStub(self.channel) + self.openconfig_stub = OpenConfigServiceStub(self.channel) def close(self): if self.channel is not None: self.channel.close() self.channel = None self.stub = None + self.openconfig_stub = None @RETRY_DECORATOR def AddDevice(self, request : Device) -> DeviceId: @@ -82,8 +87,21 @@ class DeviceClient: response = self.stub.MonitorDeviceKpi(request) LOGGER.debug('MonitorDeviceKpi result: {:s}'.format(grpc_message_to_json_string(response))) return response + def ConfigureOpticalDevice(self, request : OpticalConfig) -> OpticalConfigId: LOGGER.debug('ConfigureOpticalDevice request: {:s}'.format(grpc_message_to_json_string(request))) response = self.openconfig_stub.ConfigureOpticalDevice(request) LOGGER.debug('ConfigureOpticalDevice result: {:s}'.format(grpc_message_to_json_string(response))) return response + + def GetDeviceConfiguration(self, request : OpticalConfigList) -> Empty: + LOGGER.debug('ConfigureOpticalDevice request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.openconfig_stub.GetDeviceConfiguration(request) + LOGGER.debug('ConfigureOpticalDevice result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + def DisableOpticalDevice(self, request : OpticalConfig) -> Empty: + LOGGER.debug('DisableOpticalDevice request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.openconfig_stub.DisableOpticalDevice(request) + LOGGER.debug('DisableOpticalDevice result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/device/client/__init__.py b/src/device/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/client/__init__.py +++ b/src/device/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/requirements.in b/src/device/requirements.in index bf5e6a2b3128f438a7c044c3f3cf9ee393de2265..ca2cdea47bb1ec1045a8bb8c35d64999b8f77f85 100644 --- a/src/device/requirements.in +++ b/src/device/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. - anytree==2.8.0 APScheduler==3.10.1 +bitarray==2.8.* cryptography==36.0.2 deepdiff==6.7.* deepmerge==1.1.* @@ -22,26 +22,27 @@ deepmerge==1.1.* Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 +ipaddress Jinja2==3.0.3 -numpy<2.0.0 +libyang==2.8.4 +macaddress ncclient==0.6.15 +numpy<2.0.0 p4runtime==1.3.0 pandas==1.5.* -paramiko==2.9.2 +paramiko==2.11.* +pyang==2.6.* +git+https://github.com/robshakir/pyangbind.git python-json-logger==2.0.2 #pytz==2021.3 #redis==4.1.2 requests==2.27.1 requests-mock==1.9.3 -xmltodict==0.12.0 tabulate -ipaddress -macaddress -yattag -pyang==2.6.0 -git+https://github.com/robshakir/pyangbind.git -websockets==10.4 +websockets==12.0 werkzeug==2.3.7 +xmltodict==0.12.0 +yattag # pip's dependency resolver does not take into account installed packages. # p4runtime does not specify the version of grpcio/protobuf it needs, so it tries to install latest one diff --git a/src/device/service/DeviceService.py b/src/device/service/DeviceService.py index 1769a16afb49aab6cb986b49e3ca74b9f3b572be..a5a48e1bf80bce67fccd32316fa92935428d5b65 100644 --- a/src/device/service/DeviceService.py +++ b/src/device/service/DeviceService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,11 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.device_pb2 import DESCRIPTOR as DEVICE_DESCRIPTOR from common.proto.device_pb2_grpc import add_DeviceServiceServicer_to_server -from common.proto.openconfig_device_pb2_grpc import add_OpenConfigServiceServicer_to_server +from common.proto.optical_device_pb2 import DESCRIPTOR as OPTICAL_DEVICE_DESCRIPTOR +from common.proto.optical_device_pb2_grpc import add_OpenConfigServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from device.Config import LOAD_ALL_DEVICE_DRIVERS from .driver_api.DriverInstanceCache import DriverInstanceCache @@ -41,8 +42,11 @@ class DeviceService(GenericGrpcService): def install_servicers(self): self.monitoring_loops.start() add_DeviceServiceServicer_to_server(self.device_servicer, self.server) + self.add_reflection_service_name(DEVICE_DESCRIPTOR, 'DeviceService') + if LOAD_ALL_DEVICE_DRIVERS: add_OpenConfigServiceServicer_to_server(self.openconfig_device_servicer,self.server) + self.add_reflection_service_name(OPTICAL_DEVICE_DESCRIPTOR, 'OpenConfigService') def stop(self): super().stop() diff --git a/src/device/service/DeviceServiceServicerImpl.py b/src/device/service/DeviceServiceServicerImpl.py index 7546c225e67fd3122ec845b3154606eddb7cd9ff..b81ac4dc690105508c62ebb5320bda7776cb2bbf 100644 --- a/src/device/service/DeviceServiceServicerImpl.py +++ b/src/device/service/DeviceServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -33,9 +33,11 @@ from .driver_api.DriverInstanceCache import DriverInstanceCache, get_driver from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ERROR_MISSING_DRIVER, ERROR_MISSING_KPI from .Tools import ( - check_connect_rules, check_no_endpoints, compute_rules_to_add_delete, configure_rules, deconfigure_rules, - get_device_controller_uuid, populate_config_rules, populate_endpoint_monitoring_resources, populate_endpoints, - populate_initial_config_rules, subscribe_kpi, unsubscribe_kpi, update_endpoints) + check_connect_rules, check_no_endpoints, compute_rules_to_add_delete, configure_rules, + deconfigure_rules, get_device_controller_uuid, populate_config_rules, + populate_endpoint_monitoring_resources, populate_endpoints, populate_initial_config_rules, + subscribe_kpi, unsubscribe_kpi, update_endpoints +) LOGGER = logging.getLogger(__name__) @@ -60,8 +62,7 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): device_uuid = request.device_id.device_uuid.uuid connection_config_rules = check_connect_rules(request.device_config) - if request.device_drivers[0] != DeviceDriverEnum.DEVICEDRIVER_OC: - check_no_endpoints(request.device_endpoints) + check_no_endpoints(request.device_endpoints) t1 = time.time() @@ -107,18 +108,24 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): # (which controller is in charge of which sub-device). new_sub_devices : Dict[str, Device] = dict() new_sub_links : Dict[str, Link] = dict() + + #----- Experimental ------------ + new_optical_configs : Dict[str, OpticalConfig] = dict() if len(device.device_endpoints) == 0: t5 = time.time() # created from request, populate endpoints using driver errors.extend(populate_endpoints( - device, driver, self.monitoring_loops, new_sub_devices, new_sub_links)) + device, driver, self.monitoring_loops, new_sub_devices, new_sub_links, + new_optical_configs + )) t6 = time.time() t_pop_endpoints = t6 - t5 else: t_pop_endpoints = None - if len(device.device_config.config_rules) == len(connection_config_rules): + is_optical_device = request.device_drivers[0] == DeviceDriverEnum.DEVICEDRIVER_OC + if len(device.device_config.config_rules) == len(connection_config_rules) and not is_optical_device: # created from request, populate config rules using driver t7 = time.time() errors.extend(populate_config_rules(device, driver)) @@ -143,13 +150,15 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): else: # ZTP is not deployed; assume the device is ready while onboarding and set them as enabled. device.device_operational_status = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED - - # temporary line - if request.device_drivers[0] == DeviceDriverEnum.DEVICEDRIVER_OC and len(request.device_endpoints) > 0: + + # temporary line + if is_optical_device: #for endpoint in request.device_endpoints: # #endpoint.endpoint_id.device_id.CopyFrom(device.device_id) # pass - device.device_endpoints.extend(request.device_endpoints) + + if 'new_optical_config' in new_optical_configs and 'opticalconfig' in new_optical_configs["new_optical_config"]: + context_client.SetOpticalConfig(new_optical_configs["new_optical_config"]['opticalconfig']) device_id = context_client.SetDevice(device) diff --git a/src/device/service/ErrorMessages.py b/src/device/service/ErrorMessages.py index f30319121762e91ef21f680a0cc5c8092c0590bc..317de8cf600b387340dfe72788c63334b5c2ba50 100644 --- a/src/device/service/ErrorMessages.py +++ b/src/device/service/ErrorMessages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/OpenConfigServicer.py b/src/device/service/OpenConfigServicer.py index 1dddade18e171380132ed4e5850dfbc7e180b4d8..59c821a676f89d560a674313dfba8d6095e46050 100644 --- a/src/device/service/OpenConfigServicer.py +++ b/src/device/service/OpenConfigServicer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,7 +16,8 @@ import grpc, logging, json from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import NotFoundException from common.proto.context_pb2 import ( - Device, DeviceId, DeviceOperationalStatusEnum, Empty, OpticalConfig, OpticalConfig + Device, DeviceId, DeviceOperationalStatusEnum, Empty, OpticalConfig, + OpticalConfig, OpticalConfigList ) from common.proto.device_pb2_grpc import DeviceServiceServicer from common.tools.context_queries.Device import get_device @@ -75,21 +76,103 @@ class OpenConfigServicer(DeviceServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ConfigureOpticalDevice (self, request : OpticalConfig, context : grpc.ServicerContext) -> Empty: - device_uuid = request.opticalconfig_id.opticalconfig_uuid - resources=[] - config =json.loads(request.config) + device_uuid = request.device_id.device_uuid.uuid + resources : list[dict] = [] + is_all_good = True + config = json.loads(request.config) + results = None + + try: + context_client = ContextClient() + device = get_device( + context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, + include_config_rules=False) + if device is None: + raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') + resources, conditions = extract_resources(config=config, device=device) + + driver : _Driver = get_driver(self.driver_instance_cache, device) + results = driver.SetConfig(resources=resources,conditions=conditions) + for result in results: + if not result : + is_all_good = False + + if is_all_good: + #driver.GetConfig(resource_keys=[]) + config = json.loads(request.config) + handled_flow = next((i for i in resources if i['resource_key'] == 'handled_flow'), None) + if handled_flow is not None and len(handled_flow) > 0: + config['flow_handled'] = handled_flow['value'] + request.config=json.dumps(config) + context_client.UpdateOpticalConfig(request) + context_client.close() + except Exception as e: + LOGGER.info("error in configuring %s",e) + return Empty() + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetDeviceConfiguration (self, request : OpticalConfigList, context : grpc.ServicerContext) -> Empty: + context_client = ContextClient() + + for configs in request.opticalconfigs: + device_uuid = configs.device_id.device_uuid.uuid + try: + device = get_device( + context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, + include_config_rules=False) + if device is None: + raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') + driver : _Driver = get_driver(self.driver_instance_cache, device) + results = driver.GetConfig(resource_keys=[]) + for resource_data in results : + resource_key, resource_value = resource_data + if resource_key.startswith('/opticalconfigs/opticalconfig/'): + if 'opticalconfig' in resource_value: + context_client.SetOpticalConfig(resource_value['opticalconfig']) + + #TODO: add a control with the NETCONF get + #driver.GetConfig(resource_keys=filter_fields) + except Exception as e: + LOGGER.info("error in configuring %s",e) + context_client.close() + return Empty() + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DisableOpticalDevice (self, request : OpticalConfig, context : grpc.ServicerContext) -> Empty: + roadm_configuration = None + device_uuid = request.device_id.device_uuid.uuid + resources : list[dict] = [] + is_all_good = True + config = json.loads(request.config) + try: context_client = ContextClient() device = get_device( context_client, device_uuid, rw_copy=True, include_endpoints=True, include_components=False, include_config_rules=False) + if device is None: raise NotFoundException('Device', device_uuid, extra_details='loading in ConfigureDevice') - resources,conditions=extract_resources(config=config,device=device) + + resources, conditions = extract_resources(config=config, device=device) + driver : _Driver = get_driver(self.driver_instance_cache, device) - result = driver.SetConfig(resources=resources,conditions=conditions) - #TODO: add a control with the NETCONF get - #driver.GetConfig(resource_keys=filter_fields) + if 'edit_type' in conditions and conditions['edit_type'] == 'optical-band': + roadm_configuration = driver.GetConfig() + for resource_data in roadm_configuration: + resource_key, resource_value = resource_data + if resource_key.startswith('/opticalconfigs/opticalconfig/'): + roadm_configuration=resource_value["opticalconfig"] + results = driver.DeleteConfig(resources=resources,conditions=conditions,optical_device_configuration=roadm_configuration) + for result in results: + if not result : + is_all_good = False + + if is_all_good: + config = json.loads(request.config) + if "new_config" in config : + context_client.DeleteOpticalChannel(request) + context_client.close() except Exception as e: - LOGGER.info("error in configuring %s",e) + LOGGER.info("error in Disable configuring %s",e) return Empty() diff --git a/src/device/service/Tools.py b/src/device/service/Tools.py index 91926b9e59cccac2e233ac14bbac497bbb0ac15c..ee683853676b34f256ff335fffe3600823e2c070 100644 --- a/src/device/service/Tools.py +++ b/src/device/service/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -17,7 +17,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.DeviceTypes import DeviceTypeEnum from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException -from common.proto.context_pb2 import ConfigActionEnum, ConfigRule_ACL, Device, DeviceConfig, EndPoint, Link, Location +from common.proto.context_pb2 import ( + ConfigActionEnum, ConfigRule_ACL, Device, DeviceConfig, EndPoint, Link, Location, OpticalConfig +) from common.proto.device_pb2 import MonitoringSettings from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.grpc.ConfigRules import update_config_rule_custom @@ -26,7 +28,8 @@ from common.type_checkers.Checkers import chk_length, chk_type from .driver_api._Driver import _Driver, RESOURCE_ENDPOINTS from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ( - ERROR_BAD_RESOURCE, ERROR_DELETE, ERROR_GET, ERROR_GET_INIT, ERROR_MISSING_KPI, ERROR_SAMPLETYPE, ERROR_SET, + ERROR_BAD_RESOURCE, ERROR_DELETE, ERROR_GET, ERROR_GET_INIT, + ERROR_MISSING_KPI, ERROR_SAMPLETYPE, ERROR_SET, ERROR_SUBSCRIBE, ERROR_UNSUBSCRIBE, ERROR_UNSUP_RESOURCE ) @@ -106,7 +109,8 @@ def get_device_controller_uuid(device : Device) -> Optional[str]: def populate_endpoints( device : Device, driver : _Driver, monitoring_loops : MonitoringLoops, - new_sub_devices : Dict[str, Device], new_sub_links : Dict[str, Link] + new_sub_devices : Dict[str, Device], new_sub_links : Dict[str, Link], + new_optical_configs : Dict[str, OpticalConfig] ) -> List[str]: device_uuid = device.device_id.device_uuid.uuid device_name = device.name @@ -237,6 +241,9 @@ def populate_endpoints( _sub_link_endpoint_id.device_id.device_uuid.uuid = device_uuid _sub_link_endpoint_id.endpoint_uuid.uuid = endpoint_uuid + # ----------Experimental -------------- + elif resource_key.startswith('/opticalconfigs/opticalconfig/'): + new_optical_configs["new_optical_config"]=resource_value else: errors.append(ERROR_UNSUP_RESOURCE.format(device_uuid=device_uuid, resource_data=str(resource_data))) continue @@ -454,7 +461,8 @@ def update_endpoints(src_device : Device, dst_device : Device) -> None: def get_edit_target(device : Device, is_opticalband : bool) -> str: if is_opticalband: return 'optical-band' - if device.device_type == DeviceTypeEnum.OPTICAL_ROADM: return 'media-channel' + if device.device_type == DeviceTypeEnum.OPTICAL_ROADM._value_: return 'media-channel' + if device.device_type == DeviceTypeEnum.OPEN_ROADM._value_: return 'network-media-channel' return 'optical-channel' def is_key_existed(key : str, keys_dic = dict, key_name_to_use = None) -> dict: @@ -468,57 +476,81 @@ def is_key_existed(key : str, keys_dic = dict, key_name_to_use = None) -> dict: dic['value'] = None return dic -def extract_resources(config : dict, device : Device) -> list: +def extract_resources(config : dict, device : Device) -> list[list[dict], dict]: conditions = {} - resources = [] - resources.append(is_key_existed('channel_namespace', config)) - resources.append(is_key_existed('add_transceiver', config)) + resources : list[dict] = [] is_opticalband = config.get('is_opticalband', False) - conditions['is_opticalband'] = is_opticalband conditions['edit_type'] = get_edit_target(device, is_opticalband) - if 'flow' in config: - #for tuple_value in config['flow'][device.name]: - source_vals = [] - dest_vals = [] - for tuple_value in config['flow']: - source_port = None - destination_port = None - source_port_uuid, destination_port_uuid = tuple_value - if source_port_uuid != '0': - src_endpoint_obj = get_endpoint_matching(device, source_port_uuid) - source_port = src_endpoint_obj.name - source_vals.append(source_port) - if destination_port_uuid != '0': - dst_endpoint_obj = get_endpoint_matching(device, destination_port_uuid) - destination_port = dst_endpoint_obj.name - dest_vals.append(destination_port) - resources.append({'resource_key': 'source_port', 'value': source_vals}) - resources.append({'resource_key': 'destination_port', 'value': dest_vals }) - - if 'new_config' in config: - lower_frequency = None - upper_frequency = None - resources.append(is_key_existed('target-output-power', keys_dic=config['new_config'])) - resources.append(is_key_existed('frequency', keys_dic=config['new_config'])) - resources.append(is_key_existed('operational-mode', keys_dic=config['new_config'])) - resources.append(is_key_existed('line-port', keys_dic=config['new_config'])) - resources.append(is_key_existed('band_type', keys_dic=config['new_config'], key_name_to_use='name')) - resources.append(is_key_existed('ob_id', keys_dic=config['new_config'], key_name_to_use='optical-band-parent')) - resources.append(is_key_existed('name', keys_dic=config['new_config'], key_name_to_use='channel_name')) - if not is_opticalband: - if 'frequency' in config['new_config'] and 'band' in config['new_config'] and conditions['edit_type'] == 'media-channel': - lower_frequency = int(int(config['new_config']['frequency']) - (int(config['new_config']['band'])/2)) - upper_frequency = int(int(config['new_config']['frequency']) + (int(config['new_config']['band'])/2)) - #lower_frequency = (config['new_config']['frequency'] - config['new_config']['band'])/2 - #upper_frequency = (config['new_config']['frequency'] + config['new_config']['band'])/2 - resources.append(is_key_existed('flow_id', keys_dic=config['new_config'], key_name_to_use='index')) - #resources.append({'resource_key':'index','value':config['new_config']['flow_id'] if 'flow_id' in config['new_config'] else None}) - else: - lower_frequency = config['new_config']['low-freq'] if 'low-freq' in config['new_config'] else None - upper_frequency = config['new_config']['up-freq' ] if 'up-freq' in config['new_config'] else None - resources.append(is_key_existed('ob_id', keys_dic=config['new_config'], key_name_to_use='index')) - #resources.append({'resource_key':'index','value':config['new_config']['ob_id'] if 'ob_id' in config['new_config'] else None}) - resources.append({'resource_key': 'lower-frequency', 'value': lower_frequency}) - resources.append({'resource_key': 'upper-frequency', 'value': upper_frequency}) + + if device.device_type == DeviceTypeEnum.OPEN_ROADM._value_ : + ports_dic = is_key_existed('ports',keys_dic=config['new_config']) + interfaces_list = [] + config_type = is_key_existed('config_type', keys_dic=config['new_config']) + resources.append(config_type) + resources.append(is_key_existed('administrative-state', keys_dic=config['new_config'])) + resources.append(is_key_existed('frequency', keys_dic=config['new_config'])) + resources.append(is_key_existed('width', keys_dic=config['new_config'])) + for port in ports_dic["value"]: + circuit_pack_dic = is_key_existed('supporting-circuit-pack-name', keys_dic=port) + interface_list = is_key_existed('supporting-interface-list', keys_dic=port) + supporting_port = is_key_existed('supporting-port', keys_dic=port) + interfaces_list.append([ + circuit_pack_dic, + interface_list, + supporting_port + ]) + resources.append({'resource_key':'interfaces','value':interfaces_list}) + else : + resources.append(is_key_existed('channel_namespace', config)) + resources.append(is_key_existed('add_transceiver', config)) + + conditions['is_opticalband'] = is_opticalband + if 'flow' in config: + #for tuple_value in config['flow'][device.name]: + source_vals = [] + dest_vals = [] + handled_flow = [] + for tuple_value in config['flow']: + source_port = None + destination_port = None + source_port_uuid, destination_port_uuid = tuple_value + if source_port_uuid != '0': + src_endpoint_obj = get_endpoint_matching(device, source_port_uuid) + source_port = src_endpoint_obj.name + source_vals.append(source_port) + if destination_port_uuid != '0': + dst_endpoint_obj = get_endpoint_matching(device, destination_port_uuid) + destination_port = dst_endpoint_obj.name + dest_vals.append(destination_port) + handled_flow.append((source_port, destination_port)) + resources.append({'resource_key': 'source_port', 'value': source_vals }) + resources.append({'resource_key': 'destination_port', 'value': dest_vals }) + resources.append({'resource_key': 'handled_flow', 'value': handled_flow}) + if 'new_config' in config: + lower_frequency = None + upper_frequency = None + resources.append(is_key_existed('target-output-power', keys_dic=config['new_config'])) + resources.append(is_key_existed('frequency', keys_dic=config['new_config'])) + resources.append(is_key_existed('operational-mode', keys_dic=config['new_config'])) + resources.append(is_key_existed('line-port', keys_dic=config['new_config'])) + resources.append(is_key_existed('status', keys_dic=config['new_config'], key_name_to_use="admin-state")) + resources.append(is_key_existed('band_type', keys_dic=config['new_config'], key_name_to_use='name')) + resources.append(is_key_existed('ob_id', keys_dic=config['new_config'], key_name_to_use='optical-band-parent')) + #resources.append(is_key_existed('name', keys_dic=config['new_config'], key_name_to_use='channel_name')) + + if not is_opticalband: + if 'frequency' in config['new_config'] and 'band' in config['new_config'] and conditions['edit_type'] == 'media-channel': + if config['new_config']['frequency'] is not None and config['new_config']['band'] is not None: + lower_frequency = int(int(config['new_config']['frequency']) - (int(config['new_config']['band'])/2)+1) + upper_frequency = int(int(config['new_config']['frequency']) + (int(config['new_config']['band'])/2)) + resources.append(is_key_existed('flow_id', keys_dic=config['new_config'], key_name_to_use='index')) + #resources.append({'resource_key':'index','value':config['new_config']['flow_id'] if 'flow_id' in config['new_config'] else None}) + else: + lower_frequency = config['new_config']['low-freq'] if 'low-freq' in config['new_config'] else None + upper_frequency = config['new_config']['up-freq' ] if 'up-freq' in config['new_config'] else None + resources.append(is_key_existed('ob_id', keys_dic=config['new_config'], key_name_to_use='index')) + #resources.append({'resource_key':'index','value':config['new_config']['ob_id'] if 'ob_id' in config['new_config'] else None}) + resources.append({'resource_key': 'lower-frequency', 'value': lower_frequency}) + resources.append({'resource_key': 'upper-frequency', 'value': upper_frequency}) return [resources, conditions] diff --git a/src/device/service/__init__.py b/src/device/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/__init__.py +++ b/src/device/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/__main__.py b/src/device/service/__main__.py index 4a75d6284ac700bb1a6d6a388049824c2b301de7..d29f1543100b330ae322cc86c8802b4aa9581b8b 100644 --- a/src/device/service/__main__.py +++ b/src/device/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/AnyTreeTools.py b/src/device/service/driver_api/AnyTreeTools.py index fedb0564dabfd92bad99a3945d44a77d93d79bec..9d9228d9b7da119f032cdfd9f8e0244e3af37279 100644 --- a/src/device/service/driver_api/AnyTreeTools.py +++ b/src/device/service/driver_api/AnyTreeTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/DriverFactory.py b/src/device/service/driver_api/DriverFactory.py index 860b8d1608b832ab33ab4d2f762186facdd76a02..028d216237d38b42d5dad2b5b5c14dcfb50c0fae 100644 --- a/src/device/service/driver_api/DriverFactory.py +++ b/src/device/service/driver_api/DriverFactory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/DriverInstanceCache.py b/src/device/service/driver_api/DriverInstanceCache.py index 11e12884ef24e694f09822f1afccb1c705a5771e..35f8a477b5f0b20c3765929de75dcb099cbcc532 100644 --- a/src/device/service/driver_api/DriverInstanceCache.py +++ b/src/device/service/driver_api/DriverInstanceCache.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/Exceptions.py b/src/device/service/driver_api/Exceptions.py index 09ecfbc7249bf630d8394cdda6dc9f389260f351..8bc607d955c1b60576f28ad743e47a754eba3acd 100644 --- a/src/device/service/driver_api/Exceptions.py +++ b/src/device/service/driver_api/Exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/FilterFields.py b/src/device/service/driver_api/FilterFields.py index 0d2e792f205caf5244ad4b757a533e75c7abbd36..b1d2cb3144f85f9e8db35c39808accc0d3c386a5 100644 --- a/src/device/service/driver_api/FilterFields.py +++ b/src/device/service/driver_api/FilterFields.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/ImportTopologyEnum.py b/src/device/service/driver_api/ImportTopologyEnum.py index b8925f7cf16ba1bdcfeeae4ec4aac4092acbc7dd..1a341549ec26e27f67da3de78d1678460d240ed8 100644 --- a/src/device/service/driver_api/ImportTopologyEnum.py +++ b/src/device/service/driver_api/ImportTopologyEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/driver_api/_Driver.py b/src/device/service/driver_api/_Driver.py index 9612952fe4c1da3beb2534f26da68f630f2acacb..e838e5b3d3cfca353fd4994fd60ad387b5f6766d 100644 --- a/src/device/service/driver_api/_Driver.py +++ b/src/device/service/driver_api/_Driver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -25,12 +25,15 @@ RESOURCE_ROUTING_POLICIES = '__routing_policies__' RESOURCE_SERVICES = '__services__' RESOURCE_ACL = '__acl__' RESOURCE_INVENTORY = '__inventory__' +RESOURCE_RULES = "__rules__" class _Driver: def __init__(self, name : str, address: str, port: int, **settings) -> None: """ Initialize Driver. Parameters: + name : str + Device driver name address : str The address of the device port : int diff --git a/src/device/service/driver_api/__init__.py b/src/device/service/driver_api/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/driver_api/__init__.py +++ b/src/device/service/driver_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index a5e7f377113342b98203a23a426540f6188f784e..b99ee50ca8319ab96f9062a3c58c356fa2ae7ec7 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/emulated/Constants.py b/src/device/service/drivers/emulated/Constants.py index 612052eed8e193a86eefc44ed3afe19c133372a7..3d349152eb03c04222ae376a3aed21605bcc7708 100644 --- a/src/device/service/drivers/emulated/Constants.py +++ b/src/device/service/drivers/emulated/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/emulated/EmulatedDriver.py b/src/device/service/drivers/emulated/EmulatedDriver.py index fff92fc9a5d3d05e27268503dfe4e4dfa73f536d..efd615ee0cdf2d536c6825ba1fb2b943aff1f3ee 100644 --- a/src/device/service/drivers/emulated/EmulatedDriver.py +++ b/src/device/service/drivers/emulated/EmulatedDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/emulated/SyntheticSamplingParameters.py b/src/device/service/drivers/emulated/SyntheticSamplingParameters.py index a0d01200e855984b79314d6a7c303d865d4a8642..e25e207e87256472a6bebf2da5601d409f189b1f 100644 --- a/src/device/service/drivers/emulated/SyntheticSamplingParameters.py +++ b/src/device/service/drivers/emulated/SyntheticSamplingParameters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/emulated/Tools.py b/src/device/service/drivers/emulated/Tools.py index cdd84fccf0d3b2c373b99e5f229201e8967de9c2..9f2a105c0d9735f486f41fab5bc3069ec9327f65 100644 --- a/src/device/service/drivers/emulated/Tools.py +++ b/src/device/service/drivers/emulated/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/emulated/__init__.py b/src/device/service/drivers/emulated/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/emulated/__init__.py +++ b/src/device/service/drivers/emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py b/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py index daf04be5a1ff82a79031d8c3ffe19da10739fbcb..2396e956b9a3709d11b9052de714d2ea7a77b2d7 100644 --- a/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py +++ b/src/device/service/drivers/gnmi_openconfig/DeltaSampleCache.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,13 +13,15 @@ # limitations under the License. import copy -from typing import Any, Dict, Tuple, Union +from typing import Any, Dict, Optional, Tuple, Union class DeltaSampleCache: def __init__(self) -> None: self._previous_samples : Dict[str, Tuple[float, Union[int, float]]] = dict() - def get_delta(self, path : str, current_timestamp : float, current_value : Any) -> None: + def get_delta( + self, path : str, current_timestamp : float, current_value : Any + ) -> Optional[Tuple[float, Optional[Any]]]: previous_sample = copy.deepcopy(self._previous_samples.get(path)) self._previous_samples[path] = current_timestamp, current_value @@ -30,6 +32,10 @@ class DeltaSampleCache: delta_value = max(0, current_value - previous_value) delay = current_timestamp - previous_timestamp - delta_sample = current_timestamp, delta_value / delay - - return delta_sample + if delay < 1.e-12: + # return a special value meaning, at that timestamp, + # computed value is not a number, e.g., division by zero + # also, recover previuos samples to do not miss any packet/byte + self._previous_samples[path] = previous_sample + return current_timestamp, None + return current_timestamp, delta_value / delay diff --git a/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py b/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py index 9d22dcf798532fe2aa27f8a79aa729d174786ff4..ec4d905431e39c6f5475dfd80490bf5b4f7a0045 100644 --- a/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py +++ b/src/device/service/drivers/gnmi_openconfig/GnmiOpenConfigDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py b/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py index 4428fb81ca304d20ee4b3bce259924278400249f..03a55f472d2d4d4cd6726795fe6000c4fb68f95b 100644 --- a/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py +++ b/src/device/service/drivers/gnmi_openconfig/GnmiSessionHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -19,7 +19,8 @@ from common.type_checkers.Checkers import chk_float, chk_length, chk_string, chk from .gnmi.gnmi_pb2_grpc import gNMIStub from .gnmi.gnmi_pb2 import Encoding, GetRequest, SetRequest, UpdateResult # pylint: disable=no-name-in-module from .handlers import ALL_RESOURCE_KEYS, compose, get_path, parse -from .tools.Capabilities import get_supported_encodings +from .handlers.YangHandler import YangHandler +from .tools.Capabilities import check_capabilities from .tools.Channel import get_grpc_channel from .tools.Path import path_from_string, path_to_string #, compose_path from .tools.Subscriptions import Subscriptions @@ -40,11 +41,20 @@ class GnmiSessionHandler: self._channel : Optional[grpc.Channel] = None self._stub : Optional[gNMIStub] = None self._monit_thread = None - self._supported_encodings = None + self._yang_handler = YangHandler() self._subscriptions = Subscriptions() self._in_subscriptions = queue.Queue() self._out_samples = queue.Queue() + def __del__(self) -> None: + self._logger.info('Destroying YangValidator...') + if self._yang_handler is not None: + self._logger.debug('yang_validator.data:') + for path, dnode in self._yang_handler.get_data_paths().items(): + self._logger.debug(' {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) + self._yang_handler.destroy() + self._logger.info('DONE') + @property def subscriptions(self): return self._subscriptions @@ -58,8 +68,7 @@ class GnmiSessionHandler: with self._lock: self._channel = get_grpc_channel(self._address, self._port, self._use_tls, self._logger) self._stub = gNMIStub(self._channel) - self._supported_encodings = get_supported_encodings( - self._stub, self._username, self._password, timeout=120) + check_capabilities(self._stub, self._username, self._password, timeout=120) self._monit_thread = MonitoringThread( self._stub, self._logger, self._settings, self._in_subscriptions, self._out_samples) self._monit_thread.start() @@ -96,13 +105,15 @@ class GnmiSessionHandler: self._logger.exception(MSG.format(str_resource_name, str(resource_key))) parsing_results.append((resource_key, e)) # if validation fails, store the exception + self._logger.debug('parsing_results={:s}'.format(str(parsing_results))) + if len(parsing_results) > 0: return parsing_results metadata = [('username', self._username), ('password', self._password)] timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) get_reply = self._stub.Get(get_request, metadata=metadata, timeout=timeout) - #self._logger.info('get_reply={:s}'.format(grpc_message_to_json_string(get_reply))) + self._logger.debug('get_reply={:s}'.format(grpc_message_to_json_string(get_reply))) results = [] #results[str_filter] = [i, None, False] # (index, value, processed?) @@ -119,7 +130,7 @@ class GnmiSessionHandler: # resource_key_tuple[2] = True for update in notification.update: - #self._logger.info('update={:s}'.format(grpc_message_to_json_string(update))) + self._logger.debug('update={:s}'.format(grpc_message_to_json_string(update))) str_path = path_to_string(update.path) #resource_key_tuple = results.get(str_path) #if resource_key_tuple is None: @@ -130,10 +141,10 @@ class GnmiSessionHandler: value = decode_value(update.val) #resource_key_tuple[1] = value #resource_key_tuple[2] = True - results.extend(parse(str_path, value)) + results.extend(parse(str_path, value, self._yang_handler)) except Exception as e: # pylint: disable=broad-except - MSG = 'Exception processing notification {:s}' - self._logger.exception(MSG.format(grpc_message_to_json_string(notification))) + MSG = 'Exception processing update {:s}' + self._logger.exception(MSG.format(grpc_message_to_json_string(update))) results.append((str_path, e)) # if validation fails, store the exception #_results = sorted(results.items(), key=lambda x: x[1][0]) @@ -158,31 +169,34 @@ class GnmiSessionHandler: set_request = SetRequest() #for resource_key in resource_keys: + resources_requested = list() for resource_key, resource_value in resources: - self._logger.info('---1') - self._logger.info(str(resource_key)) - self._logger.info(str(resource_value)) + #self._logger.info('---1') + #self._logger.info(str(resource_key)) + #self._logger.info(str(resource_value)) #resource_tuple = resource_tuples.get(resource_key) #if resource_tuple is None: continue #_, value, exists, operation_done = resource_tuple if isinstance(resource_value, str): resource_value = json.loads(resource_value) - str_path, str_data = compose(resource_key, resource_value, delete=False) - self._logger.info('---3') - self._logger.info(str(str_path)) - self._logger.info(str(str_data)) + str_path, str_data = compose(resource_key, resource_value, self._yang_handler, delete=False) + if str_path is None: continue # nothing to set + #self._logger.info('---3') + #self._logger.info(str(str_path)) + #self._logger.info(str(str_data)) set_request_list = set_request.update #if exists else set_request.replace set_request_entry = set_request_list.add() set_request_entry.path.CopyFrom(path_from_string(str_path)) set_request_entry.val.json_val = str_data.encode('UTF-8') + resources_requested.append((resource_key, resource_value)) - self._logger.info('set_request={:s}'.format(grpc_message_to_json_string(set_request))) + self._logger.debug('set_request={:s}'.format(grpc_message_to_json_string(set_request))) metadata = [('username', self._username), ('password', self._password)] timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) set_reply = self._stub.Set(set_request, metadata=metadata, timeout=timeout) - self._logger.info('set_reply={:s}'.format(grpc_message_to_json_string(set_reply))) + self._logger.debug('set_reply={:s}'.format(grpc_message_to_json_string(set_reply))) results = [] - for (resource_key, resource_value), update_result in zip(resources, set_reply.response): + for (resource_key, resource_value), update_result in zip(resources_requested, set_reply.response): operation = update_result.op if operation == UpdateResult.UPDATE: results.append((resource_key, True)) @@ -227,30 +241,34 @@ class GnmiSessionHandler: set_request = SetRequest() #for resource_key in resource_keys: + resources_requested = list() for resource_key, resource_value in resources: - self._logger.info('---1') - self._logger.info(str(resource_key)) - self._logger.info(str(resource_value)) + #self._logger.info('---1') + #self._logger.info(str(resource_key)) + #self._logger.info(str(resource_value)) #resource_tuple = resource_tuples.get(resource_key) #if resource_tuple is None: continue #_, value, exists, operation_done = resource_tuple #if not exists: continue if isinstance(resource_value, str): resource_value = json.loads(resource_value) - str_path, str_data = compose(resource_key, resource_value, delete=True) - self._logger.info('---3') - self._logger.info(str(str_path)) - self._logger.info(str(str_data)) + # pylint: disable=unused-variable + str_path, str_data = compose(resource_key, resource_value, self._yang_handler, delete=True) + if str_path is None: continue # nothing to do with this resource_key + #self._logger.info('---3') + #self._logger.info(str(str_path)) + #self._logger.info(str(str_data)) set_request_entry = set_request.delete.add() set_request_entry.CopyFrom(path_from_string(str_path)) + resources_requested.append((resource_key, resource_value)) - self._logger.info('set_request={:s}'.format(grpc_message_to_json_string(set_request))) + self._logger.debug('set_request={:s}'.format(grpc_message_to_json_string(set_request))) metadata = [('username', self._username), ('password', self._password)] timeout = None # GNMI_SUBSCRIPTION_TIMEOUT = int(sampling_duration) set_reply = self._stub.Set(set_request, metadata=metadata, timeout=timeout) - self._logger.info('set_reply={:s}'.format(grpc_message_to_json_string(set_reply))) + self._logger.debug('set_reply={:s}'.format(grpc_message_to_json_string(set_reply))) results = [] - for (resource_key, resource_value), update_result in zip(resources, set_reply.response): + for (resource_key, resource_value), update_result in zip(resources_requested, set_reply.response): operation = update_result.op if operation == UpdateResult.DELETE: results.append((resource_key, True)) diff --git a/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py b/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py index 8bf6704a854542b3a085af05d55391e23c8d224f..eeab0ca5279f7c59d8cde375e24e3991849378ee 100644 --- a/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py +++ b/src/device/service/drivers/gnmi_openconfig/MonitoringThread.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -94,9 +94,14 @@ class MonitoringThread(threading.Thread): subscriptions = [] while not self._terminate.is_set(): try: - subscription = self._in_subscriptions.get(block=True, timeout=0.1) + # Some devices do not support to process multiple + # SubscriptionList requests in a bidirectional channel. + # Increased timeout to 5 seconds assuming it should + # bring enough time to receive all the subscriptions in + # the queue and process them in bulk. + subscription = self._in_subscriptions.get(block=True, timeout=5.0) operation, resource_key, sampling_duration, sampling_interval = subscription # pylint: disable=unused-variable - if operation != 'subscribe': continue # Unsubscribe not supported by gNM, needs to cancel entire connection + if operation != 'subscribe': continue # Unsubscribe not supported by gNMI, needs to cancel entire connection # options.timeout = int(sampling_duration) #_path = parse_xpath(resource_key) path = path_from_string(resource_key) @@ -107,15 +112,15 @@ class MonitoringThread(threading.Thread): subscriptions.append(subscription) except queue.Empty: if len(subscriptions) == 0: continue - #self._logger.warning('[generate_requests] process') + self._logger.debug('[generate_requests] process') prefix = path_from_string(GNMI_PATH_PREFIX) if GNMI_PATH_PREFIX is not None else None qos = QOSMarking(marking=GNMI_QOS_MARKING) if GNMI_QOS_MARKING is not None else None subscriptions_list = SubscriptionList( prefix=prefix, mode=GNMI_SUBSCRIPTION_LIST_MODE, allow_aggregation=GNMI_ALLOW_AGGREGATION, encoding=GNMI_ENCODING, subscription=subscriptions, qos=qos) subscribe_request = SubscribeRequest(subscribe=subscriptions_list) - #str_subscribe_request = grpc_message_to_json_string(subscribe_request) - #self._logger.warning('[generate_requests] subscribe_request={:s}'.format(str_subscribe_request)) + str_subscribe_request = grpc_message_to_json_string(subscribe_request) + self._logger.debug('[generate_requests] subscribe_request={:s}'.format(str_subscribe_request)) yield subscribe_request subscriptions = [] except: # pylint: disable=bare-except @@ -134,7 +139,7 @@ class MonitoringThread(threading.Thread): self._response_iterator = self._stub.Subscribe(request_iterator, metadata=metadata, timeout=timeout) for subscribe_response in self._response_iterator: str_subscribe_response = grpc_message_to_json_string(subscribe_response) - self._logger.warning('[run] subscribe_response={:s}'.format(str_subscribe_response)) + self._logger.debug('[run] subscribe_response={:s}'.format(str_subscribe_response)) update = subscribe_response.update timestamp_device = float(update.timestamp) / 1.e9 timestamp_local = datetime.timestamp(datetime.utcnow()) @@ -145,25 +150,37 @@ class MonitoringThread(threading.Thread): else: # might be clocks are not synchronized, use local timestamp timestamp = timestamp_local + str_prefix = path_to_string(update.prefix) if len(update.prefix.elem) > 0 else '' for update_entry in update.update: str_path = path_to_string(update_entry.path) + if len(str_prefix) > 0: + str_path = '{:s}/{:s}'.format(str_prefix, str_path) + str_path = str_path.replace('//', '/') + if str_path.startswith('/interfaces/'): + # Add namespace, if missing + str_path_parts = str_path.split('/') + str_path_parts[1] = 'openconfig-interfaces:interfaces' + str_path = '/'.join(str_path_parts) #if str_path != '/system/name/host-name': continue #counter_name = update_entry.path[-1].name value_type = update_entry.val.WhichOneof('value') value = getattr(update_entry.val, value_type) - if re.match(r'^[0-9]+$', value) is not None: - value = int(value) - elif re.match(r'^[0-9]*\.[0-9]*$', value) is not None: - value = float(value) - else: - value = str(value) + if isinstance(value, str): + if re.match(r'^[0-9]+$', value) is not None: + value = int(value) + elif re.match(r'^[0-9]*\.[0-9]*$', value) is not None: + value = float(value) + else: + value = str(value) delta_sample = self._delta_sample_cache.get_delta(str_path, timestamp, value) if delta_sample is None: sample = (timestamp, str_path, value) else: sample = (delta_sample[0], str_path, delta_sample[1]) - self._logger.warning('[run] sample={:s}'.format(str(sample))) - self._out_samples.put_nowait(sample) + self._logger.debug('[run] sample={:s}'.format(str(sample))) + if sample[2] is not None: + # Skip not-a-number (e.g., division by zero) samples + self._out_samples.put_nowait(sample) except grpc.RpcError as e: if e.code() != grpc.StatusCode.CANCELLED: raise # pylint: disable=no-member if e.details() != 'Locally cancelled by application!': raise # pylint: disable=no-member diff --git a/src/device/service/drivers/gnmi_openconfig/__init__.py b/src/device/service/drivers/gnmi_openconfig/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/gnmi_openconfig/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/clone-yang-models.sh b/src/device/service/drivers/gnmi_openconfig/clone-yang-models.sh new file mode 100755 index 0000000000000000000000000000000000000000..18cdf0836586b5a028ed442554b78857df6ccb74 --- /dev/null +++ b/src/device/service/drivers/gnmi_openconfig/clone-yang-models.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +BASE_PATH=~/tfs-ctrl/src/device/service/drivers/gnmi_openconfig +GIT_BASE_PATH=${BASE_PATH}/git/openconfig + +rm -rf ${GIT_BASE_PATH} + +OC_PUBLIC_PATH=${GIT_BASE_PATH}/public +mkdir -p ${OC_PUBLIC_PATH} +git clone https://github.com/openconfig/public.git ${OC_PUBLIC_PATH} + +#OC_HERCULES_PATH=${GIT_BASE_PATH}/hercules +#mkdir -p ${OC_HERCULES_PATH} +#git clone https://github.com/openconfig/hercules.git ${OC_HERCULES_PATH} diff --git a/src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py b/src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py new file mode 100644 index 0000000000000000000000000000000000000000..f16be652b753ca24fb7c16b361d43781328d97d4 --- /dev/null +++ b/src/device/service/drivers/gnmi_openconfig/examples/libyang_examples.py @@ -0,0 +1,162 @@ +# Copyright 2022-2024 ETSI 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. + +import json, libyang, logging, os +from typing import Dict + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +YANG_BASE_PATH = '/home/tfs/tfs-ctrl/src/device/service/drivers/gnmi_openconfig/git/openconfig/public' +YANG_SEARCH_PATHS = ':'.join([ + os.path.join(YANG_BASE_PATH, 'release'), + os.path.join(YANG_BASE_PATH, 'third_party'), +]) + +YANG_MODULES = [ + 'iana-if-type', + 'openconfig-bgp-types', + 'openconfig-vlan-types', + + 'openconfig-interfaces', + 'openconfig-if-8021x', + 'openconfig-if-aggregate', + 'openconfig-if-ethernet-ext', + 'openconfig-if-ethernet', + 'openconfig-if-ip-ext', + 'openconfig-if-ip', + 'openconfig-if-poe', + 'openconfig-if-sdn-ext', + 'openconfig-if-tunnel', + + 'openconfig-vlan', + + 'openconfig-types', + 'openconfig-policy-types', + 'openconfig-mpls-types', + 'openconfig-network-instance-types', + 'openconfig-network-instance', + + 'openconfig-platform', + 'openconfig-platform-controller-card', + 'openconfig-platform-cpu', + 'openconfig-platform-ext', + 'openconfig-platform-fabric', + 'openconfig-platform-fan', + 'openconfig-platform-integrated-circuit', + 'openconfig-platform-linecard', + 'openconfig-platform-pipeline-counters', + 'openconfig-platform-port', + 'openconfig-platform-psu', + 'openconfig-platform-software', + 'openconfig-platform-transceiver', + 'openconfig-platform-types', +] + +class YangHandler: + def __init__(self) -> None: + self._yang_context = libyang.Context(YANG_SEARCH_PATHS) + self._loaded_modules = set() + for yang_module_name in YANG_MODULES: + LOGGER.info('Loading module: {:s}'.format(str(yang_module_name))) + self._yang_context.load_module(yang_module_name).feature_enable_all() + self._loaded_modules.add(yang_module_name) + self._data_path_instances = dict() + + def get_data_paths(self) -> Dict[str, libyang.DNode]: + return self._data_path_instances + + def get_data_path(self, path : str) -> libyang.DNode: + data_path_instance = self._data_path_instances.get(path) + if data_path_instance is None: + data_path_instance = self._yang_context.create_data_path(path) + self._data_path_instances[path] = data_path_instance + return data_path_instance + + def destroy(self) -> None: + self._yang_context.destroy() + +def main(): + yang_handler = YangHandler() + + LOGGER.info('YangHandler Data (before):') + for path, dnode in yang_handler.get_data_paths().items(): + LOGGER.info('|-> {:s}: {:s}'.format(str(path), json.dumps(dnode.print_dict()))) + + if_name = 'eth1' + sif_index = 0 + enabled = True + address_ip = '172.16.0.1' + address_ip2 = '192.168.0.1' + address_prefix = 24 + mtu = 1500 + + yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') + yang_if_path = 'interface[name="{:s}"]'.format(if_name) + yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) + yang_if.create_path('config/name', if_name) + yang_if.create_path('config/enabled', enabled) + yang_if.create_path('config/mtu', mtu ) + + yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') + yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) + yang_sif : libyang.DContainer = yang_sifs.create_path(yang_sif_path) + yang_sif.create_path('config/index', sif_index) + yang_sif.create_path('config/enabled', enabled ) + + yang_ipv4 : libyang.DContainer = yang_sif.create_path('openconfig-if-ip:ipv4') + yang_ipv4.create_path('config/enabled', enabled) + + yang_ipv4_addrs : libyang.DContainer = yang_ipv4.create_path('addresses') + yang_ipv4_addr_path = 'address[ip="{:s}"]'.format(address_ip) + yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) + yang_ipv4_addr.create_path('config/ip', address_ip ) + yang_ipv4_addr.create_path('config/prefix-length', address_prefix) + + yang_ipv4_addr_path2 = 'address[ip="{:s}"]'.format(address_ip2) + yang_ipv4_addr2 : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path2) + yang_ipv4_addr2.create_path('config/ip', address_ip2 ) + yang_ipv4_addr2.create_path('config/prefix-length', address_prefix) + + str_data = yang_if.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-interfaces:interface'][0] + str_data = json.dumps(json_data, indent=4) + LOGGER.info('Resulting Request (before unlink): {:s}'.format(str_data)) + + yang_ipv4_addr2.unlink() + + root_node : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') + LOGGER.info('root_node={:s}'.format(str(root_node.print_mem('json')))) + + for s in root_node.siblings(): + LOGGER.info('sibling: {:s}'.format(str(s))) + + PATH_TMPL = '/openconfig-interfaces:interfaces/interface[name="{:s}"]/subinterfaces/subinterface[index="{:d}"]' + yang_sif = root_node.find_path(PATH_TMPL.format(if_name, sif_index)) + if yang_sif is not None: + LOGGER.info('yang_sif={:s}'.format(str(yang_sif.print_mem('json')))) + yang_sif.unlink() + yang_sif.free() + + str_data = yang_if.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-interfaces:interface'][0] + str_data = json.dumps(json_data, indent=4) + LOGGER.info('Resulting Request (after unlink): {:s}'.format(str_data)) + + yang_handler.destroy() + +if __name__ == '__main__': + main() diff --git a/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py b/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/gnmi/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Component.py b/src/device/service/drivers/gnmi_openconfig/handlers/Component.py index 5ac8754c6081245f79f28b89e026d5a859bc363a..3cad5f5f2bed6f2c496a35a16130df42e41ad71b 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Component.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Component.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,45 +12,52 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging +import json, logging, re # libyang from typing import Any, Dict, List, Tuple from common.proto.kpi_sample_types_pb2 import KpiSampleType from ._Handler import _Handler +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) -PATH_IF_CTR = "/interfaces/interface[name={:s}]/state/counters/{:s}" +PATH_IF_CTR = '/openconfig-interfaces:interfaces/interface[name={:s}]/state/counters/{:s}' +#pylint: disable=abstract-method class ComponentHandler(_Handler): def get_resource_key(self) -> str: return '/endpoints/endpoint' - def get_path(self) -> str: return '/components/component' + def get_path(self) -> str: return '/openconfig-platform:components' - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: - #LOGGER.info('json_data = {:s}'.format(json.dumps(json_data))) - json_component_list : List[Dict] = json_data.get('component', []) - response = [] - for json_component in json_component_list: - #LOGGER.info('json_component = {:s}'.format(json.dumps(json_component))) + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('json_data = {:s}'.format(json.dumps(json_data))) - endpoint = {} + yang_components_path = self.get_path() + json_data_valid = yang_handler.parse_to_dict(yang_components_path, json_data, fmt='json') - component_type = json_component.get('state', {}).get('type') - if component_type is None: continue - component_type = component_type.replace('oc-platform-types:', '') - component_type = component_type.replace('openconfig-platform-types:', '') - if component_type not in {'PORT'}: continue - endpoint['type'] = '-' + entries = [] + for component in json_data_valid['components']['component']: + LOGGER.debug('component={:s}'.format(str(component))) + + component_name = component['name'] + #component_config = component.get('config', {}) - #LOGGER.info('PORT json_component = {:s}'.format(json.dumps(json_component))) + #yang_components : libyang.DContainer = yang_handler.get_data_path(yang_components_path) + #yang_component_path = 'component[name="{:s}"]'.format(component_name) + #yang_component : libyang.DContainer = yang_components.create_path(yang_component_path) + #yang_component.merge_data_dict(component, strict=True, validate=False) - component_name = json_component.get('name') - if component_name is None: continue + component_state = component.get('state', {}) + component_type = component_state.get('type') + if component_type is None: continue + component_type = component_type.split(':')[-1] + if component_type not in {'PORT'}: continue # TODO: improve mapping between interface name and component name # By now, computed by time for the sake of saving time for the Hackfest. - interface_name = component_name.lower().replace('-port', '') + interface_name = re.sub(r'\-[pP][oO][rR][tT]', '', component_name) - endpoint['uuid'] = interface_name + endpoint = {'uuid': interface_name, 'type': '-'} endpoint['sample_types'] = { KpiSampleType.KPISAMPLETYPE_BYTES_RECEIVED : PATH_IF_CTR.format(interface_name, 'in-octets' ), KpiSampleType.KPISAMPLETYPE_BYTES_TRANSMITTED : PATH_IF_CTR.format(interface_name, 'out-octets'), @@ -58,6 +65,6 @@ class ComponentHandler(_Handler): KpiSampleType.KPISAMPLETYPE_PACKETS_TRANSMITTED: PATH_IF_CTR.format(interface_name, 'out-pkts' ), } - if len(endpoint) == 0: continue - response.append(('/endpoints/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) - return response + entries.append(('/endpoints/endpoint[{:s}]'.format(endpoint['uuid']), endpoint)) + + return entries diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py index e97855aa8b97fc855b07848f1a7f0c7e93717a70..ed833b647d9c856cd7e54c5258b14924d187eb9f 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Interface.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,237 +12,197 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging +import json, libyang, logging from typing import Any, Dict, List, Tuple from ._Handler import _Handler -from .Tools import dict_get_first +from .Tools import get_bool, get_int, get_str +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) class InterfaceHandler(_Handler): - def get_resource_key(self) -> str: return '/interface' - def get_path(self) -> str: return '/interfaces/interface' + def get_resource_key(self) -> str: return '/interface/subinterface' + def get_path(self) -> str: return '/openconfig-interfaces:interfaces' - def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: - if_name = str (resource_value['name' ]) # ethernet-1/1 - sif_index = int (resource_value.get('sub_if_index' , 0 )) # 0 + def compose( + self, resource_key : str, resource_value : Dict, yang_handler : YangHandler, delete : bool = False + ) -> Tuple[str, str]: + if_name = get_str(resource_value, 'name' ) # ethernet-1/1 + sif_index = get_int(resource_value, 'index', 0) # 0 if delete: PATH_TMPL = '/interfaces/interface[name={:s}]/subinterfaces/subinterface[index={:d}]' str_path = PATH_TMPL.format(if_name, sif_index) str_data = json.dumps({}) + + root_node : libyang.DContainer = yang_handler.get_data_path( + '/openconfig-interfaces:interfaces' + ) + yang_sif = root_node.find_path('/'.join([ + '', # add slash at the beginning + 'openconfig-interfaces:interfaces', + 'interface[name="{:s}"]'.format(if_name), + 'subinterfaces', + 'subinterface[index="{:d}"]'.format(sif_index), + ])) + if yang_sif is not None: + yang_sif.unlink() + yang_sif.free() + return str_path, str_data - if_enabled = bool(resource_value.get('enabled' , True)) # True/False - sif_enabled = bool(resource_value.get('sub_if_enabled' , True)) # True/False - sif_ipv4_enabled = bool(resource_value.get('sub_if_ipv4_enabled', True)) # True/False - sif_ipv4_address = str (resource_value['sub_if_ipv4_address' ]) # 172.16.0.1 - sif_ipv4_prefix = int (resource_value['sub_if_ipv4_prefix' ]) # 24 + enabled = get_bool(resource_value, 'enabled', True) # True/False + #if_type = get_str (resource_value, 'type' ) # 'l3ipvlan' + vlan_id = get_int (resource_value, 'vlan_id', ) # 127 + address_ip = get_str (resource_value, 'address_ip' ) # 172.16.0.1 + address_prefix = get_int (resource_value, 'address_prefix') # 24 + mtu = get_int (resource_value, 'mtu' ) # 1500 + + yang_ifs : libyang.DContainer = yang_handler.get_data_path('/openconfig-interfaces:interfaces') + yang_if_path = 'interface[name="{:s}"]'.format(if_name) + yang_if : libyang.DContainer = yang_ifs.create_path(yang_if_path) + yang_if.create_path('config/name', if_name ) + if enabled is not None: yang_if.create_path('config/enabled', enabled) + if mtu is not None: yang_if.create_path('config/mtu', mtu) + + yang_sifs : libyang.DContainer = yang_if.create_path('subinterfaces') + yang_sif_path = 'subinterface[index="{:d}"]'.format(sif_index) + yang_sif : libyang.DContainer = yang_sifs.create_path(yang_sif_path) + yang_sif.create_path('config/index', sif_index) + if enabled is not None: yang_sif.create_path('config/enabled', enabled) + + if vlan_id is not None: + yang_subif_vlan : libyang.DContainer = yang_sif.create_path('openconfig-vlan:vlan') + yang_subif_vlan.create_path('match/single-tagged/config/vlan-id', vlan_id) + + yang_ipv4 : libyang.DContainer = yang_sif.create_path('openconfig-if-ip:ipv4') + if enabled is not None: yang_ipv4.create_path('config/enabled', enabled) + + if address_ip is not None and address_prefix is not None: + yang_ipv4_addrs : libyang.DContainer = yang_ipv4.create_path('addresses') + yang_ipv4_addr_path = 'address[ip="{:s}"]'.format(address_ip) + yang_ipv4_addr : libyang.DContainer = yang_ipv4_addrs.create_path(yang_ipv4_addr_path) + yang_ipv4_addr.create_path('config/ip', address_ip) + yang_ipv4_addr.create_path('config/prefix-length', address_prefix) str_path = '/interfaces/interface[name={:s}]'.format(if_name) - str_data = json.dumps({ - 'name': if_name, - 'config': {'name': if_name, 'enabled': if_enabled}, - 'subinterfaces': { - 'subinterface': { - 'index': sif_index, - 'config': {'index': sif_index, 'enabled': sif_enabled}, - 'ipv4': { - 'config': {'enabled': sif_ipv4_enabled}, - 'addresses': { - 'address': { - 'ip': sif_ipv4_address, - 'config': {'ip': sif_ipv4_address, 'prefix_length': sif_ipv4_prefix}, - } - } - } - } - } - }) + str_data = yang_if.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-interfaces:interface'][0] + str_data = json.dumps(json_data) return str_path, str_data - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: - #LOGGER.info('json_data = {:s}'.format(json.dumps(json_data))) - json_interface_list : List[Dict] = json_data.get('interface', []) - - response = [] - for json_interface in json_interface_list: - #LOGGER.info('json_interface = {:s}'.format(json.dumps(json_interface))) - - interface = {} - - interface_name = json_interface.get('name') - if interface_name is None: - LOGGER.info('DISCARDED json_interface = {:s}'.format(json.dumps(json_interface))) - continue - interface['name'] = interface_name - - CONFIG_FIELDS = ('config', 'openconfig-interface:config', 'oci:config') - json_config : Dict = dict_get_first(json_interface, CONFIG_FIELDS, default={}) - - STATE_FIELDS = ('state', 'openconfig-interface:state', 'oci:state') - json_state : Dict = dict_get_first(json_interface, STATE_FIELDS, default={}) - - interface_type = json_config.get('type') - if interface_type is None: interface_type = json_state.get('type') - if interface_type is None: - LOGGER.info('DISCARDED json_interface = {:s}'.format(json.dumps(json_interface))) - continue - interface_type = interface_type.replace('ianaift:', '') - interface_type = interface_type.replace('iana-if-type:', '') - interface['type'] = interface_type - - interface_mtu = json_config.get('mtu') - if interface_mtu is None: interface_mtu = json_state.get('mtu') - if interface_mtu is not None: interface['mtu'] = int(interface_mtu) - - interface_enabled = json_config.get('enabled') - if interface_enabled is None: interface_enabled = json_state.get('enabled') - interface['enabled'] = False if interface_enabled is None else bool(interface_enabled) - - interface_management = json_config.get('management') - if interface_management is None: interface_management = json_state.get('management') - interface['management'] = False if interface_management is None else bool(interface_management) - - interface_descr = json_interface.get('config', {}).get('description') - if interface_descr is not None: interface['description'] = interface_descr - - json_subinterfaces = json_interface.get('subinterfaces', {}) - json_subinterface_list : List[Dict] = json_subinterfaces.get('subinterface', []) - - for json_subinterface in json_subinterface_list: - #LOGGER.info('json_subinterface = {:s}'.format(json.dumps(json_subinterface))) - - subinterface = {} - - subinterface_index = json_subinterface.get('state', {}).get('index') - if subinterface_index is None: continue - subinterface['index'] = int(subinterface_index) - - subinterface_name = json_subinterface.get('state', {}).get('name') - if subinterface_name is None: continue - subinterface['name'] = subinterface_name - - subinterface_enabled = json_subinterface.get('state', {}).get('enabled', False) - subinterface['enabled'] = bool(subinterface_enabled) - - VLAN_FIELDS = ('vlan', 'openconfig-vlan:vlan', 'ocv:vlan') - json_vlan = dict_get_first(json_subinterface, VLAN_FIELDS, default={}) - - MATCH_FIELDS = ('match', 'openconfig-vlan:match', 'ocv:match') - json_vlan = dict_get_first(json_vlan, MATCH_FIELDS, default={}) - - SIN_TAG_FIELDS = ('single-tagged', 'openconfig-vlan:single-tagged', 'ocv:single-tagged') - json_vlan = dict_get_first(json_vlan, SIN_TAG_FIELDS, default={}) - - CONFIG_FIELDS = ('config', 'openconfig-vlan:config', 'ocv:config') - json_vlan = dict_get_first(json_vlan, CONFIG_FIELDS, default={}) - - VLAN_ID_FIELDS = ('vlan-id', 'openconfig-vlan:vlan-id', 'ocv:vlan-id') - subinterface_vlan_id = dict_get_first(json_vlan, VLAN_ID_FIELDS) - if subinterface_vlan_id is not None: subinterface['vlan_id'] = subinterface_vlan_id - - - # TODO: implement support for multiple IP addresses per subinterface - - IPV4_FIELDS = ('ipv4', 'openconfig-if-ip:ipv4', 'ociip:ipv4') - json_ipv4 = dict_get_first(json_subinterface, IPV4_FIELDS, default={}) - - IPV4_ADDRESSES_FIELDS = ('addresses', 'openconfig-if-ip:addresses', 'ociip:addresses') - json_ipv4_addresses = dict_get_first(json_ipv4, IPV4_ADDRESSES_FIELDS, default={}) - - IPV4_ADDRESS_FIELDS = ('address', 'openconfig-if-ip:address', 'ociip:address') - json_ipv4_address_list : List[Dict] = dict_get_first(json_ipv4_addresses, IPV4_ADDRESS_FIELDS, default=[]) - - #ipv4_addresses = [] - for json_ipv4_address in json_ipv4_address_list: - #LOGGER.info('json_ipv4_address = {:s}'.format(json.dumps(json_ipv4_address))) - - STATE_FIELDS = ('state', 'openconfig-if-ip:state', 'ociip:state') - json_ipv4_address_state = dict_get_first(json_ipv4_address, STATE_FIELDS, default={}) - - #ipv4_address = {} - - #ORIGIN_FIELDS = ('origin', 'openconfig-if-ip:origin', 'ociip:origin') - #ipv4_address_origin = dict_get_first(json_ipv4_address_state, ORIGIN_FIELDS, default={}) - #if ipv4_address_origin is not None: ipv4_address['origin'] = ipv4_address_origin - - IP_FIELDS = ('ip', 'openconfig-if-ip:ip', 'ociip:ip') - ipv4_address_ip = dict_get_first(json_ipv4_address_state, IP_FIELDS) - #if ipv4_address_ip is not None: ipv4_address['address_ip'] = ipv4_address_ip - if ipv4_address_ip is not None: subinterface['address_ip'] = ipv4_address_ip - - PREFIX_FIELDS = ('prefix-length', 'openconfig-if-ip:prefix-length', 'ociip:prefix-length') - ipv4_address_prefix = dict_get_first(json_ipv4_address_state, PREFIX_FIELDS) - #if ipv4_address_prefix is not None: ipv4_address['address_prefix'] = int(ipv4_address_prefix) - if ipv4_address_prefix is not None: subinterface['address_prefix'] = int(ipv4_address_prefix) - - #if len(ipv4_address) == 0: continue - #ipv4_addresses.append(ipv4_address) - - #subinterface['ipv4_addresses'] = ipv4_addresses - - if len(subinterface) == 0: continue - resource_key = '/interface[{:s}]/subinterface[{:s}]'.format(interface['name'], str(subinterface['index'])) - response.append((resource_key, subinterface)) - - if len(interface) == 0: continue - response.append(('/interface[{:s}]'.format(interface['name']), interface)) - - return response - - def parse_counters(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: - LOGGER.info('[parse_counters] json_data = {:s}'.format(json.dumps(json_data))) - json_interface_list : List[Dict] = json_data.get('interface', []) - - response = [] - for json_interface in json_interface_list: - LOGGER.info('[parse_counters] json_interface = {:s}'.format(json.dumps(json_interface))) - - interface = {} - - NAME_FIELDS = ('name', 'openconfig-interface:name', 'oci:name') - interface_name = dict_get_first(json_interface, NAME_FIELDS) - if interface_name is None: continue - interface['name'] = interface_name - - STATE_FIELDS = ('state', 'openconfig-interface:state', 'oci:state') - json_state = dict_get_first(json_interface, STATE_FIELDS, default={}) - - COUNTERS_FIELDS = ('counters', 'openconfig-interface:counters', 'oci:counters') - json_counters = dict_get_first(json_state, COUNTERS_FIELDS, default={}) - - IN_PKTS_FIELDS = ('in-pkts', 'openconfig-interface:in-pkts', 'oci:in-pkts') - interface_in_pkts = dict_get_first(json_counters, IN_PKTS_FIELDS) - if interface_in_pkts is not None: interface['in-pkts'] = int(interface_in_pkts) - - IN_OCTETS_FIELDS = ('in-octets', 'openconfig-interface:in-octets', 'oci:in-octets') - interface_in_octets = dict_get_first(json_counters, IN_OCTETS_FIELDS) - if interface_in_octets is not None: interface['in-octets'] = int(interface_in_octets) - - IN_ERRORS_FIELDS = ('in-errors', 'openconfig-interface:in-errors', 'oci:in-errors') - interface_in_errors = dict_get_first(json_counters, IN_ERRORS_FIELDS) - if interface_in_errors is not None: interface['in-errors'] = int(interface_in_errors) - - OUT_OCTETS_FIELDS = ('out-octets', 'openconfig-interface:out-octets', 'oci:out-octets') - interface_out_octets = dict_get_first(json_counters, OUT_OCTETS_FIELDS) - if interface_out_octets is not None: interface['out-octets'] = int(interface_out_octets) - - OUT_PKTS_FIELDS = ('out-pkts', 'openconfig-interface:out-pkts', 'oci:out-pkts') - interface_out_pkts = dict_get_first(json_counters, OUT_PKTS_FIELDS) - if interface_out_pkts is not None: interface['out-pkts'] = int(interface_out_pkts) - - OUT_ERRORS_FIELDS = ('out-errors', 'openconfig-interface:out-errors', 'oci:out-errors') - interface_out_errors = dict_get_first(json_counters, OUT_ERRORS_FIELDS) - if interface_out_errors is not None: interface['out-errors'] = int(interface_out_errors) - - OUT_DISCARDS_FIELDS = ('out-discards', 'openconfig-interface:out-discards', 'oci:out-discards') - interface_out_discards = dict_get_first(json_counters, OUT_DISCARDS_FIELDS) - if interface_out_discards is not None: interface['out-discards'] = int(interface_out_discards) - - #LOGGER.info('[parse_counters] interface = {:s}'.format(str(interface))) - - if len(interface) == 0: continue - response.append(('/interface[{:s}]'.format(interface['name']), interface)) - - return response + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('json_data = {:s}'.format(json.dumps(json_data))) + + yang_interfaces_path = self.get_path() + json_data_valid = yang_handler.parse_to_dict(yang_interfaces_path, json_data, fmt='json') + + entries = [] + for interface in json_data_valid['interfaces']['interface']: + LOGGER.debug('interface={:s}'.format(str(interface))) + + interface_name = interface['name'] + interface_config = interface.get('config', {}) + + #yang_interfaces : libyang.DContainer = yang_handler.get_data_path(yang_interfaces_path) + #yang_interface_path = 'interface[name="{:s}"]'.format(interface_name) + #yang_interface : libyang.DContainer = yang_interfaces.create_path(yang_interface_path) + #yang_interface.merge_data_dict(interface, strict=True, validate=False) + + interface_state = interface.get('state', {}) + interface_type = interface_state.get('type') + if interface_type is None: continue + interface_type = interface_type.split(':')[-1] + if interface_type not in {'ethernetCsmacd'}: continue + + _interface = { + 'name' : interface_name, + 'type' : interface_type, + 'mtu' : interface_state['mtu'], + 'admin-status' : interface_state['admin-status'], + 'oper-status' : interface_state['oper-status'], + 'management' : interface_state['management'], + } + if not interface_state['management'] and 'ifindex' in interface_state: + _interface['ifindex'] = interface_state['ifindex'] + if 'description' in interface_config: + _interface['description'] = interface_config['description'] + if 'enabled' in interface_config: + _interface['enabled'] = interface_config['enabled'] + if 'hardware-port' in interface_state: + _interface['hardware-port'] = interface_state['hardware-port'] + if 'transceiver' in interface_state: + _interface['transceiver'] = interface_state['transceiver'] + + entry_interface_key = '/interface[{:s}]'.format(interface_name) + entries.append((entry_interface_key, _interface)) + + if interface_type == 'ethernetCsmacd': + ethernet_state = interface['ethernet']['state'] + + _ethernet = { + 'mac-address' : ethernet_state['mac-address'], + 'hw-mac-address' : ethernet_state['hw-mac-address'], + 'port-speed' : ethernet_state['port-speed'].split(':')[-1], + 'negotiated-port-speed' : ethernet_state['negotiated-port-speed'].split(':')[-1], + } + entry_ethernet_key = '{:s}/ethernet'.format(entry_interface_key) + entries.append((entry_ethernet_key, _ethernet)) + + subinterfaces = interface.get('subinterfaces', {}).get('subinterface', []) + for subinterface in subinterfaces: + LOGGER.debug('subinterface={:s}'.format(str(subinterface))) + + subinterface_index = subinterface['index'] + subinterface_state = subinterface.get('state', {}) + + _subinterface = {'index': subinterface_index} + if 'name' in subinterface_state: + _subinterface['name'] = subinterface_state['name'] + if 'enabled' in subinterface_state: + _subinterface['enabled'] = subinterface_state['enabled'] + + if 'vlan' in subinterface: + vlan = subinterface['vlan'] + vlan_match = vlan['match'] + + single_tagged = vlan_match.pop('single-tagged', None) + if single_tagged is not None: + single_tagged_config = single_tagged['config'] + vlan_id = single_tagged_config['vlan-id'] + _subinterface['vlan_id'] = vlan_id + + if len(vlan_match) > 0: + raise Exception('Unsupported VLAN schema: {:s}'.format(str(vlan))) + + ipv4_addresses = subinterface.get('ipv4', {}).get('addresses', {}).get('address', []) + if len(ipv4_addresses) > 1: + raise Exception('Multiple IPv4 Addresses not supported: {:s}'.format(str(ipv4_addresses))) + for ipv4_address in ipv4_addresses: + LOGGER.debug('ipv4_address={:s}'.format(str(ipv4_address))) + _subinterface['address_ip'] = ipv4_address['ip'] + ipv4_address_state = ipv4_address.get('state', {}) + #if 'origin' in ipv4_address_state: + # _subinterface['origin'] = ipv4_address_state['origin'] + if 'prefix-length' in ipv4_address_state: + _subinterface['address_prefix'] = ipv4_address_state['prefix-length'] + + ipv6_addresses = subinterface.get('ipv6', {}).get('addresses', {}).get('address', []) + if len(ipv6_addresses) > 1: + raise Exception('Multiple IPv6 Addresses not supported: {:s}'.format(str(ipv6_addresses))) + for ipv6_address in ipv6_addresses: + LOGGER.debug('ipv6_address={:s}'.format(str(ipv6_address))) + _subinterface['address_ipv6'] = ipv6_address['ip'] + ipv6_address_state = ipv6_address.get('state', {}) + #if 'origin' in ipv6_address_state: + # _subinterface['origin_ipv6'] = ipv6_address_state['origin'] + if 'prefix-length' in ipv6_address_state: + _subinterface['address_prefix_ipv6'] = ipv6_address_state['prefix-length'] + + entry_subinterface_key = '{:s}/subinterface[{:d}]'.format(entry_interface_key, subinterface_index) + entries.append((entry_subinterface_key, _subinterface)) + + return entries diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py b/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py index 502868c2204553d30e7cdd529184cf994d03fd21..c72a4ea3af5dd7f1ee71560dcad37a06b7d2fb32 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/InterfaceCounter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,69 +12,53 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging +import json, libyang, logging from typing import Any, Dict, List, Tuple from ._Handler import _Handler -from .Tools import dict_get_first +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) +#pylint: disable=abstract-method class InterfaceCounterHandler(_Handler): def get_resource_key(self) -> str: return '/interface/counters' - def get_path(self) -> str: return '/interfaces/interface/state/counters' - - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: - LOGGER.info('[parse] json_data = {:s}'.format(json.dumps(json_data))) - json_interface_list : List[Dict] = json_data.get('interface', []) - - response = [] - for json_interface in json_interface_list: - LOGGER.info('[parse] json_interface = {:s}'.format(json.dumps(json_interface))) - - interface = {} - - NAME_FIELDS = ('name', 'openconfig-interface:name', 'oci:name') - interface_name = dict_get_first(json_interface, NAME_FIELDS) - if interface_name is None: continue - interface['name'] = interface_name - - STATE_FIELDS = ('state', 'openconfig-interface:state', 'oci:state') - json_state = dict_get_first(json_interface, STATE_FIELDS, default={}) - - COUNTERS_FIELDS = ('counters', 'openconfig-interface:counters', 'oci:counters') - json_counters = dict_get_first(json_state, COUNTERS_FIELDS, default={}) - - IN_PKTS_FIELDS = ('in-pkts', 'openconfig-interface:in-pkts', 'oci:in-pkts') - interface_in_pkts = dict_get_first(json_counters, IN_PKTS_FIELDS) - if interface_in_pkts is not None: interface['in-pkts'] = int(interface_in_pkts) - - IN_OCTETS_FIELDS = ('in-octets', 'openconfig-interface:in-octets', 'oci:in-octets') - interface_in_octets = dict_get_first(json_counters, IN_OCTETS_FIELDS) - if interface_in_octets is not None: interface['in-octets'] = int(interface_in_octets) - - IN_ERRORS_FIELDS = ('in-errors', 'openconfig-interface:in-errors', 'oci:in-errors') - interface_in_errors = dict_get_first(json_counters, IN_ERRORS_FIELDS) - if interface_in_errors is not None: interface['in-errors'] = int(interface_in_errors) - - OUT_OCTETS_FIELDS = ('out-octets', 'openconfig-interface:out-octets', 'oci:out-octets') - interface_out_octets = dict_get_first(json_counters, OUT_OCTETS_FIELDS) - if interface_out_octets is not None: interface['out-octets'] = int(interface_out_octets) - - OUT_PKTS_FIELDS = ('out-pkts', 'openconfig-interface:out-pkts', 'oci:out-pkts') - interface_out_pkts = dict_get_first(json_counters, OUT_PKTS_FIELDS) - if interface_out_pkts is not None: interface['out-pkts'] = int(interface_out_pkts) - - OUT_ERRORS_FIELDS = ('out-errors', 'openconfig-interface:out-errors', 'oci:out-errors') - interface_out_errors = dict_get_first(json_counters, OUT_ERRORS_FIELDS) - if interface_out_errors is not None: interface['out-errors'] = int(interface_out_errors) - - OUT_DISCARDS_FIELDS = ('out-discards', 'openconfig-interface:out-discards', 'oci:out-discards') - interface_out_discards = dict_get_first(json_counters, OUT_DISCARDS_FIELDS) - if interface_out_discards is not None: interface['out-discards'] = int(interface_out_discards) - - #LOGGER.info('[parse] interface = {:s}'.format(str(interface))) - - if len(interface) == 0: continue - response.append(('/interface[{:s}]'.format(interface['name']), interface)) - - return response + def get_path(self) -> str: return '/openconfig-interfaces:interfaces/interface/state/counters' + + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('json_data = {:s}'.format(json.dumps(json_data))) + + yang_interfaces_path = self.get_path() + json_data_valid = yang_handler.parse_to_dict(yang_interfaces_path, json_data, fmt='json') + + entries = [] + for interface in json_data_valid['interfaces']['interface']: + LOGGER.debug('interface={:s}'.format(str(interface))) + + interface_name = interface['name'] + interface_counters = interface.get('state', {}).get('counters', {}) + _interface = { + 'name' : interface_name, + 'in-broadcast-pkts' : interface_counters['in_broadcast_pkts' ], + 'in-discards' : interface_counters['in_discards' ], + 'in-errors' : interface_counters['in_errors' ], + 'in-fcs-errors' : interface_counters['in_fcs_errors' ], + 'in-multicast-pkts' : interface_counters['in_multicast_pkts' ], + 'in-octets' : interface_counters['in_octets' ], + 'in-pkts' : interface_counters['in_pkts' ], + 'in-unicast-pkts' : interface_counters['in_unicast_pkts' ], + 'out-broadcast-pkts': interface_counters['out_broadcast_pkts'], + 'out-discards' : interface_counters['out_discards' ], + 'out-errors' : interface_counters['out_errors' ], + 'out-multicast-pkts': interface_counters['out_multicast_pkts'], + 'out-octets' : interface_counters['out_octets' ], + 'out-pkts' : interface_counters['out_pkts' ], + 'out-unicast-pkts' : interface_counters['out_unicast_pkts' ], + } + LOGGER.debug('interface = {:s}'.format(str(interface))) + + entry_interface_key = '/interface[{:s}]'.format(interface_name) + entries.append((entry_interface_key, _interface)) + + return entries diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py index d522eec964b2c6beffe953075411dbba2594eaa4..5d56dde8c0a4b37a3179970303469d6a80d61ad1 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstance.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,18 +12,39 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging +import json, libyang, logging from typing import Any, Dict, List, Tuple from ._Handler import _Handler +from .Tools import get_str +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) +MAP_NETWORK_INSTANCE_TYPE = { + # special routing instance; acts as default/global routing instance for a network device + 'DEFAULT': 'openconfig-network-instance-types:DEFAULT_INSTANCE', + + # private L3-only routing instance; formed of one or more RIBs + 'L3VRF': 'openconfig-network-instance-types:L3VRF', + + # private L2-only switch instance; formed of one or more L2 forwarding tables + 'L2VSI': 'openconfig-network-instance-types:L2VSI', + + # private L2-only forwarding instance; point to point connection between two endpoints + 'L2P2P': 'openconfig-network-instance-types:L2P2P', + + # private Layer 2 and Layer 3 forwarding instance + 'L2L3': 'openconfig-network-instance-types:L2L3', +} + class NetworkInstanceHandler(_Handler): def get_resource_key(self) -> str: return '/network_instance' - def get_path(self) -> str: return '/network-instances/network-instance' + def get_path(self) -> str: return '/openconfig-network-instance:network-instances' - def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: - ni_name = str(resource_value['name']) # test-svc + def compose( + self, resource_key : str, resource_value : Dict, yang_handler : YangHandler, delete : bool = False + ) -> Tuple[str, str]: + ni_name = get_str(resource_value, 'name') # test-svc if delete: PATH_TMPL = '/network-instances/network-instance[name={:s}]' @@ -31,32 +52,124 @@ class NetworkInstanceHandler(_Handler): str_data = json.dumps({}) return str_path, str_data - ni_type = str(resource_value['type']) # L3VRF / L2VSI / ... + ni_type = get_str(resource_value, 'type') # L3VRF / L2VSI / ... + ni_type = MAP_NETWORK_INSTANCE_TYPE.get(ni_type, ni_type) + + str_path = '/network-instances/network-instance[name={:s}]'.format(ni_name) + #str_data = json.dumps({ + # 'name': ni_name, + # 'config': {'name': ni_name, 'type': ni_type}, + #}) - # not works: [FailedPrecondition] unsupported identifier 'DIRECTLY_CONNECTED' - #protocols = [self._compose_directly_connected()] + yang_nis : libyang.DContainer = yang_handler.get_data_path('/openconfig-network-instance:network-instances') + yang_ni_path = 'network-instance[name="{:s}"]'.format(ni_name) + yang_ni : libyang.DContainer = yang_nis.create_path(yang_ni_path) + yang_ni.create_path('config/name', ni_name) + yang_ni.create_path('config/type', ni_type) - MAP_OC_NI_TYPE = { - 'L3VRF': 'openconfig-network-instance-types:L3VRF', - } - ni_type = MAP_OC_NI_TYPE.get(ni_type, ni_type) + # 'DIRECTLY_CONNECTED' is implicitly added + #'protocols': {'protocol': protocols}, - str_path = '/network-instances/network-instance[name={:s}]'.format(ni_name) - str_data = json.dumps({ - 'name': ni_name, - 'config': {'name': ni_name, 'type': ni_type}, - #'protocols': {'protocol': protocols}, - }) + str_data = yang_ni.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-network-instance:network-instance'][0] + str_data = json.dumps(json_data) return str_path, str_data - def _compose_directly_connected(self, name=None, enabled=True) -> Dict: - identifier = 'DIRECTLY_CONNECTED' - if name is None: name = 'DIRECTLY_CONNECTED' - return { - 'identifier': identifier, 'name': name, - 'config': {'identifier': identifier, 'name': name, 'enabled': enabled}, - } - - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: - response = [] - return response + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('json_data = {:s}'.format(json.dumps(json_data))) + + # Arista Parsing Fixes: + # - Default instance comes with mpls/signaling-protocols/rsvp-te/global/hellos/state/hello-interval set to 0 + # overwrite with .../hellos/config/hello-interval + network_instances = json_data.get('openconfig-network-instance:network-instance', []) + for network_instance in network_instances: + if network_instance['name'] != 'default': continue + mpls_rsvp_te = network_instance.get('mpls', {}).get('signaling-protocols', {}).get('rsvp-te', {}) + mpls_rsvp_te_hellos = mpls_rsvp_te.get('global', {}).get('hellos', {}) + hello_interval = mpls_rsvp_te_hellos.get('config', {}).get('hello-interval', 9000) + mpls_rsvp_te_hellos.get('state', {})['hello-interval'] = hello_interval + + yang_network_instances_path = self.get_path() + json_data_valid = yang_handler.parse_to_dict(yang_network_instances_path, json_data, fmt='json', strict=False) + + entries = [] + for network_instance in json_data_valid['network-instances']['network-instance']: + LOGGER.debug('network_instance={:s}'.format(str(network_instance))) + ni_name = network_instance['name'] + + ni_config = network_instance['config'] + ni_type = ni_config['type'].split(':')[-1] + + _net_inst = {'name': ni_name, 'type': ni_type} + entry_net_inst_key = '/network_instance[{:s}]'.format(ni_name) + entries.append((entry_net_inst_key, _net_inst)) + + ni_interfaces = network_instance.get('interfaces', {}).get('interface', []) + for ni_interface in ni_interfaces: + #ni_if_id = ni_interface['id'] + ni_if_config = ni_interface['config'] + ni_if_name = ni_if_config['interface'] + ni_sif_index = ni_if_config['subinterface'] + ni_if_id = '{:s}.{:d}'.format(ni_if_name, ni_sif_index) + + _interface = {'name': ni_name, 'id': ni_if_id, 'if_name': ni_if_name, 'sif_index': ni_sif_index} + entry_interface_key = '{:s}/interface[{:s}]'.format(entry_net_inst_key, ni_if_id) + entries.append((entry_interface_key, _interface)) + + ni_protocols = network_instance.get('protocols', {}).get('protocol', []) + for ni_protocol in ni_protocols: + ni_protocol_id = ni_protocol['identifier'].split(':')[-1] + ni_protocol_name = ni_protocol['name'] + + _protocol = {'name': ni_name, 'identifier': ni_protocol_id, 'protocol_name': ni_protocol_name} + entry_protocol_key = '{:s}/protocols[{:s}]'.format(entry_net_inst_key, ni_protocol_id) + entries.append((entry_protocol_key, _protocol)) + + if ni_protocol_id == 'STATIC': + static_routes = ni_protocol.get('static-routes', {}).get('static', []) + for static_route in static_routes: + static_route_prefix = static_route['prefix'] + for next_hop in static_route.get('next-hops', {}).get('next-hop', []): + static_route_metric = next_hop['config']['metric'] + _static_route = { + 'prefix' : static_route_prefix, + 'index' : next_hop['index'], + 'next_hop': next_hop['config']['next-hop'], + 'metric' : static_route_metric, + } + _static_route.update(_protocol) + entry_static_route_key = '{:s}/static_route[{:s}:{:d}]'.format( + entry_protocol_key, static_route_prefix, static_route_metric + ) + entries.append((entry_static_route_key, _static_route)) + + ni_tables = network_instance.get('tables', {}).get('table', []) + for ni_table in ni_tables: + ni_table_protocol = ni_table['protocol'].split(':')[-1] + ni_table_address_family = ni_table['address-family'].split(':')[-1] + _table = {'protocol': ni_table_protocol, 'address_family': ni_table_address_family} + entry_table_key = '{:s}/table[{:s},{:s}]'.format( + entry_net_inst_key, ni_table_protocol, ni_table_address_family + ) + entries.append((entry_table_key, _table)) + + ni_vlans = network_instance.get('vlans', {}).get('vlan', []) + for ni_vlan in ni_vlans: + ni_vlan_id = ni_vlan['vlan-id'] + + #ni_vlan_config = ni_vlan['config'] + ni_vlan_state = ni_vlan['state'] + ni_vlan_name = ni_vlan_state['name'] + + _members = [ + member['state']['interface'] + for member in ni_vlan.get('members', {}).get('member', []) + ] + _vlan = {'vlan_id': ni_vlan_id, 'name': ni_vlan_name, 'members': _members} + entry_vlan_key = '{:s}/vlan[{:d}]'.format(entry_net_inst_key, ni_vlan_id) + entries.append((entry_vlan_key, _vlan)) + + return entries diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py index cc22618bc4179ba6eabdd2b4232b8cbfb92f1587..f6f61a32403f154578da0247d0e1db24a727b017 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceInterface.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,35 +12,60 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging +import json, libyang, logging from typing import Any, Dict, List, Tuple from ._Handler import _Handler +from .Tools import get_int, get_str +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) +IS_CEOS = True + class NetworkInstanceInterfaceHandler(_Handler): def get_resource_key(self) -> str: return '/network_instance/interface' - def get_path(self) -> str: return '/network-instances/network-instance/interfaces' + def get_path(self) -> str: return '/openconfig-network-instance:network-instances/network-instance/interfaces' + + def compose( + self, resource_key : str, resource_value : Dict, yang_handler : YangHandler, delete : bool = False + ) -> Tuple[str, str]: + ni_name = get_str(resource_value, 'name' ) # test-svc + ni_if_id = get_str(resource_value, 'id' ) # ethernet-1/1.0 + if_name = get_str(resource_value, 'interface' ) # ethernet-1/1 + sif_index = get_int(resource_value, 'subinterface', 0) # 0 + + if IS_CEOS: ni_if_id = if_name - def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: - ni_name = str(resource_value['name' ]) # test-svc - if_name = str(resource_value['if_name' ]) # ethernet-1/1 - sif_index = int(resource_value['sif_index']) # 0 - if_id = '{:s}.{:d}'.format(if_name, sif_index) + PATH_TMPL = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]' + str_path = PATH_TMPL.format(ni_name, ni_if_id) if delete: - PATH_TMPL = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]' - str_path = PATH_TMPL.format(ni_name, if_id) str_data = json.dumps({}) return str_path, str_data - str_path = '/network-instances/network-instance[name={:s}]/interfaces/interface[id={:s}]'.format(ni_name, if_id) - str_data = json.dumps({ - 'id': if_id, - 'config': {'id': if_id, 'interface': if_name, 'subinterface': sif_index}, - }) + #str_data = json.dumps({ + # 'id': if_id, + # 'config': {'id': if_id, 'interface': if_name, 'subinterface': sif_index}, + #}) + + yang_nis : libyang.DContainer = yang_handler.get_data_path('/openconfig-network-instance:network-instances') + yang_ni : libyang.DContainer = yang_nis.create_path('network-instance[name="{:s}"]'.format(ni_name)) + yang_ni_ifs : libyang.DContainer = yang_ni.create_path('interfaces') + yang_ni_if_path = 'interface[id="{:s}"]'.format(ni_if_id) + yang_ni_if : libyang.DContainer = yang_ni_ifs.create_path(yang_ni_if_path) + yang_ni_if.create_path('config/id', ni_if_id) + yang_ni_if.create_path('config/interface', if_name) + yang_ni_if.create_path('config/subinterface', sif_index) + + str_data = yang_ni_if.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-network-instance:interface'][0] + str_data = json.dumps(json_data) return str_path, str_data - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('[parse] json_data = {:s}'.format(str(json_data))) response = [] return response diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceProtocol.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceProtocol.py new file mode 100644 index 0000000000000000000000000000000000000000..854bb4fd2df68c47c4291ed51ed012522c1a3a2d --- /dev/null +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceProtocol.py @@ -0,0 +1,79 @@ +# Copyright 2022-2024 ETSI 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. + +import json, libyang, logging +from typing import Any, Dict, List, Tuple +from ._Handler import _Handler +from .Tools import get_str +from .YangHandler import YangHandler + +LOGGER = logging.getLogger(__name__) + +class NetworkInstanceProtocolHandler(_Handler): + def get_resource_key(self) -> str: return '/network_instance/protocols' + def get_path(self) -> str: + return '/openconfig-network-instance:network-instances/network-instance/protocols/protocol' + + def compose( + self, resource_key : str, resource_value : Dict, yang_handler : YangHandler, delete : bool = False + ) -> Tuple[str, str]: + ni_name = get_str(resource_value, 'name' ) # test-svc + identifier = get_str(resource_value, 'identifier') # 'STATIC' + proto_name = get_str(resource_value, 'protocol_name') # 'STATIC' + + if ':' not in identifier: + identifier = 'openconfig-policy-types:{:s}'.format(identifier) + PATH_TMPL = '/network-instances/network-instance[name={:s}]/protocols/protocol[identifier={:s}][name={:s}]' + str_path = PATH_TMPL.format(ni_name, identifier, proto_name) + + if delete: + str_data = json.dumps({}) + return str_path, str_data + + #str_data = json.dumps({ + # 'identifier': identifier, 'name': name, + # 'config': {'identifier': identifier, 'name': name, 'enabled': True}, + # 'static_routes': {'static': [{ + # 'prefix': prefix, + # 'config': {'prefix': prefix}, + # 'next_hops': { + # 'next-hop': [{ + # 'index': next_hop_index, + # 'config': {'index': next_hop_index, 'next_hop': next_hop} + # }] + # } + # }]} + #}) + + yang_nis : libyang.DContainer = yang_handler.get_data_path('/openconfig-network-instance:network-instances') + yang_ni : libyang.DContainer = yang_nis.create_path('network-instance[name="{:s}"]'.format(ni_name)) + yang_ni_prs : libyang.DContainer = yang_ni.create_path('protocols') + yang_ni_pr_path = 'protocol[identifier="{:s}"][name="{:s}"]'.format(identifier, proto_name) + yang_ni_pr : libyang.DContainer = yang_ni_prs.create_path(yang_ni_pr_path) + yang_ni_pr.create_path('config/identifier', identifier) + yang_ni_pr.create_path('config/name', proto_name) + yang_ni_pr.create_path('config/enabled', True ) + + str_data = yang_ni_pr.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-network-instance:protocol'][0] + str_data = json.dumps(json_data) + return str_path, str_data + + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('[parse] json_data = {:s}'.format(str(json_data))) + response = [] + return response diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py index 6294f9c9bf46b3b60da48f19c08ad57f096fa39b..cb4b68a1e82774350d7a16accf9ad7ef1ad2ac1a 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/NetworkInstanceStaticRoute.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,50 +12,90 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging +import json, libyang, logging from typing import Any, Dict, List, Tuple from ._Handler import _Handler +from .Tools import get_int, get_str +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) class NetworkInstanceStaticRouteHandler(_Handler): - def get_resource_key(self) -> str: return '/network_instance/static_route' - def get_path(self) -> str: return '/network-instances/network-instance/static_route' + def get_resource_key(self) -> str: return '/network_instance/protocols/static_route' + def get_path(self) -> str: + return '/openconfig-network-instance:network-instances/network-instance/protocols/protocol/static-routes' - def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: - ni_name = str(resource_value['name' ]) # test-svc - prefix = str(resource_value['prefix' ]) # '172.0.1.0/24' + def compose( + self, resource_key : str, resource_value : Dict, yang_handler : YangHandler, delete : bool = False + ) -> Tuple[str, str]: + ni_name = get_str(resource_value, 'name' ) # test-svc + identifier = get_str(resource_value, 'identifier') # 'STATIC' + proto_name = get_str(resource_value, 'protocol_name') # 'STATIC' + prefix = get_str(resource_value, 'prefix') # '172.0.1.0/24' + + if ':' not in identifier: + identifier = 'openconfig-policy-types:{:s}'.format(identifier) - identifier = 'STATIC' - name = 'static' if delete: PATH_TMPL = '/network-instances/network-instance[name={:s}]/protocols' PATH_TMPL += '/protocol[identifier={:s}][name={:s}]/static-routes/static[prefix={:s}]' - str_path = PATH_TMPL.format(ni_name, identifier, name, prefix) + str_path = PATH_TMPL.format(ni_name, identifier, proto_name, prefix) str_data = json.dumps({}) return str_path, str_data - next_hop = str(resource_value['next_hop' ]) # '172.0.0.1' - next_hop_index = int(resource_value.get('next_hop_index', 0)) # 0 + next_hop = get_str(resource_value, 'next_hop') # '172.0.0.1' + metric = get_int(resource_value, 'metric' ) # 20 + index = get_str(resource_value, 'index' ) # AUTO_1_172-0-0-1 + if index is None: + index = 'AUTO_{:d}_{:s}'.format(metric, next_hop) PATH_TMPL = '/network-instances/network-instance[name={:s}]/protocols/protocol[identifier={:s}][name={:s}]' - str_path = PATH_TMPL.format(ni_name, identifier, name) - str_data = json.dumps({ - 'identifier': identifier, 'name': name, - 'config': {'identifier': identifier, 'name': name, 'enabled': True}, - 'static_routes': {'static': [{ - 'prefix': prefix, - 'config': {'prefix': prefix}, - 'next_hops': { - 'next-hop': [{ - 'index': next_hop_index, - 'config': {'index': next_hop_index, 'next_hop': next_hop} - }] - } - }]} - }) + str_path = PATH_TMPL.format(ni_name, identifier, proto_name) + #str_data = json.dumps({ + # 'identifier': identifier, 'name': name, + # 'config': {'identifier': identifier, 'name': name, 'enabled': True}, + # 'static_routes': {'static': [{ + # 'prefix': prefix, + # 'config': {'prefix': prefix}, + # 'next_hops': { + # 'next-hop': [{ + # 'index': next_hop_index, + # 'config': {'index': next_hop_index, 'next_hop': next_hop} + # }] + # } + # }]} + #}) + + yang_nis : libyang.DContainer = yang_handler.get_data_path('/openconfig-network-instance:network-instances') + yang_ni : libyang.DContainer = yang_nis.create_path('network-instance[name="{:s}"]'.format(ni_name)) + yang_ni_prs : libyang.DContainer = yang_ni.create_path('protocols') + yang_ni_pr_path = 'protocol[identifier="{:s}"][name="{:s}"]'.format(identifier, proto_name) + yang_ni_pr : libyang.DContainer = yang_ni_prs.create_path(yang_ni_pr_path) + yang_ni_pr.create_path('config/identifier', identifier) + yang_ni_pr.create_path('config/name', proto_name) + yang_ni_pr.create_path('config/enabled', True ) + + yang_ni_pr_srs : libyang.DContainer = yang_ni_pr.create_path('static-routes') + yang_ni_pr_sr_path = 'static[prefix="{:s}"]'.format(prefix) + yang_ni_pr_sr : libyang.DContainer = yang_ni_pr_srs.create_path(yang_ni_pr_sr_path) + yang_ni_pr_sr.create_path('config/prefix', prefix) + + yang_ni_pr_sr_nhs : libyang.DContainer = yang_ni_pr_sr.create_path('next-hops') + yang_ni_pr_sr_nh_path = 'next-hop[index="{:s}"]'.format(index) + yang_ni_pr_sr_nh : libyang.DContainer = yang_ni_pr_sr_nhs.create_path(yang_ni_pr_sr_nh_path) + yang_ni_pr_sr_nh.create_path('config/index', index) + yang_ni_pr_sr_nh.create_path('config/next-hop', next_hop) + yang_ni_pr_sr_nh.create_path('config/metric', metric) + + str_data = yang_ni_pr.print_mem('json') + json_data = json.loads(str_data) + json_data = json_data['openconfig-network-instance:protocol'][0] + str_data = json.dumps(json_data) return str_path, str_data - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: + LOGGER.debug('[parse] json_data = {:s}'.format(str(json_data))) response = [] return response diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py b/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py index 358c7de9fa3b9c46c4a7c70142deb1c2ab396ad0..d07a097f6f1ebc008c370a524df4e7511cbe2b46 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,7 +13,7 @@ # limitations under the License. import re -from typing import Any, Dict, Iterable +from typing import Any, Callable, Dict, Iterable, Optional RE_REMOVE_FILTERS = re.compile(r'\[[^\]]+\]') RE_REMOVE_NAMESPACES = re.compile(r'\/[a-zA-Z0-9\_\-]+:') @@ -23,8 +23,39 @@ def get_schema(resource_key : str): resource_key = RE_REMOVE_NAMESPACES.sub('/', resource_key) return resource_key -def dict_get_first(d : Dict, field_names : Iterable[str], default=None) -> Any: - for field_name in field_names: - if field_name not in d: continue - return d[field_name] +def container_get_first( + container : Dict[str, Any], key_name : str, namespace : Optional[str]=None, namespaces : Iterable[str]=tuple(), + default : Optional[Any] = None +) -> Any: + value = container.get(key_name) + if value is not None: return value + + if namespace is not None: + if len(namespaces) > 0: + raise Exception('At maximum, one of namespace or namespaces can be specified') + namespaces = (namespace,) + + for namespace in namespaces: + namespace_key_name = '{:s}:{:s}'.format(namespace, key_name) + if namespace_key_name in container: return container[namespace_key_name] + return default + +def get_value( + resource_value : Dict, field_name : str, cast_func : Callable = lambda x:x, default : Optional[Any] = None +) -> Optional[Any]: + field_value = resource_value.get(field_name, default) + if field_value is not None: field_value = cast_func(field_value) + return field_value + +def get_bool(resource_value : Dict, field_name : bool, default : Optional[Any] = None) -> bool: + return get_value(resource_value, field_name, cast_func=bool, default=default) + +def get_float(resource_value : Dict, field_name : float, default : Optional[Any] = None) -> float: + return get_value(resource_value, field_name, cast_func=float, default=default) + +def get_int(resource_value : Dict, field_name : int, default : Optional[Any] = None) -> int: + return get_value(resource_value, field_name, cast_func=int, default=default) + +def get_str(resource_value : Dict, field_name : str, default : Optional[Any] = None) -> str: + return get_value(resource_value, field_name, cast_func=str, default=default) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py b/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..e7cff19eb901be4a85d4e31f8de9070fe5a7c277 --- /dev/null +++ b/src/device/service/drivers/gnmi_openconfig/handlers/YangHandler.py @@ -0,0 +1,110 @@ +# Copyright 2022-2024 ETSI 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. + +import json, libyang, logging, os +from typing import Dict, Optional + +YANG_BASE_PATH = os.path.join(os.path.dirname(__file__), '..', 'git', 'openconfig', 'public') +YANG_SEARCH_PATHS = ':'.join([ + os.path.join(YANG_BASE_PATH, 'release'), + os.path.join(YANG_BASE_PATH, 'third_party'), +]) + +YANG_MODULES = [ + 'iana-if-type', + 'openconfig-bgp-types', + 'openconfig-vlan-types', + + 'openconfig-interfaces', + 'openconfig-if-8021x', + 'openconfig-if-aggregate', + 'openconfig-if-ethernet-ext', + 'openconfig-if-ethernet', + 'openconfig-if-ip-ext', + 'openconfig-if-ip', + 'openconfig-if-poe', + 'openconfig-if-sdn-ext', + 'openconfig-if-tunnel', + + 'openconfig-vlan', + + 'openconfig-types', + 'openconfig-policy-types', + 'openconfig-mpls-types', + 'openconfig-network-instance-types', + 'openconfig-network-instance', + + 'openconfig-platform', + 'openconfig-platform-controller-card', + 'openconfig-platform-cpu', + 'openconfig-platform-ext', + 'openconfig-platform-fabric', + 'openconfig-platform-fan', + 'openconfig-platform-integrated-circuit', + 'openconfig-platform-linecard', + 'openconfig-platform-pipeline-counters', + 'openconfig-platform-port', + 'openconfig-platform-psu', + 'openconfig-platform-software', + 'openconfig-platform-transceiver', + 'openconfig-platform-types', +] + +LOGGER = logging.getLogger(__name__) + +class YangHandler: + def __init__(self) -> None: + self._yang_context = libyang.Context(YANG_SEARCH_PATHS) + self._loaded_modules = set() + for yang_module_name in YANG_MODULES: + LOGGER.info('Loading module: {:s}'.format(str(yang_module_name))) + self._yang_context.load_module(yang_module_name).feature_enable_all() + self._loaded_modules.add(yang_module_name) + self._data_path_instances = dict() + + def get_data_paths(self) -> Dict[str, libyang.DNode]: + return self._data_path_instances + + def get_data_path(self, path : str) -> libyang.DNode: + data_path_instance = self._data_path_instances.get(path) + if data_path_instance is None: + data_path_instance = self._yang_context.create_data_path(path) + self._data_path_instances[path] = data_path_instance + return data_path_instance + + def parse_to_dict( + self, request_path : str, json_data : Dict, fmt : str = 'json', strict : bool = True + ) -> Dict: + if fmt != 'json': raise Exception('Unsupported format: {:s}'.format(str(fmt))) + LOGGER.debug('request_path = {:s}'.format(str(request_path))) + LOGGER.debug('json_data = {:s}'.format(str(json_data))) + LOGGER.debug('format = {:s}'.format(str(fmt))) + + parent_path_parts = list(filter(lambda s: len(s) > 0, request_path.split('/'))) + for parent_path_part in reversed(parent_path_parts): + json_data = {parent_path_part: json_data} + str_data = json.dumps(json_data) + + dnode : Optional[libyang.DNode] = self._yang_context.parse_data_mem( + str_data, fmt, strict=strict, parse_only=True, #validate_present=True, #validate=True, + ) + if dnode is None: raise Exception('Unable to parse Data({:s})'.format(str(json_data))) + + parsed = dnode.print_dict() + LOGGER.debug('parsed = {:s}'.format(json.dumps(parsed))) + dnode.free() + return parsed + + def destroy(self) -> None: + self._yang_context.destroy() diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py b/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py index f051c43534ab4e1d6c15a34ae2070067034ba9e1..3d9d0ade1f70d6b359c53838567b5d0a6ed7e038 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/_Handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,6 +13,7 @@ # limitations under the License. from typing import Any, Dict, List, Tuple +from .YangHandler import YangHandler class _Handler: def get_resource_key(self) -> str: @@ -23,10 +24,14 @@ class _Handler: # Retrieve the OpenConfig path schema used to interrogate the device raise NotImplementedError() - def compose(self, resource_key : str, resource_value : Dict, delete : bool = False) -> Tuple[str, str]: + def compose( + self, resource_key : str, resource_value : Dict, yang_handler : YangHandler, delete : bool = False + ) -> Tuple[str, str]: # Compose a Set/Delete message based on the resource_key/resource_value fields, and the delete flag raise NotImplementedError() - def parse(self, json_data : Dict) -> List[Tuple[str, Dict[str, Any]]]: + def parse( + self, json_data : Dict, yang_handler : YangHandler + ) -> List[Tuple[str, Dict[str, Any]]]: # Parse a Reply from the device and return a list of resource_key/resource_value pairs raise NotImplementedError() diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py b/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py index 4ff8e8b38b4a76ba9bb0d2b91fb70b54b06a170e..6af371cebffb4870004cb5d9e249f0bca3aaf035 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/handlers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,7 +13,7 @@ # limitations under the License. import logging -from typing import Dict, List, Optional, Tuple, Union +from typing import Any, Dict, List, Optional, Tuple, Union from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES from ._Handler import _Handler from .Component import ComponentHandler @@ -21,8 +21,10 @@ from .Interface import InterfaceHandler from .InterfaceCounter import InterfaceCounterHandler from .NetworkInstance import NetworkInstanceHandler from .NetworkInstanceInterface import NetworkInstanceInterfaceHandler +from .NetworkInstanceProtocol import NetworkInstanceProtocolHandler from .NetworkInstanceStaticRoute import NetworkInstanceStaticRouteHandler from .Tools import get_schema +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) @@ -31,6 +33,7 @@ ifaceh = InterfaceHandler() ifctrh = InterfaceCounterHandler() nih = NetworkInstanceHandler() niifh = NetworkInstanceInterfaceHandler() +niph = NetworkInstanceProtocolHandler() nisrh = NetworkInstanceStaticRouteHandler() ALL_RESOURCE_KEYS = [ @@ -46,9 +49,10 @@ RESOURCE_KEY_MAPPER = { } PATH_MAPPER = { - '/components' : comph.get_path(), - '/interfaces' : ifaceh.get_path(), - '/network-instances' : nih.get_path(), + '/components' : comph.get_path(), + '/components/component' : comph.get_path(), + '/interfaces' : ifaceh.get_path(), + '/network-instances' : nih.get_path(), } RESOURCE_KEY_TO_HANDLER = { @@ -57,6 +61,7 @@ RESOURCE_KEY_TO_HANDLER = { ifctrh.get_resource_key() : ifctrh, nih.get_resource_key() : nih, niifh.get_resource_key() : niifh, + niph.get_resource_key() : niph, nisrh.get_resource_key() : nisrh, } @@ -66,11 +71,13 @@ PATH_TO_HANDLER = { ifctrh.get_path() : ifctrh, nih.get_path() : nih, niifh.get_path() : niifh, + niph.get_path() : niph, nisrh.get_path() : nisrh, } def get_handler( - resource_key : Optional[str] = None, path : Optional[str] = None, raise_if_not_found=True + resource_key : Optional[str] = None, path : Optional[str] = None, + raise_if_not_found=True ) -> Optional[_Handler]: if (resource_key is None) == (path is None): MSG = 'Exactly one of resource_key({:s}) or path({:s}) must be specified' @@ -88,16 +95,24 @@ def get_handler( path_schema = PATH_MAPPER.get(path_schema, path_schema) handler = PATH_TO_HANDLER.get(path_schema) if handler is None and raise_if_not_found: - MSG = 'Handler not found: resource_key={:s} resource_key_schema={:s}' + MSG = 'Handler not found: path={:s} path_schema={:s}' # pylint: disable=broad-exception-raised - raise Exception(MSG.format(str(resource_key), str(resource_key_schema))) + raise Exception(MSG.format(str(path), str(path_schema))) return handler def get_path(resource_key : str) -> str: - return get_handler(resource_key=resource_key).get_path() + handler = get_handler(resource_key=resource_key) + return handler.get_path() -def parse(str_path : str, value : Union[Dict, List]): - return get_handler(path=str_path).parse(value) +def parse( + str_path : str, value : Union[Dict, List], yang_handler : YangHandler +) -> List[Tuple[str, Dict[str, Any]]]: + handler = get_handler(path=str_path) + return handler.parse(value, yang_handler) -def compose(resource_key : str, resource_value : Union[Dict, List], delete : bool = False) -> Tuple[str, str]: - return get_handler(resource_key=resource_key).compose(resource_key, resource_value, delete=delete) +def compose( + resource_key : str, resource_value : Union[Dict, List], + yang_handler : YangHandler, delete : bool = False +) -> Tuple[str, str]: + handler = get_handler(resource_key=resource_key) + return handler.compose(resource_key, resource_value, yang_handler, delete=delete) diff --git a/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt b/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt index 89dee2a177141cca428a5981c8ce45b9a79cc9a8..e5343301d6c92f95c8e30ac3b8f72d78cde4573c 100644 --- a/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt +++ b/src/device/service/drivers/gnmi_openconfig/handlers/old_bgp_handler.txt @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py b/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py index 093a96233f26399be4e224a48a78ea6329da4304..a57f0d731667364693c0e337ca2bda92e68068a8 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Capabilities.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -17,7 +17,7 @@ from common.tools.grpc.Tools import grpc_message_to_json from ..gnmi.gnmi_pb2 import CapabilityRequest # pylint: disable=no-name-in-module from ..gnmi.gnmi_pb2_grpc import gNMIStub -def get_supported_encodings( +def check_capabilities( stub : gNMIStub, username : str, password : str, timeout : Optional[int] = None ) -> Set[Union[str, int]]: metadata = [('username', username), ('password', password)] @@ -25,6 +25,17 @@ def get_supported_encodings( reply = stub.Capabilities(req, metadata=metadata, timeout=timeout) data = grpc_message_to_json(reply) + + gnmi_version = data.get('gNMI_version') + if gnmi_version is None or gnmi_version != '0.7.0': + raise Exception('Unsupported gNMI version: {:s}'.format(str(gnmi_version))) + + #supported_models = { + # supported_model['name']: supported_model['version'] + # for supported_model in data.get('supported_models', []) + #} + # TODO: check supported models and versions + supported_encodings = { supported_encoding for supported_encoding in data.get('supported_encodings', []) @@ -33,4 +44,6 @@ def get_supported_encodings( if len(supported_encodings) == 0: # pylint: disable=broad-exception-raised raise Exception('No supported encodings found') - return supported_encodings + if 'JSON_IETF' not in supported_encodings: + # pylint: disable=broad-exception-raised + raise Exception('JSON_IETF encoding not supported') diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Channel.py b/src/device/service/drivers/gnmi_openconfig/tools/Channel.py index 72d45d32227cd8133e36940d4f14cfd19ca3e3dd..93893f6405a63c4730e23f8dd009645abcc2b5eb 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Channel.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Channel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Path.py b/src/device/service/drivers/gnmi_openconfig/tools/Path.py index 7ce0631dada58ce581900c974a0b24d170df2f39..a9d47a2aca492bbd6dbc18d26fba9a4788cbd16c 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Path.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Path.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -19,8 +19,8 @@ from ..gnmi.gnmi_pb2 import Path, PathElem RE_PATH_SPLIT = re.compile(r'/(?=(?:[^\[\]]|\[[^\[\]]+\])*$)') RE_PATH_KEYS = re.compile(r'\[(.*?)\]') -def path_from_string(path='/'): - if not path: return Path(elem=[]) +def path_from_string(path='/'): #, origin='openconfig' + if not path: return Path(elem=[]) #, origin=origin if path[0] == '/': if path[-1] == '/': @@ -40,7 +40,7 @@ def path_from_string(path='/'): dict_keys = dict(x.split('=', 1) for x in elem_keys) path.append(PathElem(name=elem_name, key=dict_keys)) - return Path(elem=path) + return Path(elem=path) #, origin=origin def path_to_string(path : Path) -> str: path_parts = list() diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py b/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py index ad3e63e58f86ea5115d6e73ce3124bcb38212542..21c8edd61af727eeedff7e8ef23411cf1a509706 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Subscriptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/gnmi_openconfig/tools/Value.py b/src/device/service/drivers/gnmi_openconfig/tools/Value.py index 077bdd40ec8859202b8e8e6053b731339edfe7fe..8337e6677a67d0c8d6eb2d2a684704d9d10c8854 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/Value.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/Value.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,9 +13,36 @@ # limitations under the License. import base64, json -from typing import Any +from typing import Any, Dict, List, Union from ..gnmi.gnmi_pb2 import TypedValue +REMOVE_NAMESPACES = ( + 'arista-intf-augments', + 'arista-netinst-augments', + 'openconfig-hercules-platform', +) + +def remove_fields(key : str) -> bool: + parts = key.split(':') + if len(parts) == 1: return False + namespace = parts[0].lower() + return namespace in REMOVE_NAMESPACES + +def recursive_remove_keys(container : Union[Dict, List, Any]) -> None: + if isinstance(container, dict): + remove_keys = [ + key + for key in container.keys() + if remove_fields(key) + ] + for key in remove_keys: + container.pop(key, None) + for value in container.values(): + recursive_remove_keys(value) + elif isinstance(container, list): + for value in container: + recursive_remove_keys(value) + def decode_value(value : TypedValue) -> Any: encoding = value.WhichOneof('value') if encoding == 'json_val': @@ -31,9 +58,13 @@ def decode_value(value : TypedValue) -> Any: raise NotImplementedError() #return value elif encoding == 'json_ietf_val': - value : str = value.json_ietf_val + str_value : str = value.json_ietf_val.decode('UTF-8') try: - return json.loads(value) + # Cleanup and normalize the records according to OpenConfig + #str_value = str_value.replace('openconfig-platform-types:', 'oc-platform-types:') + json_value = json.loads(str_value) + recursive_remove_keys(json_value) + return json_value except json.decoder.JSONDecodeError: # Assume is Base64-encoded b_b64_value = value.encode('UTF-8') diff --git a/src/device/service/drivers/gnmi_openconfig/tools/__init__.py b/src/device/service/drivers/gnmi_openconfig/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/gnmi_openconfig/tools/__init__.py +++ b/src/device/service/drivers/gnmi_openconfig/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/IetfActnDriver.py b/src/device/service/drivers/ietf_actn/IetfActnDriver.py index 19e4429f48b6474aa8cea6100262ced117310c15..e48265448cb6dcf2e354a9d89c13e73f1fb72b25 100644 --- a/src/device/service/drivers/ietf_actn/IetfActnDriver.py +++ b/src/device/service/drivers/ietf_actn/IetfActnDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/Tools.py b/src/device/service/drivers/ietf_actn/Tools.py index 1d71e28d3fe2857ea8d400504e2a895de4c78b9c..1b2cce88e3a12176d027489bbcfbd99344cf9b73 100644 --- a/src/device/service/drivers/ietf_actn/Tools.py +++ b/src/device/service/drivers/ietf_actn/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/__init__.py b/src/device/service/drivers/ietf_actn/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/ietf_actn/__init__.py +++ b/src/device/service/drivers/ietf_actn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py b/src/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py index 86176ea40605d7bb6fd30a0deb5dbd981598ac1a..24ceb888eb6758d8ad20d74fb337da5e7b6bd04c 100644 --- a/src/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py +++ b/src/device/service/drivers/ietf_actn/handlers/EthtServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py b/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py index d04418ff1abddfca9f797a1fb6f5f80a98e8e96d..9d81ade18dec1450029a83d468772094d438bdda 100644 --- a/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py +++ b/src/device/service/drivers/ietf_actn/handlers/OsuTunnelHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py b/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py index ea72d2f547a02f0dd80cf3804407bdff856298f7..d861ef7e751261a99231b9cd8317d8db9c901e38 100644 --- a/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py +++ b/src/device/service/drivers/ietf_actn/handlers/RestApiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_actn/handlers/__init__.py b/src/device/service/drivers/ietf_actn/handlers/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/ietf_actn/handlers/__init__.py +++ b/src/device/service/drivers/ietf_actn/handlers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py index dc4946ca51913af9e9dfd39004ad0ec541c15b98..d756ca89f0bb062137a86ed2a21dfafec82b4bca 100644 --- a/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py +++ b/src/device/service/drivers/ietf_l2vpn/IetfL2VpnDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py index 8a03cb943839eab0b6bc8727e9892fa550d7287b..c51e2d6bf165d1b9caf41b05e367e43eb3ffebb5 100644 --- a/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py +++ b/src/device/service/drivers/ietf_l2vpn/TfsApiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_l2vpn/Tools.py b/src/device/service/drivers/ietf_l2vpn/Tools.py index 3b0ab84875486370d72b4156e19547f5407d2d1a..dc744e87720f3f0d1f5b2c315ea6c55c88ce3c5a 100644 --- a/src/device/service/drivers/ietf_l2vpn/Tools.py +++ b/src/device/service/drivers/ietf_l2vpn/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/ietf_l2vpn/__init__.py b/src/device/service/drivers/ietf_l2vpn/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/ietf_l2vpn/__init__.py +++ b/src/device/service/drivers/ietf_l2vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/microwave/IETFApiDriver.py b/src/device/service/drivers/microwave/IETFApiDriver.py index 3588eb9293ade4a155f05f11e9d94271e0fbeaf0..78eded32d8000bb2e68173d9f317a24d33e171e9 100644 --- a/src/device/service/drivers/microwave/IETFApiDriver.py +++ b/src/device/service/drivers/microwave/IETFApiDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/microwave/Tools.py b/src/device/service/drivers/microwave/Tools.py index fa74d3e7477e7cfcabac3ac9bdc2d9ac7eeaad0e..2c96a7c2eff817bf0595e9812a0956d2167a2376 100644 --- a/src/device/service/drivers/microwave/Tools.py +++ b/src/device/service/drivers/microwave/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/microwave/__init__.py b/src/device/service/drivers/microwave/__init__.py index 42b68d76cdc980efe931dc717e142d545f2305b4..0a72790d4ff5a84d03ba886ff704ac55137a3c77 100644 --- a/src/device/service/drivers/microwave/__init__.py +++ b/src/device/service/drivers/microwave/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/OCDriver.py b/src/device/service/drivers/oc_driver/OCDriver.py index 89dc791f6982239c3eb878662b02f7f845c6746b..8d437ccc8dd3b92d246db20127bc916c3b8ec5b4 100644 --- a/src/device/service/drivers/oc_driver/OCDriver.py +++ b/src/device/service/drivers/oc_driver/OCDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,33 +13,34 @@ # limitations under the License. import json -import anytree, copy, logging, pytz, queue, re, threading +import logging, pytz, queue, re, threading #import lxml.etree as ET -from datetime import datetime, timedelta -from typing import Any, Dict, Iterator, List, Optional, Tuple, Union +from typing import Any, List, Tuple, Union from apscheduler.executors.pool import ThreadPoolExecutor -import xml.etree.ElementTree as ET -from apscheduler.job import Job from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.schedulers.background import BackgroundScheduler from ncclient.manager import Manager, connect_ssh from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.tools.client.RetryDecorator import delay_exponential -from common.type_checkers.Checkers import chk_length, chk_string, chk_type, chk_float +from common.type_checkers.Checkers import chk_type from device.service.driver_api.Exceptions import UnsupportedResourceKeyException from device.service.driver_api._Driver import _Driver -from device.service.driver_api.AnyTreeTools import TreeNode, get_subnode, set_subnode_value #dump_subtree +from device.service.driver_api.AnyTreeTools import TreeNode +from .templates.VPN.common import seperate_port_config #from .Tools import xml_pretty_print, xml_to_dict, xml_to_file -from .templates.Interfaces.interfaces import interface_template -from .templates.VPN.physical import create_optical_channel,add_transceiver,create_media_channel,create_optical_band +from .templates.VPN.roadms import ( + create_optical_band, disable_media_channel, delete_optical_band, create_media_channel_v2 +) +from .templates.VPN.transponder import edit_optical_channel, change_optical_channel_status from .RetryDecorator import retry from context.client.ContextClient import ContextClient -from common.proto.context_pb2 import ( - OpticalConfig, - ConfigActionEnum, Device, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, Empty - ,OpticalConfigId,Uuid) -from .templates.Tools import extractor -from .Tools import generate_uuid_from_numbers +from common.proto.context_pb2 import OpticalConfig +from .templates.discovery_tool.transponders import transponder_values_extractor +from .templates.discovery_tool.roadms import roadm_values_extractor, extract_media_channels +from .templates.discovery_tool.open_roadm import openroadm_values_extractor +from .templates.VPN.openroadm import network_media_channel_handler + + DEBUG_MODE = False logging.getLogger('ncclient.manager').setLevel(logging.DEBUG if DEBUG_MODE else logging.WARNING) logging.getLogger('ncclient.transport.ssh').setLevel(logging.DEBUG if DEBUG_MODE else logging.WARNING) @@ -56,13 +57,14 @@ RE_GET_ENDPOINT_FROM_INTERFACE_XPATH = re.compile(r".*interface\[oci\:name\='([^ SAMPLE_EVICTION_SECONDS = 30.0 # seconds SAMPLE_RESOURCE_KEY = 'interfaces/interface/state/counters' -filter_fields= ["frequency","target-output-power","interface","operational-mode","line-port"] +transponder_filter_fields = ["frequency", "target-output-power", "operational-mode", "line-port", "admin-state"] MAX_RETRIES = 15 DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') context_client= ContextClient() port_xml_filter=f"/components/component[state[type='oc-platform-types:PORT']]/*" transceiver_xml_filter="/components/component[state[type='oc-platform-types:TRANSCEIVER']]/*" + class NetconfSessionHandler: def __init__(self, address : str, port : int, **settings) -> None: self.__lock = threading.RLock() @@ -83,6 +85,7 @@ class NetconfSessionHandler: self.__manager_params = settings.get('manager_params', {}) self.__nc_params = settings.get('nc_params', {}) self.__message_renderer = settings.get('message_renderer','jinja') + self.__manager : Manager = None self.__candidate_supported = False @@ -109,10 +112,10 @@ class NetconfSessionHandler: @property def vendor(self): return self.__vendor - + @property def version(self): return self.__version - + @property def message_renderer(self): return self.__message_renderer @@ -120,7 +123,6 @@ class NetconfSessionHandler: def get(self, filter=None, with_defaults=None): # pylint: disable=redefined-builtin with self.__lock: config=self.__manager.get(filter=filter, with_defaults=with_defaults) - return config @RETRY_DECORATOR @@ -128,14 +130,16 @@ class NetconfSessionHandler: self, config, target='running', default_operation=None, test_option=None, error_option=None, format='xml' # pylint: disable=redefined-builtin ): - - - + response = None with self.__lock: response= self.__manager.edit_config( config, target=target, default_operation=default_operation, test_option=test_option, error_option=error_option, format=format) - + + str_respones = str(response) + if re.search(r'<ok/>', str_respones): + return True + return False @RETRY_DECORATOR def locked(self, target): @@ -144,7 +148,7 @@ class NetconfSessionHandler: @RETRY_DECORATOR def commit(self, confirmed=False, timeout=None, persist=None, persist_id=None): return self.__manager.commit(confirmed=confirmed, timeout=timeout, persist=persist, persist_id=persist_id) - + DRIVER_NAME = 'oc' METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) def edit_config( # edit the configuration of openconfig devices @@ -153,80 +157,85 @@ def edit_config( commit_per_rule=False, target='running', default_operation='merge', test_option=None, error_option=None, format='xml' ): - #str_method = 'DeleteConfig' if delete else 'SetConfig' + str_method = 'DeleteConfig' if delete else 'SetConfig' results = [] + logging.info(f"commmit per rule {commit_per_rule}") str_config_messages=[] - - - if (conditions['edit_type']=='optical-channel'): - #transponder - str_config_messages = create_optical_channel(resources) - elif (conditions['edit_type']=='optical-band'): - #roadm optical-band - str_config_messages = create_optical_band(resources) - else : - #roadm media-channel - str_config_messages=create_media_channel(resources) - - - + if str_method == 'SetConfig': + if (conditions['edit_type']=='optical-channel'): + #transponder + str_config_messages = edit_optical_channel(resources) + elif (conditions['edit_type']=='optical-band'): + #roadm optical-band + str_config_messages = create_optical_band(resources) + elif (conditions['edit_type']=='network-media-channel'): + commit_per_rule=True + #openroadm network media channel + str_config_messages = network_media_channel_handler(resources) + else : + #roadm media-channel + str_config_messages=create_media_channel_v2(resources) + #Disabling of the Configuration + else: + # Device type is Transponder + if (conditions['edit_type'] == "optical-channel"): + _,ports,_=seperate_port_config(resources) + str_config_messages=change_optical_channel_status(state="DISABLED",ports=ports) + + # Device type is Roadm + elif (conditions['edit_type']=='optical-band'): + str_config_messages=delete_optical_band(resources) + else : + str_config_messages=disable_media_channel(resources) + for str_config_message in str_config_messages: - # configuration of the received templates - if str_config_message is None: raise UnsupportedResourceKeyException("CONFIG") - - netconf_handler.edit_config( # configure the device - config=str_config_message, target=target, default_operation=default_operation, - test_option=test_option, error_option=error_option, format=format) - if commit_per_rule: - netconf_handler.commit() # configuration commit - + # configuration of the received templates + if str_config_message is None: raise UnsupportedResourceKeyException("CONFIG") + result= netconf_handler.edit_config( # configure the device + config=str_config_message, target=target, default_operation=default_operation, + test_option=test_option, error_option=error_option, format=format) + if commit_per_rule: + netconf_handler.commit() # configuration commit + #results[i] = True - results.append(True) - + results.append(result) + + return results class OCDriver(_Driver): def __init__(self, address : str, port : int,device_uuid=None, **settings) -> None: super().__init__(DRIVER_NAME, address, port, **settings) self.__logger = logging.getLogger('{:s}:[{:s}:{:s}]'.format(str(__name__), str(self.address), str(self.port))) self.__lock = threading.Lock() - #self.__initial = TreeNode('.') - #self.__running = TreeNode('.') - self.__subscriptions = TreeNode('.') + self.__started = threading.Event() self.__terminate = threading.Event() - self.__scheduler = BackgroundScheduler(daemon=True) # scheduler used to emulate sampling events + self.__scheduler = BackgroundScheduler(daemon=True) self.__scheduler.configure( jobstores = {'default': MemoryJobStore()}, - executors = {'default': ThreadPoolExecutor(max_workers=1)}, # important! 1 = avoid concurrent requests + executors = {'default': ThreadPoolExecutor(max_workers=1)}, job_defaults = {'coalesce': False, 'max_instances': 3}, timezone=pytz.utc) self._temp_address=f"{address}{port}" - self.__out_samples = queue.Queue() + self.__netconf_handler = NetconfSessionHandler(self.address, self.port, **(self.settings)) - - self.__device_uuid=device_uuid - + self.__type = self.settings.get("type","optical-transponder") + self.__device_uuid = device_uuid self.Connect() - #self.GetConfig() - #self.__samples_cache = SamplesCache(self.__netconf_handler, self.__logger) - + def Connect(self) -> bool: with self.__lock: if self.__started.is_set(): return True self.__netconf_handler.connect() - # Connect triggers activation of sampling events that will be scheduled based on subscriptions self.__scheduler.start() self.__started.set() return True def Disconnect(self) -> bool: with self.__lock: - # Trigger termination of loops and processes self.__terminate.set() - # If not started, assume it is already disconnected if not self.__started.is_set(): return True - # Disconnect triggers deactivation of sampling events self.__scheduler.shutdown() self.__netconf_handler.disconnect() return True @@ -238,78 +247,91 @@ class OCDriver(_Driver): @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: - - chk_type('resources', resource_keys, list) results = [] opticalConfig= OpticalConfig() - j=0 - + with self.__lock: - - - context_client.connect() - config={} - channels_lst=[] - transceivers={} - + config = {} + transceivers = {} + oc_values = {} + ports_result = [] + oc_values["type"] = self.__type try: xml_data = self.__netconf_handler.get().data_xml - transceivers,interfaces,channels_lst,channel_namespace,endpoints=extractor(data_xml=xml_data,resource_keys=filter_fields,dic=config) - - + if self.__type == "optical-transponder": + extracted_values = transponder_values_extractor( + data_xml=xml_data, resource_keys=transponder_filter_fields, dic=config + ) + transceivers, optical_channels_params, channel_namespace, endpoints, ports_result = extracted_values + oc_values["channels" ] = optical_channels_params + oc_values["transceivers" ] = transceivers + oc_values["channel_namespace"] = channel_namespace + oc_values["endpoints" ] = endpoints + oc_values["ports" ] = ports_result + elif (self.__type =='openroadm'): + extracted_values=openroadm_values_extractor(data_xml=xml_data, resource_keys=[], dic=oc_values) + ports_result = extracted_values[1] + oc_values['interfaces'] = extracted_values[0]['interfaces'] + else: + extracted_values = roadm_values_extractor(data_xml=xml_data, resource_keys=[], dic=config) + ports_result = extracted_values[0] + oc_values['optical_bands' ] = extracted_values[1] + oc_values['media_channels'] = extracted_values[2] + + #results.append((resource_key, e)) # if validation fails, store the exception + + #///////////////////////// store optical configurtaion //////////////////////////////////////////////////////// + + opticalConfig.config=json.dumps(oc_values) + if self.__device_uuid is not None: + opticalConfig.device_id.device_uuid.uuid=self.__device_uuid + results.append((f"/opticalconfigs/opticalconfig/{self.__device_uuid}",{"opticalconfig":opticalConfig})) + # context_client.connect() + # config_id=context_client.SetOpticalConfig(opticalConfig) + # context_client.close() except Exception as e: # pylint: disable=broad-except - MSG = 'Exception retrieving {:s}' - self.__logger.info("error from getConfig %s",e) - self.__logger.exception(MSG.format(e)) - #results.append((resource_key, e)) # if validation fails, store the exception - - #///////////////////////// divider //////////////////////////////////////////////////////// - - - value_dic={} - value_dic["channels"]=channels_lst - value_dic["transceivers"]=transceivers - value_dic["interfaces"]=interfaces - value_dic["channel_namespace"]=channel_namespace - value_dic["endpoints"]=endpoints - - opticalConfig.config=json.dumps(value_dic) - opticalConfig.opticalconfig_id.opticalconfig_uuid=self.__device_uuid if self.__device_uuid is not None else "" - config_id=context_client.SetOpticalConfig(opticalConfig) - - context_client.close() - + MSG = 'Exception retrieving {:s}' + self.__logger.info("error from getConfig %s",e) + self.__logger.exception(MSG.format(e)) + + if len(ports_result) > 0: results.extend(ports_result) return results @metered_subclass_method(METRICS_POOL) def SetConfig(self, resources : List[Tuple[str, Any]],conditions:dict) -> List[Union[bool, Exception]]: if len(resources) == 0: return [] - results=[] + results = [] with self.__lock: - if self.__netconf_handler.use_candidate: - with self.__netconf_handler.locked(target='candidate'): - results = edit_config( - self.__netconf_handler, self.__logger, resources,conditions, target='candidate', - commit_per_rule=self.__netconf_handler.commit_per_rule - ,) - else: - results = edit_config(self.__netconf_handler, self.__logger, resources,conditions=conditions - ) + if self.__netconf_handler.use_candidate: + with self.__netconf_handler.locked(target='candidate'): + results = edit_config( + self.__netconf_handler, self.__logger, resources, conditions, target='candidate', + commit_per_rule=self.__netconf_handler.commit_per_rule + ) + else: + results = edit_config( + self.__netconf_handler, self.__logger, resources, conditions=conditions + ) return results @metered_subclass_method(METRICS_POOL) - def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + def DeleteConfig( + self, resources : List[Tuple[str, Any]], conditions : dict, + optical_device_configuration = None + ) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] + with self.__lock: if self.__netconf_handler.use_candidate: with self.__netconf_handler.locked(target='candidate'): results = edit_config( self.__netconf_handler, self.__logger, resources, target='candidate', delete=True, - commit_per_rule=self.__netconf_handler.commit_per_rule) + commit_per_rule=self.__netconf_handler.commit_per_rule, conditions=conditions + ) else: - results = edit_config(self.__netconf_handler, self.__logger, resources, delete=True) + results = edit_config( + self.__netconf_handler, self.__logger, resources, delete=True, conditions=conditions + ) return results - - diff --git a/src/device/service/drivers/oc_driver/RetryDecorator.py b/src/device/service/drivers/oc_driver/RetryDecorator.py index 6c2060ce969c1e575497594db7129480aa0d2607..df37414c15fa2be63ba74e6c6f9955749b15302a 100644 --- a/src/device/service/drivers/oc_driver/RetryDecorator.py +++ b/src/device/service/drivers/oc_driver/RetryDecorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/Tools.py b/src/device/service/drivers/oc_driver/Tools.py index 526d91c868a1b91a63663f4e8e5d3c5c00c04465..45407d38d28892f9bbe049520cc3d615ec1bc965 100644 --- a/src/device/service/drivers/oc_driver/Tools.py +++ b/src/device/service/drivers/oc_driver/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/__init__.py b/src/device/service/drivers/oc_driver/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/oc_driver/__init__.py +++ b/src/device/service/drivers/oc_driver/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/templates/Interfaces/__init__.py b/src/device/service/drivers/oc_driver/templates/Interfaces/__init__.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/device/service/drivers/oc_driver/templates/Interfaces/__init__.py +++ b/src/device/service/drivers/oc_driver/templates/Interfaces/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py b/src/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py index 87ba8835ac6f7ad66a709be90195e6597bc2bf6c..5a3709ca8ff0a6703be0dddb7a720845002be1e3 100644 --- a/src/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py +++ b/src/device/service/drivers/oc_driver/templates/Interfaces/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,6 +14,7 @@ from yattag import Doc, indent import logging + def interface_template (interface_data:dict) : data={"name":"eth0","ip":"192.168.1.1","prefix-length":'24'} doc, tag, text = Doc().tagtext() @@ -31,13 +32,10 @@ def interface_template (interface_data:dict) : with tag('config'): with tag('ip'):text(interface_data["ip"]) with tag('prefix-length'):text(interface_data["prefix-length"]) - + result = indent( doc.getvalue(), indentation = ' '*2, newline = '\r\n' ) - logging.info("interfaces %s",result) - return result - - \ No newline at end of file + return result diff --git a/src/device/service/drivers/oc_driver/templates/Tools.py b/src/device/service/drivers/oc_driver/templates/Tools.py index 98086adf7bcc1877ca719fec6ef3f7b9dc890941..71f827dfe80a5064723e1287ae4419f1d38bde5e 100644 --- a/src/device/service/drivers/oc_driver/templates/Tools.py +++ b/src/device/service/drivers/oc_driver/templates/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -19,6 +19,7 @@ from typing import Collection, Dict, Any from yattag import Doc, indent from .VPN.physical import create_optical_channel + def add_value_from_tag(target : Dict, field_name: str, field_value : ET.Element, cast=None) -> None: if isinstance(field_value,str) or field_value is None or field_value.text is None: return field_value = field_value.text @@ -55,9 +56,32 @@ def generate_templates(resource_key: str, resource_value: str, channel:str) -> s data['name']=channel data['resource_key']=resource_key data['value']=resource_value - result_templates.append(create_physical_config(data)) + #result_templates.append(create_physical_config(data)) return result_templates + + +def extract_status (dic:dict,resource_key:str,xml_data:str,channel_name:str): + + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + channel_name=channel_name if 'index' not in channel_name else channel_name['index'] + index=None + if channel_name.find('-') != -1 : + index= channel_name.split("-")[1] + + + namespaces = { "td": "http://openconfig.net/yang/terminal-device"} + channels = root.findall(f".//td:terminal-device/td:logical-channels/td:channel",namespaces) + for channel in channels : + + index_ele= channel.find(f".//td:config[td:index='{index}']/td:{resource_key}",namespaces) + if index_ele is not None : + dic["status"]=index_ele.text + print(index_ele.text) + return dic + + def extract_channel_xmlns (data_xml:str,is_opticalband:bool): xml_bytes = data_xml.encode("utf-8") root = ET.fromstring(xml_bytes) @@ -88,6 +112,7 @@ def extract_channel_xmlns (data_xml:str,is_opticalband:bool): return namespace + def extract_channels_based_on_channelnamespace (xml_data:str,channel_namespace:str,is_opticalband:bool): xml_bytes = xml_data.encode("utf-8") root = ET.fromstring(xml_bytes) @@ -122,6 +147,7 @@ def extract_channels_based_on_channelnamespace (xml_data:str,channel_namespace:s # Retrieve port-name for dest return channels + def extract_channels_based_on_type (xml_data:str): xml_bytes = xml_data.encode("utf-8") root = ET.fromstring(xml_bytes) @@ -140,9 +166,10 @@ def extract_channels_based_on_type (xml_data:str): return channel_names def extract_value(resource_key:str,xml_data:str,dic:dict,channel_name:str,channel_namespace:str): + xml_bytes = xml_data.encode("utf-8") root = ET.fromstring(xml_bytes) - + channel_name=channel_name if 'index' not in channel_name else channel_name['index'] namespace = {'oc': 'http://openconfig.net/yang/platform', 'td': channel_namespace} @@ -153,10 +180,13 @@ def extract_value(resource_key:str,xml_data:str,dic:dict,channel_name:str,channe if (parameter is not None): value = parameter.text dic[resource_key]=value + else : + logging.info("parameter is None") else: + logging.info("element is None") print(" element not found.") - + return dic @@ -192,6 +222,7 @@ def extract_tranceiver (data_xml:str,dic:dict): component_names = [component.text for component in transceiver_components] dic['transceiver']=component_names return dic + def extract_interface (xml_data:str,dic:dict): xml_bytes = xml_data.encode("utf-8") root = ET.fromstring(xml_bytes) @@ -214,6 +245,7 @@ def extract_interface (xml_data:str,dic:dict): else : dic['interface']={} return dic + def has_opticalbands(xml_data:str): xml_bytes = xml_data.encode("utf-8") root = ET.fromstring(xml_bytes) @@ -226,32 +258,237 @@ def has_opticalbands(xml_data:str): else : has_opticalbands=False return has_opticalbands + +def extract_ports_based_on_type (xml_data:str): + pattern = r':\s*PORT\b' + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespace = {'oc': 'http://openconfig.net/yang/platform', 'typex': 'http://openconfig.net/yang/platform-types'} + ports = [] + components = root.findall(".//oc:state[oc:type]",namespace) + for component in components: + type_ele = component.find(".//oc:type",namespace) + match = re.search(pattern, type_ele.text) + if match is not None : + name_element= component.find(".//oc:name",namespace) + port_name =name_element.text + port_index=name_element.text.split("-")[1] + port = (port_name,port_index) + ports.append(port) + return ports -def extractor(data_xml:str,resource_keys:list,dic:dict): +def transponder_values_extractor(data_xml:str,resource_keys:list,dic:dict): endpoints=[] is_opticalband=has_opticalbands(xml_data=data_xml) - channel_namespace=extract_channel_xmlns(data_xml=data_xml,is_opticalband=is_opticalband) # channel_names=extract_channels_based_on_type(xml_data=data_xml) # if len(channel_names)==0 : channel_names= extract_channels_based_on_channelnamespace(xml_data=data_xml,channel_namespace=channel_namespace,is_opticalband=is_opticalband) - - lst_dic=[] + ports = extract_ports_based_on_type(data_xml) + optical_channels_params=[] + ports_result=[] if (is_opticalband): endpoints=channel_names else: for channel_name in channel_names: dic={} - for resource_key in resource_keys : + for resource_key in resource_keys : - if (resource_key != 'interface'): - dic=extract_value(dic=dic,resource_key=resource_key,xml_data=data_xml,channel_name=channel_name,channel_namespace=channel_namespace) + if (resource_key != 'admin-state'): + + dic=extract_value(dic=dic,resource_key=resource_key,xml_data=data_xml + ,channel_name=channel_name,channel_namespace=channel_namespace) + else : + dic = extract_status(dic=dic,resource_key=resource_key,xml_data=data_xml, channel_name=channel_name) dic["name"]=channel_name endpoints.append({"endpoint_uuid":{"uuid":channel_name}}) - lst_dic.append(dic) - transceivers_dic=extract_tranceiver(data_xml=data_xml,dic={}) - interfaces_dic=extract_interface(xml_data=data_xml,dic={}) + optical_channels_params.append(dic) + #transceivers_dic=extract_tranceiver(data_xml=data_xml,dic={}) + transceivers_dic={"transceiver":[]} + #interfaces_dic=extract_interface(xml_data=data_xml,dic={}) + if len(ports)>0 : + for port in ports : + endpoint_name,endpoint_id=port + resource_key = '/endpoints/endpoint[{:s}]'.format(endpoint_id) + resource_value = {'uuid': endpoint_id, 'type':endpoint_name} + ports_result.append((resource_key, resource_value)) + + + return [transceivers_dic,optical_channels_params,channel_namespace,endpoints,ports_result] + +######################################################################### + +#################################### ROADMAs ############################ + +########################################################################## + +def extract_roadm_ports (xml_data:str): + + ports =[] + pattern1 = r'\bMG_ON_OPTICAL_PORT_WAVEBAND\b' + pattern2 = r'\bMG_ON_OPTICAL_PORT_MEDIACHANNEL\b' + pattern3 = r'\bINPUT\b' + pattern4 = r'\bOUTPUT\b' + + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + with open('xml.log', 'w') as f: + print(xml_bytes, file=f) + + + namespace = {'oc': 'http://openconfig.net/yang/platform'} + ports_wb_in = [] + ports_mc_in = [] + ports_wb_out = [] + ports_mc_out = [] + components = root.findall('.//oc:component',namespace) + print(f"component {components}") + + + for component in components: + + properties = component.find(".//oc:properties",namespace) + name_element= component.find(".//oc:name",namespace) + print(name_element.text) + if (properties is not None): + wb_x = 0 + mc_x = 0 + in_x = 0 + out_x = 0 + for property in properties : + value = property.find(".//oc:value",namespace) + if (re.search(pattern1,value.text)): + wb_x = 1 + elif (re.search(pattern2,value.text)): + mc_x = 1 + elif (re.search(pattern3,value.text)): + in_x = 1 + elif (re.search(pattern4,value.text)): + out_x = 1 + if wb_x == 1: + if in_x ==1: + ports_wb_in.append(name_element.text) + elif out_x == 1: + ports_wb_out.append(name_element.text) + if mc_x == 1: + if in_x ==1: + ports_mc_in.append(name_element.text) + elif out_x == 1: + ports_mc_out.append(name_element.text) + + return ports_wb_in, ports_wb_out, ports_mc_in, ports_mc_out + + + +def roadm_values_extractor (data_xml:str,resource_keys:list,dic:dict): + ports_result=[] + ports_wb_in, ports_wb_out, ports_mc_in, ports_mc_out = extract_roadm_ports(data_xml) + + #if len(ports)>0 : + # for port in ports : + # + # resource_key = '/endpoints/endpoint[{:s}]'.format(port) + # resource_value = {'uuid': port, 'type':'MG_ON_OPTICAL_PORT_WAVEBAND'} + # ports_result.append((resource_key, resource_value)) + if len(ports_wb_in)>0 : + for port in ports_wb_in: + + resource_key = '/endpoints/endpoint[{:s}]'.format(port) + resource_value = {'uuid': port, 'type':'MG_ON_OPTICAL_PORT_WAVEBAND'} + ports_result.append((resource_key, resource_value)) + + return [ports_result] + + + + #/////////////// OpenRoadm ////////////// + + +def extract_roadm_circuits_pack (xml_data:str): + - return [transceivers_dic,interfaces_dic,lst_dic,channel_namespace,endpoints] \ No newline at end of file + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + # with open('xml.log', 'w') as f: + # print(xml_bytes, file=f) + + + namespace = {'oc': "http://org/openroadm/device"} + + circuits = root.findall('.//oc:circuit-packs',namespace) + + circuits_list =[] + # print(f"component {components}") + + if (circuits is not None): + circuit_info ={} + for circuit in circuits: + + circuit_name = circuit.find(".//oc:circuit-pack-name",namespace) + circuit_type=circuit.find(".//oc:circuit-pack-type",namespace) + circuit_adminstrative_status=circuit.find(".//oc:administrative-state",namespace) + circuit_equipment_state=circuit.find("./oc:equipment-state",namespace) + circuit_mode=circuit.find("./oc:circuit-pack-mode",namespace) + slot= circuit.find("./oc:slot",namespace) + shelf= circuit.find("./oc:shelf",namespace) + ports = circuit.findall("./oc:ports",namespace) + + circuit_ports=[] + if (ports is not None): + + for port in ports : + port_info={} + port_name=port.find('./oc:port-name',namespace) + port_qual= port.find("./oc:port-qual",namespace) + + if port_name is not None : + port_info["port_name"]=port_name.text + if port_qual is not None : + port_info["port_qual"]=port_qual.text + circuit_ports.append(port_info) + if (circuit_name is not None): + circuit_info["circuit_name"]=circuit_name.text + if (circuit_type is not None): + circuit_info["circuit_type"]=circuit_type.text + if (circuit_adminstrative_status is not None): + circuit_info["circuit_adminstrative_status"]=circuit_adminstrative_status.text + if (circuit_equipment_state is not None): + circuit_info["circuit_equipment_state"]=circuit_equipment_state.text + if (circuit_mode is not None): + circuit_info["circuit_mode"]=circuit_mode.text + if (slot is not None): + circuit_info["slot"]=slot.text + if (shelf is not None): + circuit_info["shelf"]=shelf.text + circuit_info["ports"]=circuit_ports + + circuits_list.append(circuit_info) + + + return circuits_list + + + +def extract_openroadm_info(xml_data:str): + roadm_info={"node-id":None,"node-number":None,"node-type":None,'clli':None} + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespace = {'oc': "http://org/openroadm/device"} + info = root.findall('.//oc:info',namespace) + if info is not None : + for i in info : + node_id= i.find('.//oc:node-id',namespace) + node_number= i.find('.//oc:node-number',namespace) + node_type=i.find('.//oc:node-type',namespace) + clli=i.find('.//oc:clli',namespace) + if (node_id is not None): + roadm_info['node-id']=node_id.text + if (node_number is not None): + roadm_info['node-number']=node_number.text + if (node_type is not None): + roadm_info['node-type']=node_type.text + if (clli is not None): + roadm_info['clli']=clli.text + return roadm_info diff --git a/src/device/service/drivers/oc_driver/templates/VPN/__init__.py b/src/device/service/drivers/oc_driver/templates/VPN/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/oc_driver/templates/VPN/__init__.py +++ b/src/device/service/drivers/oc_driver/templates/VPN/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/templates/VPN/common.py b/src/device/service/drivers/oc_driver/templates/VPN/common.py new file mode 100644 index 0000000000000000000000000000000000000000..15d180bf826f906a70e3d8bc543ef38ccd2f0dba --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/VPN/common.py @@ -0,0 +1,55 @@ +# Copyright 2022-2024 ETSI 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. + + +def seperate_port_config(resources:list,unwanted_keys=[])->list[list,dict,str]: + config=[] + ports={} + index=None + for item in resources : + if len(unwanted_keys)>0: + if (item['value'] is not None and (item['resource_key'] not in unwanted_keys)): + config.append({'resource_key':item['resource_key'], 'value':item['value']} ) + #if (item['resource_key'] == 'destination_port' or item['resource_key'] == 'source_port') and item['value'] is not None: + # ports[item['resource_key']]=item['value'] + if (item['resource_key'] == 'destination_port' or item['resource_key'] == 'source_port'): + ports[item['resource_key']]=item['value'] + if (item['resource_key']=='index' and item['value'] is not None) : + index=item['value'] + + return [config,ports,index] + +def extract_ports (resources:list): + if len(resources) ==0 :return + ports=[] + flow=next((i for i in resources if i['resource_key']=='handled_flow'),None) + if flow is not None: + ports = flow['value'] + return ports + +def filter_config(resources:list,unwanted_keys=[])->list[list,dict,str]: + config=[] + ports=() + index=None + for item in resources : + if len(unwanted_keys)>0: + if (item['value'] is not None and (item['resource_key'] not in unwanted_keys)): + config.append({'resource_key':item['resource_key'], 'value':item['value']} ) + if (item['resource_key']=='index' and item['value'] is not None) : + index=item['value'] + #if (item['resource_key'] == 'destination_port' or item['resource_key'] == 'source_port') and item['value'] is not None: + # ports[item['resource_key']]=item['value'] + ports = extract_ports(resources=resources) + + return [config,ports,index] diff --git a/src/device/service/drivers/oc_driver/templates/VPN/openroadm.py b/src/device/service/drivers/oc_driver/templates/VPN/openroadm.py new file mode 100644 index 0000000000000000000000000000000000000000..1b3de89fa07a00e62a69fef88698e863f34d872d --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/VPN/openroadm.py @@ -0,0 +1,187 @@ +# Copyright 2022-2024 ETSI 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. + + + +from yattag import Doc, indent +import logging +from .common import seperate_port_config ,filter_config +from decimal import Decimal + + + +create_mc_err= ''' + <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> +<org-openroadm-device xmlns="http://org/openroadm/device"> + <interface> + <name>MC-TTP-DEG2-RX-193.3</name> + <description>Media-Channel-TTP-193.3THz-degree-2-in</description> + <type>openROADM-if:mediaChannelTrailTerminationPoint</type> + <administrative-state>inService</administrative-state> + <supporting-circuit-pack-name>DEG2-AMPRX</supporting-circuit-pack-name> + <supporting-port>DEG2-AMPRX-IN</supporting-port> + <supporting-interface-list>OMS-DEG2-TTP-RX</supporting-interface-list> + <mc-ttp xmlns="http://org/openroadm/media-channel-interfaces"> + <min-freq>193.25</min-freq> + <max-freq>193.35</max-freq> + </mc-ttp> + </interface> + <interface> + <name>MC-TTP-DEG2-TX-193.3</name> + <description>Media-Channel-TTP-193.3THz-degree-2-out</description> + <type>openROADM-if:mediaChannelTrailTerminationPoint</type> + <administrative-state>inService</administrative-state> + <supporting-circuit-pack-name>DEG2-AMPTX</supporting-circuit-pack-name> + <supporting-port>DEG2-AMPTX-OUT</supporting-port> + <supporting-interface-list>OMS-DEG2-TTP-TX</supporting-interface-list> + <mc-ttp xmlns="http://org/openroadm/media-channel-interfaces"> + <min-freq>193.25</min-freq> + <max-freq>193.35</max-freq> + </mc-ttp> + </interface> +</org-openroadm-device> + + +</config> + +''' + +def define_interface_name (type:str,interface_list:str,freq:int)->str: + interface_str = interface_list.split('-') + port_rank='' + port_type='' + if (len(interface_str)==4): + port_rank=interface_str[1] + port_type=interface_str[3] + elif (len(interface_str)==5): + port_rank=interface_str[2] + port_type=interface_str[3] + else : + port_rank=interface_list + port_type=interface_list+'type' + + + return f'{type.upper()}-{port_rank}-{port_type}-{freq}' + + + +def create_media_channel (resources): + + frequency_dict=next((r for r in resources if r['resource_key']== 'frequency'),None) + width_dict=next((r for r in resources if r['resource_key']== 'width'),None) + interfaces_lists =next((r for r in resources if r['resource_key']== 'interfaces'),None) + administrative_state= next((r for r in resources if r['resource_key']== 'administrative-state'),None) + min_freq= int(Decimal(frequency_dict["value"])*1000) - (int(width_dict["value"])/2) + max_freq = int(Decimal(frequency_dict["value"])*1000) + (int(width_dict["value"])/2) + #config,_,_ = filter_config(resources=resources,unwanted_keys=unwanted_keys) + + or_device_ns="http://org/openroadm/device" + or_interface_ns="http://org/openroadm/interfaces" + + results=[] + logging.info(f"from openroadm mc {resources}") + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('org-openroadm-device', ('xmlns',or_device_ns)): + + for interface in interfaces_lists["value"]: + port = next((r for r in interface if r['resource_key']=='supporting-port'),None) + circuit_pack =next((r for r in interface if r['resource_key']=='supporting-circuit-pack-name'),None) + interface_list = next((r for r in interface if r['resource_key']=='supporting-interface-list'),None) + mc_name = define_interface_name('mc-ttp',interface_list['value'],frequency_dict['value']) + interface.append({'resource_key':'mc_name','value':mc_name}) + with tag('interface'): + + with tag('name'):text(mc_name) + with tag('description'):text(f'Media-channel-{frequency_dict["value"]}THz') + with tag('type'):text("openROADM-if:mediaChannelTrailTerminationPoint") + with tag('administrative-state'):text(administrative_state["value"]) + with tag('supporting-circuit-pack-name'):text(circuit_pack["value"]) + with tag('supporting-port'):text(port["value"]) + with tag('supporting-interface-list'):text(interface_list["value"]) + with tag('mc-ttp',xmlns="http://org/openroadm/media-channel-interfaces"): + with tag('max-freq'):text(max_freq) + with tag('min-freq'):text(min_freq) + + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + logging.info(f"from openroadm mc results {results}") + return [results,resources] + + + + +def create_network_media_channel (resources): + + logging.info(f"nmc resources {resources}") + + unwanted_keys= ['max-freq','min-freq'] + #config,_,_ = filter_config(resources=resources,unwanted_keys=unwanted_keys) + + or_device_ns="http://org/openroadm/device" + frequency_dict=next((r for r in resources if r['resource_key']== 'frequency'),None) + width_dict=next((r for r in resources if r['resource_key']== 'width'),None) + interfaces_lists =next((r for r in resources if r['resource_key']== 'interfaces'),None) + administrative_state= next((r for r in resources if r['resource_key']== 'administrative-state'),None) + + + results=[] + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('org-openroadm-device', ('xmlns',or_device_ns)): + for interface in interfaces_lists["value"]: + port = next((r for r in interface if r['resource_key']=='supporting-port'),None) + circuit_pack =next((r for r in interface if r['resource_key']=='supporting-circuit-pack-name'),None) + interface_list = next((r for r in interface if r['resource_key']=='mc_name'),None) + nmc_name = define_interface_name('nmc-ctp',interface_list['value'],frequency_dict['value']) + + with tag('interface'): + + with tag('name'):text(nmc_name) + with tag('description'):text(f'Media-channel-{frequency_dict["value"]}THz') + with tag('type'):text("openROADM-if:networkMediaChannelConnectionTerminationPoint") + with tag('administrative-state'):text(administrative_state["value"]) + with tag('supporting-circuit-pack-name'):text(circuit_pack["value"]) + with tag('supporting-port'):text(port["value"]) + with tag('supporting-interface-list'):text(interface_list["value"]) + with tag('nmc-ctp',xmlns="http://org/openroadm/network-media-channel-interfaces"): + with tag('frequency'):text(frequency_dict['value']) + with tag('width'):text(width_dict['value']) + + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + logging.info(f"nmc message {results}") + return results + + +def network_media_channel_handler (resources): + unwanted_keys=["config_type"] + config,_,_ = filter_config(resources=resources,unwanted_keys=unwanted_keys) + mc_list,resources_updated= create_media_channel(resources=config) + nmc_list= create_network_media_channel(resources=resources_updated) + mc_list.extend(nmc_list) + + return mc_list diff --git a/src/device/service/drivers/oc_driver/templates/VPN/physical.py b/src/device/service/drivers/oc_driver/templates/VPN/physical.py index 0db6ffa5065ad3013250c3bde4dd160d8c12a498..c562e55d997016bacf5e47a0758f8d7f9ad0dbb2 100644 --- a/src/device/service/drivers/oc_driver/templates/VPN/physical.py +++ b/src/device/service/drivers/oc_driver/templates/VPN/physical.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -34,14 +34,14 @@ def seperate_port_config(resources:list,unwanted_keys:list[str])->list[list,dict return [config,ports,index] -def create_optical_channel(resources): +def create_optical_channel(resources:list[dict],ports:list[dict],config:list[dict] ): - unwanted_keys=['destination_port','source_port','channel_namespace','optical-band-parent','index', 'name'] + #unwanted_keys=['destination_port','source_port','channel_namespace','optical-band-parent','index', 'name','admin-state'] results =[] - data={"name":i["value"] for i in resources if i["resource_key"]=="channel_name"} + data ={} data["channel_namespace"]=next((i["value"] for i in resources if i["resource_key"] == "channel_namespace"), None) - config,ports,index=seperate_port_config(resources,unwanted_keys=unwanted_keys) - + #config,ports,index=seperate_port_config(resources,unwanted_keys=unwanted_keys) + port_val = "" if 'destination_port' in ports and ports['destination_port'][0] is not None: port_val = ports['destination_port'][0] @@ -57,10 +57,18 @@ def create_optical_channel(resources): with tag('name'):text("channel-{}".format(port_val)) with tag('config'): with tag('name'):text("channel-{}".format(port_val)) - with tag('optical-channel',xmlns=data["channel_namespace"]): + #with tag('optical-channel', xmlns="http://example.com/flexscale-terminal-device"): + with tag('optical-channel', xmlns=data["channel_namespace"]): with tag('config'): for resource in config: with tag(resource['resource_key']):text(resource['value']) + # with tag('terminal-device', xmlns="http://openconfig.net/yang/terminal-device"): + # with tag('logical-channels'): + # with tag('channel'): + # with tag('index'):text("{}".format(port_val)) + # with tag('config'): + # with tag('index'):text("{}".format(port_val)) + # with tag('admin-state'):text("ENABLED") result = indent( doc.getvalue(), indentation = ' '*2, @@ -119,6 +127,7 @@ def create_optical_band (resources) : results =[] unwanted_keys=['destination_port','source_port','channel_namespace','frequency','optical-band-parent'] config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + doc, tag, text = Doc().tagtext() #with tag('config'): with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): @@ -166,6 +175,7 @@ def create_media_channel (resources): results=[] unwanted_keys=['destination_port','source_port','channel_namespace','frequency','operational-mode', 'optical-band-parent'] config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + doc, tag, text = Doc().tagtext() #with tag('config'): with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): @@ -206,5 +216,49 @@ def create_media_channel (resources): results.append(result) return results - - \ No newline at end of file + +def change_optical_channel_status (channel_name:str,state:str,ports:list[dict]) : + port_val="" + if 'destination_port' in ports and ports['destination_port'][0] is not None: + port_val = ports['destination_port'][0] + else: + port_val = ports['source_port'][0] + + results=[] + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + + with tag('terminal-device',xmlns="http://openconfig.net/yang/terminal-device"): + with tag("logical-channels"): + with tag('channel'): + with tag('index'):text("{}".format(port_val)) + with tag('config'): + with tag('admin-state'):text("{}".format(state)) + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + + + return results + + +def edit_optical_channel (resources:list[dict]): + unwanted_keys=['destination_port','source_port','channel_namespace','optical-band-parent','index', 'name','admin-state'] + config,ports,index=seperate_port_config(resources,unwanted_keys=unwanted_keys) + results = [] + channel_name=next((i["value"] for i in resources if i["resource_key"]=="channel_name" and i["value"] != None),None) + admin_state= next((i["value"] for i in resources if i["resource_key"]== "admin-state" and i["value"] != None) , None) + + + if channel_name is not None : + if (admin_state is not None): + results.extend(change_optical_channel_status(channel_name=channel_name,state=admin_state,ports=ports)) + if admin_state is None : + results.extend(create_optical_channel(resources=resources,ports=ports,config=config) ) + + return results diff --git a/src/device/service/drivers/oc_driver/templates/VPN/roadms.py b/src/device/service/drivers/oc_driver/templates/VPN/roadms.py new file mode 100644 index 0000000000000000000000000000000000000000..e5362f48243dbca9bb2b439855e2d8ed84f14eee --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/VPN/roadms.py @@ -0,0 +1,357 @@ +# Copyright 2022-2024 ETSI 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. + + + +from yattag import Doc, indent +import logging +from .common import seperate_port_config ,filter_config + + + + +def create_media_channel_old (resources): + optical_band_namespaces="http://flex-scale-project.eu/yang/flex-scale-mg-on" + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace' + ,'frequency','operational-mode','target-output-power', + "admin-state","flow_handled","channel_num"] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + + + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('media-channels'): + n = 0 + if 'destination_port' in ports: + n = len(ports['destination_port']) + else: + n = len(ports['source_port']) + for i in range(0, n): + #with tag('channel', operation="create"): + with tag('channel'): + with tag('index'):text(str(int(index)+i)) + with tag('config'): + #with tag('index'):text(index) + for resource in config: + + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+i)) + elif resource['resource_key']== 'optical-band-parent' : + with tag('optical-band-parent',xmlns=optical_band_namespaces):text(resource['value']) + else: + with tag(resource['resource_key']):text(resource['value']) + if ('destination_port' in ports) and (ports['destination_port'][i] is not None): + with tag('dest'): + with tag('config'): + with tag('port-name'):text(ports['destination_port'][i]) + if ('source_port' in ports) and (ports['source_port'][i] is not None): + with tag('source'): + with tag('config'): + with tag('port-name'):text(ports['source_port'][i]) + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + + + +def create_media_channel (resources): + optical_band_namespaces="http://flex-scale-project.eu/yang/flex-scale-mg-on" + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace' + ,'frequency','operational-mode','target-output-power', + "admin-state","handled_flow","channel_num"] + + config,ports,index=filter_config(resources,unwanted_keys) + + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('media-channels'): + n = 0 + + for flow in ports: + src,dest=flow + #with tag('channel', operation="create"): + with tag('channel'): + with tag('index'):text(str(int(index)+n)) + with tag('config'): + #with tag('index'):text(index) + for resource in config: + + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+n)) + elif resource['resource_key']== 'optical-band-parent' : + with tag('optical-band-parent',xmlns=optical_band_namespaces):text(resource['value']) + else: + with tag(resource['resource_key']):text(resource['value']) + if dest is not None and dest != '0': + with tag('dest'): + with tag('config'): + with tag('port-name'):text(dest) + if src is not None and src != '0': + with tag('source'): + with tag('config'): + with tag('port-name'):text(src) + n+=1 + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + + + + +def create_media_channel_v2 (resources): + optical_band_namespaces="http://flex-scale-project.eu/yang/flex-scale-mg-on" + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace' + ,'frequency','operational-mode','target-output-power', + "handled_flow","channel_num"] + + config,ports,index=filter_config(resources,unwanted_keys) + + n = 0 + for flow in ports: + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('media-channels'): + + + src,dest=flow + with tag('channel', operation="create"): + #with tag('channel'): + with tag('index'):text(str(int(index)+n)) + with tag('config'): + #with tag('index'):text(index) + for resource in config: + + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+n)) + elif resource['resource_key']== 'optical-band-parent' : + with tag('optical-band-parent',xmlns=optical_band_namespaces):text(int(resource['value'])+int(n)) + elif resource['resource_key']== 'admin-state' : + with tag('admin-status'):text(resource['value']) + else: + with tag(resource['resource_key']):text(resource['value']) + + + if src is not None and src != '0': + with tag('source'): + with tag('config'): + with tag('port-name'):text(src) + if dest is not None and dest != '0': + with tag('dest'): + with tag('config'): + with tag('port-name'):text(dest) + n+=1 + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + + + +def create_optical_band_old (resources) : + results =[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','optical-band-parent','flow_handled'] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): + n = 0 + if 'destination_port' in ports: + n = len(ports['destination_port']) + else: + n = len(ports['source_port']) + for i in range(0, n): + #with tag('optical-band', operation="create"): + with tag('optical-band'): + if index is not None: + with tag('index'):text(str(int(index)+i)) + with tag('config'): + #if index is not None: + # with tag('index'):text(str(int(index)+i)) + for resource in config: + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+i)) + else: + with tag(resource['resource_key']):text(resource['value']) + with tag('admin-status'):text('ENABLED') + #with tag('fiber-parent'):text(ports['destination_port'] if 'destination_port' in ports else ports['source_port']) + if ('destination_port' in ports) and (ports['destination_port'][i] is not None): + with tag('dest'): + with tag('config'): + with tag('port-name'):text(ports['destination_port'][i]) + if ('source_port' in ports) and (ports['source_port'][i] is not None): + with tag('source'): + with tag('config'): + with tag('port-name'):text(ports['source_port'][i]) + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + + + +def create_optical_band (resources) : + results =[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','optical-band-parent','handled_flow'] + config,ports,index= filter_config(resources,unwanted_keys=unwanted_keys) + + #with tag('config'): + n = 0 + for flow in ports: + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): + + + #with tag('optical-band', operation="create"): + src,dest=flow + + with tag('optical-band'): + if index is not None: + with tag('index'):text(str(int(index)+n)) + with tag('config'): + #if index is not None: + # with tag('index'):text(str(int(index)+i)) + for resource in config: + if resource['resource_key'] == "index": + with tag('index'):text(str(int(index)+n)) + else: + with tag(resource['resource_key']):text(resource['value']) + with tag('admin-status'):text('ENABLED') + #with tag('fiber-parent'):text(ports['destination_port'] if 'destination_port' in ports else ports['source_port']) + if dest is not None and dest != '0': + with tag('dest'): + with tag('config'): + with tag('port-name'):text(dest) + if src is not None and src !='0': + with tag('source'): + with tag('config'): + with tag('port-name'):text(src) + n +=1 + + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + +def disable_media_channel (resources): + + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','operational-mode', 'optical-band-parent'] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('media-channels'): + with tag("channel",operation="delete"): + with tag('index'):text(str(int(index))) + with tag('config'): + with tag('index'):text(str(int(index))) + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + +def disable_optical_band (resources:list,state:str): + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','operational-mode', 'optical-band-parent'] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): + with tag('optical-band'): + if index is not None: + with tag('index'):text(index) + with tag('config'): + with tag('index'):text(index) + with tag('admin-status'):text(state) + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results + + +def delete_optical_band (resources:list): + results=[] + unwanted_keys=['destination_port','source_port','channel_namespace','frequency','operational-mode', 'optical-band-parent'] + config,ports,index= seperate_port_config(resources,unwanted_keys=unwanted_keys) + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('wavelength-router', xmlns="http://openconfig.net/yang/wavelength-router"): + with tag('optical-bands',xmlns="http://flex-scale-project.eu/yang/flex-scale-mg-on"): + with tag('optical-band',operation="delete"): + if index is not None: + with tag('index'):text(index) + with tag('config'): + with tag('index'):text(index) + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + return results diff --git a/src/device/service/drivers/oc_driver/templates/VPN/transponder.py b/src/device/service/drivers/oc_driver/templates/VPN/transponder.py new file mode 100644 index 0000000000000000000000000000000000000000..e7b64ff977f53618326e14e4ea8ae39547a185db --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/VPN/transponder.py @@ -0,0 +1,157 @@ +# Copyright 2022-2024 ETSI 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. + + +from yattag import Doc, indent +import logging + +from .common import seperate_port_config + +def add_transceiver (transceiver_name:str): + + doc, tag, text = Doc().tagtext() + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('components', xmlns="http://openconfig.net/yang/platform"): + with tag('component'): + with tag('name'):text(transceiver_name) + with tag("config"): + with tag('name'):text(transceiver_name) + with tag("state"): + with tag('name'):text(transceiver_name) + with tag("type",('xmlns:oc-platform-types',"http://openconfig.net/yang/platform-types")):text("oc-platform-types:TRANSCEIVER") + with tag("transceiver",xmlns="http://openconfig.net/yang/platform/transceiver"): + with tag("config"): + with tag("enabled"):text("true") + with tag("form-factor-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:QSFP56_DD_TYPE1") + with tag("ethernet-pmd-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:ETH_400GBASE_ZR") + with tag("fec-mode",("xmlns:oc-platform-types","http://openconfig.net/yang/platform-types")):text("oc-platform-types:FEC_AUTO") + with tag("module-functional-type",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:TYPE_DIGITAL_COHERENT_OPTIC") + with tag("state"): + with tag("enabled"):text("true") + with tag("form-factor-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:QSFP56_DD_TYPE1") + with tag("ethernet-pmd-preconf",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:ETH_400GBASE_ZR") + with tag("fec-mode",("xmlns:oc-platform-types","http://openconfig.net/yang/platform-types")):text("oc-platform-types:FEC_AUTO") + with tag("module-functional-type",("xmlns:oc-opt-types","http://openconfig.net/yang/transport-types")):text("oc-opt-types:TYPE_DIGITAL_COHERENT_OPTIC") + with tag("vendor"):text("Cisco") + with tag("vendor-part"):text("400zr-QSFP-DD") + with tag("vendor-rev"):text("01") + with tag("serial-no"):text("1567321") + with tag("physical-channels"): + with tag("channel"): + with tag("index"):text("1") + with tag("config"): + with tag("index"):text("1") + with tag("associated-optical-channel"):text("channel-4") + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + + + return result + + +def create_optical_channel(resources:list[dict],ports:list[dict],config:list[dict] ): + + #unwanted_keys=['destination_port','source_port','channel_namespace','optical-band-parent','index', 'name','admin-state'] + results =[] + data ={} + data["channel_namespace"]=next((i["value"] for i in resources if i["resource_key"] == "channel_namespace"), None) + #config,ports,index=seperate_port_config(resources,unwanted_keys=unwanted_keys) + + port_val = "" + if 'destination_port' in ports and ports['destination_port'][0] is not None: + port_val = ports['destination_port'][0] + else: + port_val = ports['source_port'][0] + + + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + with tag('components', xmlns="http://openconfig.net/yang/platform"): + with tag('component'): + with tag('name'):text("channel-{}".format(port_val)) + with tag('config'): + with tag('name'):text("channel-{}".format(port_val)) + with tag('optical-channel',xmlns=data["channel_namespace"]): + with tag('config'): + for resource in config: + with tag(resource['resource_key']):text(resource['value']) + with tag('terminal-device', xmlns="http://openconfig.net/yang/terminal-device"): + with tag('logical-channels'): + with tag('channel'): + with tag('index'):text("{}".format(port_val)) + with tag('config'): + with tag('index'):text("{}".format(port_val)) + with tag('admin-state'):text("ENABLED") + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + + + return results + + +def change_optical_channel_status (state:str,ports:list[dict]) : + port_val="" + if 'destination_port' in ports and ports['destination_port'][0] is not None: + port_val = ports['destination_port'][0] + else: + port_val = ports['source_port'][0] + + results=[] + doc, tag, text = Doc().tagtext() + #with tag('config'): + with tag('config',xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"): + + with tag('terminal-device',xmlns="http://openconfig.net/yang/terminal-device"): + with tag("logical-channels"): + with tag('channel'): + with tag('index'):text("{}".format(port_val)) + with tag('config'): + with tag('admin-state'):text("{}".format(state)) + + result = indent( + doc.getvalue(), + indentation = ' '*2, + newline = '' + ) + results.append(result) + + + return results + + +def edit_optical_channel (resources:list[dict]): + + unwanted_keys=['destination_port','source_port','channel_namespace' + ,'optical-band-parent','index', 'name','admin-state','handled_flow'] + config,ports,index=seperate_port_config(resources,unwanted_keys=unwanted_keys) + results = [] + # channel_name=next((i["value"] for i in resources if i["resource_key"]=="channel_name" and i["value"] != None),None) + # admin_state= next((i["value"] for i in resources if i["resource_key"]== "admin-state" and i["value"] != None) , None) + + + + # results.extend(change_optical_channel_status(state=admin_state,ports=ports)) + # else : + + results.extend(create_optical_channel(resources=resources,ports=ports,config=config) ) + + return results diff --git a/src/device/service/drivers/oc_driver/templates/__init__.py b/src/device/service/drivers/oc_driver/templates/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/oc_driver/templates/__init__.py +++ b/src/device/service/drivers/oc_driver/templates/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/oc_driver/templates/discovery_tool/open_roadm.py b/src/device/service/drivers/oc_driver/templates/discovery_tool/open_roadm.py new file mode 100644 index 0000000000000000000000000000000000000000..8034a56f82febf4ead65235f68523e8275a00b58 --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/discovery_tool/open_roadm.py @@ -0,0 +1,246 @@ + +# Copyright 2022-2024 ETSI 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. + +import re,logging +import json +import lxml.etree as ET +from typing import Collection, Dict, Any +from common.proto.context_pb2 import Location +from decimal import Decimal + +def extract_roadm_circuits_pack (xml_data:str): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + # with open('xml.log', 'w') as f: + # print(xml_bytes, file=f) + + namespace = {'oc': "http://org/openroadm/device"} + + circuits = root.findall('.//oc:circuit-packs',namespace) + + circuits_list =[] + # print(f"component {components}") + + if (circuits is not None): + for circuit in circuits: + circuit_info ={} + circuit_ports=[] + circuit_name = circuit.find(".//oc:circuit-pack-name",namespace) + circuit_type=circuit.find(".//oc:circuit-pack-type",namespace) + circuit_adminstrative_status=circuit.find(".//oc:administrative-state",namespace) + circuit_equipment_state=circuit.find("./oc:equipment-state",namespace) + circuit_mode=circuit.find("./oc:circuit-pack-mode",namespace) + slot= circuit.find("./oc:slot",namespace) + shelf= circuit.find("./oc:shelf",namespace) + ports = circuit.findall("./oc:ports",namespace) + + + if (ports is not None): + + for port in ports : + port_info={} + port_name=port.find('./oc:port-name',namespace) + port_qual= port.find("./oc:port-qual",namespace) + + if port_name is not None : + port_info["port_name"]=port_name.text + if port_qual is not None : + port_info["port_qual"]=port_qual.text + circuit_ports.append(port_info) + # if port_info["port_qual"] == 'roadm-external': + # circuit_ports.append(port_info) + if (circuit_name is not None): + circuit_info["circuit_name"]=circuit_name.text + if (circuit_type is not None): + circuit_info["circuit_type"]=circuit_type.text + if (circuit_adminstrative_status is not None): + circuit_info["circuit_adminstrative_status"]=circuit_adminstrative_status.text + if (circuit_equipment_state is not None): + circuit_info["circuit_equipment_state"]=circuit_equipment_state.text + if (circuit_mode is not None): + circuit_info["circuit_mode"]=circuit_mode.text + if (slot is not None): + circuit_info["slot"]=slot.text + if (shelf is not None): + circuit_info["shelf"]=shelf.text + logging.info(f"circuit_ports {circuit_ports}") + circuit_info["ports"]=circuit_ports + + circuits_list.append(circuit_info) + + + + return circuits_list + + + +def extract_openroadm_info(xml_data:str): + roadm_info={"node-id":None,"node-number":None,"node-type":None,'clli':None} + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespace = {'oc': "http://org/openroadm/device"} + info = root.findall('.//oc:info',namespace) + if info is not None : + for i in info : + node_id= i.find('.//oc:node-id',namespace) + node_number= i.find('.//oc:node-number',namespace) + node_type=i.find('.//oc:node-type',namespace) + clli=i.find('.//oc:clli',namespace) + if (node_id is not None): + roadm_info['node-id']=node_id.text + if (node_number is not None): + roadm_info['node-number']=node_number.text + if (node_type is not None): + roadm_info['node-type']=node_type.text + if (clli is not None): + roadm_info['clli']=clli.text + + return roadm_info + + +def extract_openroadm_interface (xml_data:str): + or_config=[] + or_interfaces=[] + + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + # with open('xml.log', 'w') as f: + # print(xml_bytes, file=f) + + + namespace = {'oc': "http://org/openroadm/device" + , 'mc':"http://org/openroadm/media-channel-interfaces" + ,'nmc':"http://org/openroadm/network-media-channel-interfaces" + ,'or-type':'http://org/openroadm/interfaces'} + + interfaces = root.findall('.//oc:interface',namespace) + for interface in interfaces : + mc = interface.find('.//mc:mc-ttp',namespace) + name = interface.find('.//oc:name',namespace) + description = interface.find('.//oc:description',namespace) + type=interface.find('.//oc:type',namespace) + administrative_state=interface.find('.//oc:administrative-state',namespace) + circuit_pack_name=interface.find('.//oc:supporting-circuit-pack-name',namespace) + port=interface.find('.//oc:supporting-port',namespace) + interface_list =interface.find('.//oc:supporting-interface-list',namespace) + + or_interfaces.append({ + 'interface_list':name.text if name is not None else None, + 'administrative_state':administrative_state.text if administrative_state is not None else None, + 'circuit_pack_name':circuit_pack_name.text if circuit_pack_name is not None else None, + 'port':port.text if port is not None else None , + 'type':type.text if type is not None else None + }) + if mc is not None : + print (mc) + frequency=None + width=None + min_frequency = mc.find('.//mc:min-freq',namespace) + max_frequency = mc.find('.//mc:max-freq',namespace) + if min_frequency is not None and max_frequency is not None: + frequency = (Decimal(max_frequency.text) + Decimal(min_frequency.text) )/2 + width = int(( Decimal(max_frequency.text) - Decimal(min_frequency.text)) * 1000) + + + mc= { + 'name':name.text if name is not None else None, + 'description':description.text if description is not None else None , + 'type':"media_channel", + 'administrative_state':administrative_state.text if administrative_state is not None else None, + 'circuit_pack_name':circuit_pack_name.text if circuit_pack_name is not None else None, + 'port':port.text if port is not None else None , + 'interface_list': interface_list.text if interface_list is not None else None, + 'frequency': str(frequency), + 'width':width + } + or_config.append(mc) + + else : + nmc = interface.find('.//nmc:nmc-ctp',namespace) + + + if nmc is not None : + frequency = nmc.find('.//nmc:frequency',namespace) + width=nmc.find('.//nmc:width',namespace) + nmc= { + 'name':name.text if name is not None else None, + 'description':description.text if description is not None else None , + 'type':"network_media_channel", + 'administrative_state':administrative_state.text if administrative_state is not None else None, + 'circuit_pack_name':circuit_pack_name.text if circuit_pack_name is not None else None, + 'port':port.text if port is not None else None , + 'interface_list': interface_list.text if interface_list is not None else None, + 'frequency': frequency.text if frequency is not None else None, + 'width':width.text if width is not None else None + } + or_config.append(nmc) + logging.info(f"or_config for or {or_config}") + return [or_interfaces,or_config] + + +def openroadm_values_extractor (data_xml:str,resource_keys:list,dic:dict): + ports_result=[] + openroadm_info= extract_openroadm_info(data_xml) + circuits_list = extract_roadm_circuits_pack(data_xml) + interfaces,config = extract_openroadm_interface(data_xml) + dic["openroadm_info"]=openroadm_info + dic["circuits"]=circuits_list + dic['interfaces']=config + + for circuit in circuits_list : + circuit_name=circuit['circuit_name'] + location = Location() + location.circuit_pack=circuit_name + for port in circuit['ports']: + if port is not None and 'port_name' in port : + resource_key = '/endpoints/endpoint[{:s}]'.format(port["port_name"]) + resource_value = {'uuid': port["port_name"] + , 'type':port["port_qual"] if "port_qual" in port else None, + 'location':{"circuit_pack":location.circuit_pack} + } + ports_result.append((resource_key, resource_value)) + for interface in interfaces: + existed=False + circuit_name=interface['circuit_pack_name'] + interface_list=interface['interface_list'] + + location_interface=f'{interface_list}/{circuit_name}' + port = interface["port"] + type = interface['type'] + if port is not None: + for i , (key,value) in enumerate(ports_result): + if value['uuid'] == port: + new_value = value + merged_interface=None + if 'interface' in value['location']: + merged_interface= f"{value['location']['interface']},{location_interface}" + if merged_interface is not None : + new_value['location']={"interface":merged_interface} + else : + new_value['location']={"interface":location_interface} + + ports_result[i]= (key,new_value ) + existed=True + break + + if not existed: + resource_key = '/endpoints/endpoint[{:s}]'.format(port) + resource_value = {'uuid': f'{port}' + , 'type':type , + 'location':{"interface":location_interface} + } + ports_result.append((resource_key, resource_value)) + + return [dic,ports_result] diff --git a/src/device/service/drivers/oc_driver/templates/discovery_tool/roadms.py b/src/device/service/drivers/oc_driver/templates/discovery_tool/roadms.py new file mode 100644 index 0000000000000000000000000000000000000000..f9efa7f989623ad3d18052ec1cef9651ed913c9f --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/discovery_tool/roadms.py @@ -0,0 +1,171 @@ +# Copyright 2022-2024 ETSI 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. + +import re +import lxml.etree as ET + +def extract_channel_xmlns (data_xml:str,is_opticalband:bool): + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace=None + channels=None + + if (not is_opticalband) : + + optical_channel_namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/platform', + } + + channels= root.find('.//{*}optical-channel',optical_channel_namespaces) + if channels is not None : + optical_channel_namespace = channels.tag.replace("optical-channel", "") + namespace=optical_channel_namespace.replace("{", "").replace("}", "") + else : + optical_band_namespaces= { + 'oc':'http://openconfig.net/yang/wavelength-router' + } + + channels= root.find('.//{*}optical-bands',optical_band_namespaces) + if channels is not None: + optical_channel_namespace = channels.tag.replace("optical-bands", "") + namespace=optical_channel_namespace.replace("{", "").replace("}", "") + return namespace + +def extract_optical_bands (data_xml:str,namespace:str): + namespaces={"oc":namespace} + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + op_bands=[] + optical_bands= root.find('.//oc:optical-bands',namespaces) + + if optical_bands is not None : + optical_bands_ele= optical_bands.findall('.//oc:optical-band',namespaces) + + for optical_band in optical_bands_ele: + band_ele=optical_band.find('.//oc:name',namespaces) + lower_freq_ele=optical_band.find('.//oc:lower-frequency',namespaces) + upper_freq_ele=optical_band.find('.//oc:upper-frequency',namespaces) + admin_status_ele=optical_band.find('.//oc:admin-status',namespaces) + source_ele=optical_band.find('.//oc:source/oc:config/oc:port-name',namespaces) + dest_ele=optical_band.find('.//oc:dest/oc:config/oc:port-name',namespaces) + channel_index= optical_band.find('.//oc:index',namespaces) + op_band_obj={ + 'band_name':band_ele.text if band_ele is not None else None, + 'lower_frequency':lower_freq_ele.text if lower_freq_ele is not None else None, + 'upper_frequency':upper_freq_ele.text if upper_freq_ele is not None else None, + 'status':admin_status_ele.text if admin_status_ele is not None else None, + 'src_port':source_ele.text if source_ele is not None else None, + 'dest_port':dest_ele.text if dest_ele is not None else None, + "channel_index":channel_index.text if channel_index is not None else None + } + op_bands.append(op_band_obj) + + return op_bands + +def extract_media_channels (data_xml:str): + optical_band_namespaces="http://flex-scale-project.eu/yang/flex-scale-mg-on" + namespaces={"oc":"http://openconfig.net/yang/wavelength-router",'ob_parent':optical_band_namespaces} + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + media_channels= root.find(f'.//oc:media-channels',namespaces) + op_bands=[] + if media_channels is not None : + media_channels_ele= media_channels.findall('.//oc:channel',namespaces) + for optical_band in media_channels_ele: + band_ele=optical_band.find('.//oc:name',namespaces) + lower_freq_ele=optical_band.find('.//oc:lower-frequency',namespaces) + upper_freq_ele=optical_band.find('.//oc:upper-frequency',namespaces) + admin_status_ele=optical_band.find('.//oc:admin-status',namespaces) + source_ele=optical_band.find('.//oc:source/oc:config/oc:port-name',namespaces) + dest_ele=optical_band.find('.//oc:dest/oc:config/oc:port-name',namespaces) + ob_parent=optical_band.find('.//ob_parent:optical-band-parent',namespaces) + channel_index= optical_band.find('.//oc:index',namespaces) + op_band_obj={ + 'band_name':band_ele.text if band_ele is not None else None, + 'lower_frequency':lower_freq_ele.text if lower_freq_ele is not None else None, + 'upper_frequency':upper_freq_ele.text if upper_freq_ele is not None else None, + 'status':admin_status_ele.text if admin_status_ele is not None else None, + 'src_port':source_ele.text if source_ele is not None else None, + 'dest_port':dest_ele.text if dest_ele is not None else None, + 'optical_band_parent':ob_parent.text if ob_parent is not None else None, + 'channel_index':channel_index.text if channel_index is not None else None + } + op_bands.append(op_band_obj) + + return op_bands + +def extract_roadm_ports_old (xml_data:str): + ports =[] + pattern = r'\bMG_ON_OPTICAL_PORT_WAVEBAND\b' + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + with open('xml.log', 'w') as f: + print(xml_bytes, file=f) + + namespace = {'oc': 'http://openconfig.net/yang/platform'} + ports = [] + components = root.findall('.//oc:component',namespace) + print(f"component {components}") + + for component in components: + properties = component.find(".//oc:properties",namespace) + if (properties is not None): + for property in properties : + value = property.find(".//oc:value",namespace) + if (re.search(pattern,value.text)): + name_element= component.find(".//oc:name",namespace) + ports.append(name_element.text) + return ports + +def extract_roadm_ports (xml_data:str): + ports =[] + pattern2=r'\bMG_ON_PORT_TYPE' + pattern = r'\bMG_ON_OPTICAL_PORT_WAVEBAND\b' + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace = {'oc': 'http://openconfig.net/yang/platform'} + ports = [] + components = root.findall('.//oc:component',namespace) + #print(f"component {components}") + + for component in components: + properties = component.find(".//oc:properties",namespace) + if (properties is not None): + for property in properties : + value = property.find(".//oc:value",namespace) + name= property.find('.//oc:name',namespace) + if (re.search(pattern2,name.text)): + value = property.find(".//oc:value",namespace) + name_element= component.find(".//oc:name",namespace) + print('value',value.text) + ports.append((name_element.text,value.text)) + return ports + +def roadm_values_extractor (data_xml:str,resource_keys:list,dic:dict): + ports_result=[] + ports = extract_roadm_ports(data_xml) + namespcae= extract_channel_xmlns(data_xml,True) + optical_bands=extract_optical_bands(data_xml=data_xml,namespace=namespcae) + media_cahannels=extract_media_channels(data_xml) + + if len(ports)>0 : + for port in ports : + name,type=port + resource_key = '/endpoints/endpoint[{:s}]'.format(name) + resource_value = {'uuid': name, 'type':type} + ports_result.append((resource_key, resource_value)) + return [ports_result,optical_bands,media_cahannels] diff --git a/src/device/service/drivers/oc_driver/templates/discovery_tool/transponders.py b/src/device/service/drivers/oc_driver/templates/discovery_tool/transponders.py new file mode 100644 index 0000000000000000000000000000000000000000..3bd4fc760431ee288f2ca17703e48922f952c57c --- /dev/null +++ b/src/device/service/drivers/oc_driver/templates/discovery_tool/transponders.py @@ -0,0 +1,301 @@ +# Copyright 2022-2024 ETSI 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. + +import re,logging +import json +import lxml.etree as ET +from typing import Collection, Dict, Any + + + +def add_value_from_tag(target : Dict, field_name: str, field_value : ET.Element, cast=None) -> None: + if isinstance(field_value,str) or field_value is None or field_value.text is None: return + field_value = field_value.text + if cast is not None: field_value = cast(field_value) + target[field_name] = field_value + +def add_value_from_collection(target : Dict, field_name: str, field_value : Collection) -> None: + if field_value is None or len(field_value) == 0: return + target[field_name] = field_value + + +def generate_templates(resource_key: str, resource_value: str, channel:str) -> str: # template management to be configured + + result_templates = [] + data={} + data['name']=channel + data['resource_key']=resource_key + data['value']=resource_value + #result_templates.append(create_physical_config(data)) + + return result_templates + + +def extract_status (dic:dict,resource_key:str,xml_data:str,channel_name:str): + + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + channel_name=channel_name if 'index' not in channel_name else channel_name['index'] + index=None + if channel_name.find('-') != -1 : + index= channel_name.split("-")[1] + + + namespaces = { "td": "http://openconfig.net/yang/terminal-device"} + channels = root.findall(f".//td:terminal-device/td:logical-channels/td:channel",namespaces) + for channel in channels : + + index_ele= channel.find(f".//td:config[td:index='{index}']/td:{resource_key}",namespaces) + if index_ele is not None : + dic["status"]=index_ele.text + print(index_ele.text) + return dic + + +def extract_channel_xmlns (data_xml:str,is_opticalband:bool): + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace=None + channels=None + + if (not is_opticalband) : + + optical_channel_namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/platform', + } + + channels= root.find('.//{*}optical-channel',optical_channel_namespaces) + if channels is not None : + optical_channel_namespace = channels.tag.replace("optical-channel", "") + namespace=optical_channel_namespace.replace("{", "").replace("}", "") + else : + optical_band_namespaces= { + 'oc':'http://openconfig.net/yang/wavelength-router' + } + + channels= root.find('.//{*}optical-bands',optical_band_namespaces) + if channels is not None: + optical_channel_namespace = channels.tag.replace("optical-bands", "") + namespace=optical_channel_namespace.replace("{", "").replace("}", "") + + + return namespace + +def extract_channels_based_on_channelnamespace (xml_data:str,channel_namespace:str,is_opticalband:bool): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + channels=[] + + # Find the component names whose children include the "optical-channel" element + if (not is_opticalband): + namespace = {'namespace': 'http://openconfig.net/yang/platform','cn':channel_namespace} + + component_names = root.findall('.//namespace:component[cn:optical-channel]',namespace) + + # Extract and print the component names + for component in component_names: + component_name = component.find('namespace:name', namespace).text + channels.append({"index":component_name}) + else : + namespaces = { + 'wr': 'http://openconfig.net/yang/wavelength-router', + 'fs': channel_namespace + } + + wl = root.findall('.//fs:optical-band',namespaces=namespaces) + + for component in wl : + index=component.find('.//fs:index',namespaces).text + dest_port_name = component.find('.//fs:dest/fs:config/fs:port-name', namespaces).text + + # Retrieve port-name for source (assuming it exists in the XML structure) + source_port_name = component.find('.//fs:source/fs:config/fs:port-name', namespaces).text + channels.append({"index":index,"endpoints":(source_port_name,dest_port_name)}) + + # Retrieve port-name for dest + + return channels + +def extract_channels_based_on_type (xml_data:str): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace = {'oc': 'http://openconfig.net/yang/platform', 'typex': 'http://openconfig.net/yang/platform-types'} + channel_names = [] + components = root.findall('.//oc:component', namespace) + for component in components: + + type_element = component.find('.//oc:state/oc:type[.="oc-opt-types:OPTICAL_CHANNEL"]',namespaces=namespace) + + if type_element is not None and type_element.text == 'oc-opt-types:OPTICAL_CHANNEL': + name_element = component.find('oc:name', namespace) + if name_element is not None: + channel_names.append(name_element.text) + return channel_names + +def extract_value(resource_key:str,xml_data:str,dic:dict,channel_name:str,channel_namespace:str): + + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + channel_name=channel_name if 'index' not in channel_name else channel_name['index'] + namespace = {'oc': 'http://openconfig.net/yang/platform', + 'td': channel_namespace} + + element = root.find(f'.//oc:component[oc:name="{channel_name}"]', namespace) + + if element is not None: + parameter= element.find(f'.//td:{resource_key}',namespace) + if (parameter is not None): + value = parameter.text + dic[resource_key]=value + else : + logging.info("parameter is None") + + else: + logging.info("element is None") + print(" element not found.") + + return dic + + +def extract_port_value (xml_string:list,port_name:str): + + xml_bytes = xml_string.encode("utf-8") + root = ET.fromstring(xml_bytes) + + namespace = {"oc": "http://openconfig.net/yang/platform"} + component=root.find(f".//oc:component[oc:name='{port_name}']", namespace) + onos_index = component.find( + f".//oc:property//oc:state/oc:name[.='onos-index']/../oc:value", namespace + ).text + + return (port_name,onos_index) + + + + +def extract_tranceiver (data_xml:str,dic:dict): + xml_bytes = data_xml.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/platform', + 'oc-terminal': 'http://openconfig.net/yang/terminal-device', + 'oc-platform-types': 'http://openconfig.net/yang/platform-types' + } + + + transceiver_components = root.findall('.//oc:component/oc:state/[oc:type="oc-platform-types:TRANSCEIVER"]../oc:state/oc:name', namespaces) + + component_names = [component.text for component in transceiver_components] + dic['transceiver']=component_names + return dic + +def extract_interface (xml_data:str,dic:dict): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespaces = { + 'ns': 'urn:ietf:params:xml:ns:netconf:base:1.0', + 'oc': 'http://openconfig.net/yang/interfaces', + } + ip_namespaces = { + 'oc': 'http://openconfig.net/yang/interfaces', + 'ip': 'http://openconfig.net/yang/interfaces/ip', + } + + interfaces = root.findall('.//oc:interfaces/oc:interface', namespaces) + interface_names = [interface.find('oc:name', namespaces).text for interface in interfaces] + interface_enabled=[interface.find('oc:config/oc:enabled', namespaces).text for interface in interfaces] + ip_address_element = root.find('.//ip:ip', ip_namespaces) + interface_prefix_length=root.find('.//ip:prefix-length',ip_namespaces) + if (len(interface_names) > 0): + dic['interface']={"name":interface_names[0],'ip':ip_address_element.text,'enabled':interface_enabled[0],"prefix-length":interface_prefix_length.text} + else : + dic['interface']={} + return dic + +def has_opticalbands(xml_data:str): + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + + has_opticalbands=False + elements= root.find('.//{*}optical-bands') + + if (elements is not None and len(elements) >0): + has_opticalbands=True + else : + has_opticalbands=False + return has_opticalbands + +def extract_ports_based_on_type (xml_data:str): + pattern = r':\s*PORT\b' + xml_bytes = xml_data.encode("utf-8") + root = ET.fromstring(xml_bytes) + namespace = {'oc': 'http://openconfig.net/yang/platform', 'typex': 'http://openconfig.net/yang/platform-types'} + ports = [] + components = root.findall(".//oc:state[oc:type]",namespace) + for component in components: + type_ele = component.find(".//oc:type",namespace) + match = re.search(pattern, type_ele.text) + if match is not None : + name_element= component.find(".//oc:name",namespace) + port_name =name_element.text + port_index=name_element.text.split("-")[1] + port = (port_name,port_index) + ports.append(port) + return ports + +def transponder_values_extractor(data_xml:str,resource_keys:list,dic:dict): + + endpoints=[] + is_opticalband=has_opticalbands(xml_data=data_xml) + channel_namespace=extract_channel_xmlns(data_xml=data_xml,is_opticalband=is_opticalband) + # channel_names=extract_channels_based_on_type(xml_data=data_xml) + # if len(channel_names)==0 : + channel_names= extract_channels_based_on_channelnamespace(xml_data=data_xml,channel_namespace=channel_namespace,is_opticalband=is_opticalband) + + ports = extract_ports_based_on_type(data_xml) + optical_channels_params=[] + ports_result=[] + if (is_opticalband): + endpoints=channel_names + else: + + for channel_name in channel_names: + dic={} + for resource_key in resource_keys : + + if (resource_key != 'admin-state'): + + dic=extract_value(dic=dic,resource_key=resource_key,xml_data=data_xml + ,channel_name=channel_name,channel_namespace=channel_namespace) + else : + dic = extract_status(dic=dic,resource_key=resource_key,xml_data=data_xml, channel_name=channel_name) + dic["name"]=channel_name + endpoints.append({"endpoint_uuid":{"uuid":channel_name}}) + optical_channels_params.append(dic) + #transceivers_dic=extract_tranceiver(data_xml=data_xml,dic={}) + transceivers_dic={"transceiver":[]} + #interfaces_dic=extract_interface(xml_data=data_xml,dic={}) + if len(ports)>0 : + for port in ports : + endpoint_name,endpoint_id=port + resource_key = '/endpoints/endpoint[{:s}]'.format(endpoint_id) + resource_value = {'uuid': endpoint_id, 'type':endpoint_name} + ports_result.append((resource_key, resource_value)) + + + return [transceivers_dic,optical_channels_params,channel_namespace,endpoints,ports_result] diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index fd36e2dc40e38a125f1812f00eeb304106a40c8a..89432fac260d2f6523decbded020bf54eceb13e5 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/RetryDecorator.py b/src/device/service/drivers/openconfig/RetryDecorator.py index 6c2060ce969c1e575497594db7129480aa0d2607..df37414c15fa2be63ba74e6c6f9955749b15302a 100644 --- a/src/device/service/drivers/openconfig/RetryDecorator.py +++ b/src/device/service/drivers/openconfig/RetryDecorator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/Tools.py b/src/device/service/drivers/openconfig/Tools.py index ac7f3d7c3c5be3220737e23545acae7b894f3507..940bc31d4d15540f4273ba8eb40a99b7b509bc4f 100644 --- a/src/device/service/drivers/openconfig/Tools.py +++ b/src/device/service/drivers/openconfig/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/__init__.py b/src/device/service/drivers/openconfig/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/openconfig/__init__.py +++ b/src/device/service/drivers/openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py b/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py index 47e7567232853d699158b2b4f7f2ce60c216d6d0..ef2fa20900cc71d33b3403bfbaa9259cba041265 100755 --- a/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/ACL/ACL_multivendor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/ACL/__init__.py b/src/device/service/drivers/openconfig/templates/ACL/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/openconfig/templates/ACL/__init__.py +++ b/src/device/service/drivers/openconfig/templates/ACL/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/Acl.py b/src/device/service/drivers/openconfig/templates/Acl.py index e0e778f11415a2dcccd18f9b61166a68a7cf4fc2..950548c3c3a42aabc3409dc2861fb120f54956ff 100644 --- a/src/device/service/drivers/openconfig/templates/Acl.py +++ b/src/device/service/drivers/openconfig/templates/Acl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/EndPoints.py b/src/device/service/drivers/openconfig/templates/EndPoints.py index 882cf2147e7ea913d6c4f00751698cc5b2ca3043..26be2e9cad78b33a55271575427ccf30a1488261 100644 --- a/src/device/service/drivers/openconfig/templates/EndPoints.py +++ b/src/device/service/drivers/openconfig/templates/EndPoints.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/Interfaces.py b/src/device/service/drivers/openconfig/templates/Interfaces.py index 137d405c05866fba5ebdb25215e0190c1cd36388..e8ca15116d5de853a3730c20e89146c570df8d02 100644 --- a/src/device/service/drivers/openconfig/templates/Interfaces.py +++ b/src/device/service/drivers/openconfig/templates/Interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/Inventory.py b/src/device/service/drivers/openconfig/templates/Inventory.py index 4fca35bc39ea4a72a864f16832f944ed7ad21621..c14c3843367406afdff83433cca50e5364e68e3b 100644 --- a/src/device/service/drivers/openconfig/templates/Inventory.py +++ b/src/device/service/drivers/openconfig/templates/Inventory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/Namespace.py b/src/device/service/drivers/openconfig/templates/Namespace.py index 3c1ed0ad7985520ccc6f7d334c6ad049f5f5d4f1..82333c7886efcca58319d2a576de8e3de450d495 100644 --- a/src/device/service/drivers/openconfig/templates/Namespace.py +++ b/src/device/service/drivers/openconfig/templates/Namespace.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/NetworkInstances.py b/src/device/service/drivers/openconfig/templates/NetworkInstances.py index 97b55c817fdf002fe5f09852b203e5b14c600b06..c609419077e63c7463af8f7417393b46f0bcbb69 100644 --- a/src/device/service/drivers/openconfig/templates/NetworkInstances.py +++ b/src/device/service/drivers/openconfig/templates/NetworkInstances.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/RoutingPolicy.py b/src/device/service/drivers/openconfig/templates/RoutingPolicy.py index e7ac614809528077577ff14a6b376bb20aeed390..02338d5200e6af1baeeddc4d4e7b5f4f7b737d76 100644 --- a/src/device/service/drivers/openconfig/templates/RoutingPolicy.py +++ b/src/device/service/drivers/openconfig/templates/RoutingPolicy.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/Tools.py b/src/device/service/drivers/openconfig/templates/Tools.py index c4ef22b1e3c11f1e512026bea8e2122ab703a9e5..3adc908b3afb4b200fa10dc588bf09c9799820b2 100644 --- a/src/device/service/drivers/openconfig/templates/Tools.py +++ b/src/device/service/drivers/openconfig/templates/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py index ab57ce3bd26e9183f931a1a6e13a44a9a85bef7d..a33e82ef7d84977ee2e0fe78e4ccb53d55a9c4c2 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Interfaces_multivendor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py index 157dd0ab89a0eb625d428dd95109faabc399bcf0..71581640eaf92fbd77582f652222999d7177ce81 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Network_instance_multivendor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py b/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py index 69fdd2cc52ec179665b6fc5a766b04b0e6c2a6ae..ae359ff73aa592b824815e27f446fd1f42509fc0 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py +++ b/src/device/service/drivers/openconfig/templates/VPN/Routing_policy.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/VPN/__init__.py b/src/device/service/drivers/openconfig/templates/VPN/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/drivers/openconfig/templates/VPN/__init__.py +++ b/src/device/service/drivers/openconfig/templates/VPN/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/__init__.py b/src/device/service/drivers/openconfig/templates/__init__.py index a209d9607c8dca0b5ce09b7b98592a7cdb9b9aaf..c1a983c15ba3dd809623fbd753d637c1047d825c 100644 --- a/src/device/service/drivers/openconfig/templates/__init__.py +++ b/src/device/service/drivers/openconfig/templates/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/acl/__init__.py b/src/device/service/drivers/openconfig/templates/acl/__init__.py index 839e45e3b646bc60de7edd81fcfb91b7b38feadf..d1eba8e41fdc0b7257b50bf411869c7b2baa2e00 100644 --- a/src/device/service/drivers/openconfig/templates/acl/__init__.py +++ b/src/device/service/drivers/openconfig/templates/acl/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/acl/acl_adapter.py b/src/device/service/drivers/openconfig/templates/acl/acl_adapter.py index 15e723680c355d58b84d0a1677be3f21a0fb95ed..6654b43fa4bbe5705f967d65126c9459ceaf427f 100644 --- a/src/device/service/drivers/openconfig/templates/acl/acl_adapter.py +++ b/src/device/service/drivers/openconfig/templates/acl/acl_adapter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/openconfig/templates/acl/acl_adapter_ipinfusion_proprietary.py b/src/device/service/drivers/openconfig/templates/acl/acl_adapter_ipinfusion_proprietary.py index 52213c2aba9a128ace4e927a5f01f9be278442b6..9016f9bd8503746a95e4c6fbd493b5bd4b670561 100644 --- a/src/device/service/drivers/openconfig/templates/acl/acl_adapter_ipinfusion_proprietary.py +++ b/src/device/service/drivers/openconfig/templates/acl/acl_adapter_ipinfusion_proprietary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py index dbaa956450a5598154c09f8ec7946ba3d7a64502..05c44d2d3a52d063ae9981c28af06d82fe1cfc73 100644 --- a/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py +++ b/src/device/service/drivers/optical_tfs/OpticalTfsDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/optical_tfs/Tools.py b/src/device/service/drivers/optical_tfs/Tools.py index d13bac4832a8de3b802f8362b0c2b8516dfd2250..3714672f8b9f892ee6e6b51a5e0f56b37bf3967e 100644 --- a/src/device/service/drivers/optical_tfs/Tools.py +++ b/src/device/service/drivers/optical_tfs/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/optical_tfs/__init__.py b/src/device/service/drivers/optical_tfs/__init__.py index 4f3d1a042c69720452803e994c38f7c2e966c684..97ec0dd4209f253161cddf69344bd62933a81fd7 100644 --- a/src/device/service/drivers/optical_tfs/__init__.py +++ b/src/device/service/drivers/optical_tfs/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/p4/__init__.py b/src/device/service/drivers/p4/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/p4/__init__.py +++ b/src/device/service/drivers/p4/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/p4/p4_client.py b/src/device/service/drivers/p4/p4_client.py index 367419776638e2ff2be762b46890bfa16e88c6bb..0ebed802ee23afc5662d7ec852c644f5b65bbb70 100644 --- a/src/device/service/drivers/p4/p4_client.py +++ b/src/device/service/drivers/p4/p4_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/p4/p4_common.py b/src/device/service/drivers/p4/p4_common.py index bf23c2e064c53ff1fc69b9790b2dc21e0462f9af..b55296a65922de93370a66301254cacf9ca7220a 100644 --- a/src/device/service/drivers/p4/p4_common.py +++ b/src/device/service/drivers/p4/p4_common.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -27,10 +27,12 @@ import math import re import socket import ipaddress +from typing import Any, Dict, List, Optional, Tuple from ctypes import c_uint16, sizeof import macaddress -from common.type_checkers.Checkers import chk_type +from common.type_checkers.Checkers import \ + chk_attribute, chk_string, chk_type, chk_issubclass try: from .p4_exception import UserBadValueError except ImportError: @@ -38,6 +40,7 @@ except ImportError: P4_ATTR_DEV_ID = "id" P4_ATTR_DEV_NAME = "name" +P4_ATTR_DEV_ENDPOINTS = "endpoints" P4_ATTR_DEV_VENDOR = "vendor" P4_ATTR_DEV_HW_VER = "hw_ver" P4_ATTR_DEV_SW_VER = "sw_ver" @@ -50,6 +53,7 @@ P4_VAL_DEF_HW_VER = "BMv2 simple_switch" P4_VAL_DEF_SW_VER = "Stratum" P4_VAL_DEF_TIMEOUT = 60 +RESOURCE_ENDPOINTS_ROOT_PATH = "/endpoints" # Logger instance LOGGER = logging.getLogger(__name__) @@ -422,6 +426,28 @@ def parse_action_parameters_from_json(resource): return action_params +def parse_replicas_from_json(resource): + """ + Parse the session replicas within a JSON-based object. + + :param resource: JSON-based object + :return: map of replicas + """ + if not resource or ("replicas" not in resource): + LOGGER.warning( + "JSON entry misses 'replicas' list of attributes") + return None + chk_type("replicas", resource["replicas"], list) + + replicas = {} + for rep in resource["replicas"]: + chk_type("egress-port", rep["egress-port"], int) + chk_type("instance", rep["instance"], int) + replicas[rep["egress-port"]] = rep["instance"] + + return replicas + + def parse_integer_list_from_json(resource, resource_list, resource_item): """ Parse the list of integers within a JSON-based object. @@ -443,3 +469,77 @@ def parse_integer_list_from_json(resource, resource_list, resource_item): integers_list.append(item[resource_item]) return integers_list + +def process_optional_string_field( + #TODO: Consider adding this in common methdos as it is taken by the Emulated driver + endpoint_data : Dict[str, Any], field_name : str, endpoint_resource_value : Dict[str, Any] +) -> None: + field_value = chk_attribute(field_name, endpoint_data, 'endpoint_data', default=None) + if field_value is None: return + chk_string('endpoint_data.{:s}'.format(field_name), field_value) + if len(field_value) > 0: endpoint_resource_value[field_name] = field_value + +def compose_resource_endpoints(endpoints_list : List[Tuple[str, Any]]): + #TODO: Consider adding this in common methods; currently taken by the Emulated driver + endpoint_resources = [] + for i, endpoint in enumerate(endpoints_list): + LOGGER.debug("P4 endpoint {}: {}".format(i, endpoint)) + endpoint_resource = compose_resource_endpoint(endpoint) + if endpoint_resource is None: continue + endpoint_resources.append(endpoint_resource) + return endpoint_resources + +def compose_resource_endpoint(endpoint_data : Dict[str, Any]) -> Optional[Tuple[str, Dict]]: + #TODO: Consider adding this in common methods; currently taken by the Emulated driver + try: + endpoint_uuid = chk_attribute('uuid', endpoint_data, 'endpoint_data') + chk_string('endpoint_data.uuid', endpoint_uuid, min_length=1) + endpoint_resource_path = RESOURCE_ENDPOINTS_ROOT_PATH + endpoint_resource_key = '{:s}/endpoint[{:s}]'.format(endpoint_resource_path, endpoint_uuid) + endpoint_resource_value = {'uuid': endpoint_uuid} + + # Check endpoint's optional string fields + process_optional_string_field(endpoint_data, 'name', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'type', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'context_uuid', endpoint_resource_value) + process_optional_string_field(endpoint_data, 'topology_uuid', endpoint_resource_value) + + return endpoint_resource_key, endpoint_resource_value + except: # pylint: disable=bare-except + LOGGER.error('Problem composing endpoint({:s})'.format(str(endpoint_data))) + return None + +def compose_resource_rules(rules_list : List[Tuple[str, Any]]): + rule_resources = [] + for i, rule in enumerate(rules_list): + rule_resource = compose_resource_rule(rule_data=rule, rule_cnt=i) + if rule_resource is None: continue + rule_resources.append(rule_resource) + return rule_resources + +def compose_resource_rule(rule_data : Dict[str, Any], rule_cnt : int) -> Optional[Tuple[str, Dict]]: + try: + LOGGER.info("Rule: {}".format(rule_data)) + + rule_resource_key = chk_attribute('resource_key', rule_data, 'rule_data') + chk_string('rule_data.resource_key', rule_resource_key, min_length=1) + + rule_resource_value = chk_attribute('resource_value', rule_data, 'rule_data') + chk_issubclass('rule_data.resource_value', rule_resource_value, dict) + + rule_key_unique = "" + + if "table" == rule_resource_key: + table_name = parse_resource_string_from_json(rule_resource_value, "table-name") + assert table_name, "Invalid table name in rule" + rule_key_unique = '/{0}s/{0}/{1}[{2}]'.format(rule_resource_key, table_name, rule_cnt) + else: + msg = f"Parsed an invalid key {rule_resource_key}" + LOGGER.error(msg) + raise Exception(msg) + + assert rule_key_unique, "Invalid unique resource key" + return rule_key_unique, rule_resource_value + except: # pylint: disable=bare-except + LOGGER.error('Problem composing rule({:s})'.format(str(rule_data))) + return None diff --git a/src/device/service/drivers/p4/p4_context.py b/src/device/service/drivers/p4/p4_context.py index c964a866963ad53c90cd853ba8c9422e4d484d0e..ce8e308e8b2f55aa37c7cf06b6a56fdf7dc3bd7f 100644 --- a/src/device/service/drivers/p4/p4_context.py +++ b/src/device/service/drivers/p4/p4_context.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -34,6 +34,7 @@ class P4Type(enum.Enum): meter = 6 direct_meter = 7 controller_packet_metadata = 8 + digest = 9 P4Type.table.p4info_name = "tables" @@ -44,6 +45,7 @@ P4Type.direct_counter.p4info_name = "direct_counters" P4Type.meter.p4info_name = "meters" P4Type.direct_meter.p4info_name = "direct_meters" P4Type.controller_packet_metadata.p4info_name = "controller_packet_metadata" +P4Type.digest.p4info_name = "digests" for object_type in P4Type: object_type.pretty_name = object_type.name.replace('_', ' ') @@ -58,11 +60,12 @@ class P4RuntimeEntity(enum.Enum): table_entry = 1 action_profile_member = 2 action_profile_group = 3 - meter_entry = 4 - direct_meter_entry = 5 - counter_entry = 6 - direct_counter_entry = 7 + counter_entry = 4 + direct_counter_entry = 5 + meter_entry = 6 + direct_meter_entry = 7 packet_replication_engine_entry = 8 + digest_entry = 9 class Context: diff --git a/src/device/service/drivers/p4/p4_driver.py b/src/device/service/drivers/p4/p4_driver.py index dbee6cf2fe17eaa243c327448de263861356b0f0..c89a42baddaf45737ebfcf26a665f0a6beb8544f 100644 --- a/src/device/service/drivers/p4/p4_driver.py +++ b/src/device/service/drivers/p4/p4_driver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -23,15 +23,19 @@ import threading from typing import Any, Iterator, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.type_checkers.Checkers import chk_type, chk_length, chk_string +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_RULES from .p4_common import matches_ipv4, matches_ipv6, valid_port,\ - P4_ATTR_DEV_ID, P4_ATTR_DEV_NAME, P4_ATTR_DEV_VENDOR,\ - P4_ATTR_DEV_HW_VER, P4_ATTR_DEV_SW_VER,\ + compose_resource_endpoints, parse_resource_string_from_json,\ + P4_ATTR_DEV_ID, P4_ATTR_DEV_NAME, P4_ATTR_DEV_ENDPOINTS,\ + P4_ATTR_DEV_VENDOR, P4_ATTR_DEV_HW_VER, P4_ATTR_DEV_SW_VER,\ P4_ATTR_DEV_P4BIN, P4_ATTR_DEV_P4INFO, P4_ATTR_DEV_TIMEOUT,\ P4_VAL_DEF_VENDOR, P4_VAL_DEF_HW_VER, P4_VAL_DEF_SW_VER,\ P4_VAL_DEF_TIMEOUT -from .p4_manager import P4Manager, KEY_TABLE, KEY_ACTION, \ - KEY_ACTION_PROFILE, KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER,\ - KEY_CTL_PKT_METADATA +from .p4_manager import P4Manager, \ + KEY_TABLE, KEY_ACTION, KEY_ACTION_PROFILE, \ + KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER,\ + KEY_CTL_PKT_METADATA, KEY_DIGEST, KEY_CLONE_SESSION,\ + KEY_ENDPOINT from .p4_client import WriteOperation try: @@ -59,6 +63,8 @@ class P4Driver(_Driver): P4 device datapath ID (Mandatory) name : str P4 device name (Optional) + endpoints : list + List of P4 device endpoints, i.e., ports (Optional) vendor : str P4 device vendor (Optional) hw_ver : str @@ -70,17 +76,22 @@ class P4Driver(_Driver): p4info : str Path to P4 info file (Optional, but must be combined with p4bin) timeout : int - Device timeout in seconds (Optional) + P4 device timeout in seconds (Optional) + rules : list + List of rules to configure the P4 device's pipeline """ def __init__(self, address: str, port: int, **settings) -> None: - super().__init__(settings.pop('name', DRIVER_NAME), address, port, **settings) + super().__init__(name=DRIVER_NAME, address=address, port=port, setting=settings) self.__manager = None self.__address = address self.__port = int(port) - self.__endpoint = None + self.__grpc_endpoint = None self.__settings = settings self.__id = None + self.__name = None + self.__endpoints = [] + self.__rules = {} self.__vendor = P4_VAL_DEF_VENDOR self.__hw_version = P4_VAL_DEF_HW_VER self.__sw_version = P4_VAL_DEF_SW_VER @@ -97,7 +108,7 @@ class P4Driver(_Driver): self.__address, self.__port) for key, value in settings.items(): - LOGGER.info("\t%8s = %s", key, value) + LOGGER.info("\t%9s = %s", key, value) def Connect(self) -> bool: """ @@ -105,14 +116,14 @@ class P4Driver(_Driver): :return: boolean connection status. """ - LOGGER.info("Connecting to P4 device %s ...", self.__endpoint) + LOGGER.info("Connecting to P4 device %s ...", self.__grpc_endpoint) with self.__lock: # Skip if already connected if self.__started.is_set(): return True - # Dynamically devise an election ID + # TODO: Dynamically devise an election ID election_id = (1, 0) # Spawn a P4 manager for this device @@ -140,7 +151,7 @@ class P4Driver(_Driver): :return: boolean disconnection status. """ - LOGGER.info("Disconnecting from P4 device %s ...", self.__endpoint) + LOGGER.info("Disconnecting from P4 device %s ...", self.__grpc_endpoint) # If not started, assume it is already disconnected if not self.__started.is_set(): @@ -167,13 +178,15 @@ class P4Driver(_Driver): :return: list of initial configuration items. """ - initial_conf = [] + + resource_keys = [RESOURCE_ENDPOINTS] if self.__endpoints else [] with self.__lock: - if not initial_conf: - LOGGER.warning("No initial configuration for P4 device %s ...", - self.__endpoint) - return [] + if not resource_keys: + LOGGER.warning("No initial configuration for P4 device {} ...".format(self.__grpc_endpoint)) + return [] + LOGGER.info("Initial configuration for P4 device {}:".format(self.__grpc_endpoint)) + return self.GetConfig(resource_keys) @metered_subclass_method(METRICS_POOL) def GetConfig(self, resource_keys: List[str] = [])\ @@ -186,7 +199,7 @@ class P4Driver(_Driver): None/Exception. """ LOGGER.info( - "Getting configuration from P4 device %s ...", self.__endpoint) + "Getting configuration from P4 device %s ...", self.__grpc_endpoint) # No resource keys means fetch all configuration if len(resource_keys) == 0: @@ -195,7 +208,7 @@ class P4Driver(_Driver): "implies getting all resource keys!") resource_keys = [ obj_name for obj_name, _ in self.__manager.p4_objects.items() - ] + ] + [RESOURCE_ENDPOINTS] + [RESOURCE_RULES] # Verify the input type chk_type("resources", resource_keys, list) @@ -214,7 +227,7 @@ class P4Driver(_Driver): changes requested. """ LOGGER.info( - "Setting configuration to P4 device %s ...", self.__endpoint) + "Setting configuration to P4 device %s ...", self.__grpc_endpoint) if not resources or len(resources) == 0: LOGGER.warning( @@ -238,7 +251,7 @@ class P4Driver(_Driver): deletions requested. """ LOGGER.info( - "Deleting configuration from P4 device %s ...", self.__endpoint) + "Deleting configuration from P4 device %s ...", self.__grpc_endpoint) if not resources or len(resources) == 0: LOGGER.warning( @@ -308,6 +321,14 @@ class P4Driver(_Driver): """ return self.__manager + def is_started(self): + """ + Check if an instance of the P4 manager is started. + + :return: boolean P4 manager instance status + """ + return self.__started.is_set() + def __parse_and_validate_settings(self): """ Verify that the driver inputs comply to what is expected. @@ -319,7 +340,7 @@ class P4Driver(_Driver): f"{self.__address} not a valid IPv4 or IPv6 address" assert valid_port(self.__port), \ f"{self.__port} not a valid transport port" - self.__endpoint = f"{self.__address}:{self.__port}" + self.__grpc_endpoint = f"{self.__address}:{self.__port}" # Device ID try: @@ -337,6 +358,16 @@ class P4Driver(_Driver): "No device name is provided. Setting default name: %s", self.__name) + # Device endpoints + if P4_ATTR_DEV_ENDPOINTS in self.__settings: + endpoints = self.__settings.get(P4_ATTR_DEV_ENDPOINTS, []) + endpoint_resources = compose_resource_endpoints(endpoints) + if endpoint_resources: + LOGGER.info("Setting endpoints: {}".format(endpoint_resources)) + self.SetConfig(endpoint_resources) + else: + LOGGER.warning("No device endpoints are provided.") + # Device vendor if P4_ATTR_DEV_VENDOR in self.__settings: self.__vendor = self.__settings.get(P4_ATTR_DEV_VENDOR) @@ -365,7 +396,7 @@ class P4Driver(_Driver): if P4_ATTR_DEV_P4BIN in self.__settings: self.__p4bin_path = self.__settings.get(P4_ATTR_DEV_P4BIN) assert os.path.exists(self.__p4bin_path),\ - "Invalid path to p4bin file" + "Invalid path to p4bin file: {}".format(self.__p4bin_path) assert P4_ATTR_DEV_P4INFO in self.__settings,\ "p4info and p4bin settings must be provided together" @@ -373,7 +404,7 @@ class P4Driver(_Driver): if P4_ATTR_DEV_P4INFO in self.__settings: self.__p4info_path = self.__settings.get(P4_ATTR_DEV_P4INFO) assert os.path.exists(self.__p4info_path),\ - "Invalid path to p4info file" + "Invalid path to p4info file: {}".format(self.__p4info_path) assert P4_ATTR_DEV_P4BIN in self.__settings,\ "p4info and p4bin settings must be provided together" @@ -404,7 +435,7 @@ class P4Driver(_Driver): """ resources = [] - LOGGER.debug("GetConfig() -> Keys: %s", resource_keys) + LOGGER.info("GetConfig() -> Keys: {}".format(resource_keys)) for resource_key in resource_keys: entries = [] @@ -423,8 +454,7 @@ class P4Driver(_Driver): entries.append(c_entries) elif KEY_DIR_COUNTER == resource_key: for d_cnt_name in self.__manager.get_direct_counter_names(): - dc_entries = \ - self.__manager.direct_counter_entries_to_json( + dc_entries = self.__manager.direct_counter_entries_to_json( d_cnt_name) if dc_entries: entries.append(dc_entries) @@ -436,28 +466,35 @@ class P4Driver(_Driver): entries.append(m_entries) elif KEY_DIR_METER == resource_key: for d_meter_name in self.__manager.get_direct_meter_names(): - dm_entries = \ - self.__manager.direct_meter_entries_to_json( + dm_entries = self.__manager.direct_meter_entries_to_json( d_meter_name) if dm_entries: entries.append(dm_entries) elif KEY_ACTION_PROFILE == resource_key: for ap_name in self.__manager.get_action_profile_names(): - ap_entries = \ - self.__manager.action_prof_member_entries_to_json( + ap_entries = self.__manager.action_prof_member_entries_to_json( ap_name) if ap_entries: entries.append(ap_entries) elif KEY_ACTION == resource_key: - #To be implemented or deprecated - pass - elif '__endpoints__' == resource_key: - #Not Supported for P4 devices + # To be implemented or deprecated pass elif KEY_CTL_PKT_METADATA == resource_key: + #TODO: Handle controller packet metadata msg = f"{resource_key.capitalize()} is not a " \ f"retrievable resource" - raise Exception(msg) + LOGGER.warning("%s", msg) + elif KEY_DIGEST == resource_key: + #TODO: Handle digests + msg = f"{resource_key.capitalize()} is not a " \ + f"retrievable resource" + LOGGER.warning("%s", msg) + elif RESOURCE_ENDPOINTS == resource_key: + resources += self.__endpoints + continue + elif RESOURCE_RULES == resource_key: + resources = self.__rules_into_resources() + continue else: msg = f"GetConfig failed due to invalid " \ f"resource key: {resource_key}" @@ -465,8 +502,10 @@ class P4Driver(_Driver): resources.append( (resource_key, entries if entries else None) ) - except Exception as ex: # pylint: disable=broad-except - resources.append((resource_key, ex)) + except Exception as e: # pylint: disable=broad-except + resources.append((resource_key, e)) + + LOGGER.info("GetConfig() -> Results: %s", resources) return resources @@ -480,6 +519,8 @@ class P4Driver(_Driver): """ results = [] + LOGGER.info("SetConfig -> Resources {}".format(resources)) + for i, resource in enumerate(resources): str_resource_name = f"resources[#{i}]" resource_key = "" @@ -499,11 +540,15 @@ class P4Driver(_Driver): continue try: - resource_value = json.loads(resource_value) - except Exception: # pylint: disable=broad-except - pass + # Rules are JSON-based, endpoints are not + if "endpoint" not in resource_key: + resource_value = json.loads(resource_value) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception("Exception validating resource value {}".format(resource_value)) + results.append(e) + continue - LOGGER.debug( + LOGGER.info( "SetConfig() -> Key: %s - Value: %s", resource_key, resource_value) @@ -512,13 +557,22 @@ class P4Driver(_Driver): # to be inserted already exists, thus simply needs an update. operation = WriteOperation.insert + # Dataplane and cache rule insertion process try: - self.__apply_operation(resource_key, resource_value, operation) - results.append(True) - except Exception as ex: # pylint: disable=broad-except - results.append(ex) + r2, r3 = False, True + r1 = self.__cache_rule_insert(resource_key, resource_value, operation) + # Cache insertion succeeded, proceed to dataplane + if r1: + r2 = self.__apply_operation(resource_key, resource_value, operation) + # Dataplane insertion did not succeed --> Revert caching + if not r2 and r1: + r3 = self.__cache_rule_remove(resource_key) + results.append(r1 & r2 & r3) + except Exception as e: # pylint: disable=broad-except + results.append(e) + continue - print(results) + LOGGER.info("SetConfig() -> Results: {}".format(results)) return results @@ -552,21 +606,31 @@ class P4Driver(_Driver): try: resource_value = json.loads(resource_value) - except Exception: # pylint: disable=broad-except - pass + except Exception as e: # pylint: disable=broad-except + results.append(e) + continue - LOGGER.debug("DeleteConfig() -> Key: %s - Value: %s", + LOGGER.info("DeleteConfig() -> Key: %s - Value: %s", resource_key, resource_value) operation = WriteOperation.delete + # Dataplane and cache rule removal process try: - self.__apply_operation(resource_key, resource_value, operation) - results.append(True) - except Exception as ex: # pylint: disable=broad-except - results.append(ex) + r2, r3 = False, True + r1 = self.__cache_rule_remove(resource_key) + # Cache removal succeeded, proceed to dataplane + if r1: + r2 = self.__apply_operation(resource_key, resource_value, operation) + # Dataplane removal did not succeed --> Revert caching + if not r2 and r1: + r3 = self.__cache_rule_insert(resource_key, resource_value, WriteOperation.insert) + results.append(r1 & r2 & r3) + except Exception as e: # pylint: disable=broad-except + results.append(e) + continue - print(results) + LOGGER.info("DeleteConfig() -> Results: {}".format(results)) return results @@ -583,35 +647,85 @@ class P4Driver(_Driver): """ # Apply settings to the various tables - if KEY_TABLE == resource_key: + if KEY_TABLE in resource_key: self.__manager.table_entry_operation_from_json( resource_value, operation) - elif KEY_COUNTER == resource_key: + elif KEY_COUNTER in resource_key: self.__manager.counter_entry_operation_from_json( resource_value, operation) - elif KEY_DIR_COUNTER == resource_key: + elif KEY_DIR_COUNTER in resource_key: self.__manager.direct_counter_entry_operation_from_json( resource_value, operation) - elif KEY_METER == resource_key: + elif KEY_METER in resource_key: self.__manager.meter_entry_operation_from_json( resource_value, operation) - elif KEY_DIR_METER == resource_key: + elif KEY_DIR_METER in resource_key: self.__manager.direct_meter_entry_operation_from_json( resource_value, operation) - elif KEY_ACTION_PROFILE == resource_key: + elif KEY_ACTION_PROFILE in resource_key: self.__manager.action_prof_member_entry_operation_from_json( resource_value, operation) self.__manager.action_prof_group_entry_operation_from_json( resource_value, operation) - elif KEY_CTL_PKT_METADATA == resource_key: + elif KEY_CLONE_SESSION in resource_key: + self.__manager.clone_session_entry_operation_from_json( + resource_value, operation) + elif KEY_CTL_PKT_METADATA in resource_key: msg = f"{resource_key.capitalize()} is not a " \ f"configurable resource" raise Exception(msg) + elif KEY_DIGEST in resource_key: + msg = f"{resource_key.capitalize()} is not a " \ + f"configurable resource" + raise Exception(msg) + elif KEY_ENDPOINT in resource_key: + self.__endpoints.append((resource_key, resource_value)) else: msg = f"{operation} on invalid key {resource_key}" LOGGER.error(msg) raise Exception(msg) - LOGGER.debug("%s operation: %s", resource_key.capitalize(), operation) + return True + + def __cache_rule_insert(self, resource_key, resource_value, operation): + """ + Insert a new rule into the rule cache or update an existing one. + + :param resource_key: P4 resource key + :param resource_value: P4 resource value in JSON format + :param operation: write operation (i.e., insert, update) to apply + :return: True if new rule is inserted or existing is updated, otherwise False + """ + if (resource_key in self.__rules.keys()) and (operation == WriteOperation.insert): + LOGGER.error("Attempting to insert an existing rule key: {}".format(resource_key)) + return False + elif (resource_key not in self.__rules.keys()) and (operation == WriteOperation.update): + LOGGER.error("Attempting to update a non-existing rule key: {}".format(resource_key)) + return False + elif (resource_key in self.__rules.keys()) and (operation == WriteOperation.update): + LOGGER.warning("Updating an existing rule key: {}".format(resource_key)) + self.__rules[resource_key] = resource_value + return True + + def __cache_rule_remove(self, resource_key): + """ + Remove an existing rule from the rule cache. + :param resource_key: P4 resource key + :return: True if existing rule is removed, otherwise False + """ + if resource_key not in self.__rules.keys(): + LOGGER.error("Attempting to remove a non-existing rule key: {}".format(resource_key)) + return False + self.__rules.pop(resource_key) return True + + def __rules_into_resources(self): + """ + Transform rules from the driver's rule map into + resources exposed through the SBI API. + """ + resource_list = [] + for rule_key, rule_val in self.__rules.items(): + resource_list.append((rule_key, rule_val)) + return resource_list diff --git a/src/device/service/drivers/p4/p4_exception.py b/src/device/service/drivers/p4/p4_exception.py index 69e5e7b9ededbf32fe94eefd8ca014c7b616c70d..3fc6c83da5b3a48c62f1d7ddf369bbb5b95b95f7 100644 --- a/src/device/service/drivers/p4/p4_exception.py +++ b/src/device/service/drivers/p4/p4_exception.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/p4/p4_global_options.py b/src/device/service/drivers/p4/p4_global_options.py index 640c8ffa9f7812f0d4c686aad41d628ce18b748c..f214811715aa899764dc94e77bd468fdec942fbb 100644 --- a/src/device/service/drivers/p4/p4_global_options.py +++ b/src/device/service/drivers/p4/p4_global_options.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/p4/p4_manager.py b/src/device/service/drivers/p4/p4_manager.py index 7786a4ea21e3cc118e3af9cb0f284d2745081c85..210422ed8de2559b56fa22da4e36f154b7d03b99 100644 --- a/src/device/service/drivers/p4/p4_manager.py +++ b/src/device/service/drivers/p4/p4_manager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -35,7 +35,8 @@ try: from .p4_common import encode,\ parse_resource_string_from_json, parse_resource_integer_from_json,\ parse_resource_bytes_from_json, parse_match_operations_from_json,\ - parse_action_parameters_from_json, parse_integer_list_from_json + parse_action_parameters_from_json, parse_integer_list_from_json,\ + parse_replicas_from_json from .p4_exception import UserError, InvalidP4InfoError except ImportError: from p4_client import P4RuntimeClient, P4RuntimeException,\ @@ -58,6 +59,7 @@ CONTEXT = Context() CLIENTS = {} # Constant P4 entities +KEYS_P4 = [] KEY_TABLE = "table" KEY_ACTION = "action" KEY_ACTION_PROFILE = "action_profile" @@ -66,6 +68,11 @@ KEY_DIR_COUNTER = "direct_counter" KEY_METER = "meter" KEY_DIR_METER = "direct_meter" KEY_CTL_PKT_METADATA = "controller_packet_metadata" +KEY_DIGEST = "digest" + +# Extra resource keys +KEY_CLONE_SESSION = "clone_session" +KEY_ENDPOINT = "endpoint" def get_context(): @@ -83,19 +90,20 @@ def get_table_type(table): :param table: P4 table :return: P4 table type """ - for m_f in table.match_fields: - if m_f.match_type == p4info_pb2.MatchField.EXACT: - return p4info_pb2.MatchField.EXACT - if m_f.match_type == p4info_pb2.MatchField.LPM: - return p4info_pb2.MatchField.LPM - if m_f.match_type == p4info_pb2.MatchField.TERNARY: - return p4info_pb2.MatchField.TERNARY - if m_f.match_type == p4info_pb2.MatchField.RANGE: - return p4info_pb2.MatchField.RANGE - if m_f.match_type == p4info_pb2.MatchField.OPTIONAL: - return p4info_pb2.MatchField.OPTIONAL - return None + is_ternary = False + for m_f in table.match_fields: + # LPM and range are special forms of ternary + if m_f.match_type in [ + p4info_pb2.MatchField.TERNARY, + p4info_pb2.MatchField.LPM, + p4info_pb2.MatchField.RANGE + ]: + is_ternary = True + + if is_ternary: + return p4info_pb2.MatchField.TERNARY + return p4info_pb2.MatchField.EXACT def match_type_to_str(match_type): """ @@ -132,12 +140,12 @@ class P4Manager: self.__id = device_id self.__ip_address = ip_address self.__port = int(port) - self.__endpoint = f"{self.__ip_address}:{self.__port}" + self.__grpc_endpoint = f"{self.__ip_address}:{self.__port}" self.key_id = ip_address+str(port) CLIENTS[self.key_id] = P4RuntimeClient( - self.__id, self.__endpoint, election_id, role_name, ssl_options) + self.__id, self.__grpc_endpoint, election_id, role_name, ssl_options) self.__p4info = None - + self.local_client = CLIENTS[self.key_id] # Internal memory for whitebox management @@ -146,14 +154,14 @@ class P4Manager: # | -> P4 entities self.table_entries = {} + self.action_profile_members = {} + self.action_profile_groups = {} self.counter_entries = {} self.direct_counter_entries = {} self.meter_entries = {} self.direct_meter_entries = {} - self.multicast_groups = {} self.clone_session_entries = {} - self.action_profile_members = {} - self.action_profile_groups = {} + self.multicast_groups = {} def start(self, p4bin_path, p4info_path): """ @@ -234,7 +242,7 @@ class P4Manager: self.__id = None self.__ip_address = None self.__port = None - self.__endpoint = None + self.__grpc_endpoint = None self.__clear_state() def __clear_state(self): @@ -244,14 +252,14 @@ class P4Manager: :return: void """ self.table_entries.clear() + self.action_profile_members.clear() + self.action_profile_groups.clear() self.counter_entries.clear() self.direct_counter_entries.clear() self.meter_entries.clear() self.direct_meter_entries.clear() - self.multicast_groups.clear() self.clone_session_entries.clear() - self.action_profile_members.clear() - self.action_profile_groups.clear() + self.multicast_groups.clear() self.p4_objects.clear() def __init_objects(self): @@ -264,7 +272,7 @@ class P4Manager: global KEY_TABLE, KEY_ACTION, KEY_ACTION_PROFILE, \ KEY_COUNTER, KEY_DIR_COUNTER, \ KEY_METER, KEY_DIR_METER, \ - KEY_CTL_PKT_METADATA + KEY_CTL_PKT_METADATA, KEY_DIGEST, KEYS_P4 KEY_TABLE = P4Type.table.name KEY_ACTION = P4Type.action.name @@ -274,12 +282,15 @@ class P4Manager: KEY_METER = P4Type.meter.name KEY_DIR_METER = P4Type.direct_meter.name KEY_CTL_PKT_METADATA = P4Type.controller_packet_metadata.name - assert (k for k in [ + KEY_DIGEST = P4Type.digest.name + + KEYS_P4 = [ KEY_TABLE, KEY_ACTION, KEY_ACTION_PROFILE, KEY_COUNTER, KEY_DIR_COUNTER, KEY_METER, KEY_DIR_METER, - KEY_CTL_PKT_METADATA - ]) + KEY_CTL_PKT_METADATA, KEY_DIGEST + ] + assert (k for k in KEYS_P4) if not self.p4_objects: LOGGER.warning( @@ -292,6 +303,11 @@ class P4Manager: for table in self.p4_objects[KEY_TABLE]: self.table_entries[table.name] = [] + if KEY_ACTION_PROFILE in self.p4_objects: + for act_prof in self.p4_objects[KEY_ACTION_PROFILE]: + self.action_profile_members[act_prof.name] = [] + self.action_profile_groups[act_prof.name] = [] + if KEY_COUNTER in self.p4_objects: for cnt in self.p4_objects[KEY_COUNTER]: self.counter_entries[cnt.name] = [] @@ -308,11 +324,6 @@ class P4Manager: for d_meter in self.p4_objects[KEY_DIR_METER]: self.direct_meter_entries[d_meter.name] = [] - if KEY_ACTION_PROFILE in self.p4_objects: - for act_prof in self.p4_objects[KEY_ACTION_PROFILE]: - self.action_profile_members[act_prof.name] = [] - self.action_profile_groups[act_prof.name] = [] - def __discover_objects(self): """ Discover and store all P4 objects. @@ -509,6 +520,20 @@ class P4Manager: return pkt_meta return None + def get_digest(self, digest_name): + """ + Get a digest object by name. + + :param digest_name: name of a digest object + :return: digest object or None + """ + if KEY_DIGEST not in self.p4_objects: + return None + for dg in self.p4_objects[KEY_DIGEST]: + if dg == digest_name.name: + return digest_name + return None + def get_resource_keys(self): """ Retrieve the available P4 resource keys. @@ -561,15 +586,15 @@ class P4Manager: self.table_entries[table_name] = [] try: - for count, table_entry in enumerate( - TableEntry(self.local_client, table_name)(action=action_name).read()): - LOGGER.debug( - "Table %s - Entry %d\n%s", table_name, count, table_entry) + entries = TableEntry(self.local_client, table_name).read() + assert self.local_client + for table_entry in entries: self.table_entries[table_name].append(table_entry) return self.table_entries[table_name] except P4RuntimeException as ex: - LOGGER.error(ex) - return [] + LOGGER.error("Failed to get table %s entries: %s", + table_name, str(ex)) + return [] def table_entries_to_json(self, table_name): """ @@ -634,10 +659,14 @@ class P4Manager: :return: number of P4 table entries or negative integer upon missing table """ - entries = self.get_table_entries(table_name, action_name) - if entries is None: - return -1 - return len(entries) + count = 0 + try: + entries = TableEntry(self.local_client, table_name).read() + count = sum(1 for _ in entries) + except Exception as e: # pylint: disable=broad-except + LOGGER.error("Failed to read entries of table: %s", table_name) + + return count def count_table_entries_all(self): """ @@ -675,7 +704,7 @@ class P4Manager: metadata = parse_resource_bytes_from_json(json_resource, "metadata") if operation in [WriteOperation.insert, WriteOperation.update]: - LOGGER.debug("Table entry to insert/update: %s", json_resource) + LOGGER.info("Table entry to insert/update: %s", json_resource) return self.insert_table_entry( table_name=table_name, match_map=match_map, @@ -685,7 +714,7 @@ class P4Manager: metadata=metadata if metadata else None ) if operation == WriteOperation.delete: - LOGGER.debug("Table entry to delete: %s", json_resource) + LOGGER.info("Table entry to delete: %s", json_resource) return self.delete_table_entry( table_name=table_name, match_map=match_map, @@ -700,7 +729,7 @@ class P4Manager: cnt_pkt=-1, cnt_byte=-1): """ Insert an entry into an exact match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -712,45 +741,45 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + table_entry = TableEntry(self.local_client, table_name)(action=action_name) - + for match_k, match_v in match_map.items(): table_entry.match[match_k] = match_v - + for action_k, action_v in action_params.items(): table_entry.action[action_k] = action_v - + if metadata: table_entry.metadata = metadata - + if cnt_pkt > 0: table_entry.counter_data.packet_count = cnt_pkt - + if cnt_byte > 0: table_entry.counter_data.byte_count = cnt_byte - + ex_msg = "" try: table_entry.insert() LOGGER.info("Inserted exact table entry: %s", table_entry) except (P4RuntimeException, P4RuntimeWriteException) as ex: - raise P4RuntimeException from ex - + ex_msg = str(ex) + LOGGER.warning(ex) + # Table entry exists, needs to be modified if "ALREADY_EXISTS" in ex_msg: table_entry.modify() LOGGER.info("Updated exact table entry: %s", table_entry) - + return table_entry - - + def insert_table_entry_ternary(self, table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt=-1, cnt_byte=-1): """ Insert an entry into a ternary match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -763,47 +792,47 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + table_entry = TableEntry(self.local_client, table_name)(action=action_name) - + for match_k, match_v in match_map.items(): table_entry.match[match_k] = match_v - + for action_k, action_v in action_params.items(): table_entry.action[action_k] = action_v - + table_entry.priority = priority - + if metadata: table_entry.metadata = metadata - + if cnt_pkt > 0: table_entry.counter_data.packet_count = cnt_pkt - + if cnt_byte > 0: table_entry.counter_data.byte_count = cnt_byte - + ex_msg = "" try: table_entry.insert() LOGGER.info("Inserted ternary table entry: %s", table_entry) except (P4RuntimeException, P4RuntimeWriteException) as ex: - raise P4RuntimeException from ex - + ex_msg = str(ex) + LOGGER.error(ex) + # Table entry exists, needs to be modified if "ALREADY_EXISTS" in ex_msg: table_entry.modify() LOGGER.info("Updated ternary table entry: %s", table_entry) - + return table_entry - - + def insert_table_entry_range(self, table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt=-1, cnt_byte=-1): # pylint: disable=unused-argument """ Insert an entry into a range match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -816,17 +845,16 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + raise NotImplementedError( "Range-based table insertion not implemented yet") - - + def insert_table_entry_optional(self, table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt=-1, cnt_byte=-1): # pylint: disable=unused-argument """ Insert an entry into an optional match table. - + :param table_name: P4 table name :param match_map: Map of match operations :param action_name: Action name @@ -839,7 +867,7 @@ class P4Manager: """ assert match_map, "Table entry without match operations is not accepted" assert action_name, "Table entry without action is not accepted" - + raise NotImplementedError( "Optional-based table insertion not implemented yet") @@ -869,32 +897,36 @@ class P4Manager: assert table, \ "P4 pipeline does not implement table " + table_name - if not get_table_type(table): + table_type = get_table_type(table) + + if not table_type: msg = f"Table {table_name} is undefined, cannot insert entry" LOGGER.error(msg) raise UserError(msg) + LOGGER.debug("Table {}: {}".format(table_name, match_type_to_str(table_type))) + # Exact match is supported - if get_table_type(table) == p4info_pb2.MatchField.EXACT: + if table_type == p4info_pb2.MatchField.EXACT: return self.insert_table_entry_exact( table_name, match_map, action_name, action_params, metadata, cnt_pkt, cnt_byte) # Ternary and LPM matches are supported - if get_table_type(table) in \ + if table_type in \ [p4info_pb2.MatchField.TERNARY, p4info_pb2.MatchField.LPM]: return self.insert_table_entry_ternary( table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt, cnt_byte) # TODO: Cover RANGE match # pylint: disable=W0511 - if get_table_type(table) == p4info_pb2.MatchField.RANGE: + if table_type == p4info_pb2.MatchField.RANGE: return self.insert_table_entry_range( table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt, cnt_byte) # TODO: Cover OPTIONAL match # pylint: disable=W0511 - if get_table_type(table) == p4info_pb2.MatchField.OPTIONAL: + if table_type == p4info_pb2.MatchField.OPTIONAL: return self.insert_table_entry_optional( table_name, match_map, action_name, action_params, metadata, priority, cnt_pkt, cnt_byte) @@ -917,7 +949,9 @@ class P4Manager: assert table, \ "P4 pipeline does not implement table " + table_name - if not get_table_type(table): + table_type = get_table_type(table) + + if not table_type: msg = f"Table {table_name} is undefined, cannot delete entry" LOGGER.error(msg) raise UserError(msg) @@ -930,7 +964,7 @@ class P4Manager: for action_k, action_v in action_params.items(): table_entry.action[action_k] = action_v - if get_table_type(table) in \ + if table_type in \ [p4info_pb2.MatchField.TERNARY, p4info_pb2.MatchField.LPM]: if priority == 0: msg = f"Table {table_name} is ternary, priority must be != 0" @@ -938,15 +972,25 @@ class P4Manager: raise UserError(msg) # TODO: Ensure correctness of RANGE & OPTIONAL # pylint: disable=W0511 - if get_table_type(table) in \ + if table_type in \ [p4info_pb2.MatchField.RANGE, p4info_pb2.MatchField.OPTIONAL]: raise NotImplementedError( "Range and optional-based table deletion not implemented yet") table_entry.priority = priority - table_entry.delete() - LOGGER.info("Deleted entry %s from table: %s", table_entry, table_name) + ex_msg = "" + try: + table_entry.delete() + LOGGER.info("Deleted entry %s from table: %s", table_entry, table_name) + except (P4RuntimeException, P4RuntimeWriteException) as ex: + ex_msg = str(ex) + LOGGER.warning(ex) + + # Table entry exists, needs to be modified + if "NOT_FOUND" in ex_msg: + # TODO: No way to discriminate between a modified entry and an actual table miss + LOGGER.warning("Table entry was initially modified, thus cannot be removed: %s", table_entry) return table_entry @@ -1172,7 +1216,8 @@ class P4Manager: self.counter_entries[cnt_name].append(cnt_entry) return self.counter_entries[cnt_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get counter %s entries: %s", + cnt_name, str(ex)) return [] def counter_entries_to_json(self, cnt_name): @@ -1620,7 +1665,8 @@ class P4Manager: self.meter_entries[meter_name].append(meter_entry) return self.meter_entries[meter_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get meter %s entries: %s", + meter_name, str(ex)) return [] def meter_entries_to_json(self, meter_name): @@ -1852,7 +1898,8 @@ class P4Manager: self.direct_meter_entries[d_meter_name].append(d_meter_entry) return self.direct_meter_entries[d_meter_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get direct meter %s entries: %s", + d_meter_name, str(ex)) return [] def direct_meter_entries_to_json(self, d_meter_name): @@ -2094,7 +2141,8 @@ class P4Manager: self.action_profile_members[ap_name].append(ap_entry) return self.action_profile_members[ap_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get action profile member %s entries: %s", + ap_name, str(ex)) return [] def action_prof_member_entries_to_json(self, ap_name): @@ -2357,7 +2405,8 @@ class P4Manager: self.action_profile_groups[ap_name].append(ap_entry) return self.action_profile_groups[ap_name] except P4RuntimeException as ex: - LOGGER.error(ex) + LOGGER.error("Failed to get action profile group %s entries: %s", + ap_name, str(ex)) return [] def count_action_prof_group_entries(self, ap_name): @@ -2880,14 +2929,13 @@ class P4Manager: json_resource, "session-id") if operation in [WriteOperation.insert, WriteOperation.update]: - ports = parse_integer_list_from_json( - json_resource, "ports", "port") + replicas = parse_replicas_from_json(json_resource) LOGGER.debug( "Clone session entry to insert/update: %s", json_resource) return self.insert_clone_session_entry( session_id=session_id, - ports=ports + replicas=replicas ) if operation == WriteOperation.delete: LOGGER.debug( @@ -2897,22 +2945,24 @@ class P4Manager: ) return None - def insert_clone_session_entry(self, session_id, ports): + def insert_clone_session_entry(self, session_id, replicas): """ Insert a new clone session. :param session_id: id of a clone session - :param ports: list of egress ports to clone session + :param replicas: list of egress ports to clone session :return: inserted clone session """ assert session_id > 0, \ "Clone session " + session_id + " must be > 0" - assert ports, \ - "No clone session ports are provided" + assert replicas, \ + "No clone session replicas are provided" + assert isinstance(replicas, dict), \ + "Clone session replicas must be a dictionary" session = CloneSessionEntry(self.local_client, session_id) - for p in ports: - session.add(p, 1) + for eg_port,instance in replicas.items(): + session.add(eg_port, instance) ex_msg = "" try: @@ -2943,12 +2993,15 @@ class P4Manager: "Clone session " + session_id + " must be > 0" session = CloneSessionEntry(self.local_client, session_id) - session.delete() + + try: + session.delete() + LOGGER.info("Deleted clone session %d", session_id) + except (P4RuntimeException, P4RuntimeWriteException) as ex: + LOGGER.error(ex) if session_id in self.clone_session_entries: del self.clone_session_entries[session_id] - LOGGER.info( - "Deleted clone session %d", session_id) return session @@ -3786,6 +3839,7 @@ class _P4EntityBase(_EntityBase): def __init__(self, p4_client, p4_type, entity_type, p4runtime_cls, name=None, modify_only=False): super().__init__(p4_client, entity_type, p4runtime_cls, modify_only) + assert self.local_client, "No local P4 client instance" self._p4_type = p4_type if name is None: raise UserError( @@ -3815,7 +3869,7 @@ class ActionProfileMember(_P4EntityBase): """ def __init__(self, p4_client, action_profile_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.action_profile, P4RuntimeEntity.action_profile_member, p4runtime_pb2.ActionProfileMember, action_profile_name) self.member_id = 0 @@ -3981,7 +4035,7 @@ class ActionProfileGroup(_P4EntityBase): """ def __init__(self, p4_client, action_profile_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.action_profile, P4RuntimeEntity.action_profile_group, p4runtime_pb2.ActionProfileGroup, action_profile_name) self.group_id = 0 @@ -5055,7 +5109,7 @@ class CounterEntry(_CounterEntryBase): """ def __init__(self, p4_client, counter_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.counter, P4RuntimeEntity.counter_entry, p4runtime_pb2.CounterEntry, counter_name, modify_only=True) @@ -5115,11 +5169,11 @@ To write to the counter, use <self>.modify class DirectCounterEntry(_CounterEntryBase): """ Direct P4 counter entry. - """ + """ local_client = None def __init__(self, p4_client, direct_counter_name=None): - super().__init__( p4_client, + super().__init__(p4_client, P4Type.direct_counter, P4RuntimeEntity.direct_counter_entry, p4runtime_pb2.DirectCounterEntry, direct_counter_name, modify_only=True) @@ -5213,7 +5267,7 @@ class _MeterEntryBase(_P4EntityBase): """ def __init__(self, p4_client, *args, **kwargs): - super().__init__(*args, **kwargs) + super().__init__(p4_client, *args, **kwargs) self._meter_type = self._info.spec.unit self.index = -1 self.cir = -1 @@ -5910,7 +5964,7 @@ class IdleTimeoutNotification(): """ P4 idle timeout notification. """ - + local_client = None def __init__(self, p4_client): diff --git a/src/device/service/drivers/qkd/QKDDriver.py b/src/device/service/drivers/qkd/QKDDriver.py index a49144d6fc0840498c5f5f1267d1cef25cb1177a..9400460537626bdd657eef26e5426abd37b896c0 100644 --- a/src/device/service/drivers/qkd/QKDDriver.py +++ b/src/device/service/drivers/qkd/QKDDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/qkd/QKDDriver2.py b/src/device/service/drivers/qkd/QKDDriver2.py index c73a83141d92955d01a6a00912389b671fe7ef98..46bc94e12ceb87e11f02ed3a759ac4004f3bc305 100644 --- a/src/device/service/drivers/qkd/QKDDriver2.py +++ b/src/device/service/drivers/qkd/QKDDriver2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/qkd/Tools.py b/src/device/service/drivers/qkd/Tools.py index c17d01915dcdda55b36317c683fd60524c97239b..d5cb93830bed722edcf87a5059db1f3e8267dec0 100644 --- a/src/device/service/drivers/qkd/Tools.py +++ b/src/device/service/drivers/qkd/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/qkd/Tools2.py b/src/device/service/drivers/qkd/Tools2.py index c598c7443d276ea0eb76ce761d173de9944c3cfb..a80f90095a9721ced7de2028a7c5a9d3157590d0 100644 --- a/src/device/service/drivers/qkd/Tools2.py +++ b/src/device/service/drivers/qkd/Tools2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/qkd/__init__.py b/src/device/service/drivers/qkd/__init__.py index e24e5523a216f79dcec21f2ac21b2262426acc04..e8fa6e60348984663938b68dddb11e85929270d5 100644 --- a/src/device/service/drivers/qkd/__init__.py +++ b/src/device/service/drivers/qkd/__init__.py @@ -1,3 +1,17 @@ +# Copyright 2022-2024 ETSI 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. + from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES RESOURCE_LINKS = '__links__' diff --git a/src/device/service/drivers/transport_api/Tools.py b/src/device/service/drivers/transport_api/Tools.py index faa04400d5c9002d92169f49095ec58ddc6f560d..07d388be0be3426fadfe2d08897755351e79be59 100644 --- a/src/device/service/drivers/transport_api/Tools.py +++ b/src/device/service/drivers/transport_api/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/transport_api/TransportApiDriver.py b/src/device/service/drivers/transport_api/TransportApiDriver.py index f3a89064d471fc4018cce1158c0a59bd9418a18b..9496ab56cc3347de3016ca10eacbeb126bffda1b 100644 --- a/src/device/service/drivers/transport_api/TransportApiDriver.py +++ b/src/device/service/drivers/transport_api/TransportApiDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/transport_api/__init__.py b/src/device/service/drivers/transport_api/__init__.py index 4f3d1a042c69720452803e994c38f7c2e966c684..97ec0dd4209f253161cddf69344bd62933a81fd7 100644 --- a/src/device/service/drivers/transport_api/__init__.py +++ b/src/device/service/drivers/transport_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/README_XR.md b/src/device/service/drivers/xr/README_XR.md index 1255002ac1aa13cfe4c9240305431f7070333668..b353b06ff3be79016c8867452a97949ab1824fd4 100644 --- a/src/device/service/drivers/xr/README_XR.md +++ b/src/device/service/drivers/xr/README_XR.md @@ -61,7 +61,6 @@ export TFS_GRAFANA_PASSWORD="admin123+" export CRDB_NAMESPACE="crdb" export CRDB_USERNAME="tfs" export CRDB_PASSWORD="tfs123" -export CRDB_DATABASE="tfs" export CRDB_DEPLOY_MODE="single" export CRDB_DROP_DATABASE_IF_EXISTS="" export CRDB_REDEPLOY="" diff --git a/src/device/service/drivers/xr/XrDriver.py b/src/device/service/drivers/xr/XrDriver.py index fc203f0b06a3bf94edd81e2ecc9e682994b5863f..ee49bb84860e478f330ffb995cd056af745d2ba3 100644 --- a/src/device/service/drivers/xr/XrDriver.py +++ b/src/device/service/drivers/xr/XrDriver.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/__init__.py b/src/device/service/drivers/xr/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/xr/__init__.py +++ b/src/device/service/drivers/xr/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm-cli.py b/src/device/service/drivers/xr/cm-cli.py index c959eba657adbcd3e2aca4ff6839b471ee0be56e..1635b3489401eae540562566ddb140d6d99c8230 100755 --- a/src/device/service/drivers/xr/cm-cli.py +++ b/src/device/service/drivers/xr/cm-cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/__init__.py b/src/device/service/drivers/xr/cm/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/xr/cm/__init__.py +++ b/src/device/service/drivers/xr/cm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/cm_connection.py b/src/device/service/drivers/xr/cm/cm_connection.py index 4b25f80059fb86aea19687c765efb22e5bd6170e..145d074b738fcebdc933fc994145ae62beb5d88c 100644 --- a/src/device/service/drivers/xr/cm/cm_connection.py +++ b/src/device/service/drivers/xr/cm/cm_connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/connection.py b/src/device/service/drivers/xr/cm/connection.py index 8e08e1ea5d8d9010858f958be938d69f558973a6..1452dcb148595322d452ec4dbdcce5096efdd495 100644 --- a/src/device/service/drivers/xr/cm/connection.py +++ b/src/device/service/drivers/xr/cm/connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/constellation.py b/src/device/service/drivers/xr/cm/constellation.py index 74ef01afee7092788d89783ae6c5debbfce7d9d1..40b97968c3a498293debfaf84969a82de062edac 100644 --- a/src/device/service/drivers/xr/cm/constellation.py +++ b/src/device/service/drivers/xr/cm/constellation.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring, wildcard-import, unused-wildcard-import -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tests/__init__.py b/src/device/service/drivers/xr/cm/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/device/service/drivers/xr/cm/tests/__init__.py +++ b/src/device/service/drivers/xr/cm/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tests/test_cm_connection.py b/src/device/service/drivers/xr/cm/tests/test_cm_connection.py index 13c0694b20360ac7ee4dad22a5756bf960d48508..135d07c9591a4351a95a7fa6b94df05f80c2b274 100644 --- a/src/device/service/drivers/xr/cm/tests/test_cm_connection.py +++ b/src/device/service/drivers/xr/cm/tests/test_cm_connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tests/test_connection.py b/src/device/service/drivers/xr/cm/tests/test_connection.py index ad21b23392914a65fef42fbba1b8e0986e552270..d619442d26a4d3ab501efd212af6be631bad267a 100644 --- a/src/device/service/drivers/xr/cm/tests/test_connection.py +++ b/src/device/service/drivers/xr/cm/tests/test_connection.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tests/test_constellation.py b/src/device/service/drivers/xr/cm/tests/test_constellation.py index 49fa8adc4d6c08c3408b428a233f39907f92233d..139cf37fd99cdc31bc440d69c33dcf0ae5c166f8 100644 --- a/src/device/service/drivers/xr/cm/tests/test_constellation.py +++ b/src/device/service/drivers/xr/cm/tests/test_constellation.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py index f3170f95fd42fa680baade1b2d9f969ee679406a..661f43425dd3f1e6ad6937d36cb82bccafd48f8f 100644 --- a/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py +++ b/src/device/service/drivers/xr/cm/tests/test_transport_capacitity.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py b/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py index a619a9306f0894faa9447cd0eb4aea1e34c60632..642eebae49481137ab53a6f39d8bc7427c6feecd 100644 --- a/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py +++ b/src/device/service/drivers/xr/cm/tests/test_xr_service_set_config.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tf.py b/src/device/service/drivers/xr/cm/tf.py index 719075f6c774c3dff2aadd3344697d3843221c7d..c986250f2e3c991895c9c597379338ebc2aa82c8 100644 --- a/src/device/service/drivers/xr/cm/tf.py +++ b/src/device/service/drivers/xr/cm/tf.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/tf_service.py b/src/device/service/drivers/xr/cm/tf_service.py index 37e61a61868387495e0f41fad8afb284f466b1cf..dd05a01cff3f21be8a07f15b7f1d66ece93e902f 100644 --- a/src/device/service/drivers/xr/cm/tf_service.py +++ b/src/device/service/drivers/xr/cm/tf_service.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring, wildcard-import, unused-wildcard-import -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/transport_capacity.py b/src/device/service/drivers/xr/cm/transport_capacity.py index aa7e777986f850ddbe9dc99cab08abf63a0ba6cd..c4d8120956a31042a077c01795c15fc12d3fddd1 100644 --- a/src/device/service/drivers/xr/cm/transport_capacity.py +++ b/src/device/service/drivers/xr/cm/transport_capacity.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/cm/utils.py b/src/device/service/drivers/xr/cm/utils.py index b9d72b2a84472cc90e40839181359f71f0960888..0749a184387f4a84f0e0b30e0694600b1b2c93d4 100644 --- a/src/device/service/drivers/xr/cm/utils.py +++ b/src/device/service/drivers/xr/cm/utils.py @@ -1,5 +1,5 @@ #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/service-cli.py b/src/device/service/drivers/xr/service-cli.py index 9016a087d2f87b2f85806d213f94b730dcf6fbdb..234f2350a0937e0402c013d0fe84f2a0d308ad97 100755 --- a/src/device/service/drivers/xr/service-cli.py +++ b/src/device/service/drivers/xr/service-cli.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 #pylint: disable=invalid-name, missing-function-docstring, line-too-long, logging-fstring-interpolation, missing-class-docstring, missing-module-docstring -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/drivers/xr/setup_test_env.sh b/src/device/service/drivers/xr/setup_test_env.sh index 39acfece94d8d7d36b51c65fef60c34a3bdebd01..56a32bd837f4de98680316cdf62f016b8f7b6984 100755 --- a/src/device/service/drivers/xr/setup_test_env.sh +++ b/src/device/service/drivers/xr/setup_test_env.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/monitoring/MonitoringLoop.py b/src/device/service/monitoring/MonitoringLoop.py index d112f1b67a8371a568cf1f9b7f82d76b6b971ae9..849a7f48f22a947288ad2a227eebe6b4476ad633 100644 --- a/src/device/service/monitoring/MonitoringLoop.py +++ b/src/device/service/monitoring/MonitoringLoop.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/monitoring/MonitoringLoops.py b/src/device/service/monitoring/MonitoringLoops.py index 00b6e4bcc49b4218f49742614b3e4a85943f6d3c..2d7029c3c1dd53abf09828b5d255c2ef54a20c15 100644 --- a/src/device/service/monitoring/MonitoringLoops.py +++ b/src/device/service/monitoring/MonitoringLoops.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/service/monitoring/__init__.py b/src/device/service/monitoring/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/service/monitoring/__init__.py +++ b/src/device/service/monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/CommonObjects.py b/src/device/tests/CommonObjects.py index 748242c51ce04ff4f0502b9d716e23b103b3ca67..e750efe397d334c0cbc7b319c8647b45f507418f 100644 --- a/src/device/tests/CommonObjects.py +++ b/src/device/tests/CommonObjects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/Device_Emulated.py b/src/device/tests/Device_Emulated.py index 02070bea9df003aed3e699aa53f44c206042e73a..e2132a4ea094c13cc35ebf4be95664463842cda4 100644 --- a/src/device/tests/Device_Emulated.py +++ b/src/device/tests/Device_Emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/Device_Microwave_Template.py b/src/device/tests/Device_Microwave_Template.py index b9069c2cdca76c4fe13f470cc106d479b7eb8d52..ac19d9232faf3ea61231af8c528749d35a492a07 100644 --- a/src/device/tests/Device_Microwave_Template.py +++ b/src/device/tests/Device_Microwave_Template.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/Device_OpenConfig_Template.py b/src/device/tests/Device_OpenConfig_Template.py index bebf1008be113022235d79788a6d7ff21f9b2625..5f72d6c142378913aa708f8599abb1715c13a61e 100644 --- a/src/device/tests/Device_OpenConfig_Template.py +++ b/src/device/tests/Device_OpenConfig_Template.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/Device_Transport_Api_Template.py b/src/device/tests/Device_Transport_Api_Template.py index 1f762024fe88df86d69e8a2f4c370738086bb571..f189700b9e927af76a0d05dde94c062ac216cea4 100644 --- a/src/device/tests/Device_Transport_Api_Template.py +++ b/src/device/tests/Device_Transport_Api_Template.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/MockService_Dependencies.py b/src/device/tests/MockService_Dependencies.py index b91b364bf39e77a6ecb81d18883495cea01ee34c..adfa37c29bd40b428e826be9875028e656e505de 100644 --- a/src/device/tests/MockService_Dependencies.py +++ b/src/device/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/PrepareTestScenario.py b/src/device/tests/PrepareTestScenario.py index c4e951eb4bd70bed70a4fa5a819f076714e3d43f..4303722385525fbbba5f9f10e234667b241bb499 100644 --- a/src/device/tests/PrepareTestScenario.py +++ b/src/device/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/__init__.py b/src/device/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/device/tests/__init__.py +++ b/src/device/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/device_p4.py b/src/device/tests/device_p4.py index ef4f30b7f3fc629dcc5c13e6461b5cff9198c4fe..0bb4f84a46f4200d8989eebb7340e40f969b138b 100644 --- a/src/device/tests/device_p4.py +++ b/src/device/tests/device_p4.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/tests/__init__.py b/src/device/tests/gnmi_openconfig/__init__.py similarity index 87% rename from src/tests/p4/tests/__init__.py rename to src/device/tests/gnmi_openconfig/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/p4/tests/__init__.py +++ b/src/device/tests/gnmi_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/gnmi_openconfig/storage/Storage.py b/src/device/tests/gnmi_openconfig/storage/Storage.py new file mode 100644 index 0000000000000000000000000000000000000000..e42e81522483ce9c3ab5fc1b627c867529562dcd --- /dev/null +++ b/src/device/tests/gnmi_openconfig/storage/Storage.py @@ -0,0 +1,23 @@ +# Copyright 2022-2024 ETSI 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. + +from .StorageEndpoints import StorageEndpoints +from .StorageInterface import StorageInterface +from .StorageNetworkInstance import StorageNetworkInstance + +class Storage: + def __init__(self) -> None: + self.endpoints = StorageEndpoints() + self.interfaces = StorageInterface() + self.network_instances = StorageNetworkInstance() diff --git a/src/device/tests/gnmi_openconfig/storage/StorageEndpoints.py b/src/device/tests/gnmi_openconfig/storage/StorageEndpoints.py new file mode 100644 index 0000000000000000000000000000000000000000..ec8445a4d1169e6ebffa67d62e72c3fe5c5268fb --- /dev/null +++ b/src/device/tests/gnmi_openconfig/storage/StorageEndpoints.py @@ -0,0 +1,75 @@ +# Copyright 2022-2024 ETSI 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. + +import re +from typing import Dict, List, Tuple +from .Tools import compose_resources + +RE_RESKEY_ENDPOINT = re.compile(r'^\/endpoints\/endpoint\[([^\]]+)\]$') + +ENDPOINT_PACKET_SAMPLE_TYPES : Dict[int, str] = { + 101: '/openconfig-interfaces:interfaces/interface[name={:s}]/state/counters/out-pkts', + 102: '/openconfig-interfaces:interfaces/interface[name={:s}]/state/counters/in-pkts', + 201: '/openconfig-interfaces:interfaces/interface[name={:s}]/state/counters/out-octets', + 202: '/openconfig-interfaces:interfaces/interface[name={:s}]/state/counters/in-octets', +} + +class Endpoints: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/endpoints/endpoint[{:s}]', ['uuid', 'type', 'sample_types']), + ] + + def __init__(self) -> None: + self._items : Dict[str, Dict] = dict() + + def add(self, ep_uuid : str, resource_value : Dict) -> None: + item = self._items.setdefault(ep_uuid, dict()) + item['uuid'] = ep_uuid + + for _, field_names in Endpoints.STRUCT: + field_names = set(field_names) + item.update({k:v for k,v in resource_value.items() if k in field_names}) + + item['sample_types'] = { + sample_type_id : sample_type_path.format(ep_uuid) + for sample_type_id, sample_type_path in ENDPOINT_PACKET_SAMPLE_TYPES.items() + } + + def get(self, ep_uuid : str) -> Dict: + return self._items.get(ep_uuid) + + def remove(self, ep_uuid : str) -> None: + self._items.pop(ep_uuid, None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Endpoints.STRUCT) + +class StorageEndpoints: + def __init__(self) -> None: + self.endpoints = Endpoints() + + def populate(self, resources : List[Tuple[str, Dict]]) -> None: + for resource_key, resource_value in resources: + match = RE_RESKEY_ENDPOINT.match(resource_key) + if match is not None: + self.endpoints.add(match.group(1), resource_value) + continue + + MSG = 'Unhandled Resource Key: {:s} => {:s}' + raise Exception(MSG.format(str(resource_key), str(resource_value))) + + def get_expected_config(self) -> List[Tuple[str, Dict]]: + expected_config = list() + expected_config.extend(self.endpoints.compose_resources()) + return expected_config diff --git a/src/device/tests/gnmi_openconfig/storage/StorageInterface copy.py b/src/device/tests/gnmi_openconfig/storage/StorageInterface copy.py new file mode 100644 index 0000000000000000000000000000000000000000..3385ccfa85edaddaf70803c235c1116c0ec3b93e --- /dev/null +++ b/src/device/tests/gnmi_openconfig/storage/StorageInterface copy.py @@ -0,0 +1,134 @@ +# Copyright 2022-2024 ETSI 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. + +import re +from typing import Dict, List, Tuple +from .Tools import compose_resources + +PREFIX = r'^\/interface\[([^\]]+)\]' +RE_RESKEY_INTERFACE = re.compile(PREFIX + r'$') +RE_RESKEY_ETHERNET = re.compile(PREFIX + r'\/ethernet$') +RE_RESKEY_SUBINTERFACE = re.compile(PREFIX + r'\/subinterface\[([^\]]+)\]$') +#RE_RESKEY_IPV4_ADDRESS = re.compile(PREFIX + r'\/subinterface\[([^\]]+)\]\/ipv4\[([^\]]+)\]$') + +class Interfaces: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/interface[{:s}]', ['name', 'type', 'admin-status', 'oper-status', 'management', 'mtu', 'ifindex', + 'hardware-port', 'transceiver']), + ('/interface[{:s}]/ethernet', ['port-speed', 'negotiated-port-speed', 'mac-address', 'hw-mac-address']), + ] + + def __init__(self) -> None: + self._items : Dict[str, Dict] = dict() + + def add(self, if_name : str, resource_value : Dict) -> None: + item = self._items.setdefault(if_name, dict()) + item['name'] = if_name + for _, field_names in Interfaces.STRUCT: + field_names = set(field_names) + item.update({k:v for k,v in resource_value.items() if k in field_names}) + + def get(self, if_name : str) -> Dict: + return self._items.get(if_name) + + def remove(self, if_name : str) -> None: + self._items.pop(if_name, None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Interfaces.STRUCT) + +class SubInterfaces: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/interface[{:s}]/subinterface[{:d}]', ['index']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, int], Dict] = dict() + + def add(self, if_name : str, subif_index : int) -> None: + item = self._items.setdefault((if_name, subif_index), dict()) + item['index'] = subif_index + + def get(self, if_name : str, subif_index : int) -> Dict: + return self._items.get((if_name, subif_index)) + + def remove(self, if_name : str, subif_index : int) -> None: + self._items.pop((if_name, subif_index), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, SubInterfaces.STRUCT) + +class IPv4Addresses: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/interface[{:s}]/subinterface[{:d}]', ['index', 'address_ip', 'address_prefix', 'origin']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, int], Dict] = dict() + + def add(self, if_name : str, subif_index : int, ipv4_address : str, resource_value : Dict) -> None: + item = self._items.setdefault((if_name, subif_index), dict()) + item['index' ] = subif_index + item['address_ip' ] = ipv4_address + item['origin' ] = resource_value.get('origin') + item['address_prefix'] = resource_value.get('prefix') + + def get(self, if_name : str, subif_index : int, ipv4_address : str) -> Dict: + return self._items.get((if_name, subif_index)) + + def remove(self, if_name : str, subif_index : int, ipv4_address : str) -> None: + self._items.pop((if_name, subif_index), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, IPv4Addresses.STRUCT) + +class StorageInterface: + def __init__(self) -> None: + self.interfaces = Interfaces() + self.subinterfaces = SubInterfaces() + self.ipv4_addresses = IPv4Addresses() + + def populate(self, resources : List[Tuple[str, Dict]]) -> None: + for resource_key, resource_value in resources: + match = RE_RESKEY_INTERFACE.match(resource_key) + if match is not None: + self.interfaces.add(match.group(1), resource_value) + continue + + match = RE_RESKEY_ETHERNET.match(resource_key) + if match is not None: + self.interfaces.add(match.group(1), resource_value) + continue + + match = RE_RESKEY_SUBINTERFACE.match(resource_key) + if match is not None: + self.subinterfaces.add(match.group(1), int(match.group(2))) + address_ip = resource_value.get('address_ip') + self.ipv4_addresses.add(match.group(1), int(match.group(2)), address_ip, resource_value) + continue + + #match = RE_RESKEY_IPV4_ADDRESS.match(resource_key) + #if match is not None: + # self.ipv4_addresses.add(match.group(1), int(match.group(2)), match.group(3), resource_value) + # continue + + MSG = 'Unhandled Resource Key: {:s} => {:s}' + raise Exception(MSG.format(str(resource_key), str(resource_value))) + + def get_expected_config(self) -> List[Tuple[str, Dict]]: + expected_config = list() + expected_config.extend(self.interfaces.compose_resources()) + #expected_config.extend(self.subinterfaces.compose_resources()) + expected_config.extend(self.ipv4_addresses.compose_resources()) + return expected_config diff --git a/src/device/tests/gnmi_openconfig/storage/StorageInterface.py b/src/device/tests/gnmi_openconfig/storage/StorageInterface.py new file mode 100644 index 0000000000000000000000000000000000000000..c38ab9aa411204f4cd3c09f09ecf310e8ab79ef2 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/storage/StorageInterface.py @@ -0,0 +1,131 @@ +# Copyright 2022-2024 ETSI 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. + +import re +from typing import Dict, List, Tuple +from .Tools import compose_resources + +PREFIX = r'^\/interface\[([^\]]+)\]' +RE_RESKEY_INTERFACE = re.compile(PREFIX + r'$') +RE_RESKEY_ETHERNET = re.compile(PREFIX + r'\/ethernet$') +RE_RESKEY_SUBINTERFACE = re.compile(PREFIX + r'\/subinterface\[([^\]]+)\]$') +RE_RESKEY_IPV4_ADDRESS = re.compile(PREFIX + r'\/subinterface\[([^\]]+)\]\/ipv4\[([^\]]+)\]$') + +class Interfaces: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/interface[{:s}]', ['name', 'type', 'admin-status', 'oper-status', 'management', 'mtu', 'ifindex', + 'hardware-port', 'transceiver']), + ('/interface[{:s}]/ethernet', ['port-speed', 'negotiated-port-speed', 'mac-address', 'hw-mac-address']), + ] + + def __init__(self) -> None: + self._items : Dict[str, Dict] = dict() + + def add(self, if_name : str, resource_value : Dict) -> None: + item = self._items.setdefault(if_name, dict()) + item['name'] = if_name + for _, field_names in Interfaces.STRUCT: + field_names = set(field_names) + item.update({k:v for k,v in resource_value.items() if k in field_names}) + + def get(self, if_name : str) -> Dict: + return self._items.get(if_name) + + def remove(self, if_name : str) -> None: + self._items.pop(if_name, None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Interfaces.STRUCT) + +class SubInterfaces: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/interface[{:s}]/subinterface[{:d}]', ['index']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, int], Dict] = dict() + + def add(self, if_name : str, subif_index : int) -> None: + item = self._items.setdefault((if_name, subif_index), dict()) + item['index'] = subif_index + + def get(self, if_name : str, subif_index : int) -> Dict: + return self._items.get((if_name, subif_index)) + + def remove(self, if_name : str, subif_index : int) -> None: + self._items.pop((if_name, subif_index), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, SubInterfaces.STRUCT) + +class IPv4Addresses: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/interface[{:s}]/subinterface[{:d}]/ipv4[{:s}]', ['ip', 'origin', 'prefix']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, int, str], Dict] = dict() + + def add(self, if_name : str, subif_index : int, ipv4_address : str, resource_value : Dict) -> None: + item = self._items.setdefault((if_name, subif_index, ipv4_address), dict()) + item['ip' ] = ipv4_address + item['origin'] = resource_value.get('origin') + item['prefix'] = resource_value.get('prefix') + + def get(self, if_name : str, subif_index : int, ipv4_address : str) -> Dict: + return self._items.get((if_name, subif_index, ipv4_address)) + + def remove(self, if_name : str, subif_index : int, ipv4_address : str) -> None: + self._items.pop((if_name, subif_index, ipv4_address), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, IPv4Addresses.STRUCT) + +class StorageInterface: + def __init__(self) -> None: + self.interfaces = Interfaces() + self.subinterfaces = SubInterfaces() + self.ipv4_addresses = IPv4Addresses() + + def populate(self, resources : List[Tuple[str, Dict]]) -> None: + for resource_key, resource_value in resources: + match = RE_RESKEY_INTERFACE.match(resource_key) + if match is not None: + self.interfaces.add(match.group(1), resource_value) + continue + + match = RE_RESKEY_ETHERNET.match(resource_key) + if match is not None: + self.interfaces.add(match.group(1), resource_value) + continue + + match = RE_RESKEY_SUBINTERFACE.match(resource_key) + if match is not None: + self.subinterfaces.add(match.group(1), int(match.group(2))) + continue + + match = RE_RESKEY_IPV4_ADDRESS.match(resource_key) + if match is not None: + self.ipv4_addresses.add(match.group(1), int(match.group(2)), match.group(3), resource_value) + continue + + MSG = 'Unhandled Resource Key: {:s} => {:s}' + raise Exception(MSG.format(str(resource_key), str(resource_value))) + + def get_expected_config(self) -> List[Tuple[str, Dict]]: + expected_config = list() + expected_config.extend(self.interfaces.compose_resources()) + expected_config.extend(self.subinterfaces.compose_resources()) + expected_config.extend(self.ipv4_addresses.compose_resources()) + return expected_config diff --git a/src/device/tests/gnmi_openconfig/storage/StorageNetworkInstance.py b/src/device/tests/gnmi_openconfig/storage/StorageNetworkInstance.py new file mode 100644 index 0000000000000000000000000000000000000000..53fd6f4c8936889aa32b0f808ee4a09f7618e406 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/storage/StorageNetworkInstance.py @@ -0,0 +1,218 @@ +# Copyright 2022-2024 ETSI 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. + +import re +from typing import Dict, List, Tuple +from .Tools import compose_resources + +PREFIX = r'^\/network\_instance\[([^\]]+)\]' +RE_RESKEY_NET_INST = re.compile(PREFIX + r'$') +RE_RESKEY_INTERFACE = re.compile(PREFIX + r'\/interface\[([^\]]+)\]$') +RE_RESKEY_PROTOCOL = re.compile(PREFIX + r'\/protocol\[([^\]]+)\]$') +RE_RESKEY_PROTO_STATIC = re.compile(PREFIX + r'\/protocol\[([^\]]+)\]\/static\_routes\[([^\]]+)\]$') +RE_RESKEY_TABLE = re.compile(PREFIX + r'\/table\[([^\,]+)\,([^\]]+)\]$') +RE_RESKEY_VLAN = re.compile(PREFIX + r'\/vlan\[([^\]]+)\]$') + +class NetworkInstances: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/network_instance[{:s}]', ['name', 'type']), + ] + + def __init__(self) -> None: + self._items : Dict[str, Dict] = dict() + + def add(self, ni_name : str, resource_value : Dict) -> None: + item = self._items.setdefault(ni_name, dict()) + item['name'] = ni_name + item['type'] = resource_value.get('type') + + def get(self, ni_name : str) -> Dict: + return self._items.get(ni_name) + + def remove(self, ni_name : str) -> None: + self._items.pop(ni_name, None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, NetworkInstances.STRUCT) + +class Interfaces: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/network_instance[{:s}]/interface[{:s}.{:d}]', ['name', 'id', 'if_name', 'sif_index']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, str], Dict] = dict() + + def add(self, ni_name : str, if_name : str, sif_index : int) -> None: + item = self._items.setdefault((ni_name, if_name, sif_index), dict()) + item['name' ] = ni_name + item['id' ] = '{:s}.{:d}'.format(if_name, sif_index) + item['if_name' ] = if_name + item['sif_index'] = sif_index + + def get(self, ni_name : str, if_name : str, sif_index : int) -> Dict: + return self._items.get((ni_name, if_name, sif_index)) + + def remove(self, ni_name : str, if_name : str, sif_index : int) -> None: + self._items.pop((ni_name, if_name, sif_index), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Interfaces.STRUCT) + +class Protocols: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/network_instance[{:s}]/protocol[{:s}]', ['id', 'name']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, str], Dict] = dict() + + def add(self, ni_name : str, protocol : str) -> None: + item = self._items.setdefault((ni_name, protocol), dict()) + item['id' ] = protocol + item['name'] = protocol + + def get(self, ni_name : str, protocol : str) -> Dict: + return self._items.get((ni_name, protocol)) + + def remove(self, ni_name : str, protocol : str) -> None: + self._items.pop((ni_name, protocol), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Protocols.STRUCT) + +class StaticRoutes: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/network_instance[{:s}]/protocol[{:s}]/static_routes[{:s}]', ['prefix', 'next_hops']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, str, str], Dict] = dict() + + def add(self, ni_name : str, protocol : str, prefix : str, resource_value : Dict) -> None: + item = self._items.setdefault((ni_name, protocol, prefix), dict()) + item['prefix' ] = prefix + item['next_hops'] = resource_value.get('next_hops') + + def get(self, ni_name : str, protocol : str, prefix : str) -> Dict: + return self._items.get((ni_name, protocol, prefix)) + + def remove(self, ni_name : str, protocol : str, prefix : str) -> None: + self._items.pop((ni_name, protocol, prefix), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, StaticRoutes.STRUCT) + +class Tables: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/network_instance[{:s}]/table[{:s},{:s}]', ['protocol', 'address_family']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, str, str], Dict] = dict() + + def add(self, ni_name : str, protocol : str, address_family : str) -> None: + item = self._items.setdefault((ni_name, protocol, address_family), dict()) + item['protocol' ] = protocol + item['address_family'] = address_family + + def get(self, ni_name : str, protocol : str, address_family : str) -> Dict: + return self._items.get((ni_name, protocol, address_family)) + + def remove(self, ni_name : str, protocol : str, address_family : str) -> None: + self._items.pop((ni_name, protocol, address_family), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Tables.STRUCT) + +class Vlans: + STRUCT : List[Tuple[str, List[str]]] = [ + ('/network_instance[{:s}]/vlan[{:d}]', ['vlan_id', 'name', 'members']), + ] + + def __init__(self) -> None: + self._items : Dict[Tuple[str, int], Dict] = dict() + + def add(self, ni_name : str, vlan_id : int, resource_value : Dict) -> None: + item = self._items.setdefault((ni_name, vlan_id), dict()) + item['vlan_id'] = vlan_id + item['name' ] = resource_value.get('name') + item['members'] = sorted(resource_value.get('members')) + + def get(self, ni_name : str, vlan_id : int) -> Dict: + return self._items.get((ni_name, vlan_id)) + + def remove(self, ni_name : str, vlan_id : int) -> None: + self._items.pop((ni_name, vlan_id), None) + + def compose_resources(self) -> List[Dict]: + return compose_resources(self._items, Vlans.STRUCT) + +class StorageNetworkInstance: + def __init__(self) -> None: + self.network_instances = NetworkInstances() + self.interfaces = Interfaces() + self.protocols = Protocols() + self.protocol_static = StaticRoutes() + self.tables = Tables() + self.vlans = Vlans() + + def populate(self, resources : List[Tuple[str, Dict]]) -> None: + for resource_key, resource_value in resources: + match = RE_RESKEY_NET_INST.match(resource_key) + if match is not None: + self.network_instances.add(match.group(1), resource_value) + continue + + match = RE_RESKEY_INTERFACE.match(resource_key) + if match is not None: + if_id = match.group(2) + if_id_parts = if_id.split('.') + if_name = if_id_parts[0] + sif_index = 0 if len(if_id_parts) == 1 else int(if_id_parts[1]) + self.interfaces.add(match.group(1), if_name, sif_index) + continue + + match = RE_RESKEY_PROTOCOL.match(resource_key) + if match is not None: + self.protocols.add(match.group(1), match.group(2)) + continue + + match = RE_RESKEY_PROTO_STATIC.match(resource_key) + if match is not None: + self.protocol_static.add(match.group(1), match.group(2), match.group(3), resource_value) + continue + + match = RE_RESKEY_TABLE.match(resource_key) + if match is not None: + self.tables.add(match.group(1), match.group(2), match.group(3)) + continue + + match = RE_RESKEY_VLAN.match(resource_key) + if match is not None: + self.vlans.add(match.group(1), int(match.group(2)), resource_value) + continue + + MSG = 'Unhandled Resource Key: {:s} => {:s}' + raise Exception(MSG.format(str(resource_key), str(resource_value))) + + def get_expected_config(self) -> List[Tuple[str, Dict]]: + expected_config = list() + expected_config.extend(self.network_instances.compose_resources()) + expected_config.extend(self.interfaces.compose_resources()) + expected_config.extend(self.protocols.compose_resources()) + expected_config.extend(self.protocol_static.compose_resources()) + expected_config.extend(self.tables.compose_resources()) + expected_config.extend(self.vlans.compose_resources()) + return expected_config diff --git a/src/device/tests/gnmi_openconfig/storage/Tools.py b/src/device/tests/gnmi_openconfig/storage/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..dc34a7c0d1c0f5d9a9a9df4af6207bf31f555b69 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/storage/Tools.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI 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. + +from typing import Dict, List, Tuple + +def compose_resources( + storage : Dict[Tuple, Dict], config_struct : List[Tuple[str, List[str]]] +) -> List[Dict]: + expected_config = list() + + for resource_key_fields, resource_value_data in storage.items(): + for resource_key_template, resource_key_field_names in config_struct: + if isinstance(resource_key_fields, (str, int, float, bool)): resource_key_fields = (resource_key_fields,) + resource_key = resource_key_template.format(*resource_key_fields) + resource_value = { + field_name : resource_value_data[field_name] + for field_name in resource_key_field_names + if field_name in resource_value_data and resource_value_data[field_name] is not None + } + expected_config.append((resource_key, resource_value)) + + return expected_config diff --git a/src/tests/p4/__init__.py b/src/device/tests/gnmi_openconfig/storage/__init__.py similarity index 87% rename from src/tests/p4/__init__.py rename to src/device/tests/gnmi_openconfig/storage/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/p4/__init__.py +++ b/src/device/tests/gnmi_openconfig/storage/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/gnmi_openconfig/test_unitary_gnmi_oc_arista_l2vpn.py b/src/device/tests/gnmi_openconfig/test_unitary_gnmi_oc_arista_l2vpn.py new file mode 100644 index 0000000000000000000000000000000000000000..2374cbad8bf37f1faef9b9648d49c851e17658af --- /dev/null +++ b/src/device/tests/gnmi_openconfig/test_unitary_gnmi_oc_arista_l2vpn.py @@ -0,0 +1,576 @@ +# Copyright 2022-2024 ETSI 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. + +import json, logging, os, pytest, time +from typing import Dict, Tuple +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' + +# pylint: disable=wrong-import-position +from device.service.drivers.gnmi_openconfig.GnmiOpenConfigDriver import GnmiOpenConfigDriver +#from device.service.driver_api._Driver import ( +# RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES +#) + +logging.basicConfig(level=logging.DEBUG) +#logging.getLogger('ncclient.operations.rpc').setLevel(logging.INFO) +#logging.getLogger('ncclient.transport.parser').setLevel(logging.INFO) + +LOGGER = logging.getLogger(__name__) + + +##### DRIVERS FIXTURE ################################################################################################## + +DEVICES = { + 'SW1': {'address': '172.20.20.101', 'port': 6030, 'settings': { + 'username': 'admin', 'password': 'admin', + 'vendor': None, 'force_running': False, 'hostkey_verify': False, 'look_for_keys': False, 'allow_agent': False, + 'commit_per_rule': True, 'device_params': {'name': 'default'}, 'manager_params': {'timeout' : 120} + }}, + 'SW2': {'address': '10.1.1.87', 'port': 830, 'settings': { + 'username': 'ocnos', 'password': 'ocnos', + 'vendor': None, 'force_running': False, 'hostkey_verify': False, 'look_for_keys': False, 'allow_agent': False, + 'commit_per_rule': True, 'device_params': {'name': 'default'}, 'manager_params': {'timeout' : 120} + }}, +} + +@pytest.fixture(scope='session') +def drivers() -> Dict[str, OpenConfigDriver]: + _drivers : Dict[str, OpenConfigDriver] = dict() + for device_name, driver_params in DEVICES.items(): + driver = OpenConfigDriver(driver_params['address'], driver_params['port'], **(driver_params['settings'])) + driver.Connect() + _drivers[device_name] = driver + yield _drivers + time.sleep(1) + for _,driver in _drivers.items(): + driver.Disconnect() + + +def network_instance(ni_name, ni_type, ni_router_id=None, ni_route_distinguisher=None) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]'.format(ni_name) + data = {'name': ni_name, 'type': ni_type} + if ni_router_id is not None: data['router_id'] = ni_router_id + if ni_route_distinguisher is not None: data['route_distinguisher'] = ni_route_distinguisher + return path, json.dumps(data) + +def network_instance_add_protocol_bgp(ni_name, ni_type, ni_router_id, ni_bgp_as, neighbors=[]) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[BGP]'.format(ni_name) + data = { + 'name': ni_name, 'type': ni_type, 'router_id': ni_router_id, 'identifier': 'BGP', + 'protocol_name': ni_bgp_as, 'as': ni_bgp_as + } + if len(neighbors) > 0: + data['neighbors'] = [ + {'ip_address': neighbor_ip_address, 'remote_as': neighbor_remote_as} + for neighbor_ip_address, neighbor_remote_as in neighbors + ] + return path, json.dumps(data) + +def network_instance_add_protocol_direct(ni_name, ni_type) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[DIRECTLY_CONNECTED]'.format(ni_name) + data = { + 'name': ni_name, 'type': ni_type, 'identifier': 'DIRECTLY_CONNECTED', + 'protocol_name': 'DIRECTLY_CONNECTED' + } + return path, json.dumps(data) + +def network_instance_add_protocol_static(ni_name, ni_type) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[STATIC]'.format(ni_name) + data = { + 'name': ni_name, 'type': ni_type, 'identifier': 'STATIC', + 'protocol_name': 'STATIC' + } + return path, json.dumps(data) + +#def network_instance_static_route(ni_name, prefix, next_hop, next_hop_index=0) -> Tuple[str, Dict]: +# path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) +# data = {'name': ni_name, 'prefix': prefix, 'next_hop': next_hop, 'next_hop_index': next_hop_index} +# return path, json.dumps(data) + +def network_instance_add_table_connection( + ni_name, src_protocol, dst_protocol, address_family, default_import_policy, bgp_as=None +) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/table_connections[{:s}][{:s}][{:s}]'.format( + ni_name, src_protocol, dst_protocol, address_family + ) + data = { + 'name': ni_name, 'src_protocol': src_protocol, 'dst_protocol': dst_protocol, + 'address_family': address_family, 'default_import_policy': default_import_policy, + } + if bgp_as is not None: data['as'] = bgp_as + return path, json.dumps(data) + +def interface( + name, index, description=None, if_type=None, vlan_id=None, mtu=None, ipv4_address_prefix=None, enabled=None +) -> Tuple[str, Dict]: + path = '/interface[{:s}]/subinterface[{:d}]'.format(name, index) + data = {'name': name, 'index': index} + if description is not None: data['description'] = description + if if_type is not None: data['type' ] = if_type + if vlan_id is not None: data['vlan_id' ] = vlan_id + if mtu is not None: data['mtu' ] = mtu + if enabled is not None: data['enabled' ] = enabled + if ipv4_address_prefix is not None: + ipv4_address, ipv4_prefix = ipv4_address_prefix + data['address_ip' ] = ipv4_address + data['address_prefix'] = ipv4_prefix + return path, json.dumps(data) + +def network_instance_interface(ni_name, ni_type, if_name, if_index) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/interface[{:s}.{:d}]'.format(ni_name, if_name, if_index) + data = {'name': ni_name, 'type': ni_type, 'id': if_name, 'interface': if_name, 'subinterface': if_index} + return path, json.dumps(data) + +def test_configure(drivers : Dict[str, OpenConfigDriver]): + #resources_to_get = [] + #resources_to_get = [RESOURCE_ENDPOINTS] + #resources_to_get = [RESOURCE_INTERFACES] + #resources_to_get = [RESOURCE_NETWORK_INSTANCES] + #resources_to_get = [RESOURCE_ROUTING_POLICIES] + #resources_to_get = [RESOURCE_SERVICES] + #LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get))) + #results_getconfig = driver.GetConfig(resources_to_get) + #LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig))) + + csgw1_resources_to_set = [ + network_instance('ecoc24', 'L3VRF', '192.168.150.1', '65001:1'), + network_instance_add_protocol_direct('ecoc24', 'L3VRF'), + network_instance_add_protocol_static('ecoc24', 'L3VRF'), + network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.1', '65001', neighbors=[ + ('192.168.150.2', '65001') + ]), + network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.10.1', 24), enabled=True), + + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.1', 24), enabled=True), + ] + LOGGER.info('CSGW1 resources_to_set = {:s}'.format(str(csgw1_resources_to_set))) + results_setconfig = drivers['CSGW1'].SetConfig(csgw1_resources_to_set) + LOGGER.info('CSGW1 results_setconfig = {:s}'.format(str(results_setconfig))) + + csgw2_resources_to_set = [ + network_instance('ecoc24', 'L3VRF', '192.168.150.2', '65001:1'), + network_instance_add_protocol_direct('ecoc24', 'L3VRF'), + network_instance_add_protocol_static('ecoc24', 'L3VRF'), + network_instance_add_protocol_bgp('ecoc24', 'L3VRF', '192.168.150.2', '65001', neighbors=[ + ('192.168.150.1', '65001') + ]), + network_instance_add_table_connection('ecoc24', 'DIRECTLY_CONNECTED', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + network_instance_add_table_connection('ecoc24', 'STATIC', 'BGP', 'IPV4', 'ACCEPT_ROUTE', bgp_as='65001'), + + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + interface('ce1', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.20.1', 24), enabled=True), + + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + interface('xe5', 0, if_type='ethernetCsmacd', mtu=1500, ipv4_address_prefix=('192.168.150.2', 24), enabled=True), + ] + LOGGER.info('CSGW2 resources_to_set = {:s}'.format(str(csgw2_resources_to_set))) + results_setconfig = drivers['CSGW2'].SetConfig(csgw2_resources_to_set) + LOGGER.info('CSGW2 results_setconfig = {:s}'.format(str(results_setconfig))) + + csgw1_resources_to_delete = [ + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + #interface('ce1', 0), + #interface('xe5', 0), + network_instance('ecoc24', 'L3VRF'), + ] + LOGGER.info('CSGW1 resources_to_delete = {:s}'.format(str(csgw1_resources_to_delete))) + results_deleteconfig = drivers['CSGW1'].DeleteConfig(csgw1_resources_to_delete) + LOGGER.info('CSGW1 results_deleteconfig = {:s}'.format(str(results_deleteconfig))) + + csgw2_resources_to_delete = [ + network_instance_interface('ecoc24', 'L3VRF', 'ce1', 0), + network_instance_interface('ecoc24', 'L3VRF', 'xe5', 0), + #interface('ce1', 0), + #interface('xe5', 0), + network_instance('ecoc24', 'L3VRF'), + ] + LOGGER.info('CSGW2 resources_to_delete = {:s}'.format(str(csgw2_resources_to_delete))) + results_deleteconfig = drivers['CSGW2'].DeleteConfig(csgw2_resources_to_delete) + LOGGER.info('CSGW2 results_deleteconfig = {:s}'.format(str(results_deleteconfig))) + + + + + + +# Copyright 2022-2024 ETSI 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. + +import os +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' + +# pylint: disable=wrong-import-position +import logging, pytest, time +from typing import Dict, List +from device.service.driver_api._Driver import ( + RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, + RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES +) +from device.service.drivers.gnmi_openconfig.GnmiOpenConfigDriver import GnmiOpenConfigDriver +from .storage.Storage import Storage +from .tools.manage_config import ( + check_config_endpoints, check_config_interfaces, check_config_network_instances, del_config, get_config, set_config +) +from .tools.check_updates import check_updates +from .tools.request_composers import ( + interface, network_instance, network_instance_interface, network_instance_static_route +) + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +##### DRIVER FIXTURE ################################################################################################### + +DRIVER_SETTING_ADDRESS = '172.20.20.101' +DRIVER_SETTING_PORT = 6030 +DRIVER_SETTING_USERNAME = 'admin' +DRIVER_SETTING_PASSWORD = 'admin' +DRIVER_SETTING_USE_TLS = False + +@pytest.fixture(scope='session') +def driver() -> GnmiOpenConfigDriver: + _driver = GnmiOpenConfigDriver( + DRIVER_SETTING_ADDRESS, DRIVER_SETTING_PORT, + username=DRIVER_SETTING_USERNAME, + password=DRIVER_SETTING_PASSWORD, + use_tls=DRIVER_SETTING_USE_TLS, + ) + _driver.Connect() + yield _driver + time.sleep(1) + _driver.Disconnect() + + +##### STORAGE FIXTURE ################################################################################################## + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield Storage() + + +##### NETWORK INSTANCE DETAILS ######################################################################################### + +NETWORK_INSTANCES = [ + { + 'name': 'test-l3-svc', + 'type': 'L3VRF', + 'interfaces': [ + {'name': 'Ethernet1', 'index': 0, 'ipv4_addr': '192.168.1.1', 'ipv4_prefix': 24, 'enabled': True}, + {'name': 'Ethernet10', 'index': 0, 'ipv4_addr': '192.168.10.1', 'ipv4_prefix': 24, 'enabled': True}, + ], + 'static_routes': [ + {'prefix': '172.0.0.0/24', 'next_hop': '172.16.0.2', 'metric': 1}, + {'prefix': '172.2.0.0/24', 'next_hop': '172.16.0.3', 'metric': 1}, + ] + }, + #{ + # 'name': 'test-l2-svc', + # 'type': 'L2VSI', + # 'interfaces': [ + # {'name': 'Ethernet2', 'index': 0, 'ipv4_addr': '192.168.1.1', 'ipv4_prefix': 24, 'enabled': True}, + # {'name': 'Ethernet4', 'index': 0, 'ipv4_addr': '192.168.10.1', 'ipv4_prefix': 24, 'enabled': True}, + # ], + # 'static_routes': [ + # {'prefix': '172.0.0.0/24', 'next_hop': '172.16.0.2', 'metric': 1}, + # {'prefix': '172.2.0.0/24', 'next_hop': '172.16.0.3', 'metric': 1}, + # ] + #} +] + + +##### TEST METHODS ##################################################################################################### + +def test_get_endpoints( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + results_getconfig = get_config(driver, [RESOURCE_ENDPOINTS]) + storage.endpoints.populate(results_getconfig) + check_config_endpoints(driver, storage) + + +def test_get_interfaces( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + results_getconfig = get_config(driver, [RESOURCE_INTERFACES]) + storage.interfaces.populate(results_getconfig) + check_config_interfaces(driver, storage) + + +def test_get_network_instances( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + results_getconfig = get_config(driver, [RESOURCE_NETWORK_INSTANCES]) + storage.network_instances.populate(results_getconfig) + check_config_network_instances(driver, storage) + + +def test_set_network_instances( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + ni_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + ni_type = ni['type'] + resources_to_set.append(network_instance(ni_name, ni_type)) + ni_names.append(ni_name) + storage.network_instances.network_instances.add(ni_name, {'type': ni_type}) + storage.network_instances.protocols.add(ni_name, 'DIRECTLY_CONNECTED') + storage.network_instances.tables.add(ni_name, 'DIRECTLY_CONNECTED', 'IPV4') + storage.network_instances.tables.add(ni_name, 'DIRECTLY_CONNECTED', 'IPV6') + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/network_instance[{:s}]', ni_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_add_interfaces_to_network_instance( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + ni_if_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index'] + resources_to_set.append(network_instance_interface(ni_name, if_name, subif_index)) + ni_if_names.append((ni_name, '{:s}.{:d}'.format(if_name, subif_index))) + storage.network_instances.interfaces.add(ni_name, if_name, subif_index) + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/network_instance[{:s}]/interface[{:s}]', ni_if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_set_interfaces( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + if_names = list() + for ni in NETWORK_INSTANCES: + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index' ] + ipv4_address = ni_if['ipv4_addr' ] + ipv4_prefix = ni_if['ipv4_prefix'] + enabled = ni_if['enabled' ] + resources_to_set.append(interface( + if_name, subif_index, ipv4_address, ipv4_prefix, enabled + )) + if_names.append(if_name) + storage.interfaces.ipv4_addresses.add(if_name, subif_index, ipv4_address, { + 'origin' : 'STATIC', 'prefix': ipv4_prefix + }) + default_vlan = storage.network_instances.vlans.get('default', 1) + default_vlan_members : List[str] = default_vlan.setdefault('members', list()) + if if_name in default_vlan_members: default_vlan_members.remove(if_name) + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/interface[{:s}]', if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_set_network_instance_static_routes( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + ni_sr_prefixes = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_sr in ni.get('static_routes', list()): + ni_sr_prefix = ni_sr['prefix' ] + ni_sr_next_hop = ni_sr['next_hop'] + ni_sr_metric = ni_sr['metric' ] + ni_sr_next_hop_index = 'AUTO_{:d}_{:s}'.format(ni_sr_metric, '-'.join(ni_sr_next_hop.split('.'))) + resources_to_set.append(network_instance_static_route( + ni_name, ni_sr_prefix, ni_sr_next_hop_index, ni_sr_next_hop, metric=ni_sr_metric + )) + ni_sr_prefixes.append((ni_name, ni_sr_prefix)) + storage.network_instances.protocols.add(ni_name, 'STATIC') + storage.network_instances.protocol_static.add(ni_name, 'STATIC', ni_sr_prefix, { + 'prefix': ni_sr_prefix, 'next_hops': { + ni_sr_next_hop_index: {'next_hop': ni_sr_next_hop, 'metric': ni_sr_metric} + } + }) + storage.network_instances.tables.add(ni_name, 'STATIC', 'IPV4') + storage.network_instances.tables.add(ni_name, 'STATIC', 'IPV6') + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/network_instance[{:s}]/static_route[{:s}]', ni_sr_prefixes) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_network_instance_static_routes( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_delete = list() + ni_sr_prefixes = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_sr in ni.get('static_routes', list()): + ni_sr_prefix = ni_sr['prefix' ] + ni_sr_next_hop = ni_sr['next_hop'] + ni_sr_metric = ni_sr['metric' ] + ni_sr_next_hop_index = 'AUTO_{:d}_{:s}'.format(ni_sr_metric, '-'.join(ni_sr_next_hop.split('.'))) + resources_to_delete.append(network_instance_static_route( + ni_name, ni_sr_prefix, ni_sr_next_hop_index, ni_sr_next_hop, metric=ni_sr_metric + )) + ni_sr_prefixes.append((ni_name, ni_sr_prefix)) + + storage.network_instances.protocols.remove(ni_name, 'STATIC') + storage.network_instances.protocol_static.remove(ni_name, 'STATIC', ni_sr_prefix) + storage.network_instances.tables.remove(ni_name, 'STATIC', 'IPV4') + storage.network_instances.tables.remove(ni_name, 'STATIC', 'IPV6') + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/network_instance[{:s}]/static_route[{:s}]', ni_sr_prefixes) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + #check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_interfaces( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + #check_config_network_instances(driver, storage) + + resources_to_delete = list() + if_names = list() + for ni in NETWORK_INSTANCES: + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index' ] + ipv4_address = ni_if['ipv4_addr' ] + ipv4_prefix = ni_if['ipv4_prefix'] + enabled = ni_if['enabled' ] + resources_to_delete.append(interface(if_name, subif_index, ipv4_address, ipv4_prefix, enabled)) + if_names.append(if_name) + storage.interfaces.ipv4_addresses.remove(if_name, subif_index, ipv4_address) + default_vlan = storage.network_instances.vlans.get('default', 1) + default_vlan_members : List[str] = default_vlan.setdefault('members', list()) + if if_name not in default_vlan_members: default_vlan_members.append(if_name) + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/interface[{:s}]', if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + #check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_interfaces_from_network_instance( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + #check_config_network_instances(driver, storage) + + resources_to_delete = list() + ni_if_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index'] + resources_to_delete.append(network_instance_interface(ni_name, if_name, subif_index)) + ni_if_names.append((ni_name, '{:s}.{:d}'.format(if_name, subif_index))) + storage.network_instances.interfaces.remove(ni_name, if_name, subif_index) + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/network_instance[{:s}]/interface[{:s}]', ni_if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + #check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_network_instances( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + #check_config_network_instances(driver, storage) + + resources_to_delete = list() + ni_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + ni_type = ni['type'] + resources_to_delete.append(network_instance(ni_name, ni_type)) + ni_names.append(ni_name) + storage.network_instances.network_instances.remove(ni_name) + storage.network_instances.protocols.remove(ni_name, 'DIRECTLY_CONNECTED') + storage.network_instances.tables.remove(ni_name, 'DIRECTLY_CONNECTED', 'IPV4') + storage.network_instances.tables.remove(ni_name, 'DIRECTLY_CONNECTED', 'IPV6') + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/network_instance[{:s}]', ni_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) diff --git a/src/device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig.py b/src/device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig.py new file mode 100644 index 0000000000000000000000000000000000000000..8762c151e7c043534981e121f80f864557efefda --- /dev/null +++ b/src/device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig.py @@ -0,0 +1,360 @@ +# Copyright 2022-2024 ETSI 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. + +import os +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' + +# pylint: disable=wrong-import-position +import logging, pytest, time +from typing import Dict, List +from device.service.driver_api._Driver import ( + RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, + RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES +) +from device.service.drivers.gnmi_openconfig.GnmiOpenConfigDriver import GnmiOpenConfigDriver +from .storage.Storage import Storage +from .tools.manage_config import ( + check_config_endpoints, check_config_interfaces, check_config_network_instances, del_config, get_config, set_config +) +from .tools.check_updates import check_updates +from .tools.request_composers import ( + interface, network_instance, network_instance_interface, network_instance_static_route +) + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + + +##### DRIVER FIXTURE ################################################################################################### + +DRIVER_SETTING_ADDRESS = '172.20.20.101' +DRIVER_SETTING_PORT = 6030 +DRIVER_SETTING_USERNAME = 'admin' +DRIVER_SETTING_PASSWORD = 'admin' +DRIVER_SETTING_USE_TLS = False + +@pytest.fixture(scope='session') +def driver() -> GnmiOpenConfigDriver: + _driver = GnmiOpenConfigDriver( + DRIVER_SETTING_ADDRESS, DRIVER_SETTING_PORT, + username=DRIVER_SETTING_USERNAME, + password=DRIVER_SETTING_PASSWORD, + use_tls=DRIVER_SETTING_USE_TLS, + ) + _driver.Connect() + yield _driver + time.sleep(1) + _driver.Disconnect() + + +##### STORAGE FIXTURE ################################################################################################## + +@pytest.fixture(scope='session') +def storage() -> Dict: + yield Storage() + + +##### NETWORK INSTANCE DETAILS ######################################################################################### + +NETWORK_INSTANCES = [ + { + 'name': 'test-l3-svc', + 'type': 'L3VRF', + 'interfaces': [ + {'name': 'Ethernet1', 'index': 0, 'ipv4_addr': '192.168.1.1', 'ipv4_prefix': 24, 'enabled': True}, + {'name': 'Ethernet10', 'index': 0, 'ipv4_addr': '192.168.10.1', 'ipv4_prefix': 24, 'enabled': True}, + ], + 'static_routes': [ + {'prefix': '172.0.0.0/24', 'next_hop': '172.16.0.2', 'metric': 1}, + {'prefix': '172.2.0.0/24', 'next_hop': '172.16.0.3', 'metric': 1}, + ] + }, + #{ + # 'name': 'test-l2-svc', + # 'type': 'L2VSI', + # 'interfaces': [ + # {'name': 'Ethernet2', 'index': 0, 'ipv4_addr': '192.168.1.1', 'ipv4_prefix': 24, 'enabled': True}, + # {'name': 'Ethernet4', 'index': 0, 'ipv4_addr': '192.168.10.1', 'ipv4_prefix': 24, 'enabled': True}, + # ], + # 'static_routes': [ + # {'prefix': '172.0.0.0/24', 'next_hop': '172.16.0.2', 'metric': 1}, + # {'prefix': '172.2.0.0/24', 'next_hop': '172.16.0.3', 'metric': 1}, + # ] + #} +] + + +##### TEST METHODS ##################################################################################################### + +def test_get_endpoints( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + results_getconfig = get_config(driver, [RESOURCE_ENDPOINTS]) + storage.endpoints.populate(results_getconfig) + check_config_endpoints(driver, storage) + + +def test_get_interfaces( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + results_getconfig = get_config(driver, [RESOURCE_INTERFACES]) + storage.interfaces.populate(results_getconfig) + check_config_interfaces(driver, storage) + + +def test_get_network_instances( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + results_getconfig = get_config(driver, [RESOURCE_NETWORK_INSTANCES]) + storage.network_instances.populate(results_getconfig) + check_config_network_instances(driver, storage) + + +def test_set_network_instances( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + ni_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + ni_type = ni['type'] + resources_to_set.append(network_instance(ni_name, ni_type)) + ni_names.append(ni_name) + storage.network_instances.network_instances.add(ni_name, {'type': ni_type}) + storage.network_instances.protocols.add(ni_name, 'DIRECTLY_CONNECTED') + storage.network_instances.tables.add(ni_name, 'DIRECTLY_CONNECTED', 'IPV4') + storage.network_instances.tables.add(ni_name, 'DIRECTLY_CONNECTED', 'IPV6') + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/network_instance[{:s}]', ni_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_add_interfaces_to_network_instance( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + ni_if_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index'] + resources_to_set.append(network_instance_interface(ni_name, if_name, subif_index)) + ni_if_names.append((ni_name, '{:s}.{:d}'.format(if_name, subif_index))) + storage.network_instances.interfaces.add(ni_name, if_name, subif_index) + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/network_instance[{:s}]/interface[{:s}]', ni_if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_set_interfaces( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + if_names = list() + for ni in NETWORK_INSTANCES: + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index' ] + ipv4_address = ni_if['ipv4_addr' ] + ipv4_prefix = ni_if['ipv4_prefix'] + enabled = ni_if['enabled' ] + resources_to_set.append(interface( + if_name, subif_index, ipv4_address, ipv4_prefix, enabled + )) + if_names.append(if_name) + storage.interfaces.ipv4_addresses.add(if_name, subif_index, ipv4_address, { + 'origin' : 'STATIC', 'prefix': ipv4_prefix + }) + default_vlan = storage.network_instances.vlans.get('default', 1) + default_vlan_members : List[str] = default_vlan.setdefault('members', list()) + if if_name in default_vlan_members: default_vlan_members.remove(if_name) + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/interface[{:s}]', if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_set_network_instance_static_routes( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_set = list() + ni_sr_prefixes = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_sr in ni.get('static_routes', list()): + ni_sr_prefix = ni_sr['prefix' ] + ni_sr_next_hop = ni_sr['next_hop'] + ni_sr_metric = ni_sr['metric' ] + ni_sr_next_hop_index = 'AUTO_{:d}_{:s}'.format(ni_sr_metric, '-'.join(ni_sr_next_hop.split('.'))) + resources_to_set.append(network_instance_static_route( + ni_name, ni_sr_prefix, ni_sr_next_hop_index, ni_sr_next_hop, metric=ni_sr_metric + )) + ni_sr_prefixes.append((ni_name, ni_sr_prefix)) + storage.network_instances.protocols.add(ni_name, 'STATIC') + storage.network_instances.protocol_static.add(ni_name, 'STATIC', ni_sr_prefix, { + 'prefix': ni_sr_prefix, 'next_hops': { + ni_sr_next_hop_index: {'next_hop': ni_sr_next_hop, 'metric': ni_sr_metric} + } + }) + storage.network_instances.tables.add(ni_name, 'STATIC', 'IPV4') + storage.network_instances.tables.add(ni_name, 'STATIC', 'IPV6') + + results_setconfig = set_config(driver, resources_to_set) + check_updates(results_setconfig, '/network_instance[{:s}]/static_route[{:s}]', ni_sr_prefixes) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_network_instance_static_routes( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + check_config_network_instances(driver, storage) + + resources_to_delete = list() + ni_sr_prefixes = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_sr in ni.get('static_routes', list()): + ni_sr_prefix = ni_sr['prefix' ] + ni_sr_next_hop = ni_sr['next_hop'] + ni_sr_metric = ni_sr['metric' ] + ni_sr_next_hop_index = 'AUTO_{:d}_{:s}'.format(ni_sr_metric, '-'.join(ni_sr_next_hop.split('.'))) + resources_to_delete.append(network_instance_static_route( + ni_name, ni_sr_prefix, ni_sr_next_hop_index, ni_sr_next_hop, metric=ni_sr_metric + )) + ni_sr_prefixes.append((ni_name, ni_sr_prefix)) + + storage.network_instances.protocols.remove(ni_name, 'STATIC') + storage.network_instances.protocol_static.remove(ni_name, 'STATIC', ni_sr_prefix) + storage.network_instances.tables.remove(ni_name, 'STATIC', 'IPV4') + storage.network_instances.tables.remove(ni_name, 'STATIC', 'IPV6') + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/network_instance[{:s}]/static_route[{:s}]', ni_sr_prefixes) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + #check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_interfaces( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + #check_config_network_instances(driver, storage) + + resources_to_delete = list() + if_names = list() + for ni in NETWORK_INSTANCES: + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index' ] + ipv4_address = ni_if['ipv4_addr' ] + ipv4_prefix = ni_if['ipv4_prefix'] + enabled = ni_if['enabled' ] + resources_to_delete.append(interface(if_name, subif_index, ipv4_address, ipv4_prefix, enabled)) + if_names.append(if_name) + storage.interfaces.ipv4_addresses.remove(if_name, subif_index, ipv4_address) + default_vlan = storage.network_instances.vlans.get('default', 1) + default_vlan_members : List[str] = default_vlan.setdefault('members', list()) + if if_name not in default_vlan_members: default_vlan_members.append(if_name) + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/interface[{:s}]', if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + #check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_interfaces_from_network_instance( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + #check_config_network_instances(driver, storage) + + resources_to_delete = list() + ni_if_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + for ni_if in ni.get('interfaces', list()): + if_name = ni_if['name' ] + subif_index = ni_if['index'] + resources_to_delete.append(network_instance_interface(ni_name, if_name, subif_index)) + ni_if_names.append((ni_name, '{:s}.{:d}'.format(if_name, subif_index))) + storage.network_instances.interfaces.remove(ni_name, if_name, subif_index) + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/network_instance[{:s}]/interface[{:s}]', ni_if_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + #check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) + + +def test_del_network_instances( + driver : GnmiOpenConfigDriver, # pylint: disable=redefined-outer-name + storage : Storage, # pylint: disable=redefined-outer-name +) -> None: + check_config_interfaces(driver, storage) + #check_config_network_instances(driver, storage) + + resources_to_delete = list() + ni_names = list() + for ni in NETWORK_INSTANCES: + ni_name = ni['name'] + ni_type = ni['type'] + resources_to_delete.append(network_instance(ni_name, ni_type)) + ni_names.append(ni_name) + storage.network_instances.network_instances.remove(ni_name) + storage.network_instances.protocols.remove(ni_name, 'DIRECTLY_CONNECTED') + storage.network_instances.tables.remove(ni_name, 'DIRECTLY_CONNECTED', 'IPV4') + storage.network_instances.tables.remove(ni_name, 'DIRECTLY_CONNECTED', 'IPV6') + + results_deleteconfig = del_config(driver, resources_to_delete) + check_updates(results_deleteconfig, '/network_instance[{:s}]', ni_names) + + check_config_interfaces(driver, storage, max_retries=10, retry_delay=2.0) + check_config_network_instances(driver, storage, max_retries=10, retry_delay=2.0) diff --git a/src/device/tests/gnmi_openconfig/tools/__init__.py b/src/device/tests/gnmi_openconfig/tools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/tools/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/device/tests/gnmi_openconfig/tools/check_updates.py b/src/device/tests/gnmi_openconfig/tools/check_updates.py new file mode 100644 index 0000000000000000000000000000000000000000..d3cb2ac3e50f662a0b16d356e1df60ba5644ff80 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/tools/check_updates.py @@ -0,0 +1,22 @@ +# Copyright 2022-2024 ETSI 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. + +from typing import Iterable, List, Tuple + +def check_updates(results : Iterable[Tuple[str, bool]], format_str : str, item_ids : List[Tuple]) -> None: + results = set(results) + assert len(results) == len(item_ids) + for item_id_fields in item_ids: + if isinstance(item_id_fields, (str, int, float, bool)): item_id_fields = (item_id_fields,) + assert (format_str.format(*item_id_fields), True) in results diff --git a/src/device/tests/gnmi_openconfig/tools/manage_config.py b/src/device/tests/gnmi_openconfig/tools/manage_config.py new file mode 100644 index 0000000000000000000000000000000000000000..99a65994626b4289a86b5a3c6753a6056445ae00 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/tools/manage_config.py @@ -0,0 +1,103 @@ +# Copyright 2022-2024 ETSI 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. + +import copy, deepdiff, logging, time +from typing import Callable, Dict, List, Tuple, Union +from device.service.driver_api._Driver import ( + RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, + RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES +) +from device.service.drivers.gnmi_openconfig.GnmiOpenConfigDriver import GnmiOpenConfigDriver +from device.tests.gnmi_openconfig.storage.Storage import Storage +from .result_config_adapters import adapt_endpoint, adapt_interface, adapt_network_instance + +LOGGER = logging.getLogger(__name__) + +def get_config(driver : GnmiOpenConfigDriver, resources_to_get : List[str]) -> List[Tuple[str, Dict]]: + LOGGER.info('[get_config] resources_to_get = {:s}'.format(str(resources_to_get))) + results_getconfig = driver.GetConfig(resources_to_get) + LOGGER.info('[get_config] results_getconfig = {:s}'.format(str(results_getconfig))) + return results_getconfig + +def set_config( + driver : GnmiOpenConfigDriver, resources_to_set : List[Tuple[str, Dict]] +) -> List[Tuple[str, Union[bool, Exception]]]: + LOGGER.info('[set_config] resources_to_set = {:s}'.format(str(resources_to_set))) + results_setconfig = driver.SetConfig(resources_to_set) + LOGGER.info('[set_config] results_setconfig = {:s}'.format(str(results_setconfig))) + return results_setconfig + +def del_config( + driver : GnmiOpenConfigDriver, resources_to_delete : List[Tuple[str, Dict]] +) -> List[Tuple[str, Union[bool, Exception]]]: + LOGGER.info('resources_to_delete = {:s}'.format(str(resources_to_delete))) + results_deleteconfig = driver.DeleteConfig(resources_to_delete) + LOGGER.info('results_deleteconfig = {:s}'.format(str(results_deleteconfig))) + return results_deleteconfig + +def check_expected_config( + driver : GnmiOpenConfigDriver, resources_to_get : List[str], expected_config : List[Dict], + func_adapt_returned_config : Callable[[Tuple[str, Dict]], Tuple[str, Dict]] = lambda x: x, + max_retries : int = 1, retry_delay : float = 0.5 +) -> List[Dict]: + LOGGER.info('expected_config = {:s}'.format(str(expected_config))) + + num_retry = 0 + return_data = None + while num_retry < max_retries: + results_getconfig = get_config(driver, resources_to_get) + return_data = copy.deepcopy(results_getconfig) + + results_getconfig = [ + func_adapt_returned_config(resource_key, resource_value) + for resource_key, resource_value in results_getconfig + ] + + diff_data = deepdiff.DeepDiff(sorted(expected_config), sorted(results_getconfig)) + num_diffs = len(diff_data) + if num_diffs == 0: break + # let the device take some time to reconfigure + time.sleep(retry_delay) + num_retry += 1 + + if num_diffs > 0: LOGGER.error('Differences[{:d}]:\n{:s}'.format(num_diffs, str(diff_data.pretty()))) + assert num_diffs == 0 + return return_data + +def check_config_endpoints( + driver : GnmiOpenConfigDriver, storage : Storage, + max_retries : int = 1, retry_delay : float = 0.5 +) -> List[Dict]: + return check_expected_config( + driver, [RESOURCE_ENDPOINTS], storage.endpoints.get_expected_config(), + adapt_endpoint, max_retries=max_retries, retry_delay=retry_delay + ) + +def check_config_interfaces( + driver : GnmiOpenConfigDriver, storage : Storage, + max_retries : int = 1, retry_delay : float = 0.5 +) -> List[Dict]: + return check_expected_config( + driver, [RESOURCE_INTERFACES], storage.interfaces.get_expected_config(), + adapt_interface, max_retries=max_retries, retry_delay=retry_delay + ) + +def check_config_network_instances( + driver : GnmiOpenConfigDriver, storage : Storage, + max_retries : int = 1, retry_delay : float = 0.5 +) -> List[Dict]: + return check_expected_config( + driver, [RESOURCE_NETWORK_INSTANCES], storage.network_instances.get_expected_config(), + adapt_network_instance, max_retries=max_retries, retry_delay=retry_delay + ) diff --git a/src/device/tests/gnmi_openconfig/tools/request_composers copy.py b/src/device/tests/gnmi_openconfig/tools/request_composers copy.py new file mode 100644 index 0000000000000000000000000000000000000000..7dcdcb143a6965991261a5b514d74b9fb9005f8c --- /dev/null +++ b/src/device/tests/gnmi_openconfig/tools/request_composers copy.py @@ -0,0 +1,46 @@ +# Copyright 2022-2024 ETSI 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. + +from typing import Dict, Tuple + +def interface(if_name, sif_index, ipv4_address, ipv4_prefix, enabled) -> Tuple[str, Dict]: + str_path = '/interface[{:s}]'.format(if_name) + str_data = { + 'name': if_name, 'enabled': enabled, 'sub_if_index': sif_index, 'sub_if_enabled': enabled, + 'sub_if_ipv4_enabled': enabled, 'sub_if_ipv4_address': ipv4_address, 'sub_if_ipv4_prefix': ipv4_prefix + } + return str_path, str_data + +def network_instance(ni_name, ni_type) -> Tuple[str, Dict]: + str_path = '/network_instance[{:s}]'.format(ni_name) + str_data = { + 'name': ni_name, 'type': ni_type + } + return str_path, str_data + +def network_instance_static_route(ni_name, prefix, next_hop_index, next_hop, metric=1) -> Tuple[str, Dict]: + str_path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) + str_data = { + 'name': ni_name, 'identifier': 'STATIC', 'protocol_name': 'STATIC', + 'prefix': prefix, 'index': next_hop_index, 'next_hop': next_hop, 'metric': metric + } + return str_path, str_data + +def network_instance_interface(ni_name, if_name, sif_index) -> Tuple[str, Dict]: + ni_if_id = '{:s}.{:d}'.format(if_name, sif_index) + str_path = '/network_instance[{:s}]/interface[{:s}]'.format(ni_name, ni_if_id) + str_data = { + 'name': ni_name, 'id': ni_if_id, 'interface': if_name, 'subinterface': sif_index + } + return str_path, str_data diff --git a/src/device/tests/gnmi_openconfig/tools/request_composers.py b/src/device/tests/gnmi_openconfig/tools/request_composers.py new file mode 100644 index 0000000000000000000000000000000000000000..0a58d4b24948f38d9ed79894934ba11adac5f23d --- /dev/null +++ b/src/device/tests/gnmi_openconfig/tools/request_composers.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI 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. + +from typing import Dict, Tuple + +def interface(if_name, sif_index, ipv4_address, ipv4_prefix, enabled) -> Tuple[str, Dict]: + str_path = '/interface[{:s}]'.format(if_name) + str_data = { + 'name': if_name, 'enabled': enabled, 'sub_if_index': sif_index, 'sub_if_enabled': enabled, + 'sub_if_ipv4_enabled': enabled, 'sub_if_ipv4_address': ipv4_address, 'sub_if_ipv4_prefix': ipv4_prefix + } + return str_path, str_data + +def network_instance(ni_name, ni_type) -> Tuple[str, Dict]: + str_path = '/network_instance[{:s}]'.format(ni_name) + str_data = { + 'name': ni_name, 'type': ni_type + } + return str_path, str_data + +def network_instance_static_route(ni_name, prefix, next_hop_index, next_hop, metric=1) -> Tuple[str, Dict]: + str_path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) + str_data = { + 'name': ni_name, 'prefix': prefix, 'next_hop_index': next_hop_index, 'next_hop': next_hop, 'metric': metric + } + return str_path, str_data + +def network_instance_interface(ni_name, if_name, sif_index) -> Tuple[str, Dict]: + str_path = '/network_instance[{:s}]/interface[{:s}.{:d}]'.format(ni_name, if_name, sif_index) + str_data = { + 'name': ni_name, 'if_name': if_name, 'sif_index': sif_index + } + return str_path, str_data diff --git a/src/device/tests/gnmi_openconfig/tools/result_config_adapters.py b/src/device/tests/gnmi_openconfig/tools/result_config_adapters.py new file mode 100644 index 0000000000000000000000000000000000000000..9db5382ecc7d8bf58d5f48c43e49a9ace19a1222 --- /dev/null +++ b/src/device/tests/gnmi_openconfig/tools/result_config_adapters.py @@ -0,0 +1,29 @@ +# Copyright 2022-2024 ETSI 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. + +import re +from typing import Dict, Tuple + +def adapt_endpoint(resource_key : str, resource_value : Dict) -> Tuple[str, Dict]: + return resource_key, resource_value + +def adapt_interface(resource_key : str, resource_value : Dict) -> Tuple[str, Dict]: + return resource_key, resource_value + +def adapt_network_instance(resource_key : str, resource_value : Dict) -> Tuple[str, Dict]: + match = re.match(r'^\/network\_instance\[([^\]]+)\]\/vlan\[([^\]]+)\]$', resource_key) + if match is not None: + members = resource_value.get('members') + if len(members) > 0: resource_value['members'] = sorted(members) + return resource_key, resource_value diff --git a/src/device/tests/mock_p4runtime_service.py b/src/device/tests/mock_p4runtime_service.py index e046fa6cdf77aa82a9067f0f09635e7dadbbe71a..1d7fbf004173a0c526732fb6b06a81a66f6ec4fb 100644 --- a/src/device/tests/mock_p4runtime_service.py +++ b/src/device/tests/mock_p4runtime_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/mock_p4runtime_servicer_impl.py b/src/device/tests/mock_p4runtime_servicer_impl.py index 15888e177045da5c52b3419206316dc306dc6115..bdff09c349c1133ea8ba92259f2e589a292c9630 100644 --- a/src/device/tests/mock_p4runtime_servicer_impl.py +++ b/src/device/tests/mock_p4runtime_servicer_impl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py b/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py index 0bb91191a96d0b3b6cfeef107b50a881c2261e60..e7157eccb0104c902a401e3eec51983dd3262e29 100644 --- a/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py +++ b/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/PrepareScenario.py b/src/device/tests/qkd/unit/PrepareScenario.py index 756b914d55df788472ed6e839e1fc29e356877e4..3fd9589dfeebd36e170232c342785b9207c79d5d 100644 --- a/src/device/tests/qkd/unit/PrepareScenario.py +++ b/src/device/tests/qkd/unit/PrepareScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/retrieve_device_mock_information.py b/src/device/tests/qkd/unit/retrieve_device_mock_information.py index f6e18f51d4ce788cbc40dc6befe101df65ef765f..2f6bda0605659ba63c9f9474d30763d747fc0096 100644 --- a/src/device/tests/qkd/unit/retrieve_device_mock_information.py +++ b/src/device/tests/qkd/unit/retrieve_device_mock_information.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_application_deployment.py b/src/device/tests/qkd/unit/test_application_deployment.py index d10ddc523062e1377c7621edfdd42b57c32bad56..352fa992e1010030c8fbbebf31cbad849550847e 100644 --- a/src/device/tests/qkd/unit/test_application_deployment.py +++ b/src/device/tests/qkd/unit/test_application_deployment.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_create_apps.py b/src/device/tests/qkd/unit/test_create_apps.py index 4724e5c4abd04e28586d54ae6dbbbf0be3c7dc5c..adfd9b1cf2ed643b49a088be7554cab3ac18d170 100644 --- a/src/device/tests/qkd/unit/test_create_apps.py +++ b/src/device/tests/qkd/unit/test_create_apps.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_mock_qkd_node.py b/src/device/tests/qkd/unit/test_mock_qkd_node.py index f679a8389476c35a6881b7dc6484baab8ef4e20b..36d6044910d02113c94c2cdf9c85e1dbd9b7fc96 100644 --- a/src/device/tests/qkd/unit/test_mock_qkd_node.py +++ b/src/device/tests/qkd/unit/test_mock_qkd_node.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_compliance.py b/src/device/tests/qkd/unit/test_qkd_compliance.py index 2f305888e952e7d9acc3e96ffc1e427a7cc85685..9c6f39919375b35c90a8e56b39e9c874eb1f1ad3 100644 --- a/src/device/tests/qkd/unit/test_qkd_compliance.py +++ b/src/device/tests/qkd/unit/test_qkd_compliance.py @@ -1,5 +1,5 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_configuration.py b/src/device/tests/qkd/unit/test_qkd_configuration.py index 15c4787c28a92ed07d8666b4c715954da1e690d6..dd7ef97bb51e900bae6b344175af910d2816ce24 100644 --- a/src/device/tests/qkd/unit/test_qkd_configuration.py +++ b/src/device/tests/qkd/unit/test_qkd_configuration.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_error_hanling.py b/src/device/tests/qkd/unit/test_qkd_error_hanling.py index d93e3711136de496fd39365563032f827cfbe913..cda4ee48cb8922d4282451820c9d0ad3f1969ca7 100644 --- a/src/device/tests/qkd/unit/test_qkd_error_hanling.py +++ b/src/device/tests/qkd/unit/test_qkd_error_hanling.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py b/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py index be9427d9b619423a61a3e6f5270d8aab76dc8955..402ade7a10751085b4ea79134439bf9cdbf2c3ca 100644 --- a/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py +++ b/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_performance.py b/src/device/tests/qkd/unit/test_qkd_performance.py index b15d1ab070b61333c55f7674e39ba74aae891de6..f261999c5ef877c83e6db4c4480de3492ba2d0f8 100644 --- a/src/device/tests/qkd/unit/test_qkd_performance.py +++ b/src/device/tests/qkd/unit/test_qkd_performance.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_security.py b/src/device/tests/qkd/unit/test_qkd_security.py index f2942fd4685dce13f89832528d4298b267707886..35e2954d7f01fe5fcd0b352765b736ade06cc7ac 100644 --- a/src/device/tests/qkd/unit/test_qkd_security.py +++ b/src/device/tests/qkd/unit/test_qkd_security.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_subscription.py b/src/device/tests/qkd/unit/test_qkd_subscription.py index 883fe2a1a6defe85a995c12e824a5e7d88159981..e16c307be041bc30e9a7abec7dd89ca6bd065569 100644 --- a/src/device/tests/qkd/unit/test_qkd_subscription.py +++ b/src/device/tests/qkd/unit/test_qkd_subscription.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_qkd_unsubscription.py b/src/device/tests/qkd/unit/test_qkd_unsubscription.py index 883fe2a1a6defe85a995c12e824a5e7d88159981..e16c307be041bc30e9a7abec7dd89ca6bd065569 100644 --- a/src/device/tests/qkd/unit/test_qkd_unsubscription.py +++ b/src/device/tests/qkd/unit/test_qkd_unsubscription.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/qkd/unit/test_set_new_configuration.py b/src/device/tests/qkd/unit/test_set_new_configuration.py index 438e46d74f0ad1204f496aaf99e29e21f41c5805..22ced06c5ef7dd7c96b4a76a37e4f4dad37229b8 100644 --- a/src/device/tests/qkd/unit/test_set_new_configuration.py +++ b/src/device/tests/qkd/unit/test_set_new_configuration.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_gnmi.py b/src/device/tests/test_gnmi.py deleted file mode 100644 index ebd026a206ddf9444d30c01e8ac2d097307cc0db..0000000000000000000000000000000000000000 --- a/src/device/tests/test_gnmi.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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. - -import logging, os, sys, time -from typing import Dict, Tuple -os.environ['DEVICE_EMULATED_ONLY'] = 'YES' -from device.service.drivers.gnmi_openconfig.GnmiOpenConfigDriver import GnmiOpenConfigDriver # pylint: disable=wrong-import-position -#from device.service.driver_api._Driver import ( -# RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES, RESOURCE_ROUTING_POLICIES, RESOURCE_SERVICES -#) - -logging.basicConfig(level=logging.DEBUG) -LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) - -# +---+---------------------------+--------------+---------------------------------+-------+---------+--------------------+--------------+ -# | # | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address | -# +---+---------------------------+--------------+---------------------------------+-------+---------+--------------------+--------------+ -# | 1 | clab-tfs-scenario-client1 | a8d48ec3265a | ghcr.io/hellt/network-multitool | linux | running | 172.100.100.201/24 | N/A | -# | 2 | clab-tfs-scenario-client2 | fc88436d2b32 | ghcr.io/hellt/network-multitool | linux | running | 172.100.100.202/24 | N/A | -# | 3 | clab-tfs-scenario-srl1 | b995b9bdadda | ghcr.io/nokia/srlinux | srl | running | 172.100.100.101/24 | N/A | -# | 4 | clab-tfs-scenario-srl2 | aacfc38cc376 | ghcr.io/nokia/srlinux | srl | running | 172.100.100.102/24 | N/A | -# +---+---------------------------+--------------+---------------------------------+-------+---------+--------------------+--------------+ - -def interface(if_name, sif_index, ipv4_address, ipv4_prefix, enabled) -> Tuple[str, Dict]: - str_path = '/interface[{:s}]'.format(if_name) - str_data = {'name': if_name, 'enabled': enabled, 'sub_if_index': sif_index, 'sub_if_enabled': enabled, - 'sub_if_ipv4_enabled': enabled, 'sub_if_ipv4_address': ipv4_address, 'sub_if_ipv4_prefix': ipv4_prefix} - return str_path, str_data - -def network_instance(ni_name, ni_type) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]'.format(ni_name) - str_data = {'name': ni_name, 'type': ni_type} - return str_path, str_data - -def network_instance_static_route(ni_name, prefix, next_hop, next_hop_index=0) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) - str_data = {'name': ni_name, 'prefix': prefix, 'next_hop': next_hop, 'next_hop_index': next_hop_index} - return str_path, str_data - -def network_instance_interface(ni_name, if_name, sif_index) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]/interface[{:s}.{:d}]'.format(ni_name, if_name, sif_index) - str_data = {'name': ni_name, 'if_name': if_name, 'sif_index': sif_index} - return str_path, str_data - -def main(): - driver_settings = { - 'protocol': 'gnmi', - 'username': 'admin', - 'password': 'NokiaSrl1!', - 'use_tls' : True, - } - driver = GnmiOpenConfigDriver('172.100.100.102', 57400, **driver_settings) - driver.Connect() - - #resources_to_get = [] - #resources_to_get = [RESOURCE_ENDPOINTS] - #resources_to_get = [RESOURCE_INTERFACES] - #resources_to_get = [RESOURCE_NETWORK_INSTANCES] - #resources_to_get = [RESOURCE_ROUTING_POLICIES] - #resources_to_get = [RESOURCE_SERVICES] - #LOGGER.info('resources_to_get = {:s}'.format(str(resources_to_get))) - #results_getconfig = driver.GetConfig(resources_to_get) - #LOGGER.info('results_getconfig = {:s}'.format(str(results_getconfig))) - - #resources_to_set = [ - # network_instance('test-svc', 'L3VRF'), - # - # interface('ethernet-1/1', 0, '172.16.0.1', 24, True), - # network_instance_interface('test-svc', 'ethernet-1/1', 0), - # - # interface('ethernet-1/2', 0, '172.0.0.1', 24, True), - # network_instance_interface('test-svc', 'ethernet-1/2', 0), - # - # network_instance_static_route('test-svc', '172.0.0.0/24', '172.16.0.2'), - # network_instance_static_route('test-svc', '172.2.0.0/24', '172.16.0.3'), - #] - #LOGGER.info('resources_to_set = {:s}'.format(str(resources_to_set))) - #results_setconfig = driver.SetConfig(resources_to_set) - #LOGGER.info('results_setconfig = {:s}'.format(str(results_setconfig))) - - resources_to_delete = [ - #network_instance_static_route('d35fc1d9', '172.0.0.0/24', '172.16.0.2'), - #network_instance_static_route('d35fc1d9', '172.2.0.0/24', '172.16.0.3'), - - #network_instance_interface('d35fc1d9', 'ethernet-1/1', 0), - #network_instance_interface('d35fc1d9', 'ethernet-1/2', 0), - - interface('ethernet-1/1', 0, '172.16.1.1', 24, True), - interface('ethernet-1/2', 0, '172.0.0.2', 24, True), - - network_instance('20f66fb5', 'L3VRF'), - ] - LOGGER.info('resources_to_delete = {:s}'.format(str(resources_to_delete))) - results_deleteconfig = driver.DeleteConfig(resources_to_delete) - LOGGER.info('results_deleteconfig = {:s}'.format(str(results_deleteconfig))) - - time.sleep(1) - - driver.Disconnect() - return 0 - -if __name__ == '__main__': - sys.exit(main()) diff --git a/src/device/tests/test_internal_p4.py b/src/device/tests/test_internal_p4.py index 6ce87349707892903f32408710f4c7a7b7c1ceb1..af99bb86be2dba91cf71cf9a6822fdf0b6acb613 100644 --- a/src/device/tests/test_internal_p4.py +++ b/src/device/tests/test_internal_p4.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_netconf.py b/src/device/tests/test_netconf.py index e5530efb5d8dfd7b18f2134d1e6c0f64b92e348d..46c07a690241d65825a4183926cf7e6f66b1560f 100644 --- a/src/device/tests/test_netconf.py +++ b/src/device/tests/test_netconf.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_emulated.py b/src/device/tests/test_unitary_emulated.py index 2ffcfa5369b8844801136c99ec4cf7d83010c36b..c4d2569b872629cb6a93e0f50c1cbbc11764c59e 100644 --- a/src/device/tests/test_unitary_emulated.py +++ b/src/device/tests/test_unitary_emulated.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_ietf_actn.py b/src/device/tests/test_unitary_ietf_actn.py index aa9fd9945fc526749eaa2596a90fbf90e9d0ed07..fb01af17207fdad7c749b1f6587054f0b53d4718 100644 --- a/src/device/tests/test_unitary_ietf_actn.py +++ b/src/device/tests/test_unitary_ietf_actn.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_microwave.py b/src/device/tests/test_unitary_microwave.py index 60341a61a7049b2204a26478ac9f49afd047d4ed..7dc452a47cc88bafe71bff294f35254b3d1a4749 100644 --- a/src/device/tests/test_unitary_microwave.py +++ b/src/device/tests/test_unitary_microwave.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_openconfig.py b/src/device/tests/test_unitary_openconfig.py index c806c1cae26c1a5a9312059f9f37c3191001b60e..4e8e7f4946cbc25ecbbd04f8d21158b58614a31c 100644 --- a/src/device/tests/test_unitary_openconfig.py +++ b/src/device/tests/test_unitary_openconfig.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_openconfig_ocnos.py b/src/device/tests/test_unitary_openconfig_ocnos.py index 87d951581ad98147f8dd565af616fe034a346693..fa034ff3a65dca4b8ccf59bd9f5202e91d7ce6a1 100644 --- a/src/device/tests/test_unitary_openconfig_ocnos.py +++ b/src/device/tests/test_unitary_openconfig_ocnos.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_p4.py b/src/device/tests/test_unitary_p4.py index 7701fa48352519971028d82fe7a84cec44f77384..ab4e253850ff37744a6d6a2ed2ecc8a80a37fb05 100644 --- a/src/device/tests/test_unitary_p4.py +++ b/src/device/tests/test_unitary_p4.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/device/tests/test_unitary_tapi.py b/src/device/tests/test_unitary_tapi.py index 0ff5aba7f9b58288c5d834bce477d7d85b63ae7a..898902a7ed2f478195ab1b61a842165c172c3b68 100644 --- a/src/device/tests/test_unitary_tapi.py +++ b/src/device/tests/test_unitary_tapi.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/.gitlab-ci.yml b/src/dlt/.gitlab-ci.yml index f2ee43a5794b9cb33426ebd4eba9fd8b84082e0b..cb260e93f3daeb71f0f91de67d8c71565fdbd052 100644 --- a/src/dlt/.gitlab-ci.yml +++ b/src/dlt/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/__init__.py b/src/dlt/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/dlt/__init__.py +++ b/src/dlt/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/Config.py b/src/dlt/connector/Config.py index 25f16a6fab8d8e6e123bc265eb5435a0e857bc8b..56e35a661581b80efb039d3817ede3350a460e84 100644 --- a/src/dlt/connector/Config.py +++ b/src/dlt/connector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/Dockerfile b/src/dlt/connector/Dockerfile index f9482e57efa9ed3940dc95e84762a5503544c21c..7e1e90932b5946e40413b98eb94bb8c75ab9e113 100644 --- a/src/dlt/connector/Dockerfile +++ b/src/dlt/connector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/__init__.py b/src/dlt/connector/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/dlt/connector/__init__.py +++ b/src/dlt/connector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/client/DltConnectorClient.py b/src/dlt/connector/client/DltConnectorClient.py index c3101d65e8609e6a5fb0ac1c4f80f48efd05f530..33565e329524adff51e41280274c5a57ab91af06 100644 --- a/src/dlt/connector/client/DltConnectorClient.py +++ b/src/dlt/connector/client/DltConnectorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/client/DltConnectorClientAsync.py b/src/dlt/connector/client/DltConnectorClientAsync.py index b9ed8a4d6e1f3878ad148cac5529bd6908a03a24..f5034a8c17331cfd40cd9cc688228304f6c9445d 100644 --- a/src/dlt/connector/client/DltConnectorClientAsync.py +++ b/src/dlt/connector/client/DltConnectorClientAsync.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/client/DltEventsCollector.py b/src/dlt/connector/client/DltEventsCollector.py index ce7d01480ba522a4006ca5d7b02943a157a10d29..16588e185c5c29434527fe2fbcecbbb1e44455e9 100644 --- a/src/dlt/connector/client/DltEventsCollector.py +++ b/src/dlt/connector/client/DltEventsCollector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/client/DltGatewayClient.py b/src/dlt/connector/client/DltGatewayClient.py index 21d4df57dd5eaa72eddc147b83b6a66344e20f02..7132edf753c728bf1a97238ef01f8f8ad4edf956 100644 --- a/src/dlt/connector/client/DltGatewayClient.py +++ b/src/dlt/connector/client/DltGatewayClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/client/DltGatewayClientAsync.py b/src/dlt/connector/client/DltGatewayClientAsync.py index 816241ec587295ffd6a8ef24cca5c66942a849d5..622d514812e199e7cb371ba40fb12f2e26005efe 100644 --- a/src/dlt/connector/client/DltGatewayClientAsync.py +++ b/src/dlt/connector/client/DltGatewayClientAsync.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/client/__init__.py b/src/dlt/connector/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/connector/client/__init__.py +++ b/src/dlt/connector/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/requirements.in b/src/dlt/connector/requirements.in index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/dlt/connector/requirements.in +++ b/src/dlt/connector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/DltConnectorService.py b/src/dlt/connector/service/DltConnectorService.py index 601d3e70d298d8ae2a098339e71fc49d66fb79ad..a87f97c76837c78f318d273f6c83f0f3992e8e02 100644 --- a/src/dlt/connector/service/DltConnectorService.py +++ b/src/dlt/connector/service/DltConnectorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py index c1a4b7b1ea2f978e798d77bfe05cfa3f245283ce..62847f2397bb8ed8e4260dba26d8c1ec87b27649 100644 --- a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py +++ b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/__init__.py b/src/dlt/connector/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/connector/service/__init__.py +++ b/src/dlt/connector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/__main__.py b/src/dlt/connector/service/__main__.py index d1c9461247176f4f8d2849fb4cd594072d2c3a55..7bdda817c44c5a8e8f2798f2221f40906cda70d1 100644 --- a/src/dlt/connector/service/__main__.py +++ b/src/dlt/connector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py b/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py index 779bae9c19f583ec47584673da51b536cc1dc8b3..e85713547dbfb7bae4ea9c7b97a5578f410b82fd 100644 --- a/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py +++ b/src/dlt/connector/service/event_dispatcher/DltEventDispatcher.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/event_dispatcher/__init__.py b/src/dlt/connector/service/event_dispatcher/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/connector/service/event_dispatcher/__init__.py +++ b/src/dlt/connector/service/event_dispatcher/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/tools/Checkers.py b/src/dlt/connector/service/tools/Checkers.py index 5b19afcd24171767c9b1130c8cb9d594b5afa5bf..4b9f05d4b86e6ea74804a562ece8fb4603e90ece 100644 --- a/src/dlt/connector/service/tools/Checkers.py +++ b/src/dlt/connector/service/tools/Checkers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/service/tools/__init__.py b/src/dlt/connector/service/tools/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/connector/service/tools/__init__.py +++ b/src/dlt/connector/service/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/tests/MockService_Dependencies.py b/src/dlt/connector/tests/MockService_Dependencies.py index 88bb8f48783dcb1a6817ba24f3a1a8a6cc215279..dcd8f515f9cac0eeb252a683ec15d4454e73221d 100644 --- a/src/dlt/connector/tests/MockService_Dependencies.py +++ b/src/dlt/connector/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/tests/Objects.py b/src/dlt/connector/tests/Objects.py index b14fb972280ce602c5982c4481d1414fbd6f61bc..06777ae227cf1895b0ca68f9c7b6f82336e21022 100644 --- a/src/dlt/connector/tests/Objects.py +++ b/src/dlt/connector/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/tests/PrepareTestScenario.py b/src/dlt/connector/tests/PrepareTestScenario.py index cc6bb641461c19bc538c9e7e53bb0efebd6f3b31..e2a019ce5007eeae3044d46e5aa206fc64d3d955 100644 --- a/src/dlt/connector/tests/PrepareTestScenario.py +++ b/src/dlt/connector/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/tests/__init__.py b/src/dlt/connector/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/connector/tests/__init__.py +++ b/src/dlt/connector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/tests/basic.py b/src/dlt/connector/tests/basic.py index 08c5980889d66318b2221f6c62ff7918f05d1efc..8c5f01dc055a5772634a292c720534f0ed530efb 100644 --- a/src/dlt/connector/tests/basic.py +++ b/src/dlt/connector/tests/basic.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/connector/tests/test_unitary.py b/src/dlt/connector/tests/test_unitary.py index 530be89d913441f03dcea2e843fc1ebb1ef9ba60..b8571568d7614be19de33342e22206b61ebc66c0 100644 --- a/src/dlt/connector/tests/test_unitary.py +++ b/src/dlt/connector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/Dockerfile b/src/dlt/gateway/Dockerfile index ace9cb22ee691efd7565120034a6a1ef36a27aaf..c757779e8b86cd1c0983a707bf6f353312ac3782 100644 --- a/src/dlt/gateway/Dockerfile +++ b/src/dlt/gateway/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/chaincode/chaincode.go b/src/dlt/gateway/chaincode/chaincode.go index 878cbe9423a7d2cac31e1857343dcdc61034180d..551a91c8cf696cf140f022d047ac9b0d2ff83a1b 100644 --- a/src/dlt/gateway/chaincode/chaincode.go +++ b/src/dlt/gateway/chaincode/chaincode.go @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/chaincode/go.mod b/src/dlt/gateway/chaincode/go.mod index 27f86fbabd3d9b169f485ab22ccc42125421afa6..9078fbdb20196180e9f8af1454faa94c91a14896 100644 --- a/src/dlt/gateway/chaincode/go.mod +++ b/src/dlt/gateway/chaincode/go.mod @@ -1,4 +1,4 @@ -<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +<!-- Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/dltApp/src/dltGateway.js b/src/dlt/gateway/dltApp/src/dltGateway.js index 656397dc88bfd8289b53e72a8d1dbde9eab32594..3949a6c5bded5fb462e8d57110e4714c725b8b22 100644 --- a/src/dlt/gateway/dltApp/src/dltGateway.js +++ b/src/dlt/gateway/dltApp/src/dltGateway.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/dltApp/src/fabricConnect.ts b/src/dlt/gateway/dltApp/src/fabricConnect.ts index 973fd6077cd3e4ee7d397f8625f4a399935183f9..8d9f4146eac3122db34cb9e1d2d40359d9685115 100644 --- a/src/dlt/gateway/dltApp/src/fabricConnect.ts +++ b/src/dlt/gateway/dltApp/src/fabricConnect.ts @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/tests/perfTest.js b/src/dlt/gateway/tests/perfTest.js index fd60bd9c4bba04a7c2a048d26389dd66381b5749..579a8539f4ab86736debc310443e24e80a0bc728 100644 --- a/src/dlt/gateway/tests/perfTest.js +++ b/src/dlt/gateway/tests/perfTest.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/tests/rateTest.js b/src/dlt/gateway/tests/rateTest.js index f7c40884293220c0ab235322d74aee61074a281c..fb0477665794bc51f2550acc50cc1742770ec6a6 100644 --- a/src/dlt/gateway/tests/rateTest.js +++ b/src/dlt/gateway/tests/rateTest.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/tests/simpleTest.js b/src/dlt/gateway/tests/simpleTest.js index 72da03dec16b91c7b6acc21e339f2844d74153be..d7605bd73d8dc66cd65139357533220b1695b60c 100644 --- a/src/dlt/gateway/tests/simpleTest.js +++ b/src/dlt/gateway/tests/simpleTest.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/tests/testEvents.js b/src/dlt/gateway/tests/testEvents.js index 6e18e803202232a9613264dd49e6beee14546d14..3ef826ebef93b97d2bbd6237742a5f2801fbfe1c 100644 --- a/src/dlt/gateway/tests/testEvents.js +++ b/src/dlt/gateway/tests/testEvents.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/gateway/tests/testGateway.js b/src/dlt/gateway/tests/testGateway.js index b08f648daf6f257f44ec94cd13dabccce67cd803..5edfe82fced4115b447e0e9af14322fe4f33b3ae 100644 --- a/src/dlt/gateway/tests/testGateway.js +++ b/src/dlt/gateway/tests/testGateway.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/mock_blockchain/Dockerfile b/src/dlt/mock_blockchain/Dockerfile index 776904c5f0adf12d4328b8d660794af93f142c77..93bae2f87a0ee8c3a688589fec3745343322cbbc 100644 --- a/src/dlt/mock_blockchain/Dockerfile +++ b/src/dlt/mock_blockchain/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/mock_blockchain/__init__.py b/src/dlt/mock_blockchain/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/mock_blockchain/__init__.py +++ b/src/dlt/mock_blockchain/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/mock_blockchain/requirements.in b/src/dlt/mock_blockchain/requirements.in index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/dlt/mock_blockchain/requirements.in +++ b/src/dlt/mock_blockchain/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/mock_blockchain/service/__init__.py b/src/dlt/mock_blockchain/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/mock_blockchain/service/__init__.py +++ b/src/dlt/mock_blockchain/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/mock_blockchain/service/__main__.py b/src/dlt/mock_blockchain/service/__main__.py index 8e2662571e6f8c49975687ee29b28c5eac6121c5..6d02d084c3d7017fd9f2c5de555536734227bb9f 100644 --- a/src/dlt/mock_blockchain/service/__main__.py +++ b/src/dlt/mock_blockchain/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/__init__.py b/src/dlt/performance/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/dlt/performance/__init__.py +++ b/src/dlt/performance/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/__main__.py b/src/dlt/performance/__main__.py index 1d6c419651bd561b12325dbcb0dba44461f25195..fb57d575a538e7cb8c8d5d17ff78bb3265d30e3e 100644 --- a/src/dlt/performance/__main__.py +++ b/src/dlt/performance/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/Dlt.py b/src/dlt/performance/play_ground/Dlt.py index b2c88954581987f5bb52d2458e4d711820d0d3b6..f0684d3a6ee9c15d40cb3daa1727519bb57cea56 100644 --- a/src/dlt/performance/play_ground/Dlt.py +++ b/src/dlt/performance/play_ground/Dlt.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/Enums.py b/src/dlt/performance/play_ground/Enums.py index 0bbd49403920a773fc4d9edc9e70a6478a4d9867..ad249d0ff87065c001da65dda56e73d2c61d12e2 100644 --- a/src/dlt/performance/play_ground/Enums.py +++ b/src/dlt/performance/play_ground/Enums.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/PerfData.py b/src/dlt/performance/play_ground/PerfData.py index 500e060b417d61b2d4356c221994142da03b5bf5..3221fa946fee25a2174e5430f2dbb9ed9e0b7b31 100644 --- a/src/dlt/performance/play_ground/PerfData.py +++ b/src/dlt/performance/play_ground/PerfData.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/PerfPoint.py b/src/dlt/performance/play_ground/PerfPoint.py index f557299b7cfc44fcc176b3431f3e3c20c7037aa5..2de88cc388f41f3e636c4b21ab5cea115ac36eaf 100644 --- a/src/dlt/performance/play_ground/PerfPoint.py +++ b/src/dlt/performance/play_ground/PerfPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/Random.py b/src/dlt/performance/play_ground/Random.py index bea20f9ae74f3d8b1c01dda1b37cbb5cf5867ab6..64eac7dfef896513fb4a884a6f44e85c61b92ae4 100644 --- a/src/dlt/performance/play_ground/Random.py +++ b/src/dlt/performance/play_ground/Random.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/Settings.py b/src/dlt/performance/play_ground/Settings.py index 9944ebfaad01f7e0a494e462c4712c2f254953a9..a29655d1e9a161b5bddfc85812d4988465f5f780 100644 --- a/src/dlt/performance/play_ground/Settings.py +++ b/src/dlt/performance/play_ground/Settings.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/play_ground/__init__.py b/src/dlt/performance/play_ground/__init__.py index 68ad14deebd57548815db01d38cec2605e3d2a7d..0ac3642b72a4cae72cd7b7846113dff79cbeb935 100644 --- a/src/dlt/performance/play_ground/__init__.py +++ b/src/dlt/performance/play_ground/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/dlt/performance/run_test.sh b/src/dlt/performance/run_test.sh index 7d23d4e65f570c5d26172c5618bef9a559422ec8..c744ea70353e928a6262806e0b9be1cd6224c52a 100755 --- a/src/dlt/performance/run_test.sh +++ b/src/dlt/performance/run_test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/.gitlab-ci.yml b/src/e2e_orchestrator/.gitlab-ci.yml index 0930be486cce13706292a48c6e6e01c60228f061..9e2ec38a1e13e511982ab2e30c3c0077064a0372 100644 --- a/src/e2e_orchestrator/.gitlab-ci.yml +++ b/src/e2e_orchestrator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/Config.py b/src/e2e_orchestrator/Config.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/e2e_orchestrator/Config.py +++ b/src/e2e_orchestrator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/Dockerfile b/src/e2e_orchestrator/Dockerfile index 132d6ba47938e1c74cee08aa3ad41ead6f992f68..f875663c1abbb8aeaadef6504c00fe6c8cbd28de 100644 --- a/src/e2e_orchestrator/Dockerfile +++ b/src/e2e_orchestrator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/__init__.py b/src/e2e_orchestrator/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/e2e_orchestrator/__init__.py +++ b/src/e2e_orchestrator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/client/E2EOrchestratorClient.py b/src/e2e_orchestrator/client/E2EOrchestratorClient.py index e532bb93eb80a3d1120d6de862e5ffb8021b606c..bc8ea8652db3afa82712f9f9ac8637590035a0aa 100644 --- a/src/e2e_orchestrator/client/E2EOrchestratorClient.py +++ b/src/e2e_orchestrator/client/E2EOrchestratorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/client/__init__.py b/src/e2e_orchestrator/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/e2e_orchestrator/client/__init__.py +++ b/src/e2e_orchestrator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/requirements.in b/src/e2e_orchestrator/requirements.in index 5732b1bf053301f73a37830e66eb211912d9e200..691d14abd1a75b3ea37ef0ee34103fd05a545310 100644 --- a/src/e2e_orchestrator/requirements.in +++ b/src/e2e_orchestrator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/service/E2EOrchestratorService.py b/src/e2e_orchestrator/service/E2EOrchestratorService.py index 2e12ea980da0f90352f2cfba1cf1f39af4594901..3abef2777ba22cc63df3db1eb86ee411a4ea74c7 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorService.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,19 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from common.Constants import ServiceNameEnum -from common.proto.e2eorchestrator_pb2_grpc import add_E2EOrchestratorServiceServicer_to_server from common.Settings import get_service_port_grpc +from common.proto.e2eorchestrator_pb2 import DESCRIPTOR as E2EORCHESTRATOR_DESCRIPTOR +from common.proto.e2eorchestrator_pb2_grpc import add_E2EOrchestratorServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .E2EOrchestratorServiceServicerImpl import E2EOrchestratorServiceServicerImpl -LOGGER = logging.getLogger(__name__) - - class E2EOrchestratorService(GenericGrpcService): - def __init__(self, cls_name: str = __name__): + def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.E2EORCHESTRATOR) super().__init__(port, cls_name=cls_name) self.e2eorchestrator_servicer = E2EOrchestratorServiceServicerImpl() @@ -33,3 +29,5 @@ class E2EOrchestratorService(GenericGrpcService): add_E2EOrchestratorServiceServicer_to_server( self.e2eorchestrator_servicer, self.server ) + + self.add_reflection_service_name(E2EORCHESTRATOR_DESCRIPTOR, 'E2EOrchestratorService') diff --git a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py index 4fc0ea3ba45a85bb3b1dccb18191dc1b4e380404..945f3171fbc3949056255a79e366ce17c2fa5c88 100644 --- a/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py +++ b/src/e2e_orchestrator/service/E2EOrchestratorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/service/__init__.py b/src/e2e_orchestrator/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/e2e_orchestrator/service/__init__.py +++ b/src/e2e_orchestrator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/service/__main__.py b/src/e2e_orchestrator/service/__main__.py index b4763627d6de04e49765c047d560cc5626fbc17f..0854aed2de9c748bab7c4d70f35dc6fd3e2ebfd3 100644 --- a/src/e2e_orchestrator/service/__main__.py +++ b/src/e2e_orchestrator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/__init__.py b/src/e2e_orchestrator/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/e2e_orchestrator/tests/__init__.py +++ b/src/e2e_orchestrator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/deploy_specs.sh b/src/e2e_orchestrator/tests/deploy_specs.sh index 9ce234c326b0036986bc685e7abb6a1235e185bc..645c5d6723d927ba80264632e12feb5a6a593470 100755 --- a/src/e2e_orchestrator/tests/deploy_specs.sh +++ b/src/e2e_orchestrator/tests/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -83,9 +83,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/e2e_orchestrator/tests/functional_tests/Fixtures.py b/src/e2e_orchestrator/tests/functional_tests/Fixtures.py index 7fe3093d082e6400f118ce38a273496036ac6d41..0d6b15aa9724b4abfe81ecec25c20856dbbe3f8e 100644 --- a/src/e2e_orchestrator/tests/functional_tests/Fixtures.py +++ b/src/e2e_orchestrator/tests/functional_tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/functional_tests/Objects.py b/src/e2e_orchestrator/tests/functional_tests/Objects.py index 4cf8334962562e14193fc60654cb4d4c93b221b3..d1bb13089ed0155bbdccf2247a60796016d6cc10 100644 --- a/src/e2e_orchestrator/tests/functional_tests/Objects.py +++ b/src/e2e_orchestrator/tests/functional_tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/functional_tests/__init__.py b/src/e2e_orchestrator/tests/functional_tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/e2e_orchestrator/tests/functional_tests/__init__.py +++ b/src/e2e_orchestrator/tests/functional_tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py b/src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py index 1103977dab86e4145590377f6f57fb56d1c92b84..005b775c5df191304b671c57812935243fee5f0c 100644 --- a/src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py +++ b/src/e2e_orchestrator/tests/functional_tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py b/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py index 0d4cf66723e1f3dff6168b32ca1d1d5670316f74..970b654a46f7cbd435422c95667d464dbf3df72e 100644 --- a/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py +++ b/src/e2e_orchestrator/tests/functional_tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py b/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py index a4bbb0c06cd6a5bd33727022722166b1fd21de79..2b37784c30fe15178d837b0cb7ea9788a3aea323 100644 --- a/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py +++ b/src/e2e_orchestrator/tests/functional_tests/test_functional_compute_path.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/redeploy.sh b/src/e2e_orchestrator/tests/redeploy.sh index 830feca00a4f36d1c9264ae315fd9c4854d629c5..1a544b62695a2d2e199617a28d2ec58d051c9fac 100755 --- a/src/e2e_orchestrator/tests/redeploy.sh +++ b/src/e2e_orchestrator/tests/redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh b/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh index 657acb5c04844a3030bcafa56d5d309d3beb005a..e2a7bbd9381490101e1c44e1ac1a9e6565cc6324 100755 --- a/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh +++ b/src/e2e_orchestrator/tests/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/run_test_02_compute_path.sh b/src/e2e_orchestrator/tests/run_test_02_compute_path.sh index c6d20bad0da14bd191f607a8abf38241d98d8879..b94c77600892a1ac0cde75e1f4cf1840733ca09b 100755 --- a/src/e2e_orchestrator/tests/run_test_02_compute_path.sh +++ b/src/e2e_orchestrator/tests/run_test_02_compute_path.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/run_test_03_cleanup.sh b/src/e2e_orchestrator/tests/run_test_03_cleanup.sh index 6ddacf5bdd82bfae66ae1e5558359ea800c7c11b..4aa2ec1aa05276d8297ca4b2753db7a163e8f966 100755 --- a/src/e2e_orchestrator/tests/run_test_03_cleanup.sh +++ b/src/e2e_orchestrator/tests/run_test_03_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/e2e_orchestrator/tests/run_tests.sh b/src/e2e_orchestrator/tests/run_tests.sh index 70b5668ffe9517bf653ea49198c212f257a51b3a..a9f4c6d7fab93bf56a5f25643e4083eeffa0afbb 100755 --- a/src/e2e_orchestrator/tests/run_tests.sh +++ b/src/e2e_orchestrator/tests/run_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/.gitlab-ci.yml b/src/forecaster/.gitlab-ci.yml index 65ce9467b4ad6b13db0dc0a795eeafe94e6e49b9..74d7f6a1fb71b11cb609213f30259897ee10ffdc 100644 --- a/src/forecaster/.gitlab-ci.yml +++ b/src/forecaster/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/Config.py b/src/forecaster/Config.py index 84c82dd1513f3a0d16912b2bdec9d149c6da3f68..2319e6ba5f500e294b2e354b4438b6ba6b375835 100644 --- a/src/forecaster/Config.py +++ b/src/forecaster/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/Dockerfile b/src/forecaster/Dockerfile index 62c905a15085537da6c8abf01d522405c544ba15..f521eab4028f749465eec231a44cb0ce5322a4e7 100644 --- a/src/forecaster/Dockerfile +++ b/src/forecaster/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/__init__.py b/src/forecaster/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/forecaster/__init__.py +++ b/src/forecaster/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/client/ForecasterClient.py b/src/forecaster/client/ForecasterClient.py index d3ba72778807e584f175e735c3c2c9fef8ac3f54..9bffffc6215b895f47cc138555975a9673555c27 100644 --- a/src/forecaster/client/ForecasterClient.py +++ b/src/forecaster/client/ForecasterClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/client/__init__.py b/src/forecaster/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/forecaster/client/__init__.py +++ b/src/forecaster/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/requirements.in b/src/forecaster/requirements.in index 9a31513799fd6aa5d915fb6c83a516176f290ce9..08672672a01e3d405ac3bff4d3aa0441e3106ec6 100644 --- a/src/forecaster/requirements.in +++ b/src/forecaster/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/service/Forecaster.py b/src/forecaster/service/Forecaster.py index 148bc8bf81e03ef41ec65cff8353f2edcc51c52a..e7930679d6922e315df06a1bcbb519dbf209bc4d 100644 --- a/src/forecaster/service/Forecaster.py +++ b/src/forecaster/service/Forecaster.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/service/ForecasterService.py b/src/forecaster/service/ForecasterService.py index c44e2e163bcb1b00f0953a2d9e048347521a0f4a..fedb5242d616eb8eef0a9b4e3fd5308925437acd 100644 --- a/src/forecaster/service/ForecasterService.py +++ b/src/forecaster/service/ForecasterService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,6 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.forecaster_pb2 import DESCRIPTOR as FORECASTER_DESCRIPTOR from common.proto.forecaster_pb2_grpc import add_ForecasterServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .ForecasterServiceServicerImpl import ForecasterServiceServicerImpl @@ -26,3 +27,5 @@ class ForecasterService(GenericGrpcService): def install_servicers(self): add_ForecasterServiceServicer_to_server(self.forecaster_servicer, self.server) + + self.add_reflection_service_name(FORECASTER_DESCRIPTOR, 'ForecasterService') diff --git a/src/forecaster/service/ForecasterServiceServicerImpl.py b/src/forecaster/service/ForecasterServiceServicerImpl.py index de99054a436aecfd03b5ac3d7dcb7e9ca16d01e3..df592b4df481ddad53cdaaa848d7e020ebd160e5 100644 --- a/src/forecaster/service/ForecasterServiceServicerImpl.py +++ b/src/forecaster/service/ForecasterServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/service/KpiManager.py b/src/forecaster/service/KpiManager.py index b9b6618d0950e134410c648601732ed99d8697de..48bc920c775fb29afb5f88543795ee5ad1bb6d31 100644 --- a/src/forecaster/service/KpiManager.py +++ b/src/forecaster/service/KpiManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/service/__init__.py b/src/forecaster/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/forecaster/service/__init__.py +++ b/src/forecaster/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/service/__main__.py b/src/forecaster/service/__main__.py index 61f9083eaecd6ed4eb24d6e863f41e80194cac76..cf5e881109529560d47d5e1b0ac30333d760e32f 100644 --- a/src/forecaster/service/__main__.py +++ b/src/forecaster/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/tests/MockService_Dependencies.py b/src/forecaster/tests/MockService_Dependencies.py index 55a28e39405ee2f99806f69cb2cc8f792fd97482..56ef052bdb02caee2e33019d87578e84fe1ff66d 100644 --- a/src/forecaster/tests/MockService_Dependencies.py +++ b/src/forecaster/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/tests/PrepareTestScenario.py b/src/forecaster/tests/PrepareTestScenario.py index 74f6ffed7861b37c4ebf3994d0dba82bff30a02c..71bfa37dbf8bd57b3e2d6945d74eba07aea4cf21 100644 --- a/src/forecaster/tests/PrepareTestScenario.py +++ b/src/forecaster/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/tests/Tools.py b/src/forecaster/tests/Tools.py index ff686750710fe47adbf03adfad91040fb0fb980b..246132140574df581a6011e9e5beca41624db853 100644 --- a/src/forecaster/tests/Tools.py +++ b/src/forecaster/tests/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/tests/__init__.py b/src/forecaster/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/forecaster/tests/__init__.py +++ b/src/forecaster/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/tests/data/inject_samples.py b/src/forecaster/tests/data/inject_samples.py index fdc6606c22c6d6e2b9c2720a50be0713527c56e4..06029d095d14d9333128d657875952f6d76d12b6 100644 --- a/src/forecaster/tests/data/inject_samples.py +++ b/src/forecaster/tests/data/inject_samples.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/forecaster/tests/test_unitary.py b/src/forecaster/tests/test_unitary.py index 02a7c3202f3293183680fa1396f1aee3f90fbf42..cf5200cc8c5610988c9464628c74685b5d263a73 100644 --- a/src/forecaster/tests/test_unitary.py +++ b/src/forecaster/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/gitlab-ci.yml_generator.py b/src/gitlab-ci.yml_generator.py index e3d81b7739bbe8bdf39da3dc446beea0bbb69f69..8d8b4fc24f769cb7c76526c31d18b51d61e7acd1 100644 --- a/src/gitlab-ci.yml_generator.py +++ b/src/gitlab-ci.yml_generator.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/.gitlab-ci.yml b/src/interdomain/.gitlab-ci.yml index 775df616f781912909a13a65f8b6a74b6d8e5942..00bf83739ef2dda31dc7cd6abdbce30b39cc49e3 100644 --- a/src/interdomain/.gitlab-ci.yml +++ b/src/interdomain/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/Config.py b/src/interdomain/Config.py index d9098447bb107a878acf297d66eaf1573d72691d..fff1c96a5dc38dfc01dd85218eda7f9ba00da393 100644 --- a/src/interdomain/Config.py +++ b/src/interdomain/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/Dockerfile b/src/interdomain/Dockerfile index 39a68987cc288f8547e3f8d944718a0b9cbf19c2..57f55007aac4aa62d86b3c7317b142a531f58fd0 100644 --- a/src/interdomain/Dockerfile +++ b/src/interdomain/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/__init__.py b/src/interdomain/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/interdomain/__init__.py +++ b/src/interdomain/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/client/InterdomainClient.py b/src/interdomain/client/InterdomainClient.py index a829c293ebbe035ef59c8f09369b8d1c0b850e38..ae78c2078a9bcf025ea90e87495ed48541e0c604 100644 --- a/src/interdomain/client/InterdomainClient.py +++ b/src/interdomain/client/InterdomainClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/client/__init__.py b/src/interdomain/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/interdomain/client/__init__.py +++ b/src/interdomain/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/requirements.in b/src/interdomain/requirements.in index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/interdomain/requirements.in +++ b/src/interdomain/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/InterdomainService.py b/src/interdomain/service/InterdomainService.py index 12d651e2f0e76d05e0683be74f48808d71993bdb..f71a8e422a1f239bfdb9752dd9fff3857d0f17b3 100644 --- a/src/interdomain/service/InterdomainService.py +++ b/src/interdomain/service/InterdomainService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/InterdomainServiceServicerImpl.py b/src/interdomain/service/InterdomainServiceServicerImpl.py index bce5e69203417e9026ddabc336a260216d0fd991..3aafdc4d1b12cbe7246bc0e452db451ee808c24e 100644 --- a/src/interdomain/service/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/InterdomainServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/RemoteDomainClients.py b/src/interdomain/service/RemoteDomainClients.py index b69b9f545869d2b9d8721ca109cb0cbe4ad1f8ea..93fd1bb25184a12be5f1291961d299df0084a658 100644 --- a/src/interdomain/service/RemoteDomainClients.py +++ b/src/interdomain/service/RemoteDomainClients.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/Tools.py b/src/interdomain/service/Tools.py index a43279236d9e5f7ac5c9985c8c93fb2e421fff69..9e4e7b67c6182786cd89e0f5698273bd6d66bdf3 100644 --- a/src/interdomain/service/Tools.py +++ b/src/interdomain/service/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/__init__.py b/src/interdomain/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/interdomain/service/__init__.py +++ b/src/interdomain/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/__main__.py b/src/interdomain/service/__main__.py index 7ab9682c2789ed11c4f066fa4b453e8c1212878b..39cd2cbc74d60394d4e7967a97a149ed9470a8dd 100644 --- a/src/interdomain/service/__main__.py +++ b/src/interdomain/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py b/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py index 6b0fe9468497bb11818bbf4a5451e74c53b9b6d5..004d00de5c054c6353465e74800eeb104dbed8cb 100644 --- a/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/_old_code/InterdomainServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/AbstractDevice.py b/src/interdomain/service/topology_abstractor/AbstractDevice.py index 38523130cba2c657a2d3b0b61897269f6b7f5cb1..e5768911e0ab1033d32dc2a1dcfbeaa4e8f761dd 100644 --- a/src/interdomain/service/topology_abstractor/AbstractDevice.py +++ b/src/interdomain/service/topology_abstractor/AbstractDevice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/AbstractLink.py b/src/interdomain/service/topology_abstractor/AbstractLink.py index f336d0ad90cc531c1d6b50efb33036088f63f190..25c0d537dea8e523be3736e534d1c40e5a5e1af1 100644 --- a/src/interdomain/service/topology_abstractor/AbstractLink.py +++ b/src/interdomain/service/topology_abstractor/AbstractLink.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/DltRecordSender.py b/src/interdomain/service/topology_abstractor/DltRecordSender.py index 5c53edc598ee57b856ebea3bd1eaf2e855b0cf6b..f2a8b0a489837da9261d7c8aa9436a260f7994dd 100644 --- a/src/interdomain/service/topology_abstractor/DltRecordSender.py +++ b/src/interdomain/service/topology_abstractor/DltRecordSender.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/DltRecorder.py b/src/interdomain/service/topology_abstractor/DltRecorder.py index 22c436363b009810815b1cf3fa011fd5cbbc6a13..6f89a447da9a4e8c949c9c50e9f7c8956c60cbd5 100644 --- a/src/interdomain/service/topology_abstractor/DltRecorder.py +++ b/src/interdomain/service/topology_abstractor/DltRecorder.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/TopologyAbstractor.py b/src/interdomain/service/topology_abstractor/TopologyAbstractor.py index 2a6ef5e32ca5a973ab833e7e5d0429f65df9812b..68cd52cab01745dfe90f832ff5195b57271edba5 100644 --- a/src/interdomain/service/topology_abstractor/TopologyAbstractor.py +++ b/src/interdomain/service/topology_abstractor/TopologyAbstractor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/Types.py b/src/interdomain/service/topology_abstractor/Types.py index 5cb3220eb2d6c0204b1271b6881676b8563904fd..8e2132a8c55361c718e0a26e6f47797e9ec4ff69 100644 --- a/src/interdomain/service/topology_abstractor/Types.py +++ b/src/interdomain/service/topology_abstractor/Types.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/service/topology_abstractor/__init__.py b/src/interdomain/service/topology_abstractor/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/interdomain/service/topology_abstractor/__init__.py +++ b/src/interdomain/service/topology_abstractor/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/tests/__init__.py b/src/interdomain/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/interdomain/tests/__init__.py +++ b/src/interdomain/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/tests/old_tests.py b/src/interdomain/tests/old_tests.py index d5bb962629e5456320e18136976423531fa1d9da..3eb3b09e1c75294a104cab3065f89e92ddb5cb71 100644 --- a/src/interdomain/tests/old_tests.py +++ b/src/interdomain/tests/old_tests.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/tests/test_compute_domains.py b/src/interdomain/tests/test_compute_domains.py index 81cc2b6708c7f0f91de48e064f6fde833f55f797..8455881dab3d7c5c3909e9853c01d0fe7bc51e78 100644 --- a/src/interdomain/tests/test_compute_domains.py +++ b/src/interdomain/tests/test_compute_domains.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/interdomain/tests/test_topology_abstractor.py b/src/interdomain/tests/test_topology_abstractor.py index 43f470a38e12f7eefaad5346504eb9c0b67d1201..b325f7a8eccee6cca2cd105f9c9282b590462568 100644 --- a/src/interdomain/tests/test_topology_abstractor.py +++ b/src/interdomain/tests/test_topology_abstractor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/.gitlab-ci.yml b/src/kpi_manager/.gitlab-ci.yml index 47c866b4a963a4ce94e227bf24bdeb9263af04e1..fb917601ab27cb4dda491b27572be80426d6c3de 100644 --- a/src/kpi_manager/.gitlab-ci.yml +++ b/src/kpi_manager/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/Dockerfile b/src/kpi_manager/Dockerfile index a57957759a32b45b715e327b54ebe004a6edf265..12455e4c96d8cf343b33decc9ccd5bac4e01ed7a 100644 --- a/src/kpi_manager/Dockerfile +++ b/src/kpi_manager/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/README.md b/src/kpi_manager/README.md index 6e9b56d9349aa6acd5c41004e32c933619a37f65..0496f0945047950e9fbd4e5caf78a79a15051cf6 100644 --- a/src/kpi_manager/README.md +++ b/src/kpi_manager/README.md @@ -5,20 +5,14 @@ Ensure the following requirements are met before executing the KPI management se 1. A virtual enviornment exist with all the required packages listed in ["requirements.in"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_manager/requirements.in) sucessfully installed. 2. Verify the creation of required database and table. The -[KPI DB test](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_manager/tests/test_kpi_db.py) python file lists the functions to create tables and the database. The -[KPI Engine](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_manager/database/KpiEngine.py) file contains the DB string. +[KPI DB test](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_manager/tests/test_kpi_db.py) python file lists the functions to create tables and the database. ### Messages format templates The ["messages"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_manager/tests/test_messages.py) python file contains templates for creating gRPC messages. -### Unit test file -The ["KPI manager test"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_manager/tests/test_kpi_manager.py) python file lists various tests conducted to validate functionality. +### Flow of execution (Kpi Manager Service functions) +1. Call the gRPC method `SetKpiDescriptor(KpiDescriptor)->KpiId` to add the KpiDescriptor to the `Kpi` DB. `KpiDescriptor` and `KpiId` are both pre-defined gRPC message types. -### Flow of execution (Kpi Maanager Service functions) -1. Call the `create_database()` and `create_tables()` functions from `Kpi_DB` class to create the required database and table if they don't exist. Call `verify_tables` to verify the existence of KPI table. +2. Call `GetKpiDescriptor(KpiId)->KpiDescriptor` to read the `KpiDescriptor` from the DB and `DeleteKpiDescriptor(KpiId)` to delete the `KpiDescriptor` from the DB. -2. Call the gRPC method `SetKpiDescriptor(KpiDescriptor)->KpiId` to add the KpiDescriptor to the `Kpi` DB. `KpiDescriptor` and `KpiId` are both pre-defined gRPC message types. - -3. Call `GetKpiDescriptor(KpiId)->KpiDescriptor` to read the `KpiDescriptor` from the DB and `DeleteKpiDescriptor(KpiId)` to delete the `KpiDescriptor` from the DB. - -4. Call `SelectKpiDescriptor(KpiDescriptorFilter)->KpiDescriptorList` to get all `KpiDescriptor` objects that matches filter criteria. `KpiDescriptorFilter` and `KpiDescriptorList` are pre-defined gRPC message types. +3. Call `SelectKpiDescriptor(KpiDescriptorFilter)->KpiDescriptorList` to get all `KpiDescriptor` objects that matches filter criteria. `KpiDescriptorFilter` and `KpiDescriptorList` are pre-defined gRPC message types. diff --git a/src/kpi_manager/__init__.py b/src/kpi_manager/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_manager/__init__.py +++ b/src/kpi_manager/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/client/KpiManagerClient.py b/src/kpi_manager/client/KpiManagerClient.py index 672d82f2d78ea8b477429c5ba03fbb4331bae7c7..b0a6ec1f577b84fc30568f4f9384b4c6cdc13741 100755 --- a/src/kpi_manager/client/KpiManagerClient.py +++ b/src/kpi_manager/client/KpiManagerClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/client/__init__.py b/src/kpi_manager/client/__init__.py index 48f7d354a2f3fe6e91bb79b3ca956f68c36ed9e3..130d6c80b35b1551a38d67bdd32f74de026f4c9a 100644 --- a/src/kpi_manager/client/__init__.py +++ b/src/kpi_manager/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/database/KpiDB.py b/src/kpi_manager/database/KpiDB.py index d503f06f4cdeb57efd4c02701803f81fd31d3eea..75b52798a93700d724000b0db8ef445a4eed2ffc 100644 --- a/src/kpi_manager/database/KpiDB.py +++ b/src/kpi_manager/database/KpiDB.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/database/KpiModel.py b/src/kpi_manager/database/KpiModel.py index 5c2fdff0664883bcc727096ddeda562fdbe3085d..0e3161baadbd37a32b01d2508fb318a06c26cc7b 100644 --- a/src/kpi_manager/database/KpiModel.py +++ b/src/kpi_manager/database/KpiModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/database/__init__.py b/src/kpi_manager/database/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_manager/database/__init__.py +++ b/src/kpi_manager/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/requirements.in b/src/kpi_manager/requirements.in index 3e98fef362277dbf60019902e115d1c733bea9e7..264e08853708a78c5321b8e85377a595eca1078a 100644 --- a/src/kpi_manager/requirements.in +++ b/src/kpi_manager/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/service/KpiManagerService.py b/src/kpi_manager/service/KpiManagerService.py index b69a926a94c6cf10a680fe1b15d065f6bc073c97..6da00ab5e61876461ffef5675e211c9359d71c71 100755 --- a/src/kpi_manager/service/KpiManagerService.py +++ b/src/kpi_manager/service/KpiManagerService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/service/KpiManagerServiceServicerImpl.py b/src/kpi_manager/service/KpiManagerServiceServicerImpl.py index 3f9ae8492380e5e11cd3cbc926a2fce07620d8a7..1dd214506339ccb257830c28fc43d0d80cdee9e7 100644 --- a/src/kpi_manager/service/KpiManagerServiceServicerImpl.py +++ b/src/kpi_manager/service/KpiManagerServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/service/__init__.py b/src/kpi_manager/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_manager/service/__init__.py +++ b/src/kpi_manager/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/service/__main__.py b/src/kpi_manager/service/__main__.py index 05e32bb58128975ea5d2a5f015d1e8b3977c9905..7da2a77916995dca7c5d137085eeaaabcaa50cc6 100644 --- a/src/kpi_manager/service/__main__.py +++ b/src/kpi_manager/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/tests/__init__.py b/src/kpi_manager/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_manager/tests/__init__.py +++ b/src/kpi_manager/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/tests/test_kpi_db.py b/src/kpi_manager/tests/test_kpi_db.py index b731ba385e54ed3ccb3c7a2e589977188ceb0e3c..be1feab088ff685e8d5f933fc3546c5934c09d9b 100644 --- a/src/kpi_manager/tests/test_kpi_db.py +++ b/src/kpi_manager/tests/test_kpi_db.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/tests/test_kpi_manager.py b/src/kpi_manager/tests/test_kpi_manager.py index 3d046ea2ce99e655856470178bf7643f83324f17..fedc3f94cee5be08301cd6241779966f3111f9c1 100755 --- a/src/kpi_manager/tests/test_kpi_manager.py +++ b/src/kpi_manager/tests/test_kpi_manager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_manager/tests/test_messages.py b/src/kpi_manager/tests/test_messages.py index 08a2dbf7334c3e4e68c3cfa6c27ce08532521342..5f55c2cfcfd3c5c65aa317d02376dd6971fba384 100644 --- a/src/kpi_manager/tests/test_messages.py +++ b/src/kpi_manager/tests/test_messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/.gitlab-ci.yml b/src/kpi_value_api/.gitlab-ci.yml index 14c8df299b1a4970ec0a4733bcd918bf1485b00d..cbbaab22cae5f920d1aa1918dae74afa7e3fd91e 100644 --- a/src/kpi_value_api/.gitlab-ci.yml +++ b/src/kpi_value_api/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/Dockerfile b/src/kpi_value_api/Dockerfile index 25b8da931f88000dd229c536456a3eb1fa7f56db..91e1690066162339b63bb7fe9b1f889621cf04ca 100644 --- a/src/kpi_value_api/Dockerfile +++ b/src/kpi_value_api/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/README.md b/src/kpi_value_api/README.md index 70ba2c5e79c79147e336307ecc6d5ddfc263df90..f946360633ccb62a49e44b2f4b77227dcda9d21f 100644 --- a/src/kpi_value_api/README.md +++ b/src/kpi_value_api/README.md @@ -1,4 +1,4 @@ -# How to locally run and test KPI Value API micro-service +# How to locally run and test KPI Value API ### Pre-requisets Ensure the following requirements are met before executing the KPI Value API service. @@ -7,7 +7,6 @@ Ensure the following requirements are met before executing the KPI Value API ser 2. A virtual enviornment exist with all the required packages listed in ["requirements.in"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_value_api/requirements.in) file sucessfully installed. -3. Call the ["create_all_topics()"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/common/tools/kafka/Variables.py) function to verify the existence of all required topics on kafka. ### Messages format templates The ["messages"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_value_api/tests/messages.py) python file contains templates for creating gRPC messages. @@ -15,9 +14,9 @@ The ["messages"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi ### Unit test file The ["KPI Value API test"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_value_api/tests/test_kpi_value_api.py) python file enlist various tests conducted to validate functionality. -### Flow of execution (Kpi Maanager Service functions) -1. Call the `create_new_topic_if_not_exists(<list of string>)` method to create any new topics if needed. +### Flow of execution (Kpi Value Api Service functions) +1. Call `StoreKpiValues(KpiValueList)` to produce `Kpi Value` on a Kafka Topic. (The `KpiValueWriter` microservice will consume and process this `Kpi Value`) -2. Call `StoreKpiValues(KpiValueList)` to produce `Kpi Value` on a Kafka Topic. (The `KpiValueWriter` microservice will consume and process the `Kpi Value`) +2. Call `SelectKpiValues(KpiValueFilter) -> KpiValueList` to read metric from the Prometheus DB. -3. Call `SelectKpiValues(KpiValueFilter) -> KpiValueList` to read metric from the Prometheus DB. +3. Call `GetKpiAlarms(KpiId) -> KpiAlarms` to read alrams from the Kafka. diff --git a/src/kpi_value_api/__init__.py b/src/kpi_value_api/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_value_api/__init__.py +++ b/src/kpi_value_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/client/KpiValueApiClient.py b/src/kpi_value_api/client/KpiValueApiClient.py index dfc5f07254a30db34a20ee8d0eae931cfd0ce571..b1bc32f902d0b62f2fbd81cbdd9cac7a8ae53ea8 100644 --- a/src/kpi_value_api/client/KpiValueApiClient.py +++ b/src/kpi_value_api/client/KpiValueApiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/client/__init__.py b/src/kpi_value_api/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_value_api/client/__init__.py +++ b/src/kpi_value_api/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/requirements.in b/src/kpi_value_api/requirements.in index 0615fa833f255bf91fd72fc484e40842face7a44..6addbfdfd961ee238b2ca44e78de87f735379673 100644 --- a/src/kpi_value_api/requirements.in +++ b/src/kpi_value_api/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/service/KpiValueApiService.py b/src/kpi_value_api/service/KpiValueApiService.py index 68b6fbdc278a00aa7cf98385bcf8afa573f91445..ea79792912524db69064d8369bb9339621e00664 100644 --- a/src/kpi_value_api/service/KpiValueApiService.py +++ b/src/kpi_value_api/service/KpiValueApiService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py b/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py index 706e180d5cf65107f5899315cdf75867beb81608..ecba7a063f3636409303ecdad7c18543bc833a19 100644 --- a/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py +++ b/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/service/__init__.py b/src/kpi_value_api/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_value_api/service/__init__.py +++ b/src/kpi_value_api/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/service/__main__.py b/src/kpi_value_api/service/__main__.py index f0f265a48812c0ae475e4e079a09b83cdfb7c69e..6ac7e1cb23254ab2be7183b7a1bc42c40597d670 100644 --- a/src/kpi_value_api/service/__main__.py +++ b/src/kpi_value_api/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/tests/messages.py b/src/kpi_value_api/tests/messages.py index 50240c0154deff33dfdbb797cd5e0fca9a05c8ab..8ded327dc8de410a83a69a24b654e1787d7070cf 100644 --- a/src/kpi_value_api/tests/messages.py +++ b/src/kpi_value_api/tests/messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_api/tests/test_kpi_value_api.py b/src/kpi_value_api/tests/test_kpi_value_api.py index c245bb9ef64eaa29dc4d51955ff94adeeeeb8dda..bd9049e160536e9c85f0d40d1eeb138759ecf87b 100644 --- a/src/kpi_value_api/tests/test_kpi_value_api.py +++ b/src/kpi_value_api/tests/test_kpi_value_api.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/.gitlab-ci.yml b/src/kpi_value_writer/.gitlab-ci.yml index 3f376a6739ebf72964d889e0c43e04f8daed6069..fccf1c9869205e46f6ee6da84a70f2fc5d3bf3c6 100644 --- a/src/kpi_value_writer/.gitlab-ci.yml +++ b/src/kpi_value_writer/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/Dockerfile b/src/kpi_value_writer/Dockerfile index 70f41128bd8c982f604a3424d2096c918ead080e..f6f8b135230d187e503fe7c2a2b76fe616d05d61 100644 --- a/src/kpi_value_writer/Dockerfile +++ b/src/kpi_value_writer/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/README.md b/src/kpi_value_writer/README.md index c45a0e39534fae9efef4174d5ca5be7047845c48..703358728178f0ab703ae7b78096430eb5e0503b 100644 --- a/src/kpi_value_writer/README.md +++ b/src/kpi_value_writer/README.md @@ -1,17 +1,15 @@ -# How to locally run and test the KPI Value Writer micro-service +# How to locally run and test the KPI Value Writer ### Pre-requisets -Ensure the following requirements are meet before executing the KPI Value Writer service> +Ensure the following requirements are meet before executing the KPI Value Writer service. -1. The KPI Manger and KPI Value API services are running and Apache Kafka is running. +1. The KPI Manger and KPI Value API services are running. 2. A Virtual enviornment exist with all the required packages listed in the ["requirements.in"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_value_writer/requirements.in) file installed sucessfully. ### Messages format templates The ["messages"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_value_writer/tests/test_messages.py) python file contains the templates to create gRPC messages. -### Unit test file -The ["KPI Value API test"](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/kpi_value_writer/tests/test_kpi_value_writer.py) python file enlist various tests conducted to validate functionality. ### Flow of execution -1. Call the `RunKafkaConsumer` method from the `KpiValueWriter` class to start consuming the `KPI Value` generated by the `KPI Value API` or `Telemetry`. For every valid `KPI Value` consumer from Kafka, it invokes the `PrometheusWriter` class to prepare and push the metric to the Promethues DB. +1. The service will be running, consuming KPI values from the Kafka topic, and pushing KPI metrics to Prometheus. diff --git a/src/kpi_value_writer/__init__.py b/src/kpi_value_writer/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_value_writer/__init__.py +++ b/src/kpi_value_writer/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/requirements.in b/src/kpi_value_writer/requirements.in index 7e4694109dc4e1d31b86abfc03162494faafcdaf..ac0c82cc3c638f17b777459dec1577b68ad2a0ba 100644 --- a/src/kpi_value_writer/requirements.in +++ b/src/kpi_value_writer/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/service/KpiValueWriter.py b/src/kpi_value_writer/service/KpiValueWriter.py index 8b258a1424cc44be4dcb9134ee913c707cc44bfa..0bc95355e35e6deab8ba79eeeb87e278b1b2ecd2 100644 --- a/src/kpi_value_writer/service/KpiValueWriter.py +++ b/src/kpi_value_writer/service/KpiValueWriter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/service/MetricWriterToPrometheus.py b/src/kpi_value_writer/service/MetricWriterToPrometheus.py index ad37d73bc2564851ee3659f3ddd756611c57bbfc..bfbb6e3bab9770719f2fc23b3fab00e2805b074a 100644 --- a/src/kpi_value_writer/service/MetricWriterToPrometheus.py +++ b/src/kpi_value_writer/service/MetricWriterToPrometheus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/service/__init__.py b/src/kpi_value_writer/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/kpi_value_writer/service/__init__.py +++ b/src/kpi_value_writer/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/service/__main__.py b/src/kpi_value_writer/service/__main__.py index be9f8f29bfdb2397eedd0ce2821c5da8f778cfc4..28ba2ac90f1e9ed28dfeeeda6b6da17568a124e7 100644 --- a/src/kpi_value_writer/service/__main__.py +++ b/src/kpi_value_writer/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/tests/test_kpi_value_writer.py b/src/kpi_value_writer/tests/test_kpi_value_writer.py index 521dd676eb20d35f46a02d959a809eea685bd67a..0d3f9e683db5430fe9214cbf4131dcc38912da85 100755 --- a/src/kpi_value_writer/tests/test_kpi_value_writer.py +++ b/src/kpi_value_writer/tests/test_kpi_value_writer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/tests/test_messages.py b/src/kpi_value_writer/tests/test_messages.py index 89a41fa08ad37b7d9b305bba6e7c445fea5cd18a..ffc6b398c4ff6405fe1ac8eec086553fa6fbe193 100755 --- a/src/kpi_value_writer/tests/test_messages.py +++ b/src/kpi_value_writer/tests/test_messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/kpi_value_writer/tests/test_metric_writer_to_prom.py b/src/kpi_value_writer/tests/test_metric_writer_to_prom.py index f60e96253ae8edb29eedcbe2d6e66aaeb450229c..e8f97c8a7650ece493eaaee345d6645a7c9625c6 100644 --- a/src/kpi_value_writer/tests/test_metric_writer_to_prom.py +++ b/src/kpi_value_writer/tests/test_metric_writer_to_prom.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/.gitlab-ci.yml b/src/l3_attackmitigator/.gitlab-ci.yml index afc3c32d629275e2bb6465f38df6ff0e41c18daf..a1d6a3de8461a1ac960ae82887db01bb6a55fe59 100644 --- a/src/l3_attackmitigator/.gitlab-ci.yml +++ b/src/l3_attackmitigator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/Config.py b/src/l3_attackmitigator/Config.py index e82dc4f0dd4cb94713ababc71d34ea7274abc3c5..622336889539fbcc44ec3f95463aa82ac7fa69a8 100644 --- a/src/l3_attackmitigator/Config.py +++ b/src/l3_attackmitigator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/Dockerfile b/src/l3_attackmitigator/Dockerfile index 4622f6f9b9a0cfb4d55f758612026f74d9de45e7..9d80570fa284cd63de2e55f5b61f79b9a6852616 100644 --- a/src/l3_attackmitigator/Dockerfile +++ b/src/l3_attackmitigator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/__init__.py b/src/l3_attackmitigator/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_attackmitigator/__init__.py +++ b/src/l3_attackmitigator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/client/__init__.py b/src/l3_attackmitigator/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_attackmitigator/client/__init__.py +++ b/src/l3_attackmitigator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/client/l3_attackmitigatorClient.py b/src/l3_attackmitigator/client/l3_attackmitigatorClient.py index a2bcdae40e0d1d5c4e5315af06a9247ce7850cc6..02e56bcffd46c7bffa523c9ecfa0a3aa376deca9 100644 --- a/src/l3_attackmitigator/client/l3_attackmitigatorClient.py +++ b/src/l3_attackmitigator/client/l3_attackmitigatorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/requirements.in b/src/l3_attackmitigator/requirements.in index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/l3_attackmitigator/requirements.in +++ b/src/l3_attackmitigator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/service/__init__.py b/src/l3_attackmitigator/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_attackmitigator/service/__init__.py +++ b/src/l3_attackmitigator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/service/__main__.py b/src/l3_attackmitigator/service/__main__.py index 3a0263e25a65073e1d7199c8cc978efd05cc493d..8a54ef66c2b32aefb1a37b21e8b8fdd01e1ca482 100644 --- a/src/l3_attackmitigator/service/__main__.py +++ b/src/l3_attackmitigator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/service/l3_attackmitigatorService.py b/src/l3_attackmitigator/service/l3_attackmitigatorService.py index 7794041bd9f25666b2c4417834b8b41fa10a624f..560c04b9291e4a3f49af0e19fe01956e41aa202d 100644 --- a/src/l3_attackmitigator/service/l3_attackmitigatorService.py +++ b/src/l3_attackmitigator/service/l3_attackmitigatorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py b/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py index 6b2a65c9822d749a86db9a18b51626d12c6ba173..70464d3169f84b9fb2603a1830e8f4a0fd407774 100644 --- a/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py +++ b/src/l3_attackmitigator/service/l3_attackmitigatorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/tests/__init__.py b/src/l3_attackmitigator/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_attackmitigator/tests/__init__.py +++ b/src/l3_attackmitigator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_attackmitigator/tests/test_unitary.py b/src/l3_attackmitigator/tests/test_unitary.py index 53d09a227350eb127ab684c210cea6d56bcb7ac1..650dae098b6020586619b434c1dda68a98e4ddc3 100644 --- a/src/l3_attackmitigator/tests/test_unitary.py +++ b/src/l3_attackmitigator/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/.gitlab-ci.yml b/src/l3_centralizedattackdetector/.gitlab-ci.yml index 1b047aef8205e5852a4b30a7234ebfdad7686358..65c4b32a8c78a79441d23f085aa95b1bf46c7614 100644 --- a/src/l3_centralizedattackdetector/.gitlab-ci.yml +++ b/src/l3_centralizedattackdetector/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/Config.py b/src/l3_centralizedattackdetector/Config.py index afff93eb5250214389aa082b0a0c16255482adcf..9ffe3f07109e26316029c0b888c8dcb2ef9fbe0d 100644 --- a/src/l3_centralizedattackdetector/Config.py +++ b/src/l3_centralizedattackdetector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/Dockerfile b/src/l3_centralizedattackdetector/Dockerfile index a294014ac02d8377db5bd848a5d7e07643658de6..718b4ff951dbcf10034f1cd1269220f9cc4efddd 100644 --- a/src/l3_centralizedattackdetector/Dockerfile +++ b/src/l3_centralizedattackdetector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/__init__.py b/src/l3_centralizedattackdetector/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_centralizedattackdetector/__init__.py +++ b/src/l3_centralizedattackdetector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/client/__init__.py b/src/l3_centralizedattackdetector/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_centralizedattackdetector/client/__init__.py +++ b/src/l3_centralizedattackdetector/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py b/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py index 02aed22b40831dee4ee5e0eeec36822e481220be..7204bf5dc87154d946a48108a299848ed44e6166 100644 --- a/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py +++ b/src/l3_centralizedattackdetector/client/l3_centralizedattackdetectorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/requirements.in b/src/l3_centralizedattackdetector/requirements.in index 14808cba5d26a479095ff112b505febff095bdcd..fafb057a2e354c5055574fd35d129e026ced910c 100644 --- a/src/l3_centralizedattackdetector/requirements.in +++ b/src/l3_centralizedattackdetector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/service/__init__.py b/src/l3_centralizedattackdetector/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_centralizedattackdetector/service/__init__.py +++ b/src/l3_centralizedattackdetector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/service/__main__.py b/src/l3_centralizedattackdetector/service/__main__.py index c03f77f4287de25a407dfadcaa0a1730678d1a66..aedde01427cbc519d9787cc9611284a9844645fe 100644 --- a/src/l3_centralizedattackdetector/service/__main__.py +++ b/src/l3_centralizedattackdetector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py index b9367a51153bcbf1d1ac13a5ab64491c3d20ab97..ef5182d2bfa675afbf9a574ba6de9b5ac245e7d5 100644 --- a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py +++ b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py index b03ee98f5c401445cf59f3c7b918a5af7fcd0318..16e88760086c0d3fd1ce7d2254201fbb9fe0ce18 100644 --- a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py +++ b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/tests/__init__.py b/src/l3_centralizedattackdetector/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_centralizedattackdetector/tests/__init__.py +++ b/src/l3_centralizedattackdetector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_centralizedattackdetector/tests/test_unitary.py b/src/l3_centralizedattackdetector/tests/test_unitary.py index b11be4862295eb17afd7e4be7bd60964e485a8dc..36f70dd6161afaf386cb1db5cf72e661283b3f99 100644 --- a/src/l3_centralizedattackdetector/tests/test_unitary.py +++ b/src/l3_centralizedattackdetector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/.gitlab-ci.yml b/src/l3_distributedattackdetector/.gitlab-ci.yml index 1ab68357354c13edb3722498501d6a2d2445d795..a833e3ac1aadc48843db71c80532395997a34ba5 100644 --- a/src/l3_distributedattackdetector/.gitlab-ci.yml +++ b/src/l3_distributedattackdetector/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/Config.py b/src/l3_distributedattackdetector/Config.py index bf344455f537c5b363d8fa4c737ccff57b145e08..8ee308efa202f0bf27e77a2a39fd500cb179d381 100644 --- a/src/l3_distributedattackdetector/Config.py +++ b/src/l3_distributedattackdetector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/Dockerfile b/src/l3_distributedattackdetector/Dockerfile index fd1a38483d49e6debdbe981d547268374bb5fc7b..95914d22e5a1219fd0fd2d63b47c8f2e147dbeca 100644 --- a/src/l3_distributedattackdetector/Dockerfile +++ b/src/l3_distributedattackdetector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/__init__.py b/src/l3_distributedattackdetector/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_distributedattackdetector/__init__.py +++ b/src/l3_distributedattackdetector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/requirements.in b/src/l3_distributedattackdetector/requirements.in index 1d2fbafc26397ee41314686a202938d42c9a22c0..602570408f0005fcb1ec17419544045c901eb779 100644 --- a/src/l3_distributedattackdetector/requirements.in +++ b/src/l3_distributedattackdetector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/service/__init__.py b/src/l3_distributedattackdetector/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_distributedattackdetector/service/__init__.py +++ b/src/l3_distributedattackdetector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/service/__main__.py b/src/l3_distributedattackdetector/service/__main__.py index a46177611453824d7fe80506539f129776041897..bc14e05210feb994cec50ae2b95413b8f9706431 100644 --- a/src/l3_distributedattackdetector/service/__main__.py +++ b/src/l3_distributedattackdetector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py b/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py index c841b21b451168ec74660b5df5fd218ab1d66cba..517ef42d3464b070cbf9f0132e76132b44635cde 100644 --- a/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py +++ b/src/l3_distributedattackdetector/service/l3_distributedattackdetector.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/tests/__init__.py b/src/l3_distributedattackdetector/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/l3_distributedattackdetector/tests/__init__.py +++ b/src/l3_distributedattackdetector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/tests/data_generator.py b/src/l3_distributedattackdetector/tests/data_generator.py index 02efcdc321dce1adb932e91d51a65a1f87ca7ece..ba9e3df5c35b58fd95e05af7d5eba1f305c6540a 100644 --- a/src/l3_distributedattackdetector/tests/data_generator.py +++ b/src/l3_distributedattackdetector/tests/data_generator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/l3_distributedattackdetector/tests/test_unitary.py b/src/l3_distributedattackdetector/tests/test_unitary.py index 3d54cb7d269617ae819353721f9a1b504e8e3d93..a60ab9f798bbb57252c96cf5483aed290c818715 100644 --- a/src/l3_distributedattackdetector/tests/test_unitary.py +++ b/src/l3_distributedattackdetector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/.gitlab-ci.yml b/src/load_generator/.gitlab-ci.yml index 5664c4dc53c6b62f20fba45749e5911a2505a04e..28ac0fbd11d49e8e56483fca57ace23c8efb675e 100644 --- a/src/load_generator/.gitlab-ci.yml +++ b/src/load_generator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/Config.py b/src/load_generator/Config.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/Config.py +++ b/src/load_generator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/Dockerfile b/src/load_generator/Dockerfile index 243b908d5c95f41f6afeb1f42b87d3257056a5ba..3ef1470f4696f96f0a6d69af99d2daabb2c8540c 100644 --- a/src/load_generator/Dockerfile +++ b/src/load_generator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/__init__.py b/src/load_generator/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/__init__.py +++ b/src/load_generator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/client/LoadGeneratorClient.py b/src/load_generator/client/LoadGeneratorClient.py index 688184b6d48058f7b7553fb0c0ac195bf789f9b6..7ef15c1ca084f4e13b31ddb04e831fc0972b6963 100644 --- a/src/load_generator/client/LoadGeneratorClient.py +++ b/src/load_generator/client/LoadGeneratorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/client/__init__.py b/src/load_generator/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/client/__init__.py +++ b/src/load_generator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/command/__init__.py b/src/load_generator/command/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/command/__init__.py +++ b/src/load_generator/command/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/command/__main__.py b/src/load_generator/command/__main__.py index d47a8290bddc910fd34f80860962ca59dffe95a9..914758a8d252c8096696a0ce799a467339a92f9c 100644 --- a/src/load_generator/command/__main__.py +++ b/src/load_generator/command/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/load_gen/Constants.py b/src/load_generator/load_gen/Constants.py index e4f34d50a34c7673cd949cf321736f88a70ea64c..7f1612dc710c34694b983c70e6023d0964212fe8 100644 --- a/src/load_generator/load_gen/Constants.py +++ b/src/load_generator/load_gen/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/load_gen/DltTools.py b/src/load_generator/load_gen/DltTools.py index 0ac7ab3f03d29480b0e57cc9993b71c4d8324d76..8f2078cdb42c681a88176d5f9d6d4321031dd76a 100644 --- a/src/load_generator/load_gen/DltTools.py +++ b/src/load_generator/load_gen/DltTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/load_gen/Parameters.py b/src/load_generator/load_gen/Parameters.py index adc551cd23e72565b3cc40989f7e533b849bc3af..64f321d9a45abb38e3576cf63bbf13123a61f755 100644 --- a/src/load_generator/load_gen/Parameters.py +++ b/src/load_generator/load_gen/Parameters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/load_gen/RequestGenerator.py b/src/load_generator/load_gen/RequestGenerator.py index 2a3e89fe02bc2a8267d203d3134c65983cb985f2..45c88a66aedde3bd6a04196247de7045efd64ea5 100644 --- a/src/load_generator/load_gen/RequestGenerator.py +++ b/src/load_generator/load_gen/RequestGenerator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/load_gen/RequestScheduler.py b/src/load_generator/load_gen/RequestScheduler.py index 3bc9486dc67121f52961c5397859f1aec28b9fab..206c556548126368577ce4f8e4f47abf83697ed8 100644 --- a/src/load_generator/load_gen/RequestScheduler.py +++ b/src/load_generator/load_gen/RequestScheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/load_gen/__init__.py b/src/load_generator/load_gen/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/load_gen/__init__.py +++ b/src/load_generator/load_gen/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/requirements.in b/src/load_generator/requirements.in index 8a92ca4ea18ecde0c1f8e9ff74b932fcac3fb6a0..c7552cd3b310bf43da4b6888c552404e6695b906 100644 --- a/src/load_generator/requirements.in +++ b/src/load_generator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/run.sh b/src/load_generator/run.sh index 08572a31c18520ae46faab8c56daa59a13f22e61..3fa87d5dc584f3a1ccb7965f00a08d0c30d456b1 100755 --- a/src/load_generator/run.sh +++ b/src/load_generator/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/service/Constants.py b/src/load_generator/service/Constants.py index 5053dc5fecf9a033a1de7dd14af3a95bd142b9c6..9835fec7e665288a9e38de67995b933ce8777188 100644 --- a/src/load_generator/service/Constants.py +++ b/src/load_generator/service/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/service/LoadGeneratorService.py b/src/load_generator/service/LoadGeneratorService.py index 2c99d7da7776a0952ad0ae00455bc5e2f5e29ed0..ff4ab2295620116d1723589ca20450cdb55138e7 100644 --- a/src/load_generator/service/LoadGeneratorService.py +++ b/src/load_generator/service/LoadGeneratorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/service/LoadGeneratorServiceServicerImpl.py b/src/load_generator/service/LoadGeneratorServiceServicerImpl.py index ff32f23a67e83fd3bda4a0acf166b2e1bb9abacb..29e0264290ad4cc9d13185b74651a850a3e5b657 100644 --- a/src/load_generator/service/LoadGeneratorServiceServicerImpl.py +++ b/src/load_generator/service/LoadGeneratorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/service/__init__.py b/src/load_generator/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/service/__init__.py +++ b/src/load_generator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/service/__main__.py b/src/load_generator/service/__main__.py index 933fdad31e3bd430aa5cd2e61026c90c1a51a33f..989f2fae99f72f16e5ecd82c830a7afae992d25e 100644 --- a/src/load_generator/service/__main__.py +++ b/src/load_generator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/tests/__init__.py b/src/load_generator/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/load_generator/tests/__init__.py +++ b/src/load_generator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/tests/deploy_specs.sh b/src/load_generator/tests/deploy_specs.sh index 3a85d615bf61cd5ef88dcd3d2499592c5999e927..851e6a4354ea46733d0259c703744bb19fd8d852 100755 --- a/src/load_generator/tests/deploy_specs.sh +++ b/src/load_generator/tests/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/tests/test_dlt_functional.py b/src/load_generator/tests/test_dlt_functional.py index f3dea3b4a83ed59cfb137eba03d312f4c87f0d45..5e9cdd7300850075a0f90eea80249022250c6447 100644 --- a/src/load_generator/tests/test_dlt_functional.py +++ b/src/load_generator/tests/test_dlt_functional.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/tools/ListScalarRange.py b/src/load_generator/tools/ListScalarRange.py index a41ca22eb3ddccf5e420f7d46cd6d13a157b84a6..f62360dc798012a34ab1aae218196ce476306909 100644 --- a/src/load_generator/tools/ListScalarRange.py +++ b/src/load_generator/tools/ListScalarRange.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/load_generator/tools/__init__.py b/src/load_generator/tools/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/load_generator/tools/__init__.py +++ b/src/load_generator/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/.gitlab-ci.yml b/src/monitoring/.gitlab-ci.yml index 73365dfada1715e689f58fe94d7451cc9df9c155..3d1e7009aad7a5ca885d0a4470f30fe62d950336 100644 --- a/src/monitoring/.gitlab-ci.yml +++ b/src/monitoring/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/Dockerfile b/src/monitoring/Dockerfile index af308d06002a0461f51ea56366222a76e100dc69..1c7a03c534c653c55dc02fb78a5556bcfb285036 100644 --- a/src/monitoring/Dockerfile +++ b/src/monitoring/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/__init__.py b/src/monitoring/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/monitoring/__init__.py +++ b/src/monitoring/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/client/MonitoringClient.py b/src/monitoring/client/MonitoringClient.py index 994cede8e2606a53606af1c5ed8d2b6544d473fb..13cc1a4a5c991340aeffc6e56bb89af79e27eb23 100644 --- a/src/monitoring/client/MonitoringClient.py +++ b/src/monitoring/client/MonitoringClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/client/__init__.py b/src/monitoring/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/monitoring/client/__init__.py +++ b/src/monitoring/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/requirements.in b/src/monitoring/requirements.in index 3b67c00ee6056de089cde8d9b7faeef05d75336a..b888a579f328e74ca7a4d1905b2b8dc1958a98d9 100644 --- a/src/monitoring/requirements.in +++ b/src/monitoring/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/AlarmManager.py b/src/monitoring/service/AlarmManager.py index e71464c418567fdf1773ec913166ce3c1d3fe26e..3d1cf68cc056cee94dd064eb3a3d8e16b9f00c87 100644 --- a/src/monitoring/service/AlarmManager.py +++ b/src/monitoring/service/AlarmManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/EventTools.py b/src/monitoring/service/EventTools.py index 7820f11c86e87f543087c88704572e1a169c6e7d..146092f032608826366ee91ef8e33031278b1cde 100644 --- a/src/monitoring/service/EventTools.py +++ b/src/monitoring/service/EventTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -108,12 +108,15 @@ class EventsDeviceCollector: if config_rule.action != ConfigActionEnum.CONFIGACTION_SET: continue if config_rule.WhichOneof('config_rule') != 'custom': continue str_resource_key = str(config_rule.custom.resource_key) - if not str_resource_key.startswith('/interface['): continue - json_resource_value = json.loads(config_rule.custom.resource_value) - if 'name' not in json_resource_value: continue - if 'enabled' not in json_resource_value: continue - if not json_resource_value['enabled']: continue - enabled_endpoint_names.add(json_resource_value['name']) + if str_resource_key.startswith('/interface[') or str_resource_key.startswith('/endpoints/endpoint['): + json_resource_value = json.loads(config_rule.custom.resource_value) + if 'name' not in json_resource_value: continue + if 'enabled' in json_resource_value: + if not json_resource_value['enabled']: continue + enabled_endpoint_names.add(json_resource_value['name']) + if 'oper-status' in json_resource_value: + if str(json_resource_value['oper-status']).upper() != 'UP': continue + enabled_endpoint_names.add(json_resource_value['name']) endpoints_monitored = self._device_endpoint_monitored.setdefault(device_uuid, dict()) for endpoint in device.device_endpoints: @@ -127,7 +130,10 @@ class EventsDeviceCollector: endpoint_was_monitored = endpoints_monitored.get(endpoint_uuid, False) endpoint_is_enabled = (endpoint_name_or_uuid in enabled_endpoint_names) - if not endpoint_was_monitored and endpoint_is_enabled: + if not endpoint_was_monitored and not endpoint_is_enabled: + # endpoint is idle, do nothing + pass + elif not endpoint_was_monitored and endpoint_is_enabled: # activate for value in endpoint.kpi_sample_types: if value == KPISAMPLETYPE_UNKNOWN: continue diff --git a/src/monitoring/service/InfluxTools.py b/src/monitoring/service/InfluxTools.py index 152114faf01314324bdab4d7e1d6980d2f728002..93de12a2aa0cfe8c3bda84e4da56ad89dee51536 100644 --- a/src/monitoring/service/InfluxTools.py +++ b/src/monitoring/service/InfluxTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/ManagementDBTools.py b/src/monitoring/service/ManagementDBTools.py index eb249dad65fdb7298a37bb067b54d6e22533e9e3..cdff894709e897e990371e86cf623a82a04f98a9 100644 --- a/src/monitoring/service/ManagementDBTools.py +++ b/src/monitoring/service/ManagementDBTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/MetricsDBTools.py b/src/monitoring/service/MetricsDBTools.py index 5f387dbb5471750439d99d4ee988f33f182e7d4f..f722a0a334b3d0e0ecfd4d6fde3d7008bc1ea4d4 100644 --- a/src/monitoring/service/MetricsDBTools.py +++ b/src/monitoring/service/MetricsDBTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/MonitoringService.py b/src/monitoring/service/MonitoringService.py index 9e78b149ff7b4e55f63432765eb06a8ab6843ee3..7252f15ee1a0acefe2d6143501452ada19e00270 100644 --- a/src/monitoring/service/MonitoringService.py +++ b/src/monitoring/service/MonitoringService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/MonitoringServiceServicerImpl.py b/src/monitoring/service/MonitoringServiceServicerImpl.py index e7025969172482ebc7c964bbc94d698824ee6966..2ec1091c4e2b89272a1ae0662ed5337e93f9fe73 100644 --- a/src/monitoring/service/MonitoringServiceServicerImpl.py +++ b/src/monitoring/service/MonitoringServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/NameMapping.py b/src/monitoring/service/NameMapping.py index f98e367b17b4a2e4c7c6f3dcdb90dfb8ee24d3ad..60cc69c60366f2586db0f153ab2627bd468cd9e4 100644 --- a/src/monitoring/service/NameMapping.py +++ b/src/monitoring/service/NameMapping.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/SubscriptionManager.py b/src/monitoring/service/SubscriptionManager.py index 9e775315573dd1f9bb84b4d7de6b0f99755b3a96..55a35c0b815bef0e7f4583323c51f1ce2217b892 100644 --- a/src/monitoring/service/SubscriptionManager.py +++ b/src/monitoring/service/SubscriptionManager.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/__init__.py b/src/monitoring/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/monitoring/service/__init__.py +++ b/src/monitoring/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/service/__main__.py b/src/monitoring/service/__main__.py index b3c4765beb4809dd66f71e60844abda5af43083f..751dc9990835733a0fdd3d863566961699433d96 100644 --- a/src/monitoring/service/__main__.py +++ b/src/monitoring/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/tests/Messages.py b/src/monitoring/tests/Messages.py index a6ea6f74a7a727e4d23ea54ad51fa032c736c271..da9219e04726ae96bef7f7f29c847d2d420e6045 100644 --- a/src/monitoring/tests/Messages.py +++ b/src/monitoring/tests/Messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/tests/Objects.py b/src/monitoring/tests/Objects.py index 09354bd18b910d281f907deed9f218d6b21b5000..fa6ad43edb7b2de2d70ba7cdb2a129d6b5b1479b 100644 --- a/src/monitoring/tests/Objects.py +++ b/src/monitoring/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/tests/__init__.py b/src/monitoring/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/monitoring/tests/__init__.py +++ b/src/monitoring/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/monitoring/tests/test_unitary.py b/src/monitoring/tests/test_unitary.py index 6838d66f3102aaf43bca913c8bb3266e10b4a4e8..f3b8beebc62c975f47b643e9b14a0e6c81aa76d2 100644 --- a/src/monitoring/tests/test_unitary.py +++ b/src/monitoring/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/.gitlab-ci.yml b/src/nbi/.gitlab-ci.yml index 5f4e45366fff439aee3afe29edae5b0b8356a053..71bf223ba9408e178e252d600c625dc2256dbe92 100644 --- a/src/nbi/.gitlab-ci.yml +++ b/src/nbi/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/Config.py b/src/nbi/Config.py index d715ba5d71ee186c31b83f2c07b1dc1d2c9ce4be..83a35005855d60b714259c6b671c7210cf14331d 100644 --- a/src/nbi/Config.py +++ b/src/nbi/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index ec1c054858b5f97dcdff36e2ccd4c8039942b51e..a9be06d37c15757f51d6d849f395d683885e9508 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/README.md b/src/nbi/README.md index 32902a0b33dba2f9ce3df4a60833608bac6e129d..f997ce21c9b809a1749f046672e895d3ad466824 100644 --- a/src/nbi/README.md +++ b/src/nbi/README.md @@ -31,5 +31,5 @@ sudo ldconfig ### Install Python bindings ```bash -pip install libyang==2.8.0 +pip install libyang==2.8.4 ``` diff --git a/src/nbi/__init__.py b/src/nbi/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/__init__.py +++ b/src/nbi/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/client/NbiClient.py b/src/nbi/client/NbiClient.py index d7eb27486e70968b1dc66e8a6296103a2b8ca440..043035c5a4b0612652b1473ac6deeaa9e3cfce19 100644 --- a/src/nbi/client/NbiClient.py +++ b/src/nbi/client/NbiClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/client/__init__.py b/src/nbi/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/client/__init__.py +++ b/src/nbi/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/requirements.in b/src/nbi/requirements.in index f0eec63568d900c1324f74d5c9265b614e2ac7d0..d56ee821b19894e435368cd6250b25d3bdc33c10 100644 --- a/src/nbi/requirements.in +++ b/src/nbi/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -18,7 +18,7 @@ Flask==2.1.3 Flask-HTTPAuth==4.5.0 Flask-RESTful==0.3.9 jsonschema==4.4.0 -libyang==2.8.0 +libyang==2.8.4 netaddr==0.9.0 pyang==2.6.0 git+https://github.com/robshakir/pyangbind.git diff --git a/src/nbi/service/NbiService.py b/src/nbi/service/NbiService.py index d8886cf38e7bb6d6dd973fdfd5aa4f7e564c31ee..fe7bf2e7b22271ea27746084ebee831257aa43d0 100644 --- a/src/nbi/service/NbiService.py +++ b/src/nbi/service/NbiService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/NbiServiceServicerImpl.py b/src/nbi/service/NbiServiceServicerImpl.py index 79d8b8ca0074fe63cde141d41a3e6fde475415ee..5719b67e4bb7a151d1f668132c7a8dc7073d4948 100644 --- a/src/nbi/service/NbiServiceServicerImpl.py +++ b/src/nbi/service/NbiServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/__init__.py b/src/nbi/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/service/__init__.py +++ b/src/nbi/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/__main__.py b/src/nbi/service/__main__.py index fb735f8a775e8cce1bc696ed4f148b2ab0ec9dcc..71df0517aa688c106d8d0fe544f5f6b1af5a58f3 100644 --- a/src/nbi/service/__main__.py +++ b/src/nbi/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/context_subscription/__init__.py b/src/nbi/service/context_subscription/__init__.py index d2ae85070eb5b5352db9690179b098cdb9781de0..758f3d82c538fe364add40cc5119f745aea1dc34 100644 --- a/src/nbi/service/context_subscription/__init__.py +++ b/src/nbi/service/context_subscription/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/RestServer.py b/src/nbi/service/rest_server/RestServer.py index 42775036237eba32f6fb1cd5a47e41ff3e885deb..521de2735f4d8476c59a263651a67f42851084e2 100644 --- a/src/nbi/service/rest_server/RestServer.py +++ b/src/nbi/service/rest_server/RestServer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/__init__.py b/src/nbi/service/rest_server/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/service/rest_server/__init__.py +++ b/src/nbi/service/rest_server/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/__init__.py b/src/nbi/service/rest_server/nbi_plugins/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/service/rest_server/nbi_plugins/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py index 7f9360e00f5891b6cac0ae5020bd4fbc5ab7d9c1..ba522fd9802372c2b7ab0c6a9cc6e57adb80ee48 100644 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Resources.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py index 55efa48b12b61cb44c23fc2995679afe38351368..b3ff6e2d17de7548ba4862212fbe6e31bc59d9a4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py +++ b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py index 33ce027421028d02b8cee5fb6882e0718f3d7414..718c4d6a3d1c0e7ecd1b628153d42885a51431fe 100644 --- a/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/etsi_bwm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py index 3e2f1389e6786a5cef322ecfaf64c12112409619..c0cbbcff74adb5c6be3df6f675ae586e86423f3b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py index 1814abbb415cfbaee205ff7880fb299e70b5dba1..816aba138beb7b1047043d93358642302345139a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/Acls.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/YangValidator.py b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/YangValidator.py index 56bf9b30c1bc2ab6a36a3d59519b544cd3c00ef3..a55b7755e2bb510a893390275807c324dc1f03e4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/YangValidator.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/YangValidator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py index 3538b24ba56b2a6011b76b3878c4bef690fe1fc8..da4fb182e539d1c1e1c9bafcfb81d153d4e11b4d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/ietf_acl_parser.py b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/ietf_acl_parser.py index 085d680d177d2f48d41c1160c3a70b6c7c4209cb..493fb00cf9fb7a0013bfaabbb65d75dc1aba735e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_acl/ietf_acl_parser.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_acl/ietf_acl_parser.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py index 2282de557c1a80227c7d50e7c125ab4fe538bd28..bce1d6d14d0663dd42b05fe8664271fcc777713d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/Hardware.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py index b1beff518bb3997fc04a79e78c3467b47bd51483..2ac0bf40ebca17abeb7c85775ed6d26630f06d5d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/HardwareMultipleDevices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/YangHandler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/YangHandler.py index 7662261e97b35958f036dc0e69913af7947b9403..fe6494231023f438d1304d7a08a040898c83de8d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/YangHandler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/YangHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py index ba774650e89e26609573a364be520c2d1bd6df84..fe9418b7be811cac2eccb8f566c97e98c97b6000 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_hardware/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py index 8ed148f1c29443ae8c39fb5652b531aa5f334567..d010259ff477d0155aca2f5f8dc02e37a1311642 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py index 5a2b1cc9775f737c75fc723c8a192d15e6d14780..288ed2d105d1ebc564fc5b609d03b9244defa966 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py index ba855c4a993d393302e4b699b5d90166b24f894e..c728b4073837d0a067ce13c69b471bf5c63b60c5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py index 65c2123c805b384a002c84119b1269dd753346ec..2ae776c2047272de9b07f0e12c5537cea355d0b8 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py index 31217f078d2935ac228a7c8d1e75bcbcbc478d44..a391040d9a77cb006ba421ae7fe0c0427b3915b1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py index b1d90c75e0823fd98ab7b9eea245d3c98648d2b3..7fc4e93088bc41f99eded5c3575d3441fb7b7234 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/Common.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py index 3d9c2f2b6c052f9aa59202cc2d51bca288d04a33..a873849091c120caab5ad6badef28fd97f593dba 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/site_network_access.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py index 1960ae8c8dfd7cd769f8356bfd273f848ef19ff2..85a0fe8bae5bf339ae03a1144ab02f114fd4e279 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l2vpn/schemas/vpn_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py index f7329cb35666f423e85f99510e5f89a82e89b7f8..0e8b8013ef5cba1305cdd040ea68efc653eefa5e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/Handlers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -195,11 +195,17 @@ def process_site(site : Dict, errors : List[Dict]) -> None: # site_static_routing: (lan-range, lan-prefix-len, lan-tag) => next-hop site_static_routing : Dict[Tuple[str, str], str] = {} - for rt_proto in site['routing-protocols']['routing-protocol']: + site_routing_protocols : Dict = site.get('routing-protocols', dict()) + site_routing_protocol : List = site_routing_protocols.get('routing-protocol', list()) + for rt_proto in site_routing_protocol: if rt_proto['type'] != 'ietf-l3vpn-svc:static': MSG = 'Site Routing Protocol Type: {:s}' raise NotImplementedError(MSG.format(str(rt_proto['type']))) - for ipv4_rt in rt_proto['static']['cascaded-lan-prefixes']['ipv4-lan-prefixes']: + + rt_proto_static : Dict = rt_proto.get('static', dict()) + rt_proto_static_clps : Dict = rt_proto_static.get('cascaded-lan-prefixes', dict()) + rt_proto_static_clps_v4 = rt_proto_static_clps.get('ipv4-lan-prefixes', list()) + for ipv4_rt in rt_proto_static_clps_v4: lan_range, lan_prefix = ipv4_rt['lan'].split('/') lan_prefix = int(lan_prefix) lan_tag = int(ipv4_rt['lan-tag'].replace('vlan', '')) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py index a313677c12203c1621b920f3fcb7f6ff0c281bfb..97364dff8606f1af48bab362b94b968561792411 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -44,7 +44,7 @@ class L3VPN_Service(Resource): service_ready_status = ServiceStatusEnum.SERVICESTATUS_ACTIVE service_status = target.service_status.service_status # pylint: disable=no-member - response = jsonify({}) + response = jsonify({'service-id': target.service_id.service_uuid.uuid}) response.status_code = HTTP_OK if service_status == service_ready_status else HTTP_GATEWAYTIMEOUT except Exception as e: # pylint: disable=broad-except LOGGER.exception('Something went wrong Retrieving VPN({:s})'.format(str(vpn_id))) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py index 11f2d6dae2f42cb06543979dcdb4d44b4d21e8aa..98d950952702d5cf1df8aa29edc50683e56a296e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_Services.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py index 9f4b43848ab94bd8db670715f0fba807ce794ccd..338c7d631f41e675f214a713d12acb3e7cea839f 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/L3VPN_SiteNetworkAccesses.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py index 77071f7f7a72ad7d46e34f118a87dc2280a2a24c..171134c4bce42c03d2988ab050154d5ac612971d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/YangValidator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py index 71c32acfcf1ec2b29ad437365cfd937c358672df..7d18c692948774741f2bf8dea993fe0e5778e9a1 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py index 8fec8798a508ba198c27fc355545ff2eba0be5e3..394b916c54c1c3df0206e6023bc6f9cf5adb9e8a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeLink.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py index 9efbce8759142b594929156bbc29c1c13e095ee5..ef9e7f31e0c17f6cc71e41208880c73c7dfc7f3d 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNetwork.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py index e2c690cd322e9da8b57d78be45d64e9505e9d33d..24da280e6a6ed0fc9dd76800dc62cd65a2270af2 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeNode.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py index 904742441e357cd1d257904d2a21816891effbb6..9922e0470d3774c633eda6c2d261328fc646790a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ComposeTermPoint.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py index d0c378aad451533bf11e297f393dfa901d696d8e..803d2bd098807584c43d0f8d55de490a2ea8bd77 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/ManualFixes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py index 94e4723a5c7ca83fb382bb70cb241cb69b66ce0e..03d052afd36d2872c8151d9e260a72e42f8e1017 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py index 96fe4dff1452458479b4b04f98e12be63343e022..849252b99a8eaa4118a77debe6ce18ffadad11b4 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NetworkTypeEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py index 0198d418f7e5f0058ce40fbcd7b6010a168e1c51..e2ac05307f136d53fe9d7a5db348e1eb99a31368 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py index a5dda280c98c060c2f872df5ab17152880b522d5..413f48f823fcd5cb818683b68494d2172bad3e0b 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py index 3f70c97d4ddbc273e50654182c8928807deb09e3..84f3a59baea6ea2fbca4dc6ba5bda81bddc29e24 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh b/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh index 8e5b182e73e4fe933a869a45918a1277b2cc3143..2775f80da62430997c15c9ae5d31b99354fe0ecb 100755 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/build-yang-bindings.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py index 7d2aa714a27a854291c55275b2f89bd01678fe1d..e25270d3601ffa1cfdffa68a98305e3646602001 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py index ad2a2e0321d837bcad6b672e841aed0544c66d82..11a73141d6bd05db851d3019903e5a6db2f5c2d6 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py index 5fcbe27e1c736531c53b0c9d3049fab023629b70..e900c27e96aafc248e5db1bec303cb25b5a0f2d7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py index 576033e9d30800bcc051a154ac193e519a94f369..70f1b0d816e4ee24bc88ad829fdcefc1d47b8578 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py index d14fe9575b21319a0fa597a7746510a11e102903..089f5f98af88de60895f6564fc6b8affc7b28836 100644 --- a/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py index 30982f104e189eb4af5b3f49b1abe2b0e5fb2d85..0c048f6625c0cdf749ed6cd84722008ddac9d228 100644 --- a/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py index 28f94887a1aa9895a337baa40b3896e3d7e95dc1..ab608f2d746a2faffc819f25cc026ce9b949aff7 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Resources.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -177,6 +177,11 @@ class Topology(_Resource): def delete(self, context_uuid : str, topology_uuid : str): return format_grpc_to_json(self.context_client.RemoveTopology(grpc_topology_id(context_uuid, topology_uuid))) +class TopologyDetails(_Resource): + def get(self, context_uuid : str, topology_uuid : str): + topology_id = grpc_topology_id(context_uuid, topology_uuid) + return format_grpc_to_json(self.context_client.GetTopologyDetails(topology_id)) + class ServiceIds(_Resource): def get(self, context_uuid : str): return format_grpc_to_json(self.context_client.ListServiceIds(grpc_context_id(context_uuid))) @@ -301,16 +306,20 @@ class Link(_Resource): def put(self, link_uuid : str): link_json = request.get_json() link = grpc_link(link_json) - virtual_types = {LinkTypeEnum.LINKTYPE_VIRTUAL_COPPER, LinkTypeEnum.LINKTYPE_VIRTUAL_OPTICAL} if link_uuid != link.link_id.link_uuid.uuid: raise BadRequest('Mismatching link_uuid') - elif link.link_type in virtual_types: - link = grpc_link(link_json) - return format_grpc_to_json(self.vntmanager_client.SetVirtualLink(link)) - return format_grpc_to_json(self.context_client.SetLink(grpc_link(link))) + if link.link_type == LinkTypeEnum.LINKTYPE_VIRTUAL: + return format_grpc_to_json(self.vntmanager_client.SetVirtualLink(link)) + else: + return format_grpc_to_json(self.context_client.SetLink(link)) def delete(self, link_uuid : str): - return format_grpc_to_json(self.context_client.RemoveLink(grpc_link_id(link_uuid))) + link_id = grpc_link_id(link_uuid) + link = self.context_client.GetLink(link_id) + if link.link_type == LinkTypeEnum.LINKTYPE_VIRTUAL: + return format_grpc_to_json(self.vntmanager_client.RemoveVirtualLink(link_id)) + else: + return format_grpc_to_json(self.context_client.RemoveLink(link_id)) class ConnectionIds(_Resource): def get(self, context_uuid : str, service_uuid : str): diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py index bb10ee375f0ecdf7b63459b300dd0ff0fed40615..0053d1590f2312e2735171b0fdc3cba48025315e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py index 41e8ff1ea634869e69258c20f81f7c3db9767eb5..6605557ca1b1aa7d6eb8db55287beb19e3db62a5 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tfs_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -22,7 +22,7 @@ from .Resources import ( PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, - Topologies, Topology, TopologyIds + Topologies, Topology, TopologyDetails, TopologyIds ) URL_PREFIX = '/tfs-api' @@ -30,38 +30,39 @@ URL_PREFIX = '/tfs-api' # Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. RESOURCES = [ # (endpoint_name, resource_class, resource_url) - ('api.context_ids', ContextIds, '/context_ids'), - ('api.contexts', Contexts, '/contexts'), - ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), - ('api.context', Context, '/context/<path:context_uuid>'), + ('api.context_ids', ContextIds, '/context_ids'), + ('api.contexts', Contexts, '/contexts'), + ('api.dummy_contexts', DummyContexts, '/dummy_contexts'), + ('api.context', Context, '/context/<path:context_uuid>'), - ('api.topology_ids', TopologyIds, '/context/<path:context_uuid>/topology_ids'), - ('api.topologies', Topologies, '/context/<path:context_uuid>/topologies'), - ('api.topology', Topology, '/context/<path:context_uuid>/topology/<path:topology_uuid>'), + ('api.topology_ids', TopologyIds, '/context/<path:context_uuid>/topology_ids'), + ('api.topologies', Topologies, '/context/<path:context_uuid>/topologies'), + ('api.topology', Topology, '/context/<path:context_uuid>/topology/<path:topology_uuid>'), + ('api.topology_details', TopologyDetails, '/context/<path:context_uuid>/topology_details/<path:topology_uuid>'), - ('api.service_ids', ServiceIds, '/context/<path:context_uuid>/service_ids'), - ('api.services', Services, '/context/<path:context_uuid>/services'), - ('api.service', Service, '/context/<path:context_uuid>/service/<path:service_uuid>'), + ('api.service_ids', ServiceIds, '/context/<path:context_uuid>/service_ids'), + ('api.services', Services, '/context/<path:context_uuid>/services'), + ('api.service', Service, '/context/<path:context_uuid>/service/<path:service_uuid>'), - ('api.slice_ids', SliceIds, '/context/<path:context_uuid>/slice_ids'), - ('api.slices', Slices, '/context/<path:context_uuid>/slices'), - ('api.slice', Slice, '/context/<path:context_uuid>/slice/<path:slice_uuid>'), + ('api.slice_ids', SliceIds, '/context/<path:context_uuid>/slice_ids'), + ('api.slices', Slices, '/context/<path:context_uuid>/slices'), + ('api.slice', Slice, '/context/<path:context_uuid>/slice/<path:slice_uuid>'), - ('api.device_ids', DeviceIds, '/device_ids'), - ('api.devices', Devices, '/devices'), - ('api.device', Device, '/device/<path:device_uuid>'), + ('api.device_ids', DeviceIds, '/device_ids'), + ('api.devices', Devices, '/devices'), + ('api.device', Device, '/device/<path:device_uuid>'), - ('api.link_ids', LinkIds, '/link_ids'), - ('api.links', Links, '/links'), - ('api.link', Link, '/link/<path:link_uuid>'), + ('api.link_ids', LinkIds, '/link_ids'), + ('api.links', Links, '/links'), + ('api.link', Link, '/link/<path:link_uuid>'), - ('api.connection_ids', ConnectionIds, '/context/<path:context_uuid>/service/<path:service_uuid>/connection_ids'), - ('api.connections', Connections, '/context/<path:context_uuid>/service/<path:service_uuid>/connections'), - ('api.connection', Connection, '/connection/<path:connection_uuid>'), + ('api.connection_ids', ConnectionIds, '/context/<path:context_uuid>/service/<path:service_uuid>/connection_ids'), + ('api.connections', Connections, '/context/<path:context_uuid>/service/<path:service_uuid>/connections'), + ('api.connection', Connection, '/connection/<path:connection_uuid>'), - ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), - ('api.policyrules', PolicyRules, '/policyrules'), - ('api.policyrule', PolicyRule, '/policyrule/<path:policyrule_uuid>'), + ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), + ('api.policyrules', PolicyRules, '/policyrules'), + ('api.policyrule', PolicyRule, '/policyrule/<path:policyrule_uuid>'), ] def register_tfs_api(rest_server : RestServer): diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py b/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py index d3b7a56383f731972d3a7f07b2d0fee08e9c2eb7..112838cc43ca1a2466739fb1f84fcd906436ba95 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/Authentication.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py b/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py index f228065724a2123e85edcc5383dce4194c29851d..56ea475c7657c80957f0d34ec5c8a3560d68d20a 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py b/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py index f955a5a06376defed8696a64d2eb9524250ce087..66b607c8bd6b115c83ff9173446646cebae11697 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/Validator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py b/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/Constants.py b/src/nbi/tests/Constants.py index b24c0b7ef69942a48a4307d4ced0afaf30197e09..886ddcafa4c3e1d798558f5dc285808ac7deecc6 100644 --- a/src/nbi/tests/Constants.py +++ b/src/nbi/tests/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/MockService_Dependencies.py b/src/nbi/tests/MockService_Dependencies.py index 3c9ad5c5f80afbb62a7cb05aff87cede920bac7b..3224413670f02a3318e4f6af95b258993b2edd2d 100644 --- a/src/nbi/tests/MockService_Dependencies.py +++ b/src/nbi/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/PrepareTestScenario.py b/src/nbi/tests/PrepareTestScenario.py index e82c0166acff476924fbc2b873dbc30765fcce6a..a574f086b30cf0125d82f1b41a986e3dc0fd2366 100644 --- a/src/nbi/tests/PrepareTestScenario.py +++ b/src/nbi/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/__init__.py b/src/nbi/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/nbi/tests/__init__.py +++ b/src/nbi/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/ietf_acl_client.py b/src/nbi/tests/ietf_acl_client.py index 155244a9261ec2a915512cd6e8f9f2df703b7868..20887f1a8ac037d700e3df4a5c1da91f2ae58899 100644 --- a/src/nbi/tests/ietf_acl_client.py +++ b/src/nbi/tests/ietf_acl_client.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_etsi_bwm.py b/src/nbi/tests/test_etsi_bwm.py index e621e40726e92c21979eba5ba2c956aebd59e029..9400de00f95d7f1ec11c2fcf9af7e3b480c70ad2 100644 --- a/src/nbi/tests/test_etsi_bwm.py +++ b/src/nbi/tests/test_etsi_bwm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_ietf_l2vpn.py b/src/nbi/tests/test_ietf_l2vpn.py index 007d8d45e07da303ad846dc4ef256b9b16a9b499..7bed8ff5db57a59e90f39dce1ba1bc9e43dd005b 100644 --- a/src/nbi/tests/test_ietf_l2vpn.py +++ b/src/nbi/tests/test_ietf_l2vpn.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_ietf_l3vpn.py b/src/nbi/tests/test_ietf_l3vpn.py index 5c77744a6024803157f210212ee071eba3a3fbf1..0f214661f4451317520db5dc0fc115459ce8e015 100644 --- a/src/nbi/tests/test_ietf_l3vpn.py +++ b/src/nbi/tests/test_ietf_l3vpn.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_ietf_network.py b/src/nbi/tests/test_ietf_network.py index ec03d3798ded3efd027a0b8237becc865441fc98..68337d0a8b3cf4b4942f9cba7c4ca9a60b338268 100644 --- a/src/nbi/tests/test_ietf_network.py +++ b/src/nbi/tests/test_ietf_network.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_slice.py b/src/nbi/tests/test_slice.py index d382542fdbc5e51658531a1456bebf5d79d5f770..fe112e6fc70c94caa1f5fc3824e56758c2ec442c 100644 --- a/src/nbi/tests/test_slice.py +++ b/src/nbi/tests/test_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_tfs_api.py b/src/nbi/tests/test_tfs_api.py index f7d81aa56ef3274fbf17d20f5a067b3a7fa355a7..eab2f8d9ba6408491fb272cd59bc2f79a1c08a64 100644 --- a/src/nbi/tests/test_tfs_api.py +++ b/src/nbi/tests/test_tfs_api.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/nbi/tests/test_yang_acl.py b/src/nbi/tests/test_yang_acl.py index 607001870fa69e79bd7ef53fa92d88bbf353e45e..2f45c50bc4a140ca289aad03969f94148efa71d4 100644 --- a/src/nbi/tests/test_yang_acl.py +++ b/src/nbi/tests/test_yang_acl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/.gitlab-ci.yml b/src/opticalattackdetector/.gitlab-ci.yml index fb5715f755a2b11f10263b3093b3b59fbc62b72e..40cf3c397e93e231639ca8529829745274442c1b 100644 --- a/src/opticalattackdetector/.gitlab-ci.yml +++ b/src/opticalattackdetector/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/Config.py b/src/opticalattackdetector/Config.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackdetector/Config.py +++ b/src/opticalattackdetector/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/Dockerfile b/src/opticalattackdetector/Dockerfile index 37d79582e754b4bbd2f0b82ad1fd63731c777ef8..60220dc63ce8ca157d56dcc76bbba05ab6aa6b7e 100644 --- a/src/opticalattackdetector/Dockerfile +++ b/src/opticalattackdetector/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/__init__.py b/src/opticalattackdetector/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackdetector/__init__.py +++ b/src/opticalattackdetector/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/client/OpticalAttackDetectorClient.py b/src/opticalattackdetector/client/OpticalAttackDetectorClient.py index 42a2b6c668a4e358daf6c6e24638084329fd5262..035d49fab2c2ec300ebe2aac042b8701734c8b7f 100644 --- a/src/opticalattackdetector/client/OpticalAttackDetectorClient.py +++ b/src/opticalattackdetector/client/OpticalAttackDetectorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/client/__init__.py b/src/opticalattackdetector/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackdetector/client/__init__.py +++ b/src/opticalattackdetector/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/requirements.in b/src/opticalattackdetector/requirements.in index e8476e9faebacd73ff570de43f6417f4f32e23a0..b1a4c5a9a983d39de44ce8108e77b22a9eda26d1 100644 --- a/src/opticalattackdetector/requirements.in +++ b/src/opticalattackdetector/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/service/OpticalAttackDetectorService.py b/src/opticalattackdetector/service/OpticalAttackDetectorService.py index 8b8263d738066b412236ade0dfc5cd4ea806e0f5..637d268c8e5d110ba35b9755638cb81172b932c9 100644 --- a/src/opticalattackdetector/service/OpticalAttackDetectorService.py +++ b/src/opticalattackdetector/service/OpticalAttackDetectorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py b/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py index d479f48e5b10c689b92aef64d13b2b3cb094826d..ee2b02f410444134eac92dfd9e3787ee71c37d58 100644 --- a/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py +++ b/src/opticalattackdetector/service/OpticalAttackDetectorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/service/__init__.py b/src/opticalattackdetector/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackdetector/service/__init__.py +++ b/src/opticalattackdetector/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/service/__main__.py b/src/opticalattackdetector/service/__main__.py index b9c7202cf1949b31c91cab37d0dea04c455ba037..d265de4d3ee399e5103c11dd944a4acc2c1c682a 100644 --- a/src/opticalattackdetector/service/__main__.py +++ b/src/opticalattackdetector/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/tests/__init__.py b/src/opticalattackdetector/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackdetector/tests/__init__.py +++ b/src/opticalattackdetector/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/tests/example_objects.py b/src/opticalattackdetector/tests/example_objects.py index 436b0ebaba4a5c3b7a172f87c2d0741c170932ed..8c9c8eef967702e5acac10c29849d18c7c142121 100644 --- a/src/opticalattackdetector/tests/example_objects.py +++ b/src/opticalattackdetector/tests/example_objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackdetector/tests/test_unitary.py b/src/opticalattackdetector/tests/test_unitary.py index a5ae8d59dbd271042575164276d746a705971a05..6b204b266f2e726ec8bd36dc64ebed210fb86e92 100644 --- a/src/opticalattackdetector/tests/test_unitary.py +++ b/src/opticalattackdetector/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/.gitlab-ci.yml b/src/opticalattackmanager/.gitlab-ci.yml index fc10007775769d9c14bb984b7b0b62bd2edbe9a9..ccc5191a5fae0e40002396e519b1c4961ba9ae66 100644 --- a/src/opticalattackmanager/.gitlab-ci.yml +++ b/src/opticalattackmanager/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/Config.py b/src/opticalattackmanager/Config.py index 9fd60386c3913bb7ee9b23c9688852b9743c881c..ba6d16bc00b208d932a19f1cc4eaa5c123bad7bd 100644 --- a/src/opticalattackmanager/Config.py +++ b/src/opticalattackmanager/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/Dockerfile b/src/opticalattackmanager/Dockerfile index f9f5537a4c3249798d8022ddefd6d15e54fe9af4..2af1f282ae1389114fce5c83c71f9e38ef16e0ef 100644 --- a/src/opticalattackmanager/Dockerfile +++ b/src/opticalattackmanager/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/__init__.py b/src/opticalattackmanager/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmanager/__init__.py +++ b/src/opticalattackmanager/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/requirements.in b/src/opticalattackmanager/requirements.in index 61bd9bd8b8d77bfa6f08c58ed64427c9058e2733..aed5638921626dd4cd200e22defcdf36c5ab1bbe 100644 --- a/src/opticalattackmanager/requirements.in +++ b/src/opticalattackmanager/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/service/__init__.py b/src/opticalattackmanager/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmanager/service/__init__.py +++ b/src/opticalattackmanager/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/service/__main__.py b/src/opticalattackmanager/service/__main__.py index 461756855b5fa5f1e55a8840019f92c7679c000c..31cccba055e92edf0e0ac9793d4bf423fbfdf458 100644 --- a/src/opticalattackmanager/service/__main__.py +++ b/src/opticalattackmanager/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/tests/__init__.py b/src/opticalattackmanager/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmanager/tests/__init__.py +++ b/src/opticalattackmanager/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/tests/test_unitary.py b/src/opticalattackmanager/tests/test_unitary.py index 9530b288a664cbef4d7955f45bf86a54332cdf03..93baa46eacd658738379f86c419d260d7d46fdb7 100644 --- a/src/opticalattackmanager/tests/test_unitary.py +++ b/src/opticalattackmanager/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/utils/__init__.py b/src/opticalattackmanager/utils/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmanager/utils/__init__.py +++ b/src/opticalattackmanager/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmanager/utils/monitor.py b/src/opticalattackmanager/utils/monitor.py index 39208245f08ad27bbae203c5c59c114d6d260eb8..76672ecf7a488746660b384f6af122cf914df508 100644 --- a/src/opticalattackmanager/utils/monitor.py +++ b/src/opticalattackmanager/utils/monitor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/.gitlab-ci.yml b/src/opticalattackmitigator/.gitlab-ci.yml index 4c3525f4aebb83caf22931ed2609d82246332e0f..501fcb7840200698df9ef9446c1fecea5eb1607c 100644 --- a/src/opticalattackmitigator/.gitlab-ci.yml +++ b/src/opticalattackmitigator/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/Config.py b/src/opticalattackmitigator/Config.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmitigator/Config.py +++ b/src/opticalattackmitigator/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/Dockerfile b/src/opticalattackmitigator/Dockerfile index 18c22861915317113b7eec4178385c7075d99365..f4c5a2b5ce1f7e69a35a05dcc59c1442569719e6 100644 --- a/src/opticalattackmitigator/Dockerfile +++ b/src/opticalattackmitigator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/__init__.py b/src/opticalattackmitigator/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmitigator/__init__.py +++ b/src/opticalattackmitigator/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py b/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py index 3498eae04eda8dedd3bd3766747c3ebf0d2980e1..7278144400d64d4bde3667252cf5e0b4046ec306 100644 --- a/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py +++ b/src/opticalattackmitigator/client/OpticalAttackMitigatorClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/client/__init__.py b/src/opticalattackmitigator/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmitigator/client/__init__.py +++ b/src/opticalattackmitigator/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/requirements.in b/src/opticalattackmitigator/requirements.in index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmitigator/requirements.in +++ b/src/opticalattackmitigator/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py b/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py index 94b87485d524d971f3ab05cd4b78677de558c4d8..dfb2f7e3c2f6ec4d75f8c885e02f4cd3b4edd40f 100644 --- a/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py +++ b/src/opticalattackmitigator/service/OpticalAttackMitigatorService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py b/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py index 96769f352ef3861719609d8adfba76721f4c318e..4437df98de19eb5e9d7d36da0d05e8a351f5b2e7 100644 --- a/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py +++ b/src/opticalattackmitigator/service/OpticalAttackMitigatorServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/service/__init__.py b/src/opticalattackmitigator/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmitigator/service/__init__.py +++ b/src/opticalattackmitigator/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/service/__main__.py b/src/opticalattackmitigator/service/__main__.py index 1e13e2ef0c0ac69ff2a0753247b1c7522fedda2a..135ad5bdd8d43a63d3af0bb2e63b4c907e1fed69 100644 --- a/src/opticalattackmitigator/service/__main__.py +++ b/src/opticalattackmitigator/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/tests/__init__.py b/src/opticalattackmitigator/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/opticalattackmitigator/tests/__init__.py +++ b/src/opticalattackmitigator/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalattackmitigator/tests/test_unitary.py b/src/opticalattackmitigator/tests/test_unitary.py index ba58c60709a4ead7653314bb885fe4e6a370b883..bf6927ff046d241e7daac32b402c8c93972b6edf 100644 --- a/src/opticalattackmitigator/tests/test_unitary.py +++ b/src/opticalattackmitigator/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalcontroller/.gitlab-ci.yml b/src/opticalcontroller/.gitlab-ci.yml index 831a61186d0e56b0b359d47c551c555da8ade3ee..20125e178b79b0a0db05a23769038e6aea8b9e7e 100644 --- a/src/opticalcontroller/.gitlab-ci.yml +++ b/src/opticalcontroller/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalcontroller/Dockerfile b/src/opticalcontroller/Dockerfile index faea3b2e056768ef9947db108df61928c8a177cb..3668646868f9d48faa6e3e9afa70ce4e3a1bc9df 100644 --- a/src/opticalcontroller/Dockerfile +++ b/src/opticalcontroller/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -67,5 +67,4 @@ COPY src/context/client/. context/client/ COPY src/opticalcontroller/. opticalcontroller/ # Start the service -WORKDIR /var/teraflow/opticalcontroller -ENTRYPOINT ["python", "OpticalController.py"] +ENTRYPOINT ["python", "-m", "opticalcontroller.OpticalController"] diff --git a/src/opticalcontroller/OpticalController.py b/src/opticalcontroller/OpticalController.py index 0febb7b1f470bf86dc30754c1db2af262779a25d..74fd7882689d92a654a749ea5be0c2583841a31b 100644 --- a/src/opticalcontroller/OpticalController.py +++ b/src/opticalcontroller/OpticalController.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,19 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +import logging, time from flask import Flask from flask import render_template from flask_restplus import Resource, Api +from google.protobuf.json_format import MessageToDict +from common.proto.context_pb2 import TopologyId +from opticalcontroller.tools import * +from opticalcontroller.variables import * +from opticalcontroller.RSA import RSA -from tools import * -from variables import * -from RSA import RSA -import time -import logging - +logging.basicConfig(level=logging.INFO) +LOGGER = logging.getLogger(__name__) +global rsa +global links_dict rsa = None -LOGGER = logging.getLogger(__name__) + app = Flask(__name__) api = Api(app, version='1.0', title='Optical controller API', @@ -47,7 +51,7 @@ class AddLightpath(Resource): @staticmethod def put(src, dst, bitrate, bidir=1): - LOGGER.info("INFO: New Lightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) + print("INFO: New Lightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) t0 = time.time()*1000.0 if debug: rsa.g.printGraph() @@ -56,9 +60,9 @@ class AddLightpath(Resource): flow_id = rsa.rsa_computation(src, dst, bitrate, bidir) if rsa.db_flows[flow_id]["op-mode"] == 0: return 'No path found', 404 - t1 = time.time()*1000.0 + t1 = time.time() * 1000.0 elapsed = t1 - t0 - LOGGER.info("INFO: time elapsed = {} ms".format(elapsed)) + print("INFO: time elapsed = {} ms".format(elapsed)) return rsa.db_flows[flow_id], 200 else: return "Error", 404 @@ -74,18 +78,15 @@ class AddLightpath(Resource): @optical.response(404, 'Error, not found') class AddFlexLightpath(Resource): @staticmethod - def put(src, dst, bitrate,bidir=1, band=None): - + def put(src, dst, bitrate, bidir=1, band=None): + print("INFO: New FlexLightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) - LOGGER.info("INFO: New FlexLightpath request from {} to {} with rate {} ".format(src, dst, bitrate)) t0 = time.time()*1000.0 if debug: rsa.g.printGraph() if rsa is not None: flow_id, optical_band_id = rsa.rsa_fs_computation(src, dst, bitrate, bidir, band) - print (f"flow_id {flow_id} and optical_band_id {optical_band_id} ") - LOGGER.debug('flow_id={:s} rsa.db_flows={:s}'.format(str(flow_id), str(rsa.db_flows))) if flow_id is not None: if rsa.db_flows[flow_id]["op-mode"] == 0: return 'No path found', 404 @@ -100,53 +101,118 @@ class AddFlexLightpath(Resource): else: t1 = time.time() * 1000.0 elapsed = t1 - t0 - LOGGER.info("INFO: time elapsed = {} ms".format(elapsed)) + print("INFO: time elapsed = {} ms".format(elapsed)) return rsa.optical_bands[optical_band_id], 200 else: return "Error", 404 -@optical.route('/DelFlexLightpath/<int:flow_id>/<string:src>/<string:dst>/<int:bitrate>/<int:o_band_id>') + +# @optical.route('/DelFlexLightpath/<string:src>/<string:dst>/<int:bitrate>/<int:o_band_id>') +@optical.route('/DelFlexLightpath/<string:src>/<string:dst>/<int:bitrate>/<int:o_band_id>') +@optical.route('/DelFlexLightpath/<string:src>/<string:dst>/<int:bitrate>/<int:o_band_id>/<int:flow_id>') @optical.response(200, 'Success') @optical.response(404, 'Error, not found') -class DelLightpath(Resource): +class DelFLightpath(Resource): @staticmethod - def delete(flow_id, src, dst, bitrate, o_band_id): - if flow_id in rsa.db_flows.keys(): - flow = rsa.db_flows[flow_id] - bidir = flow["bidir"] - match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] == bitrate - if bidir: - match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] == bitrate - if match1 or match2: + def delete( src, dst, bitrate, o_band_id, flow_id=None): + flow = None + match1 = False + ob_id = None + if flow_id is not None: + if flow_id in rsa.db_flows.keys(): + flow = rsa.db_flows[flow_id] + match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] == bitrate ob_id = flow["parent_opt_band"] - rsa.del_flow(flow, ob_id) - rsa.db_flows[flow_id]["is_active"] = False - rsa.optical_bands[ob_id]["served_lightpaths"].remove(flow_id) - if rsa.optical_bands[ob_id]["reverse_optical_band_id"] != 0: - rev_ob_id = rsa.optical_bands[ob_id]["reverse_optical_band_id"] - rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id) - - if debug: - LOGGER.info(links_dict) - return "flow {} deleted".format(flow_id), 200 + flow['is_active'] = False + + if flow is not None: + bidir = flow["bidir"] + if bidir: + match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] == bitrate + if match1 or match2: + ob_id = flow["parent_opt_band"] + rsa.del_flow(flow, ob_id) + rsa.db_flows[flow_id]["is_active"] = False + if flow_id in rsa.optical_bands[ob_id]["served_lightpaths"]: + rsa.optical_bands[ob_id]["served_lightpaths"].remove(flow_id) + #if rsa.optical_bands[ob_id]["reverse_optical_band_id"] != 0: + # rev_ob_id = rsa.optical_bands[ob_id]["reverse_optical_band_id"] + # rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id) + + if debug: + print(rsa.links_dict) + return "flow {} deleted".format(flow_id), 200 + else: + return "flow {} not matching".format(flow_id), 404 else: - return "flow {} not matching".format(flow_id), 404 + if match1: + # if delete_band !=0 and ob_id is not None: + # print(f"delete_lightpath {delete_band} and ob_id {ob_id}") + # if len( rsa.optical_bands[ob_id]["served_lightpaths"]) != 0: + # return "DELETE_NOT_ALLOWED" ,400 + rsa.del_flow(flow,flow_id,ob_id) + + if debug: + print(f"vor ob_id {ob_id} rsa.optical_bands {rsa.optical_bands[ob_id]}") + print(f"rsa.links_dict {rsa.links_dict}") + return "flow {} deleted".format(flow_id), 200 + else: + return "flow {} not matching".format(flow_id), 404 else: - if match1: - ob_id = flow["parent_opt_band"] - rsa.del_flow(flow, ob_id) - rsa.db_flows[flow_id]["is_active"] = False - rsa.optical_bands[ob_id]["served_lightpaths"].remove(flow_id) - if debug: - LOGGER.info(links_dict) - return "flow {} deleted".format(flow_id), 200 - else: - return "flow {} not matching".format(flow_id), 404 - else: - return "flow id {} does not exist".format(flow_id), 404 + return "flow id {} does not exist".format(flow_id), 404 +@optical.route('/DelOpticalBand/<string:src>/<string:dst>/<int:o_band_id>', methods=['DELETE']) +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class DelOpticalBand(Resource): + @staticmethod + def delete( src, dst, o_band_id): + flow = None + ob_id = None + if o_band_id is not None: + if o_band_id in rsa.optical_bands.keys(): + flow = rsa.optical_bands[o_band_id] + match1 = flow["src"] == src and flow["dst"] == dst and flow["bitrate"] + ob_id = o_band_id + + if flow is not None: + bidir = flow["bidir"] + if bidir: + match2 = flow["src"] == dst and flow["dst"] == src and flow["bitrate"] + if match1 or match2: + ob_id = flow["parent_opt_band"] + #rsa.del_flow(flow, ob_id) + rsa.optical_bands[ob_id]["is_active"] = False + # if flow_id in rsa.optical_bands[ob_id]["served_lightpaths"]: + # rsa.optical_bands[ob_id]["served_lightpaths"].remove(flow_id) + #if rsa.optical_bands[ob_id]["reverse_optical_band_id"] != 0: + # rev_ob_id = rsa.optical_bands[ob_id]["reverse_optical_band_id"] + # rsa.optical_bands[rev_ob_id]["served_lightpaths"].remove(flow_id) + + if debug: + print(rsa.links_dict) + return "ob_id {} deleted".format(ob_id), 200 + else: + return "ob_id {} not matching".format(ob_id), 404 + else: + if ob_id is not None: + + if len( rsa.optical_bands[ob_id]["served_lightpaths"]) != 0: + return "DELETE_NOT_ALLOWED" ,400 + + rsa.del_band(flow,ob_id) + if debug: + print(f"vor ob_id {ob_id} rsa.optical_bands {rsa.optical_bands[ob_id]}") + print(f"rsa.links_dict {rsa.links_dict}") + return "ob_id {} deleted".format(ob_id), 200 + + else : + return "flow for ob_id {} not found".format(ob_id),400 + else: + return "ob_id {} does not exist".format(ob_id), 404 + @optical.route('/DelLightpath/<int:flow_id>/<string:src>/<string:dst>/<int:bitrate>') @optical.response(200, 'Success') @@ -162,7 +228,7 @@ class DelLightpath(Resource): rsa.del_flow(flow) rsa.db_flows[flow_id]["is_active"] = False if debug: - LOGGER.info(links_dict) + print(rsa.links_dict) return "flow {} deleted".format(flow_id), 200 else: return "flow {} not matching".format(flow_id), 404 @@ -178,22 +244,21 @@ class GetFlows(Resource): def get(): try: if debug: - LOGGER.info(rsa.db_flows) + print(rsa.db_flows) return rsa.db_flows, 200 except: return "Error", 404 + @optical.route('/GetOpticalBands') @optical.response(200, 'Success') @optical.response(404, 'Error, not found') class GetBands(Resource): @staticmethod def get(): - print("Getting ") - LOGGER.info("Getting") try: if debug: - LOGGER.info(rsa.optical_bands) + print(rsa.optical_bands) return rsa.optical_bands, 200 except: return "Error", 404 @@ -208,7 +273,7 @@ class GetBand(Resource): for ob_idx in rsa.optical_bands.keys(): if str(ob_idx) == str(ob_id): if debug: - LOGGER.info(rsa.optical_bands[ob_id]) + print(rsa.optical_bands[ob_id]) return rsa.optical_bands[ob_idx], 200 return {}, 404 @@ -219,28 +284,74 @@ class GetBand(Resource): class GetFlows(Resource): @staticmethod def get(): - global links_dict + global rsa + #global links_dict + links = None + if rsa is not None : + links = rsa.links_dict try: if debug: - LOGGER.info(links_dict) - return links_dict, 200 + print(links) + return links, 200 except: return "Error", 404 -if __name__ == '__main__': +@optical.route('/GetTopology/<path:context_id>/<path:topology_id>',methods=['GET']) +@optical.response(200, 'Success') +@optical.response(404, 'Error, not found') +class GetTopology(Resource): + @staticmethod + def get(context_id:str,topology_id:str): + + global rsa + if (rsa is not None): + return "Opticalcontroller is synchronised" ,200 + topog_id = TopologyId() + topog_id.topology_uuid.uuid=topology_id + topog_id.context_id.context_uuid.uuid=context_id + + try: + links_dict = {"optical_links": []} + node_dict = {} + topo, nodes = readTopologyDataFromContext(topog_id) + + for link in topo: + link_dict_type = MessageToDict(link, preserving_proto_field_name=True) + + if "c_slots" in link_dict_type["optical_details"]: + link_dict_type["optical_details"]["c_slots"] = link_dict_type["optical_details"]["c_slots"] + + if "l_slots" in link_dict_type["optical_details"]: + link_dict_type["optical_details"]["l_slots"] = link_dict_type["optical_details"]["l_slots"] + + if "s_slots" in link_dict_type["optical_details"]: + link_dict_type["optical_details"]["s_slots"] = link_dict_type["optical_details"]["s_slots"] + + links_dict["optical_links"].append(link_dict_type) + + for device in nodes : + dev_dic = { + "id":device.device_id.device_uuid.uuid, + #"ip":f"10.30.2.{207+i}", + #"port":"50001", + "type":"OC-ROADM" if device.device_type =="optical-roadm" else "OC-TP", + "driver": "OpticalOC" + } + node_dict[device.name] = dev_dic + #i+=1 + #print(f"refresh_optical controller optical_links_dict= {links_dict}") + #print(f"refresh_optical controller node_dict {node_dict}") + + rsa = RSA(node_dict, links_dict) + if debug: + print(rsa.init_link_slots2()) + return "ok", 200 + except Exception as e: + LOGGER.exception('Error in GetTopology') + print(f"err {e}") + return "Error", 400 - # Start metrics server - - LOGGER.info('Starting...') - - - - nodes_dict, links_dict = readTopologyData(nodes_json, topology_json) - - #topologies, links = getTopology() - #print("topologies{} and devices {}".format(topologies,links)) - rsa = RSA(nodes_dict, links_dict) - - app.run(host='0.0.0.0', port=10060, debug=True) +if __name__ == '__main__': + app.run(host='0.0.0.0', port=10060) diff --git a/src/opticalcontroller/README.md b/src/opticalcontroller/README.md index 5fd94c59e51cbd78dd76a7db0f24aaaec4ebd9db..f121055cec91470646b9885bfe90db137027f472 100644 --- a/src/opticalcontroller/README.md +++ b/src/opticalcontroller/README.md @@ -1,17 +1,20 @@ -# optical-controller -This a framework to implement the optical controller for the RMSA algorithm. +# Optical Controller + +This is a framework to test the optical controller for the RMSA algorithm in an isolated manner. + + + +```bash #create a venv python -m venv venv -in linux +# in linux source venv/Scripts/activate -in windows +# in windows venv\Scripts\activate -pip install -r requirements_opt.txt +pip install -r requirements_optical_ctrl_test.txt python OpticalController.py - - - +``` diff --git a/src/opticalcontroller/RSA.py b/src/opticalcontroller/RSA.py index b15357c98242ad6b18d4068b6f0aa1cb08852d7a..da31187eb1d5c3f6f51cbbdc1c9641653b683e4b 100644 --- a/src/opticalcontroller/RSA.py +++ b/src/opticalcontroller/RSA.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import dijsktra -from tools import * -from variables import * +from opticalcontroller.dijkstra import Graph, shortest_path +from opticalcontroller.tools import * +from opticalcontroller.variables import * class RSA(): @@ -26,15 +26,15 @@ class RSA(): self.flow_id = 0 self.opt_band_id = 0 self.db_flows = {} - self.initGraph() + self.initGraph2() self.c_slot_number = 0 self.l_slot_number = 0 self.s_slot_number = 0 self.optical_bands = {} - def init_link_slots(self, testing): - if not testing: - for l in self.links_dict["links"]: + def init_link_slots(self): + if full_links: + for l in self.links_dict["optical_links"]: for fib in l["optical_link"]["details"]["fibers"]: #fib = self.links_dict[l]["fibers"][f] if len(fib["c_slots"]) > 0: @@ -45,7 +45,7 @@ class RSA(): fib["s_slots"] = list(range(0, Ns)) if debug: print(fib) - for l1 in self.links_dict["links"]: + for l1 in self.links_dict["optical_links"]: for fib1 in l1["optical_link"]["details"]["fibers"]: #fib1 = self.links_dict[l1]["details"]["fibers"][f1] @@ -58,11 +58,35 @@ class RSA(): break return "{},{},{}".format(self.c_slot_number, self.l_slot_number, self.s_slot_number) + def init_link_slots2(self): + if full_links: + for l in self.links_dict["optical_links"]: + fib = l["optical_details"] + #fib = self.links_dict[l]["fibers"][f] + if len(fib["c_slots"]) > 0: + for c in range(0, Nc): + fib["c_slots"][c] = 1 + if len(fib["l_slots"]) > 0: + for c in range(0, Nl): + fib["l_slots"][c] = 1 + if len(fib["s_slots"]) > 0: + for c in range(0, Ns): + fib["s_slots"][c] = 1 + if debug: + print(fib) + for l1 in self.links_dict["optical_links"]: + fib1 = l1["optical_details"] + self.c_slot_number = len(fib1["c_slots"].keys()) + self.l_slot_number = len(fib1["l_slots"].keys()) + self.s_slot_number = len(fib1["s_slots"].keys()) + break + return "{},{},{}".format(self.c_slot_number, self.l_slot_number, self.s_slot_number) + def initGraph(self): - self.g = dijsktra.Graph() + self.g = Graph() for n in self.nodes_dict: self.g.add_vertex(n) - for l in self.links_dict["links"]: + for l in self.links_dict["optical_links"]: if debug: print(l) [s, d] = l["optical_link"]["name"].split('-') @@ -74,8 +98,26 @@ class RSA(): if debug: self.g.printGraph() + def initGraph2(self): + + self.g = Graph() + + for n in self.nodes_dict: + self.g.add_vertex(n) + for l in self.links_dict["optical_links"]: + if debug: + print(l) + [s, d] = l["name"].split('-') + ps = l["optical_details"]["src_port"] + pd = l["optical_details"]["dst_port"] + self.g.add_edge(s, d, ps, pd, 1) + + print("INFO: Graph initiated.2") + if debug: + self.g.printGraph() + def compute_path(self, src, dst): - path = dijsktra.shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) + path = shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) print("INFO: Path from {} to {} with distance: {}".format(src, dst, self.g.get_vertex(dst).get_distance())) if debug: print(path) @@ -95,7 +137,7 @@ class RSA(): self.g.reset_graph() return links, path - def get_slots(self, links, slots, optical_band_id = None): + def get_slots(self, links, slots, optical_band_id=None): if isinstance(slots, int): val_c = slots @@ -120,38 +162,40 @@ class RSA(): add = links[0] if self.nodes_dict[dst_2]["type"] == "OC-TP": drop = links[-1] - + found = 0 for l in links: c_slots[l] = [] l_slots[l] = [] s_slots[l] = [] - found = 0 - for link in self.links_dict["links"]: - if link["optical_link"]["name"] == l: - #for f in self.links_dict[l]['fibers'].keys(): - for fib in link["optical_link"]["details"]["fibers"]: - if l == add: - if 'used' in fib: - if fib["used"]: - #if debug: - print("WARNING!!!: link {}, fiber {} is already in use".format(l, fib["ID"])) - continue - if l == drop: - if 'used' in fib: - if fib["used"]: - #if debug: - print("WARNING!!!: link {}, fiber {} is already in use".format(l, fib["ID"])) - continue - if len(fib["c_slots"]) > 0: - c_slots[l] = combine(c_slots[l], consecutives(fib["c_slots"], val_c)) - if len(fib["l_slots"]) > 0: - l_slots[l] = combine(l_slots[l], consecutives(fib["l_slots"], val_l)) - if len(fib["s_slots"]) > 0: - s_slots[l] = combine(s_slots[l], consecutives(fib["s_slots"], val_s)) - if debug: - print(l, c_slots[l]) - found = 1 - if found == 0: + + link = self.get_link_by_name(l) + fib = link["optical_details"] + if l == add: + if 'used' in fib: + if fib["used"]: + #if debug: + print("WARNING!!!: link {}, is already in use".format(l)) + return [], [], [] + if l == drop: + if 'used' in fib: + if fib["used"]: + #if debug: + print("WARNING!!!: link {} is already in use".format(l)) + return [], [], [] + c_found = l_found = s_found = 0 + if len(fib["c_slots"].keys()) > 0: + #c_slots[l] = combine(c_slots[l], consecutives(fib["c_slots"], val_c)) + c_slots[l] = combine(c_slots[l], consecutives(fib["c_slots"], val_c)) + c_found = 1 + if len(fib["l_slots"].keys()) > 0: + l_slots[l] = combine(l_slots[l], consecutives(fib["l_slots"], val_l)) + l_found = 1 + if len(fib["s_slots"].keys()) > 0: + s_slots[l] = combine(s_slots[l], consecutives(fib["s_slots"], val_s)) + s_found = 1 + if debug: + print(l, c_slots[l]) + if c_found == 0 and l_found == 0 and s_found == 0: return [], [], [] keys = list(c_slots.keys()) @@ -185,60 +229,80 @@ class RSA(): c_sts = common_slots(a_c, b_c) l_sts = common_slots(a_l, b_l) s_sts = common_slots(a_s, b_s) + ''' + if len(fib["l_slots"]) > 0: + l_slots[l] = combine(l_slots[l], consecutives(fib["l_slots"], val_l)) + l_found = 1''' if optical_band_id is not None: if "c_slots" in self.optical_bands[optical_band_id].keys(): if len(self.optical_bands[optical_band_id]["c_slots"]) > 0: a_c = c_sts - b_c = self.optical_bands[optical_band_id]["c_slots"] + #MOD + b_c = consecutives(self.optical_bands[optical_band_id]["c_slots"], val_c) + #b_c = self.optical_bands[optical_band_id]["c_slots"] c_sts = common_slots(a_c, b_c) - else: - c_sts = [] else: c_sts = [] if "l_slots" in self.optical_bands[optical_band_id].keys(): if len(self.optical_bands[optical_band_id]["l_slots"]) > 0: a_l = l_sts - b_l = self.optical_bands[optical_band_id]["l_slots"] + b_l = consecutives(self.optical_bands[optical_band_id]["l_slots"], val_c) l_sts = common_slots(a_l, b_l) - else: - l_sts = [] else: l_sts = [] if "s_slots" in self.optical_bands[optical_band_id].keys(): if len(self.optical_bands[optical_band_id]["s_slots"]) > 0: a_s = s_sts - b_s = self.optical_bands[optical_band_id]["s_slots"] + b_s = consecutives(str_list_to_int(self.optical_bands[optical_band_id]["s_slots"].keys()), val_c) s_sts = common_slots(a_s, b_s) - else: - s_sts = [] else: s_sts = [] return c_sts, l_sts, s_sts def update_link(self, fib, slots, band): + #print(fib) for i in slots: - fib[band].remove(i) + fib[band][str(i)] = 0 if 'used' in fib: fib['used'] = True + print(f"fib updated {fib}") + #print(fib) def update_optical_band(self, optical_band_id, slots, band): for i in slots: - self.optical_bands[optical_band_id][band].remove(i) + self.optical_bands[optical_band_id][band][str(i)] = 0 + + def augment_optical_band(self, optical_band_id, slots, band): + for i in slots: + self.optical_bands[optical_band_id][band][str(i)] = 1 def restore_link(self, fib, slots, band): for i in slots: - fib[band].append(int(i)) + fib[band][str(i)] = 1 if 'used' in fib: fib['used'] = False - fib[band].sort() + #fib[band].sort() def restore_optical_band(self, optical_band_id, slots, band): for i in slots: - self.optical_bands[optical_band_id][band].append(int(i)) - self.optical_bands[optical_band_id][band].sort() + self.optical_bands[optical_band_id][band][str(i)] = 1 + #self.optical_bands[optical_band_id][band].append(int(i)) + #self.optical_bands[optical_band_id][band].sort() + + def restore_optical_band_2(self, optical_band_id, slots, band ,links): + print(f"example of band { band}") + print(f"example of slots {slots}") + print(f"example of self.optical_bands_before { self.optical_bands}") + for i in slots: + self.optical_bands[optical_band_id][band][str(i)] = 1 + print(f"example of self.optical_bands_after { self.optical_bands}") + + #link_name= self.optical_bands[optical_band_id]['links'][0] + #link = self.get_link_by_name(link_name) + #update_optical_band(optical_bands=self.optical_bands,optical_band_id=optical_band_id,band=band,link=link) - def del_flow(self, flow, o_b_id = None): + def del_flow(self, flow,flow_id, o_b_id = None): flows = flow["flows"] band = flow["band_type"] slots = flow["slots"] @@ -249,22 +313,123 @@ class RSA(): path = flow["path"] links = flow["links"] bidir = flow["bidir"] + flow_id = flow["flow_id"] - for l in fiber_f.keys(): + for l in links: if debug: print(l) - print(fiber_f[l]) #link = self.links_dict[l] #f = fiber_f[l] #fib = link['fibers'][f] - fib = self.get_fiber_details(l, fiber_f[l]) - if not list_in_list(slots, fib[band]): - self.restore_link(fib, slots, band) + fib = self.get_link_by_name(l)["optical_details"] + + self.restore_link(fib, slots, band) + if debug: + print(fib[band]) + + if o_b_id is not None: + if debug: + print("restoring OB") + print(f"invoking restore_optical_band o_b_id: {o_b_id} , slots {slots} , band {band} ") + self.restore_optical_band(o_b_id, slots, band) + if flow_id in self.optical_bands[o_b_id]["served_lightpaths"]: + if flow_id in self.optical_bands[o_b_id]["served_lightpaths"]: + self.optical_bands[o_b_id]["served_lightpaths"].remove(flow_id) + + #self.restore_optical_band_2(o_b_id, slots, band,links) + + if bidir: + for l in links: + r_l = reverse_link(l) + if debug: + print(r_l) + # link = self.links_dict[l] + # f = fiber_f[l] + # fib = link['fibers'][f] + fib = self.get_link_by_name(r_l)["optical_details"] + if list_in_list(slots, str_list_to_int(fib[band].keys())): + self.restore_link(fib, slots, band) + if debug: + print(fib[band]) + ''' + for rl in fiber_b.keys(): if debug: - print(fib[band]) + print(rl) + print(fiber_b[rl]) + #rlink = self.links_dict[rl] + #rf = fiber_b[rl] + #rfib = rlink['fibers'][rf] + rfib = self.get_fiber_details(rl, fiber_b[rl]) + if not list_in_list(slots, rfib[band]): + self.restore_link(rfib, slots, band) + if debug: + print(rfib[band]) + ''' + #changed according to TFS development + #if o_b_id is not None: + # rev_o_band_id = self.optical_bands[o_b_id]["reverse_optical_band_id"] + # self.restore_optical_band(rev_o_band_id, slots, band) + return True + + + def del_band(self, flow, o_b_id = None): + print(f"delete band {flow} ") + + flows = flow["flows"] + band = None + #slots = flow["slots"] + fiber_f = flow["fiber_forward"] + fiber_b = flow["fiber_backward"] + op = flow["op-mode"] + n_slots = 0 + path = flow["path"] + bidir = flow["bidir"] + links = [] + if o_b_id is not None: + links= self.optical_bands[o_b_id]["links"] + band = self.optical_bands[o_b_id]["band_type"] + n_slots =self.optical_bands[o_b_id]["n_slots"] + if n_slots > 0: + slots=[i+1 for i in range(n_slots)] + + for l in links: + if debug: + print(l) + #link = self.links_dict[l] + #f = fiber_f[l] + #fib = link['fibers'][f] + fib = self.get_link_by_name(l)["optical_details"] + print(f"del_flow_fib {fib } and band {band}") + print(f"del_flow { str_list_to_int(fib[band].keys())}") + + print(f"invoking restore_link fib: {fib} , slots {slots} , band {band} ") + self.restore_link(fib, slots, band) + self.optical_bands[o_b_id]["is_active"]=False + + if debug: + print(fib[band]) + if o_b_id is not None: + + if debug: + print("restoring OB") + print(f"invoking restore_optical_band o_b_id: {o_b_id} , slots {slots} , band {band} ") self.restore_optical_band(o_b_id, slots, band) + #self.restore_optical_band_2(o_b_id, slots, band,links) if bidir: + for l in links: + r_l = reverse_link(l) + if debug: + print(r_l) + # link = self.links_dict[l] + # f = fiber_f[l] + # fib = link['fibers'][f] + fib = self.get_link_by_name(r_l)["optical_details"] + if list_in_list(slots, str_list_to_int(fib[band].keys())): + self.restore_link(fib, slots, band) + if debug: + print(fib[band]) + ''' for rl in fiber_b.keys(): if debug: print(rl) @@ -277,17 +442,26 @@ class RSA(): self.restore_link(rfib, slots, band) if debug: print(rfib[band]) + ''' #changed according to TFS development #if o_b_id is not None: # rev_o_band_id = self.optical_bands[o_b_id]["reverse_optical_band_id"] # self.restore_optical_band(rev_o_band_id, slots, band) return True + def del_handler(self, flow,flow_id, o_b_id = None,delete_band=0): + print(f" del_handler flow {flow} flow_id {flow_id} o_b_id {o_b_id} delete_band {delete_band}") + if delete_band != 0: + print(f"delete band del_band") + self.del_band(flow,flow_id,o_b_id=o_b_id) + else : + self.del_flow(flow,flow_id=flow_id,o_b_id=o_b_id) + def get_fibers_forward(self, links, slots, band): fiber_list = {} add = links[0] drop = links[-1] - print(links) + #print(links) ''' for link in self.links_dict["links"]: if link["optical_link"]["name"] == l: @@ -296,85 +470,98 @@ class RSA(): ''' for l in links: - for link in self.links_dict["links"]: - if link["optical_link"]["name"] == l: - for fib in link["optical_link"]["details"]["fibers"]: - #for f in self.links_dict[l]['fibers'].keys(): - #for fib in l["optical_link"]["details"]["fibers"]: - #fib = self.links_dict[l]['fibers'][f] - if l == add: - if 'used' in fib: - if fib["used"]: - if debug: - print("link {}, fiber {} is already in use".format(l, fib["ID"])) - continue - if l == drop: - if 'used' in fib: - if fib["used"]: - if debug: - print("link {}, fiber {} is already in use".format(l, fib["ID"])) - continue - if list_in_list(slots, fib[band]): - fiber_list[l] = fib["ID"] - self.update_link(fib, slots, band) - break + for link in self.links_dict["optical_links"]: + print(f"tracking link info {link}") + if link["name"] == l: + fib = link["optical_details"] + #for f in self.links_dict[l]['fibers'].keys(): + #for fib in l["optical_link"]["details"]["fibers"]: + #fib = self.links_dict[l]['fibers'][f] + if l == add: + if 'used' in fib: + if fib["used"]: + if debug: + print("link {} is already in use".format(l)) + continue + if l == drop: + if 'used' in fib: + if fib["used"]: + if debug: + print("link {} is already in use".format(l)) + continue + if list_in_list(slots, str_list_to_int(fib[band].keys())): + #fiber_list[l] = fib["ID"] + self.update_link(fib, slots, band) + break print("INFO: Path forward computation completed") return fiber_list def get_link_by_name (self, key): - result = None - for link in self.links_dict["links"]: - if link["optical_link"]["name"] == key: + for link in self.links_dict["optical_links"]: + if link["name"] == key: if debug: print(link) - result = link break - return result + return link def get_fiber_details(self, link_key, fiber_id): - for link in self.links_dict["links"]: - if link["optical_link"]["name"] == link_key: + for link in self.links_dict["optical_links"]: + if link["name"] == link_key: if debug: print(link) - for fib in link["optical_link"]["details"]["fibers"]: + for fib in link["optical_details"]: if fib["ID"] == fiber_id: return fib return None - - def get_fibers_backward(self, links, fibers, slots, band): + def get_fibers_backward(self, links, slots, band): fiber_list = {} #r_drop = reverse_link(links[0]) #r_add = reverse_link(links[-1]) - for l in fibers.keys(): - fib = self.get_fiber_details(l, fibers[l]) + for l in links: + fib = self.get_link_by_name(l)["optical_details"] ''' link = self.get_link_by_name(l) #port = self.links_dict[l]["fibers"][fibers[l]]["src_port"] for fib in link["optical_link"]["details"]["fibers"]: if fib["ID"] == fibers[l]: ''' - port = fib["src_port"] + s_port = fib["src_port"] + d_port = fib["dst_port"] + + if debug: + print(l, s_port, d_port) + r_l = reverse_link(l) r_link = self.get_link_by_name(r_l) + if debug: + print(r_l) + #for f in r_link["fibers"].keys(): - for r_fib in r_link["optical_link"]["details"]["fibers"]: - if r_fib["remote_peer_port"] == port: - if list_in_list(slots, r_fib[band]): - fiber_list[r_l] = r_fib["ID"] - self.update_link(r_fib, slots, band) + r_fib = r_link["optical_details"] + if r_fib["remote_peer_port"] == s_port and r_fib["local_peer_port"] == d_port: + if list_in_list(slots, str_list_to_int(r_fib[band].keys())): + #fiber_list[r_l] = r_fib["ID"] + self.update_link(r_fib, slots, band) print("INFO: Path backward computation completed") return fiber_list + #function invoked for lightpaths and OB def select_slots_and_ports(self, links, n_slots, c, l, s, bidir): if debug: - print(self.links_dict) + print (links, n_slots, c, l, s, bidir, self.c_slot_number, self.l_slot_number, self.s_slot_number) band, slots = slot_selection(c, l, s, n_slots, self.c_slot_number, self.l_slot_number, self.s_slot_number) + if debug: + print (band, slots) if band is None: print("No slots available in the three bands") - return None, None, None - if debug: - print(band, slots) + #return None, None, None, {}, {} + return None, None, None, {}, {} + + self.get_fibers_forward(links, slots, band) + if bidir: + self.get_fibers_backward(links, slots, band) + ''' fibers_f = self.get_fibers_forward(links, slots, band) fibers_b = [] @@ -385,6 +572,7 @@ class RSA(): print(fibers_f) print("backward") print(fibers_b) + ''' add = links[0] drop = links[-1] inport = "0" @@ -394,18 +582,22 @@ class RSA(): t_flows = {} #if len(links) == 1: - for lx in fibers_f: - if lx == add: + for llx in links: + if llx == add: inport = "0" r_outport = "0" - if lx == drop: + if llx == drop: outport = "0" r_inport = "0" + ''' f = fibers_f[lx] - src, dst = lx.split("-") + fibx = self.get_fiber_details(lx, f) + ''' + src, dst = llx.split("-") #outport = self.links_dict[lx]['fibers'][f]["src_port"] - outport = fibx["src_port"] + lx = self.get_link_by_name(llx)["optical_details"] + outport = lx["src_port"] t_flows[src] = {} t_flows[src]["f"] = {} @@ -414,14 +606,14 @@ class RSA(): if bidir: #r_inport = self.links_dict[lx]['fibers'][f]["local_peer_port"] - r_inport = fibx["local_peer_port"] + r_inport = lx["local_peer_port"] t_flows[src]["b"] = {"in": r_inport, "out": r_outport} #inport = self.links_dict[lx]['fibers'][f]["dst_port"] - inport = fibx["dst_port"] + inport = lx["dst_port"] if bidir: #r_outport = self.links_dict[lx]['fibers'][f]["remote_peer_port"] - r_outport = fibx["remote_peer_port"] + r_outport = lx["remote_peer_port"] t_flows[dst] = {} t_flows[dst]["f"] = {} t_flows[dst]["b"] = {} @@ -436,8 +628,9 @@ class RSA(): print(t_flows) print("INFO: Flow matrix computed") - return t_flows, band, slots, fibers_f, fibers_b + return t_flows, band, slots, {}, {} + #function ivoked for fs lightpaths only def select_slots_and_ports_fs(self, links, n_slots, c, l, s, bidir, o_band_id): if debug: print(self.links_dict) @@ -447,22 +640,20 @@ class RSA(): return None, None, None, None, None if debug: print(band, slots) - fibers_f = self.get_fibers_forward(links, slots, band) - self.update_optical_band(o_band_id, slots, band) - fibers_b = [] + self.get_fibers_forward(links, slots, band) if bidir: - fibers_b = self.get_fibers_backward(links, fibers_f, slots, band) + self.get_fibers_backward(links, slots, band) + + #fibers_f = self.get_fibers_forward(links, slots, band) + self.update_optical_band(o_band_id, slots, band) + #fibers_b = [] + #if bidir: + # fibers_b = self.get_fibers_backward(links, fibers_f, slots, band) ''' rev_o_band_id = self.optical_bands[o_band_id]["reverse_optical_band_id"] self.update_optical_band(rev_o_band_id, slots, band) ''' - if debug: - print("forward") - print(fibers_f) - if bidir: - print("backward") - print(fibers_b) add = links[0] drop = links[-1] port_0 = "0" @@ -470,11 +661,10 @@ class RSA(): t_flows = {} #flows_add_side - f = fibers_f[add] src, dst = add.split("-") - fibx = self.get_fiber_details(add, f) + lx = self.get_link_by_name(add)["optical_details"] #outport = self.links_dict[add]['fibers'][f]["src_port"] - outport = fibx["src_port"] + outport = lx["src_port"] #T1 rules t_flows[src] = {} t_flows[src]["f"] = {} @@ -482,7 +672,7 @@ class RSA(): t_flows[src]["f"] = {"in": port_0, "out": outport} if bidir: #r_inport = self.links_dict[add]['fibers'][f]["local_peer_port"] - r_inport = fibx["local_peer_port"] + r_inport = lx["local_peer_port"] t_flows[src]["b"] = {"in": r_inport, "out": port_0} #R1 rules @@ -490,27 +680,26 @@ class RSA(): t_flows[dst]["f"] = {} t_flows[dst]["b"] = {} #inport = self.links_dict[add]['fibers'][f]["dst_port"] - inport = fibx["dst_port"] + inport = lx["dst_port"] opt_band_src_port = self.optical_bands[o_band_id]["src_port"] t_flows[dst]["f"] = {"in": inport, "out": opt_band_src_port} #to modify to peer ports if bidir: #r_inport = self.links_dict[add]['fibers'][f]["local_peer_port"] - r_inport = fibx["local_peer_port"] + r_inport = lx["local_peer_port"] t_flows[src]["b"] = {"in": r_inport, "out": port_0} if bidir: rev_opt_band_dst_port = self.optical_bands[o_band_id]["rev_dst_port"] #r_outport = self.links_dict[add]['fibers'][f]["remote_peer_port"] - r_outport = fibx["remote_peer_port"] + r_outport = lx["remote_peer_port"] t_flows[dst]["b"] = {"in": rev_opt_band_dst_port, "out": r_outport} #flows_drop_side # R2 rules - f = fibers_f[drop] + ly = self.get_link_by_name(drop)["optical_details"] src, dst = drop.split("-") - fiby = self.get_fiber_details(drop, f) #outport = self.links_dict[drop]['fibers'][f]["src_port"] - outport = fiby["src_port"] + outport = ly["src_port"] t_flows[src] = {} t_flows[src]["f"] = {} @@ -520,17 +709,17 @@ class RSA(): if bidir: rev_opt_band_src_port = self.optical_bands[o_band_id]["rev_src_port"] #r_inport = self.links_dict[drop]['fibers'][f]["local_peer_port"] - r_inport = fiby["local_peer_port"] + r_inport = ly["local_peer_port"] t_flows[src]["b"] = {"in": r_inport, "out": rev_opt_band_src_port} t_flows[dst] = {} t_flows[dst]["f"] = {} t_flows[dst]["b"] = {} #inport = self.links_dict[drop]['fibers'][f]["dst_port"] - inport = fiby["dst_port"] + inport = ly["dst_port"] t_flows[dst]["f"] = {"in": inport, "out": port_0} if bidir: #r_inport = self.links_dict[drop]['fibers'][f]["remote_peer_port"] - r_inport = fiby["remote_peer_port"] + r_inport = ly["remote_peer_port"] t_flows[dst]["b"] = {"in": port_0, "out": r_inport} if debug: @@ -540,7 +729,7 @@ class RSA(): print(t_flows) print("INFO: Flow matrix computed for Flex Lightpath") - return t_flows, band, slots, fibers_f, fibers_b + return t_flows, band, slots, {}, {} def rsa_computation(self, src, dst, rate, bidir): self.flow_id += 1 @@ -565,7 +754,7 @@ class RSA(): if len(c_slots) > 0 or len(l_slots) > 0 or len(s_slots) > 0: flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports(links, num_slots, c_slots, l_slots, s_slots, bidir) - f0, band = freqency_converter(band_range, slots) + f0, band = frequency_converter(band_range, slots) if debug: print(f0, band) print("INFO: RSA completed for normal wavelenght connection") @@ -675,50 +864,43 @@ class RSA(): print(s_slots) if len(c_slots) > 0 or len(l_slots) > 0 or len(s_slots) > 0: flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports(links, num_slots, c_slots, l_slots, s_slots, bidir) - f0, band = freqency_converter(band_range, slots) - print(flow_list, band_range, slots, fiber_f, fiber_b) - ''' - - flow_list_b = {} - rev_path = path.copy() - rev_path.reverse() - rev_links = reverse_links(links) - if bidir: - for dev_x in flow_list.keys(): - flow_list_b[dev_x] = {} - flow_list_b[dev_x]["f"] = flow_list[dev_x]["b"] - del flow_list[dev_x]["b"] - rev_path = path.copy() - ''' + if debug: + print(flow_list, band_range, slots, fiber_f, fiber_b) + f0, band = frequency_converter(band_range, slots) if debug: print(f0, band) print("INFO: RSA completed for optical band") if flow_list is None: self.null_values(self.flow_id) return self.flow_id, [] - slots_i = [] + #slots_i = [] + #for i in slots: + # slots_i.append(int(i)) + slots_i = {} for i in slots: - slots_i.append(int(i)) + slots_i[str(i)] = 1 # return links, path, flow_list, band_range, slots, fiber_f, fiber_b, op, num_slots, f0, band # links, path, flows, bx, slots, fiber_f, fiber_b, op, n_slots, f0, band + if debug: + print(links) if len(flow_list) > 0: src_port = flow_list[path[0]]['f']['out'] dst_port = flow_list[path[-1]]['f']['in'] - print(flow_list) - if len(fiber_f.keys()) == 1: - link_x = list(fiber_f.keys())[0] + if debug: + print(flow_list) + if len(links) == 1: #fib_x = fiber_f[link_x] #rev_dst_port = self.links_dict[link_x]['fibers'][fib_x]["local_peer_port"] #rev_src_port = self.links_dict[link_x]['fibers'][fib_x]["remote_peer_port"] - fibx = self.get_fiber_details(link_x, fiber_f[link_x]) + fibx = self.get_link_by_name(links[0])["optical_details"] rev_dst_port = fibx["local_peer_port"] rev_src_port = fibx["remote_peer_port"] else: - link_in = list(fiber_f.keys())[0] - link_out = list(fiber_f.keys())[-1] - fib_inx = self.get_fiber_details(link_in, fiber_f[link_in]) - fib_outx = self.get_fiber_details(link_out, fiber_f[link_out]) + link_in = links[0] + link_out = links[-1] + fib_inx = self.get_link_by_name(link_in)["optical_details"] + fib_outx = self.get_link_by_name(link_out)["optical_details"] rev_dst_port = fib_inx["local_peer_port"] rev_src_port = fib_outx["remote_peer_port"] @@ -790,6 +972,7 @@ class RSA(): return self.flow_id, [] optical_band_id, temp_links = self.create_optical_band(links, path, bidir, num_slots_ob) return None, optical_band_id + print("INFO: TP to TP connection") self.flow_id += 1 self.db_flows[self.flow_id] = {} self.db_flows[self.flow_id]["flow_id"] = self.flow_id @@ -797,7 +980,7 @@ class RSA(): self.db_flows[self.flow_id]["dst"] = dst self.db_flows[self.flow_id]["bitrate"] = rate self.db_flows[self.flow_id]["bidir"] = bidir - print("INFO: TP to TP connection") + if band is None: temp_links2 = [] temp_path = [] @@ -816,13 +999,16 @@ class RSA(): temp_path.append(roadm_dst) temp_path.append(t_dst) existing_ob = self.get_optical_bands(roadm_src, roadm_dst) - if len(existing_ob) > 0: print("INFO: Evaluating existing OB {}".format(existing_ob)) #first checking in existing OB ob_found = 0 for ob_id in existing_ob: + if "is_active" in self.optical_bands[ob_id].keys(): + is_active = self.optical_bands[ob_id]["is_active"] + if not is_active: + continue op, num_slots = map_rate_to_slot(rate) if debug: print(temp_links2) @@ -836,7 +1022,7 @@ class RSA(): c_slots, l_slots, s_slots, bidir, ob_id) - f0, band = freqency_converter(band_range, slots) + f0, band = frequency_converter(band_range, slots) if debug: print(f0, band) print("INFO: RSA completed for Flex Lightpath with OB already in place") @@ -871,6 +1057,75 @@ class RSA(): return self.flow_id, ob_id else: print("not enough slots") + print("trying to extend OB {}".format(ob_id)) + new_slots = self.extend_optical_band(ob_id, band=None) + + if len(new_slots) > 0: + band_type = self.optical_bands[ob_id]["band_type"] + c_slots = [] + l_slots = [] + s_slots = [] + if band_type == "c_slots": + c_slots = new_slots + elif band_type == "l_slots": + l_slots = new_slots + else: + s_slots = new_slots + op, num_slots = map_rate_to_slot(rate) + if debug: + print(temp_links2) + c_slots, l_slots, s_slots = self.get_slots(temp_links2, num_slots, ob_id) + if debug: + print(c_slots) + print(l_slots) + print(s_slots) + #print(c_slots) + #print(l_slots) + #print(s_slots) + if len(c_slots) >= num_slots or len(l_slots) >= num_slots or len(s_slots) >= num_slots: + flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports_fs( + temp_links2, num_slots, + c_slots, + l_slots, s_slots, bidir, + ob_id) + f0, band = frequency_converter(band_range, slots) + if debug: + print(f0, band) + print("INFO: RSA completed for Flex Lightpath with OB already in place") + if flow_list is None: + self.null_values(self.flow_id) + continue + slots_i = [] + for i in slots: + slots_i.append(int(i)) + # return links, path, flow_list, band_range, slots, fiber_f, fiber_b, op, num_slots, f0, band + # links, path, flows, bx, slots, fiber_f, fiber_b, op, n_slots, f0, band + self.db_flows[self.flow_id]["flows"] = flow_list + self.db_flows[self.flow_id]["band_type"] = band_range + self.db_flows[self.flow_id]["slots"] = slots_i + self.db_flows[self.flow_id]["fiber_forward"] = fiber_f + self.db_flows[self.flow_id]["fiber_backward"] = fiber_b + self.db_flows[self.flow_id]["op-mode"] = op + self.db_flows[self.flow_id]["n_slots"] = num_slots + self.db_flows[self.flow_id]["links"] = temp_links2 + self.db_flows[self.flow_id]["path"] = temp_path + self.db_flows[self.flow_id]["band"] = band + self.db_flows[self.flow_id]["freq"] = f0 + self.db_flows[self.flow_id]["is_active"] = True + self.db_flows[self.flow_id]["parent_opt_band"] = ob_id + self.db_flows[self.flow_id]["new_optical_band"] = 1 + #self.db_flows[self.flow_id]["new_optical_band"] = 2 + self.optical_bands[ob_id]["served_lightpaths"].append(self.flow_id) + ''' + if bidir: + rev_ob_id = self.optical_bands[ob_id]["reverse_optical_band_id"] + self.optical_bands[rev_ob_id]["served_lightpaths"].append(self.flow_id) + ''' + return self.flow_id, ob_id + else: + print("it is not possible to allocate connection in extended OB {}".format(ob_id)) + + if band is None: print("INFO: Not existing optical-band meeting the requirements") else: @@ -879,14 +1134,6 @@ class RSA(): links, path = self.compute_path(src, dst) optical_band_id, temp_links = self.create_optical_band(links, path, bidir, num_slots_ob) op, num_slots = map_rate_to_slot(rate) - # self.flow_id += 1 - # self.db_flows[self.flow_id] = {} - # self.db_flows[self.flow_id]["flow_id"] = self.flow_id - # self.db_flows[self.flow_id]["src"] = src - # self.db_flows[self.flow_id]["dst"] = dst - # self.db_flows[self.flow_id]["bitrate"] = rate - # self.db_flows[self.flow_id]["bidir"] = bidir - if debug: print(temp_links) c_slots, l_slots, s_slots = self.get_slots(temp_links, num_slots, optical_band_id) @@ -897,7 +1144,7 @@ class RSA(): if len(c_slots) > 0 or len(l_slots) > 0 or len(s_slots) > 0: flow_list, band_range, slots, fiber_f, fiber_b = self.select_slots_and_ports_fs(temp_links, num_slots, c_slots, l_slots, s_slots, bidir, optical_band_id) - f0, band = freqency_converter(band_range, slots) + f0, band = frequency_converter(band_range, slots) if debug: print(f0, band) print("INFO: RSA completed for FLex Lightpath with new OB") @@ -929,3 +1176,41 @@ class RSA(): self.optical_bands[rev_ob_id]["served_lightpaths"].append(self.flow_id) ''' return self.flow_id, optical_band_id + + def extend_optical_band(self, ob_id, band=None): + ob = self.optical_bands[ob_id] + links = ob["links"] + old_band = ob["band"] + band_type = ob["band_type"] + f0 = ob["freq"] + slots = ob[band_type] + if band is None: + num_slots_ob = map_band_to_slot(old_band/1000.0) + else: + num_slots_ob = map_band_to_slot(band) + new_slots = [] + for l in links: + link = self.get_link_by_name(l) + fib = link["optical_details"][band_type] + #s_slots = get_side_slots_on_link(link, band_type, num_slots_ob, slots) + s_slots, s_num = get_side_slots_on_link(fib, num_slots_ob, slots) + print("NEW SLOTS {}".format(s_slots)) + if len(new_slots) == 0: + new_slots = s_slots + else: + if len(new_slots) < s_num: + new_slots = list_in_list(new_slots, s_slots) + print("NEW SLOTS {}".format(new_slots)) + self.augment_optical_band(ob_id, new_slots, band_type) + new_band = int(len(new_slots)*12.5*1000) + print("{}, {},{},{} ".format(old_band, f0, len(new_slots), new_band)) + final_band = old_band + new_band + final_f0 = int(f0 + new_band/2) + print("{}, {}".format(final_band, final_f0)) + ob["band"] = final_band + ob["freq"] = final_f0 + for link_x in links: + link = self.get_link_by_name(link_x) + fib = link["optical_details"] + self.update_link(fib, new_slots, band_type) + return new_slots diff --git a/src/opticalcontroller/__init__.py b/src/opticalcontroller/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/opticalcontroller/__init__.py +++ b/src/opticalcontroller/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -11,3 +11,4 @@ # 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. + diff --git a/src/opticalcontroller/dijsktra.py b/src/opticalcontroller/dijkstra.py similarity index 98% rename from src/opticalcontroller/dijsktra.py rename to src/opticalcontroller/dijkstra.py index 058d59e75cbc09c1b18ab4b406f08186e106609d..2657990cf7f111c25c08ded4e12d7eaf81fd5e12 100644 --- a/src/opticalcontroller/dijsktra.py +++ b/src/opticalcontroller/dijkstra.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/opticalcontroller/json_files/nodes.json b/src/opticalcontroller/json_files/nodes.json deleted file mode 100644 index 60f017c19d7c7a578c0ddfc2225cab742deb0026..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/nodes.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "R1":{ - "id":0, - "ip":"10.30.2.207", - "port":"50001", - "type":"OC-ROADM", - "driver": "OpticalOC" - }, - - "R2":{ - "id":1, - "ip":"10.30.2.208", - "port":"50001", - "type":"OC-ROADM", - "driver": "OpticalOC" - }, - - "R3":{ - "id":2, - "ip":"10.30.2.209", - "port":"50001", - "type":"OC-ROADM", - "driver": "OpticalOC" - }, - "T1":{ - "id":3, - "ip":"10.30.2.210", - "port":"50001", - "type":"OC-TP", - "driver": "OpticalOC" - }, - "T2":{ - "id":4, - "ip":"10.30.2.211", - "port":"50001", - "type":"OC-TP", - "driver": "OpticalOC" - } -} diff --git a/src/opticalcontroller/json_files/optical_TFSworking.json b/src/opticalcontroller/json_files/optical_TFSworking.json deleted file mode 100644 index ff1841eeea9df1e73bcfb25d07f19d64554f11e1..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/optical_TFSworking.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "R1-R2": { - "length": 80, - "source": "d1", - "target": "d1", - "fibers": { - "d1-1": { - "length": 80, - "src_port": "3", - "dst_port": "14", - "local_peer_port": "13", - "remote_peer_port": "4", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-R1": { - "length": 80, - "source": "d1", - "target": "d1", - "fibers": { - "d1-1": { - "length": 80, - "src_port": "4", - "dst_port": "13", - "local_peer_port": "14", - "remote_peer_port": "3", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "T1-R1": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "12", - "local_peer_port": "1", - "remote_peer_port": "2", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R1-T1": { - "length": 0, - "source": "srgT", - "target": "muxR", - "fibers": { - "S1": { - "length": 0, - "src_port": "2", - "dst_port": "1", - "local_peer_port": "12", - "remote_peer_port": "1", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "T2-R2": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": { - "M1": { - "length": 0, - "src_port": "6", - "dst_port": "15", - "local_peer_port": "6", - "remote_peer_port": "5", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-T2": { - "length": 0, - "source": "srgT", - "target": "muxR", - "fibers": { - "S1": { - "length": 0, - "src_port": "5", - "dst_port": "6", - "local_peer_port": "15", - "remote_peer_port": "6", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - } -} diff --git a/src/opticalcontroller/json_files/optical_topoTFS.json b/src/opticalcontroller/json_files/optical_topoTFS.json deleted file mode 100644 index 7dea474cd676b7c699cffc1c180e14598b987473..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/optical_topoTFS.json +++ /dev/null @@ -1,1836 +0,0 @@ -{ - "R1-R2": { - "length": 80, - "source": "d1", - "target": "d1", - "fibers": { - "d1-1": { - "length": 80, - "src_port": "101", - "dst_port": "201", - "local_peer_port": "201", - "remote_peer_port": "101", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d1-2": { - "length": 80, - "src_port": "102", - "dst_port": "202", - "local_peer_port": "202", - "remote_peer_port": "102", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-R1": { - "length": 80, - "source": "d1", - "target": "d1", - "fibers": { - "d1-1": { - "length": 80, - "src_port": "101", - "dst_port": "201", - "local_peer_port": "201", - "remote_peer_port": "101", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d1-2": { - "length": 80, - "src_port": "102", - "dst_port": "202", - "local_peer_port": "202", - "remote_peer_port": "102", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R1-R3": { - "length": 80, - "source": "d2", - "target": "d1", - "fibers": { - "d2-1": { - "length": 80, - "src_port": "103", - "dst_port": "201", - "local_peer_port": "203", - "remote_peer_port": "101", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d2-2": { - "length": 80, - "src_port": "104", - "dst_port": "202", - "local_peer_port": "204", - "remote_peer_port": "102", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R3-R1": { - "length": 80, - "source": "d1", - "target": "d2", - "fibers": { - "d1-1": { - "length": 80, - "src_port": "101", - "dst_port": "203", - "local_peer_port": "201", - "remote_peer_port": "103", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d1-2": { - "length": 80, - "src_port": "102", - "dst_port": "204", - "local_peer_port": "202", - "remote_peer_port": "104", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-R3": { - "length": 80, - "source": "d2", - "target": "d2", - "fibers": { - "d2-1": { - "length": 80, - "src_port": "103", - "dst_port": "203", - "local_peer_port": "203", - "remote_peer_port": "103", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d2-2": { - "length": 80, - "src_port": "104", - "dst_port": "204", - "local_peer_port": "204", - "remote_peer_port": "104", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R3-R2": { - "length": 80, - "source": "d2", - "target": "d2", - "fibers": { - "d2-1": { - "length": 80, - "src_port": "103", - "dst_port": "203", - "local_peer_port": "203", - "remote_peer_port": "103", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d2-2": { - "length": 80, - "src_port": "104", - "dst_port": "204", - "local_peer_port": "204", - "remote_peer_port": "104", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "T1-R1": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "2001", - "local_peer_port": "1", - "remote_peer_port": "1001", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M2": { - "length": 0, - "src_port": "2", - "dst_port": "2002", - "local_peer_port": "2", - "remote_peer_port": "1002", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M3": { - "length": 0, - "src_port": "3", - "dst_port": "2003", - "local_peer_port": "3", - "remote_peer_port": "1003", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R1-T1": { - "length": 0, - "source": "srgT", - "target": "muxR", - "fibers": { - "S1": { - "length": 0, - "src_port": "1001", - "dst_port": "1", - "local_peer_port": "2001", - "remote_peer_port": "1", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S2": { - "length": 0, - "src_port": "1002", - "dst_port": "2", - "local_peer_port": "2002", - "remote_peer_port": "2", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S3": { - "length": 0, - "src_port": "1003", - "dst_port": "3", - "local_peer_port": "2003", - "remote_peer_port": "3", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "T2-R2": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "2001", - "local_peer_port": "1", - "remote_peer_port": "1001", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M2": { - "length": 0, - "src_port": "2", - "dst_port": "2002", - "local_peer_port": "2", - "remote_peer_port": "1002", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M3": { - "length": 0, - "src_port": "3", - "dst_port": "2003", - "local_peer_port": "3", - "remote_peer_port": "1003", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-T2": { - "length": 0, - "source": "srgT", - "target": "muxR", - "fibers": { - "S1": { - "length": 0, - "src_port": "1001", - "dst_port": "1", - "local_peer_port": "2001", - "remote_peer_port": "1", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S2": { - "length": 0, - "src_port": "1002", - "dst_port": "2", - "local_peer_port": "2002", - "remote_peer_port": "2", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S3": { - "length": 0, - "src_port": "1003", - "dst_port": "3", - "local_peer_port": "2003", - "remote_peer_port": "3", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - } -} diff --git a/src/opticalcontroller/json_files/tfs.json b/src/opticalcontroller/json_files/tfs.json deleted file mode 100644 index 31803b893b5639e957be33465599573baa475ca2..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/tfs.json +++ /dev/null @@ -1,686 +0,0 @@ -{ - "links": [ - { - "link_id": { - "link_uuid": { - "uuid": "T1->R1" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "T1" - } - }, - "endpoint_uuid": { - "uuid": "1" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "R1" - } - }, - "endpoint_uuid": { - "uuid": "12" - } - } - ], - "optical_link": { - "name": "T1-R1", - "details": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": [ - { - "ID": "M1", - "length": 0, - "src_port": "1", - "dst_port": "12", - "local_peer_port": "1", - "remote_peer_port": "2", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - ] - } - } - }, - { - "link_id": { - "link_uuid": { - "uuid": "R1->T1" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "R1" - } - }, - "endpoint_uuid": { - "uuid": "2" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "T1" - } - }, - "endpoint_uuid": { - "uuid": "1" - } - } - ], - "optical_link": { - "name": "R1-T1", - "details": { - "length": 0, - "source": "srgT", - "target": "muxT", - "fibers": [ - { - "ID": "M1", - "length": 0, - "src_port": "2", - "dst_port": "1", - "local_peer_port": "12", - "remote_peer_port": "1", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - ] - } - } - }, - { - "link_id": { - "link_uuid": { - "uuid": "R1->R2" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "R1" - } - }, - "endpoint_uuid": { - "uuid": "3" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "R2" - } - }, - "endpoint_uuid": { - "uuid": "14" - } - } - ], - "optical_link": { - "name": "R1-R2", - "details": { - "length": 0, - "source": "D1", - "target": "D1", - "fibers": [ - { - "ID": "D11", - "length": 0, - "src_port": "3", - "dst_port": "14", - "local_peer_port": "13", - "remote_peer_port": "4", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - ] - } - } - }, - { - "link_id": { - "link_uuid": { - "uuid": "R2->R1" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "R2" - } - }, - "endpoint_uuid": { - "uuid": "4" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "R1" - } - }, - "endpoint_uuid": { - "uuid": "13" - } - } - ], - "optical_link": { - "name": "R2-R1", - "details": { - "length": 0, - "source": "D1", - "target": "D1", - "fibers": [ - { - "ID": "D11", - "length": 0, - "src_port": "4", - "dst_port": "13", - "local_peer_port": "14", - "remote_peer_port": "3", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - ] - } - } - }, - { - "link_id": { - "link_uuid": { - "uuid": "T2->R2" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "T2" - } - }, - "endpoint_uuid": { - "uuid": "6" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "R2" - } - }, - "endpoint_uuid": { - "uuid": "15" - } - } - ], - "optical_link": { - "name": "T2-R2", - "details": { - "length": 0, - "source": "srgT", - "target": "muxT", - "fibers": [ - { - "ID": "M1", - "length": 0, - "src_port": "6", - "dst_port": "15", - "local_peer_port": "6", - "remote_peer_port": "5", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - ] - } - } - }, - { - "link_id": { - "link_uuid": { - "uuid": "R2->T2" - } - }, - "link_endpoint_ids": [ - { - "device_id": { - "device_uuid": { - "uuid": "R2" - } - }, - "endpoint_uuid": { - "uuid": "5" - } - }, - { - "device_id": { - "device_uuid": { - "uuid": "T2" - } - }, - "endpoint_uuid": { - "uuid": "6" - } - } - ], - "optical_link": { - "name": "R2-T2", - "details": { - "length": 0, - "source": "srgT", - "target": "muxT", - "fibers": [ - { - "ID": "M1", - "length": 0, - "src_port": "5", - "dst_port": "6", - "local_peer_port": "15", - "remote_peer_port": "6", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - ] - } - } - } - ] -} \ No newline at end of file diff --git a/src/opticalcontroller/json_files/topo_2_links.json b/src/opticalcontroller/json_files/topo_2_links.json deleted file mode 100644 index 02165938ce675071a4ff4c3424e3b53244d40810..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/topo_2_links.json +++ /dev/null @@ -1,1530 +0,0 @@ -{ - "R1-R3": { - "length": 80, - "source": "d2", - "target": "d1", - "fibers": { - "d2-1": { - "length": 80, - "src_port": "103", - "dst_port": "201", - "local_peer_port": "203", - "remote_peer_port": "101", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d2-2": { - "length": 80, - "src_port": "104", - "dst_port": "202", - "local_peer_port": "204", - "remote_peer_port": "102", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R3-R1": { - "length": 80, - "source": "d1", - "target": "d2", - "fibers": { - "d1-1": { - "length": 80, - "src_port": "101", - "dst_port": "203", - "local_peer_port": "201", - "remote_peer_port": "103", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d1-2": { - "length": 80, - "src_port": "102", - "dst_port": "204", - "local_peer_port": "202", - "remote_peer_port": "104", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-R3": { - "length": 80, - "source": "d2", - "target": "d2", - "fibers": { - "d2-1": { - "length": 80, - "src_port": "103", - "dst_port": "203", - "local_peer_port": "203", - "remote_peer_port": "103", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d2-2": { - "length": 80, - "src_port": "104", - "dst_port": "204", - "local_peer_port": "204", - "remote_peer_port": "104", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R3-R2": { - "length": 80, - "source": "d2", - "target": "d2", - "fibers": { - "d2-1": { - "length": 80, - "src_port": "103", - "dst_port": "203", - "local_peer_port": "203", - "remote_peer_port": "103", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "d2-2": { - "length": 80, - "src_port": "104", - "dst_port": "204", - "local_peer_port": "204", - "remote_peer_port": "104", - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "T1-R1": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "2001", - "local_peer_port": "1", - "remote_peer_port": "1001", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M2": { - "length": 0, - "src_port": "2", - "dst_port": "2002", - "local_peer_port": "2", - "remote_peer_port": "1002", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M3": { - "length": 0, - "src_port": "3", - "dst_port": "2003", - "local_peer_port": "3", - "remote_peer_port": "1003", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R1-T1": { - "length": 0, - "source": "srgT", - "target": "muxR", - "fibers": { - "S1": { - "length": 0, - "src_port": "1001", - "dst_port": "1", - "local_peer_port": "2001", - "remote_peer_port": "1", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S2": { - "length": 0, - "src_port": "1002", - "dst_port": "2", - "local_peer_port": "2002", - "remote_peer_port": "2", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S3": { - "length": 0, - "src_port": "1003", - "dst_port": "3", - "local_peer_port": "2003", - "remote_peer_port": "3", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "T2-R2": { - "length": 0, - "source": "muxT", - "target": "srgR", - "fibers": { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "2001", - "local_peer_port": "1", - "remote_peer_port": "1001", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M2": { - "length": 0, - "src_port": "2", - "dst_port": "2002", - "local_peer_port": "2", - "remote_peer_port": "1002", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "M3": { - "length": 0, - "src_port": "3", - "dst_port": "2003", - "local_peer_port": "3", - "remote_peer_port": "1003", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - }, - "R2-T2": { - "length": 0, - "source": "srgT", - "target": "muxR", - "fibers": { - "S1": { - "length": 0, - "src_port": "1001", - "dst_port": "1", - "local_peer_port": "2001", - "remote_peer_port": "1", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S2": { - "length": 0, - "src_port": "1002", - "dst_port": "2", - "local_peer_port": "2002", - "remote_peer_port": "2", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - }, - "S3": { - "length": 0, - "src_port": "1003", - "dst_port": "3", - "local_peer_port": "2003", - "remote_peer_port": "3", - "used": false, - "c_slots": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], - "l_slots": [ - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120 - ], - "s_slots": [ - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520 - ] - } - } - } -} diff --git a/src/opticalcontroller/json_files/topology-optical.json b/src/opticalcontroller/json_files/topology-optical.json deleted file mode 100644 index e2453b654d53fc3200570ce9c2b17effc964bd25..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/topology-optical.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "r1-r2": { - "length": 80, - "source" : "d1", - "target" : "d1", - "fibers" : { - "d1-1": { - "src_port": "1T", - "dst_port": "1R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "d1-2":{ - "src_port": "2T", - "dst_port": "2R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r2-r1": { - "length": 80, - "source" : "d1", - "target" : "d1", - "fibers" : { - "d1-1" : { - "src_port": "1T", - "dst_port": "1R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "d1-2" : { - "src_port": "2T", - "dst_port": "2R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r1-r3": { - "length": 80, - "source" : "d2", - "target" : "d1", - "fibers" : { - "d2-1":{ - "src_port": "3T", - "dst_port": "1R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "d2-2":{ - "src_port": "4T", - "dst_port": "2R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r3-r1": { - "length": 80, - "source" : "d1", - "target" : "d2", - "fibers" : { - "d1-1": { - "src_port": "1T", - "dst_port": "3R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "d1-2": { - "src_port": "2T", - "dst_port": "4R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r2-r3": { - "length": 80, - "source" : "d2", - "target" : "d2", - "fibers" : { - "d2-1": { - "src_port": "3T", - "dst_port": "3R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "d2-2": { - "src_port": "4T", - "dst_port": "4R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r3-r2": { - "length": 80, - "source" : "d2", - "target" : "d2", - "fibers" : { - "d2-1": { - "src_port": "3T", - "dst_port": "3R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "d2-2":{ - "src_port": "4T", - "dst_port": "4R", - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "t1-r1": { - "length": 0, - "source" : "muxT", - "target" : "srgR", - "fibers" : { - "M1": { - "src_port": "1", - "dst_port": "101R", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "M2": { - "src_port": "2", - "dst_port": "102R", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "M3": { - "src_port": "3", - "dst_port": "103R", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r1-t1": { - "length": 0, - "source" : "srgT", - "target" : "muxR", - "fibers" : { - "S1": { - "src_port": "101T", - "dst_port": "1", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "S2": { - "src_port": "102T", - "dst_port": "2", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "S3": { - "src_port": "103T", - "dst_port": "3", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "t2-r2": { - "length": 0, - "source" : "muxT", - "target" : "srgR", - "fibers" : { - "M1": { - "src_port": "1", - "dst_port": "101R", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "M2": { - "src_port": "2", - "dst_port": "102R", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "M3": { - "src_port": "3", - "dst_port": "103R", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - }, - "r2-t2": { - "length": 0, - "source" : "srgT", - "target" : "muxR", - "fibers" : { - "S1": { - "src_port": "101T", - "dst_port": "1", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "S2": { - "src_port": "102T", - "dst_port": "2", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - }, - "S3": { - "src_port": "103T", - "dst_port": "3", - "used": false, - "c_slots": {"1": 1, "2": 1, "3": 1, "4": 1}, - "l_slots": {"101": 1, "102": 1, "103": 1, "104": 1}, - "s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1} - } - } - } -} diff --git a/src/opticalcontroller/json_files/topology-optical2.json b/src/opticalcontroller/json_files/topology-optical2.json deleted file mode 100644 index fe8e9866bcc64d52b2f49089ce03af47d72df9d0..0000000000000000000000000000000000000000 --- a/src/opticalcontroller/json_files/topology-optical2.json +++ /dev/null @@ -1,324 +0,0 @@ -{ - "r1-r2": { - "length": 80, - "source" : "d1", - "target" : "d1", - "fibers" : { - "d1-1": { - "length": 80, - "src_port": "1T", - "dst_port": "1R", - "local_peer_port": "1R", - "remote_peer_port": "1T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "d1-2":{ - "length": 80, - "src_port": "2T", - "dst_port": "2R", - "local_peer_port": "2R", - "remote_peer_port": "2T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r2-r1": { - "length": 80, - "source" : "d1", - "target" : "d1", - "fibers" : { - "d1-1" : { - "length": 80, - "src_port": "1T", - "dst_port": "1R", - "local_peer_port": "1R", - "remote_peer_port": "1T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "d1-2" : { - "length": 80, - "src_port": "2T", - "dst_port": "2R", - "local_peer_port": "2R", - "remote_peer_port": "2T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r1-r3": { - "length": 80, - "source" : "d2", - "target" : "d1", - "fibers" : { - "d2-1":{ - "length": 80, - "src_port": "3T", - "dst_port": "1R", - "local_peer_port": "3R", - "remote_peer_port": "1T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "d2-2":{ - "length": 80, - "src_port": "4T", - "dst_port": "2R", - "local_peer_port": "4R", - "remote_peer_port": "2T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r3-r1": { - "length": 80, - "source" : "d1", - "target" : "d2", - "fibers" : { - "d1-1": { - "length": 80, - "src_port": "1T", - "dst_port": "3R", - "local_peer_port": "1R", - "remote_peer_port": "3T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "d1-2": { - "length": 80, - "src_port": "2T", - "dst_port": "4R", - "local_peer_port": "2R", - "remote_peer_port": "4T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r2-r3": { - "length": 80, - "source" : "d2", - "target" : "d2", - "fibers" : { - "d2-1": { - "length": 80, - "src_port": "3T", - "dst_port": "3R", - "local_peer_port": "3R", - "remote_peer_port": "3T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "d2-2": { - "length": 80, - "src_port": "4T", - "dst_port": "4R", - "local_peer_port": "4R", - "remote_peer_port": "4T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r3-r2": { - "length": 80, - "source" : "d2", - "target" : "d2", - "fibers" : { - "d2-1": { - "length": 80, - "src_port": "3T", - "dst_port": "3R", - "local_peer_port": "3R", - "remote_peer_port": "3T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "d2-2":{ - "length": 80, - "src_port": "4T", - "dst_port": "4R", - "local_peer_port": "4R", - "remote_peer_port": "4T", - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "t1-r1": { - "length": 0, - "source" : "muxT", - "target" : "srgR", - "fibers" : { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "101R", - "local_peer_port": "1", - "remote_peer_port": "101T", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "M2": { - "length": 0, - "src_port": "2", - "dst_port": "102R", - "local_peer_port": "2", - "remote_peer_port": "102T", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "M3": { - "length": 0, - "src_port": "3", - "dst_port": "103R", - "local_peer_port": "3", - "remote_peer_port": "103T", - "used": false, - "c_slots": [], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r1-t1": { - "length": 0, - "source" : "srgT", - "target" : "muxR", - "fibers" : { - "S1": { - "length": 0, - "src_port": "101T", - "dst_port": "1", - "local_peer_port": "101R", - "remote_peer_port": "1", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "S2": { - "length": 0, - "src_port": "102T", - "dst_port": "2", - "local_peer_port": "102T", - "remote_peer_port": "2", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "S3": { - "length": 0, - "src_port": "103T", - "dst_port": "3", - "local_peer_port": "103R", - "remote_peer_port": "3", - "used": false, - "c_slots": [], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "t2-r2": { - "length": 0, - "source" : "muxT", - "target" : "srgR", - "fibers" : { - "M1": { - "length": 0, - "src_port": "1", - "dst_port": "101R", - "local_peer_port": "1", - "remote_peer_port": "101T", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "M2": { - "length": 0, - "src_port": "2", - "dst_port": "102R", - "local_peer_port": "2", - "remote_peer_port": "102T", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "M3": { - "length": 0, - "src_port": "3", - "dst_port": "103R", - "local_peer_port": "3", - "remote_peer_port": "103T", - "used": false, - "c_slots": [], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - }, - "r2-t2": { - "length": 0, - "source" : "srgT", - "target" : "muxR", - "fibers" : { - "S1": { - "length": 0, - "src_port": "101T", - "dst_port": "1", - "local_peer_port": "101R", - "remote_peer_port": "1", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "S2": { - "length": 0, - "src_port": "102T", - "dst_port": "2", - "local_peer_port": "102R", - "remote_peer_port": "2", - "used": false, - "c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - }, - "S3": { - "length": 0, - "src_port": "103T", - "dst_port": "3", - "local_peer_port": "103R", - "remote_peer_port": "3", - "used": false, - "c_slots": [], - "l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120], - "s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520] - } - } - } -} diff --git a/src/opticalcontroller/requirements.in b/src/opticalcontroller/requirements.in index 4732ee635a60b8320e25cd2c26388d1cfdfd25cc..f77bc15970be2695bbfde4fc744c5b2e363a6bf0 100644 --- a/src/opticalcontroller/requirements.in +++ b/src/opticalcontroller/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,10 +12,25 @@ # See the License for the specific language governing permissions and # limitations under the License. +aniso8601==9.0.1 +attrs==23.1.0 +blinker==1.6.2 +click==8.1.7 +colorama==0.4.6 Flask==1.1.2 flask-restplus==0.13.0 +importlib-metadata==6.8.0 +importlib-resources==6.0.1 itsdangerous==1.1.0 Jinja2==2.11.3 +jsonschema==4.19.0 +jsonschema-specifications==2023.7.1 MarkupSafe==1.1.1 -numpy<2.0.0 +numpy==1.23.0 +pkgutil-resolve-name==1.3.10 +pytz==2023.3.post1 +referencing==0.30.2 +rpds-py==0.10.3 +six==1.16.0 Werkzeug==0.16.1 +zipp==3.16.2 diff --git a/src/opticalcontroller/requirements_optical_ctrl_test.txt b/src/opticalcontroller/requirements_optical_ctrl_test.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e7443c2d693e199a34bfbd0e87b2569c26fd98f --- /dev/null +++ b/src/opticalcontroller/requirements_optical_ctrl_test.txt @@ -0,0 +1,21 @@ +# Copyright 2022-2024 ETSI 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. + +Flask==1.1.2 +flask-restplus==0.13.0 +itsdangerous==1.1.0 +Jinja2==2.11.3 +MarkupSafe==1.1.1 +numpy==1.23.0 +Werkzeug==0.16.1 diff --git a/src/opticalcontroller/tools.py b/src/opticalcontroller/tools.py index a173856b8e7bd00a0e538cd3893e1c762edff8c8..cab1807604fe238c9686e5b9f07eae0ad6c9646e 100644 --- a/src/opticalcontroller/tools.py +++ b/src/opticalcontroller/tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,9 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import numpy as np -from variables import * import json +import numpy as np +from common.proto.context_pb2 import TopologyId , LinkId , OpticalLink , OpticalLinkDetails +from common.tools.object_factory.OpticalLink import correct_slot +from context.client.ContextClient import ContextClient +from opticalcontroller.variables import * def common_slots(a, b): @@ -24,9 +27,11 @@ def common_slots(a, b): def map_modulation_to_op(mod): if mod == "DP-QPSK": return 1 - if mod == "DP-16QAM": - return 7 - if mod == "DP-64QAM": + elif mod == "DP-8QAM": + return 4 + elif mod == "DP-16QAM": + return 8 + elif mod == "DP-32QAM": return 10 @@ -40,13 +45,19 @@ def map_rate_to_slot(rate): slots = 4 op = map_modulation_to_op(mod) return op, slots - if rate == 400: + elif rate == 400: + mod = "DP-8QAM" + slots = 4 + op = map_modulation_to_op(mod) + return op, slots + elif rate == 800: mod = "DP-16QAM" - slots = 8 + #todo: check slot width + slots = 8#12 (150GHz) op = map_modulation_to_op(mod) return op, slots - if rate == 1000: - mod = "DP-64QAM" + elif rate == 1000: + mod = "DP-32QAM" slots = 18 op = map_modulation_to_op(mod) return op, slots @@ -54,21 +65,34 @@ def map_rate_to_slot(rate): return 2, 5 -def consecutives(x, val): +def consecutives(link, val): res = [] temp = [] + x1 = list(link.keys()) + x = str_list_to_int(x1) x.sort() - temp.append(x[0]) - y = 1 + y = 0 + if debug: + print("BLACK") + print(link) + print(x) + print(x[0]) + if link[str(x[0])] == 1: + temp.append(int(x[0])) + y = 1 for i in range(1, len(x)): - if x[i] == x[i - 1] + 1: + if (int(x[i]) == int(x[i - 1]) + 1) and link[str(x[i])] == 1: y += 1 - temp.append(x[i]) + temp.append(int(x[i])) else: if y >= val: res.extend(temp) - temp = [x[i]] - y = 1 + if link[str(x[i])] == 1: + temp = [int(x[i])] + y = 1 + else: + temp = [] + y = 0 if i == len(x) - 1 and y >= val: res.extend(temp) return res @@ -83,6 +107,14 @@ def combine(ls1, ls2): return temp +def str_list_to_int(str_list): + int_list = [] + for i in str_list: + int_list.append(int(i)) + int_list.sort() + return int_list + + def list_in_list(a, b): # convert list A to numpy array a_arr = np.array(a) @@ -112,7 +144,30 @@ def get_slot_frequency(b, n): return Fl + n * 12.5 -def freqency_converter(b, slots): +def get_side_slots_on_link(link, val, old_slots): + #link = l["optical_details"][band] + x = list(old_slots.keys()) + y = list(link.keys()) + keys = str_list_to_int(x) + keys.sort() + #print("AAAA") + #print(link, val, old_slots, keys) + #print(x) + starting_slot = keys[-1] + num = 0 + res = [] + #print(starting_slot) + for slot_id in range(starting_slot, len(y)): + if link[y[slot_id]] == 1: + num += 1 + res.append(int(y[slot_id])) + else: + return res, 0 + if num == val or slot_id == len(y) - 1: + return res, num + + +def frequency_converter(b, slots): l = len(slots) if debug: print(slots) @@ -135,14 +190,24 @@ def freqency_converter(b, slots): def readTopologyData(nodes, topology): - nodes_file = open(nodes, 'r') - topo_file = open(topology, 'r') - nodes = json.load(nodes_file) - topo = json.load(topo_file) - print(topo) - nodes_file.close() - topo_file.close() - return nodes, topo + nodes_file = open(nodes, 'r') + topo_file = open(topology, 'r') + nodes = json.load(nodes_file) + topo = json.load(topo_file) + #print(topo) + nodes_file.close() + topo_file.close() + return nodes, topo + + +def readTopologyDataFromContext(topology_id:TopologyId): + ctx_client = ContextClient() + ctx_client.connect() + topo_details = ctx_client.GetTopologyDetails(topology_id) + topo = topo_details.optical_links + nodes = topo_details.devices + ctx_client.close() + return topo , nodes def reverse_links(links): @@ -154,23 +219,26 @@ def reverse_links(links): result.append("{}-{}".format(b, a)) return result + def get_links_from_node(topology, node): result = {} - for link in topology["links"]: - if "{}-".format(node) in link["optical_link"]["name"]: - result[link["optical_link"]["name"]] = link + for link in topology["optical_links"]: + if "{}-".format(node) in link["name"]: + result[link["name"]] = link return result + def get_links_to_node(topology, node): result = {} - for link in topology["links"]: - if "-{}".format(node) in link["optical_link"]["name"]: - result[link["optical_link"]["name"]] = link + for link in topology["optical_links"]: + if "-{}".format(node) in link["name"]: + result[link["name"]] = link return result def slot_selection(c, l, s, n_slots, Nc, Nl, Ns): # First Fit + if isinstance(n_slots, int): slot_c = n_slots slot_l = n_slots @@ -183,7 +251,15 @@ def slot_selection(c, l, s, n_slots, Nc, Nl, Ns): return "c_slots", c[0: slot_c] elif len(l) >= slot_l: return "l_slots", l[0: slot_l] - elif len(l) >= slot_s: + elif len(s) >= slot_s: return "s_slots", s[0: slot_s] else: return None, None + +def handle_slot (slot_field, slot): + for key,value in slot.items() : + slot_field[key]=value + + + + diff --git a/src/opticalcontroller/variables.py b/src/opticalcontroller/variables.py index ca436736b20a525c866ea9745be14bc4db37dfcf..de9d6609a3931840cc30069979361bd00699b53c 100644 --- a/src/opticalcontroller/variables.py +++ b/src/opticalcontroller/variables.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -23,10 +23,4 @@ Nc = 320 #Nc = 10 Ns = 720 -nodes_json = 'json_files/nodes.json' -topology_json = 'json_files/tfs.json' #LAST -#topology_json = 'json_files/optical_TFSworking.json' #LAST -#topology_json = 'json_files/optical_topoTFS.json' -#topology_json = 'json_files/topo_2_links.json' - -testing = 1 +full_links = 0 diff --git a/src/pathcomp/.gitlab-ci.yml b/src/pathcomp/.gitlab-ci.yml index 24f6d42d37ec6b6f341616f0badf08e9ef55ffff..85aab06e266ac42d13ced84aa8f012329ca002d6 100644 --- a/src/pathcomp/.gitlab-ci.yml +++ b/src/pathcomp/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/__init__.py b/src/pathcomp/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/pathcomp/__init__.py +++ b/src/pathcomp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/Dockerfile b/src/pathcomp/backend/Dockerfile index 0c992f8fbc59020f818def2852c93eeda25efcce..7b3da21a7274c6cab1148abe1153d86f6f403d88 100644 --- a/src/pathcomp/backend/Dockerfile +++ b/src/pathcomp/backend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/Dockerfile-gdb b/src/pathcomp/backend/Dockerfile-gdb index a5f18e02bb8ce463b88c93b1e3325eb6eed370fb..65879dc1a46549f802a593858f49364cddc91785 100644 --- a/src/pathcomp/backend/Dockerfile-gdb +++ b/src/pathcomp/backend/Dockerfile-gdb @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/Makefile b/src/pathcomp/backend/Makefile index 2ca6f42cbf49141d9db9138bb6481ec7a0d3c2a8..1b5ed67e1fa39e546dedefc087aa68ad08297723 100644 --- a/src/pathcomp/backend/Makefile +++ b/src/pathcomp/backend/Makefile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp.c b/src/pathcomp/backend/pathComp.c index 4961c55a391d2c48a64ae844adf0eccb351cd7cf..51c92bf428ea46d386827bb052ea0fbb25d90712 100644 --- a/src/pathcomp/backend/pathComp.c +++ b/src/pathcomp/backend/pathComp.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp.h b/src/pathcomp/backend/pathComp.h index ec2c91e88f4fe54c4f66e7df7e6dc8cfd2ee68b8..ac877e9caeddc3fc9673464cdb4764f749c562b3 100644 --- a/src/pathcomp/backend/pathComp.h +++ b/src/pathcomp/backend/pathComp.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_RESTapi.c b/src/pathcomp/backend/pathComp_RESTapi.c index 093088aa8046d1aa4ac84408557ecbd11b7a7e4e..9fa92832a649bce9a28a94a71dd553a6ab43066a 100644 --- a/src/pathcomp/backend/pathComp_RESTapi.c +++ b/src/pathcomp/backend/pathComp_RESTapi.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_RESTapi.h b/src/pathcomp/backend/pathComp_RESTapi.h index b3c7658d93f0f93f1dcdbaeacd5572cf03ad0e51..dcb1bd90e1f1c58959e8655799b94884a57ebe92 100644 --- a/src/pathcomp/backend/pathComp_RESTapi.h +++ b/src/pathcomp/backend/pathComp_RESTapi.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_cjson.c b/src/pathcomp/backend/pathComp_cjson.c index b0721f3cd7d15a4c51a26d66d4dfaa48806164a4..f1e045ab337f83f6ee8cd6010f847c36011a11c4 100644 --- a/src/pathcomp/backend/pathComp_cjson.c +++ b/src/pathcomp/backend/pathComp_cjson.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_cjson.h b/src/pathcomp/backend/pathComp_cjson.h index 9e54070a72368d47d617867d53714fe5e71af75a..af0d30b869321346ecbb201caf1bae958fec9db6 100644 --- a/src/pathcomp/backend/pathComp_cjson.h +++ b/src/pathcomp/backend/pathComp_cjson.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_ear.c b/src/pathcomp/backend/pathComp_ear.c index 37be2833d358b359dffacf13e696340ceba0f549..82b362031cdda5e2377ac327ea44b3ced8e0b533 100644 --- a/src/pathcomp/backend/pathComp_ear.c +++ b/src/pathcomp/backend/pathComp_ear.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_ear.h b/src/pathcomp/backend/pathComp_ear.h index afe95413a0665ea84edb96ab67828d7df12d1f07..31f4131ad93d5619ea31ca9ca580521976ecfc1a 100644 --- a/src/pathcomp/backend/pathComp_ear.h +++ b/src/pathcomp/backend/pathComp_ear.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_ksp.c b/src/pathcomp/backend/pathComp_ksp.c index 13a00ca43a961abfb28579198f2694b89937d8d2..b778224a543157584fe6d8b6ba02b5b1522333d1 100644 --- a/src/pathcomp/backend/pathComp_ksp.c +++ b/src/pathcomp/backend/pathComp_ksp.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_ksp.h b/src/pathcomp/backend/pathComp_ksp.h index f155a23d33019466c1ac3021da953f978e3ecf95..158188f14affda256bf2ca7ffefc943cc4333f8a 100644 --- a/src/pathcomp/backend/pathComp_ksp.h +++ b/src/pathcomp/backend/pathComp_ksp.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_log.c b/src/pathcomp/backend/pathComp_log.c index 4d2b5cad2a6069834545cb02dcf4909fe37113ed..9e8c795c115ad09c42e76fd3f06de22f6ae634e5 100644 --- a/src/pathcomp/backend/pathComp_log.c +++ b/src/pathcomp/backend/pathComp_log.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_log.h b/src/pathcomp/backend/pathComp_log.h index 559281a3f3b7dbf5d8a232f8073d62c1b9b0cf70..b42e043312e971f7d74598ab20f52474c878f752 100644 --- a/src/pathcomp/backend/pathComp_log.h +++ b/src/pathcomp/backend/pathComp_log.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_sp.c b/src/pathcomp/backend/pathComp_sp.c index ac6577520e70314f88f0ba5aa18ea52035f797ad..913fabb60c14588fe26780fe0566385262a0c726 100644 --- a/src/pathcomp/backend/pathComp_sp.c +++ b/src/pathcomp/backend/pathComp_sp.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_sp.h b/src/pathcomp/backend/pathComp_sp.h index ab684ffeeafc2a6ca1267583bad1f1b5e7afbe56..2a8b4553401793253768df4b38348d8c4fcabcee 100644 --- a/src/pathcomp/backend/pathComp_sp.h +++ b/src/pathcomp/backend/pathComp_sp.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_tools.c b/src/pathcomp/backend/pathComp_tools.c index e573dce00f15a12cc2749fd6127da8adf56c9d70..df92594b3d8c73bc82e31bec263eb9eabb720bc3 100644 --- a/src/pathcomp/backend/pathComp_tools.c +++ b/src/pathcomp/backend/pathComp_tools.c @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/pathComp_tools.h b/src/pathcomp/backend/pathComp_tools.h index 85d1c62ead295642e6d3d297941ae72d532bdeed..546adad06641e3e5f4739fe1b2d37bbb52f2be45 100644 --- a/src/pathcomp/backend/pathComp_tools.h +++ b/src/pathcomp/backend/pathComp_tools.h @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/backend/tests/run-test.sh b/src/pathcomp/backend/tests/run-test.sh index 4a1b1b4bd6d4e4e8fc0989f531021c87a958abd4..d021d593220f86d5fe20cd474076bd1116f23d3d 100755 --- a/src/pathcomp/backend/tests/run-test.sh +++ b/src/pathcomp/backend/tests/run-test.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/Config.py b/src/pathcomp/frontend/Config.py index ab431acb92ac3732ff98bf7228d825c92d279986..c67f62870f156516c953e69cf4c5ae7af64cc79e 100644 --- a/src/pathcomp/frontend/Config.py +++ b/src/pathcomp/frontend/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile index 0c72a1f144da4766215add67c5252ccd939de817..c96db7293cb16cbe18e8ae2b8894590d16fb492c 100644 --- a/src/pathcomp/frontend/Dockerfile +++ b/src/pathcomp/frontend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/__init__.py b/src/pathcomp/frontend/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/pathcomp/frontend/__init__.py +++ b/src/pathcomp/frontend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/client/PathCompClient.py b/src/pathcomp/frontend/client/PathCompClient.py index 14756ea6e2ec452a9c80d8ba09caff4c5435cfa3..0cbe1ef64e96124de4381c2b13ef62dfb392122b 100644 --- a/src/pathcomp/frontend/client/PathCompClient.py +++ b/src/pathcomp/frontend/client/PathCompClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/client/__init__.py b/src/pathcomp/frontend/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/pathcomp/frontend/client/__init__.py +++ b/src/pathcomp/frontend/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/requirements.in b/src/pathcomp/frontend/requirements.in index 602ecff548366217e24331721bd0bec7afff8e04..ea970224a21d8948ae846c4470d64eb78f13028a 100644 --- a/src/pathcomp/frontend/requirements.in +++ b/src/pathcomp/frontend/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/PathCompService.py b/src/pathcomp/frontend/service/PathCompService.py index 76edef6cf8f34b757f3dd975d51a7e57c328b920..6e413c14eb293f3073bfb1d80963dab58ba04308 100644 --- a/src/pathcomp/frontend/service/PathCompService.py +++ b/src/pathcomp/frontend/service/PathCompService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,8 +14,9 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.tools.service.GenericGrpcService import GenericGrpcService +from common.proto.pathcomp_pb2 import DESCRIPTOR as PATHCOMP_DESCRIPTOR from common.proto.pathcomp_pb2_grpc import add_PathCompServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService from .PathCompServiceServicerImpl import PathCompServiceServicerImpl class PathCompService(GenericGrpcService): @@ -26,3 +27,5 @@ class PathCompService(GenericGrpcService): def install_servicers(self): add_PathCompServiceServicer_to_server(self.pathcomp_servicer, self.server) + + self.add_reflection_service_name(PATHCOMP_DESCRIPTOR, 'PathCompService') diff --git a/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py b/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py index ffaa6c358811f567de0a38ba3f50d69b5e0e3ced..f5bc8074a8c67b832d9c8f5efbb480bc9deac94f 100644 --- a/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py +++ b/src/pathcomp/frontend/service/PathCompServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/TopologyTools.py b/src/pathcomp/frontend/service/TopologyTools.py index 0ae114b1a3dea31e2abd3399e43ba8d131f2b917..707130459aeb8416d14a4bc8a5511b951cb1f8c1 100644 --- a/src/pathcomp/frontend/service/TopologyTools.py +++ b/src/pathcomp/frontend/service/TopologyTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/__init__.py b/src/pathcomp/frontend/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/pathcomp/frontend/service/__init__.py +++ b/src/pathcomp/frontend/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/__main__.py b/src/pathcomp/frontend/service/__main__.py index 9c7b7fe202cde4edae2e9193b3a8a3aa4197e12f..58ad597bcc79e70b35f70ebf86f50b262980fc0a 100644 --- a/src/pathcomp/frontend/service/__main__.py +++ b/src/pathcomp/frontend/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/Factory.py b/src/pathcomp/frontend/service/algorithms/Factory.py index be18bc2bcce7e2037ed1c10a9dad70db2acc5217..1332dcf47a035d9832173e8a6ba46fa7669e8d67 100644 --- a/src/pathcomp/frontend/service/algorithms/Factory.py +++ b/src/pathcomp/frontend/service/algorithms/Factory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py index e5dc2938124c6a668e6ddcf3296ebf273786cc2e..6f88f497c9a9bcb654de2bf96fd76dc119dbceee 100644 --- a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py index 57ce43979f4aeb7671bf8be5a6dba5e58a50cd87..85775199b240ec652236bceda352a537fcf7e3f5 100644 --- a/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/KShortestPathAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py index effe6c50b126abb818cbb8de170845ac519a6325..9e7030b9261cac225ca5a3163d5e94e502cc9905 100644 --- a/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/ShortestPathAlgorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/_Algorithm.py b/src/pathcomp/frontend/service/algorithms/_Algorithm.py index 3ed2b13fb33ae06faeacc4286959a8016ca995d1..ea54f77978057af9ca99c700b5d1c7a46ed934ae 100644 --- a/src/pathcomp/frontend/service/algorithms/_Algorithm.py +++ b/src/pathcomp/frontend/service/algorithms/_Algorithm.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,6 +14,7 @@ import json, logging, requests, uuid from typing import Dict, List, Optional, Tuple, Union +from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import ( ConfigRule, Connection, Device, DeviceList, EndPointId, Link, LinkList, Service, ServiceStatusEnum, ServiceTypeEnum ) @@ -251,21 +252,37 @@ class _Algorithm: ] self.logger.debug('path_hops = {:s}'.format(str(path_hops))) - try: - _device_dict = {k:v[0] for k,v in self.device_dict.items()} - self.logger.debug('self.device_dict = {:s}'.format(str(_device_dict))) - connections = convert_explicit_path_hops_to_connections( - path_hops, self.device_dict, main_service_uuid, main_service_type) - self.logger.debug('EXTRAPOLATED connections = {:s}'.format(str(connections))) - except: # pylint: disable=bare-except - MSG = ' '.join([ - 'Unable to Extrapolate sub-services and sub-connections.', - 'Assuming single-service and single-connection.', - ]) - self.logger.exception(MSG) + device_types = {v[0]['device_type'] for k,v in self.device_dict.items()} + DEVICES_BASIC_CONNECTION = { + DeviceTypeEnum.DATACENTER.value, DeviceTypeEnum.EMULATED_DATACENTER.value, + DeviceTypeEnum.CLIENT.value, DeviceTypeEnum.EMULATED_CLIENT.value, + DeviceTypeEnum.PACKET_ROUTER.value, DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, + } + self.logger.debug('device_types = {:s}'.format(str(device_types))) + self.logger.debug('DEVICES_BASIC_CONNECTION = {:s}'.format(str(DEVICES_BASIC_CONNECTION))) + is_basic_connection = device_types.issubset(DEVICES_BASIC_CONNECTION) + self.logger.debug('is_basic_connection = {:s}'.format(str(is_basic_connection))) + if is_basic_connection: + self.logger.info('Assuming basic connections...') connections = convert_explicit_path_hops_to_plain_connection( path_hops, main_service_uuid, main_service_type) self.logger.debug('BASIC connections = {:s}'.format(str(connections))) + else: + try: + _device_dict = {k:v[0] for k,v in self.device_dict.items()} + self.logger.debug('self.device_dict = {:s}'.format(str(_device_dict))) + connections = convert_explicit_path_hops_to_connections( + path_hops, self.device_dict, main_service_uuid, main_service_type) + self.logger.debug('EXTRAPOLATED connections = {:s}'.format(str(connections))) + except: # pylint: disable=bare-except + MSG = ' '.join([ + 'Unable to Extrapolate sub-services and sub-connections.', + 'Assuming single-service and single-connection.', + ]) + self.logger.exception(MSG) + connections = convert_explicit_path_hops_to_plain_connection( + path_hops, main_service_uuid, main_service_type) + self.logger.debug('BASIC connections = {:s}'.format(str(connections))) for connection in connections: service_uuid,service_type,path_hops,_ = connection diff --git a/src/pathcomp/frontend/service/algorithms/__init__.py b/src/pathcomp/frontend/service/algorithms/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/pathcomp/frontend/service/algorithms/__init__.py +++ b/src/pathcomp/frontend/service/algorithms/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py index f92f9b2fff11ab585813ab59e07c463f361413d2..f0775371d0f3fea01411ce4049226377feebc27e 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py index c4141c47855140259309efa43edfad35138968c4..0554084f8e3c83504e3c225ecc5a3e7503ed9c53 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py index a34798b137fed759837bad04a47212fa867e54dd..dfcd1156b78cebee7da84033cbc9943aaabdb14d 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComputeSubServices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py b/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py index 9f596b4b324b2bf06c58cd9eb6d96c5753257ae4..d72127bdbeaa8457f1933a5c4669ead0a2106a9c 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ConstantsMappings.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py b/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py index a33397bb4e21a50c247b74a1ef6c55c8768e0c7f..9ee17783045ea0ade2216d9f125e4f119b761c9c 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py +++ b/src/pathcomp/frontend/service/algorithms/tools/EroPathToHops.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py index 185b111657ce0a3964879bb322fe146b9b7811c2..b08830332f7fc6f526a19516b120e94a1a98b232 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -22,6 +22,8 @@ from common.tools.grpc.Tools import grpc_message_to_json_string DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.EMULATED_DATACENTER.value : 90, DeviceTypeEnum.DATACENTER.value : 90, + DeviceTypeEnum.EMULATED_CLIENT.value : 90, + DeviceTypeEnum.CLIENT.value : 90, DeviceTypeEnum.TERAFLOWSDN_CONTROLLER.value : 80, DeviceTypeEnum.EMULATED_IP_SDN_CONTROLLER.value : 80, @@ -50,6 +52,8 @@ DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.OPTICAL_TRANSPONDER.value : 10, DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value : 10, DeviceTypeEnum.OPTICAL_ROADM.value : 10, + DeviceTypeEnum.QKD_NODE.value : 10, + DeviceTypeEnum.OPEN_ROADM.value : 10, DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER.value : 0, DeviceTypeEnum.NETWORK.value : 0, # network out of our control; always delegate diff --git a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py index 2792a86639fbd6852a41499e928de7a4131ed408..8230092c2decc0b2c988f63a2677f879f7ec944f 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ServiceTypes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/service/algorithms/tools/__init__.py b/src/pathcomp/frontend/service/algorithms/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/__init__.py +++ b/src/pathcomp/frontend/service/algorithms/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/MockService_Dependencies.py b/src/pathcomp/frontend/tests/MockService_Dependencies.py index 55a28e39405ee2f99806f69cb2cc8f792fd97482..56ef052bdb02caee2e33019d87578e84fe1ff66d 100644 --- a/src/pathcomp/frontend/tests/MockService_Dependencies.py +++ b/src/pathcomp/frontend/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/Objects_A_B_C.py b/src/pathcomp/frontend/tests/Objects_A_B_C.py index 1be130c7be1525f670e351ff979e2911b6e8f34f..bdcaef65b0981c9c7d7cc7e76a21c81b2ae950b5 100644 --- a/src/pathcomp/frontend/tests/Objects_A_B_C.py +++ b/src/pathcomp/frontend/tests/Objects_A_B_C.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py index 7c92179b05ebe3ae7a14f2b302451a86c3c65ea2..0dc10b669001ac7dc35644b96b7772d890870c58 100644 --- a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py +++ b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py index 2b786119294e6badee097fc35a3a76bfaf301a26..359f45b3241444c26a1f780548f0822aebce1e15 100644 --- a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py +++ b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/PrepareTestScenario.py b/src/pathcomp/frontend/tests/PrepareTestScenario.py index 8b00fb3e81f64467a7c1fedf284a42ba7fa1ef64..9dd05cdf5a5c2357042423f1d36a96418040fe92 100644 --- a/src/pathcomp/frontend/tests/PrepareTestScenario.py +++ b/src/pathcomp/frontend/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/__init__.py b/src/pathcomp/frontend/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/pathcomp/frontend/tests/__init__.py +++ b/src/pathcomp/frontend/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/test_ero_path.py b/src/pathcomp/frontend/tests/test_ero_path.py index 1b80ca83cc567be120ed07df8b4c228ac20052fa..af8877ae37c84eb56e734d50981a2343c9813eb0 100644 --- a/src/pathcomp/frontend/tests/test_ero_path.py +++ b/src/pathcomp/frontend/tests/test_ero_path.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/test_pathcomp/__init__.py b/src/pathcomp/frontend/tests/test_pathcomp/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/pathcomp/frontend/tests/test_pathcomp/__init__.py +++ b/src/pathcomp/frontend/tests/test_pathcomp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/test_pathcomp/__main__.py b/src/pathcomp/frontend/tests/test_pathcomp/__main__.py index 687e9b96dfbdd543b49641f2dd8357c69485d102..108da5a7f411a397b91ecd70bdfd48e5bdbc4fae 100644 --- a/src/pathcomp/frontend/tests/test_pathcomp/__main__.py +++ b/src/pathcomp/frontend/tests/test_pathcomp/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/test_pathcomp/data.py b/src/pathcomp/frontend/tests/test_pathcomp/data.py index 3fc5c6fac2bf2c5739872ec4bc21621599ad7883..eac4d821bf850be49acdb082b78f26633b7b01b3 100644 --- a/src/pathcomp/frontend/tests/test_pathcomp/data.py +++ b/src/pathcomp/frontend/tests/test_pathcomp/data.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/test_unitary.py b/src/pathcomp/frontend/tests/test_unitary.py index 902b84c63f60a8f47b5fe15ec18278f4392de8f2..4327ff1295ca732536c12ea8e1274ca5a1119966 100644 --- a/src/pathcomp/frontend/tests/test_unitary.py +++ b/src/pathcomp/frontend/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py b/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py index 62750b52519c77e6c00d482f785fc7455b2f3dc2..0e41c18c9562b97f04bf3ed6043c2caf20817af3 100644 --- a/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py +++ b/src/pathcomp/frontend/tests/test_unitary_pathcomp_forecaster.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/misc/my_deploy-tests.sh b/src/pathcomp/misc/my_deploy-tests.sh index 15ce64cfc31ee2ff42a697d2a3f51e2765d7c45b..b1e6ec14e26ce619e5358ebb8a6cc2bef19b36c1 100755 --- a/src/pathcomp/misc/my_deploy-tests.sh +++ b/src/pathcomp/misc/my_deploy-tests.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/pathcomp/misc/test-commands.sh b/src/pathcomp/misc/test-commands.sh index f4aefabbb056bc874215f0aa626f826ad103864d..f1fd5ce21323eb241f137a959c087a450010a686 100755 --- a/src/pathcomp/misc/test-commands.sh +++ b/src/pathcomp/misc/test-commands.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/policy/.gitlab-ci.yml b/src/policy/.gitlab-ci.yml index 881da003e198a3bed3c498e2060c2d321a66e857..530913d3a82de09ca40db9986355b213594829e1 100644 --- a/src/policy/.gitlab-ci.yml +++ b/src/policy/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/policy/pom.xml b/src/policy/pom.xml index b322110bf3944fe7df3d7f1c932177a1d28cc631..5bf04013c3f604e9c3deac392a86d3aa721a7561 100644 --- a/src/policy/pom.xml +++ b/src/policy/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/docker/Dockerfile.multistage.jvm b/src/policy/src/main/docker/Dockerfile.multistage.jvm index 4b240d657559bde36ee98f51ef92ce8984333701..6bc8f494bc9e082247454d5679c6a1bd55be3a31 100644 --- a/src/policy/src/main/docker/Dockerfile.multistage.jvm +++ b/src/policy/src/main/docker/Dockerfile.multistage.jvm @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java index dfc93e9830993154bd90812632128b8dae788e39..e3265ff32e3e1f93a3bfd3007aff7e80d3154d8f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java index b34f328f4830bc8e7fc9647ee3a0799612c949c4..64162acefcd9b722e6c56ad80256b7318dd4517a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java index 000cf9d478d47f00711c7ffd3eff1fa8b84d3bc0..e09614947253efcb063e50425dcf92226024d65b 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java index 57baa1941d904f57b476a69643fe2f10ae15403e..3055db5257075d6e4978eba1a57fc4c05dc8fe9c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java index 8e257153e92e473176dc352c7ac4412503a98d5d..974711bccae5d7912da20cd142bd8255b6f07c04 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java index 5cc2012612f342cb317b5e938b3e28b3fbf8ac0a..3f58f6e28d6b57d457ae5475deddd6e31f38e0c9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java index 3ee5b1e562157bddb8465caab03289c6b52fcf20..0746dd1e289820d52a7338e6b133728ceb277edd 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java index 953241e5c1896a557a9c690ba05aa7f413f25aa1..25fc7906f12aaf60c09a875e08eb146bb2d0812f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java index ee781cdd3c1ac02a5ca04a18858105dca1cfd03b..f3493c819a28b888caff0dbc73eafdccd6ac40ab 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java index 5e7c89e1ac65bf90217b4ce608d97970c33aac4f..bdf84a05464f0382719786498f7588002ecf59b9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java index 65a0a341906bb8dc1c15d1615947e0f9846d4ac9..1c03ad74dd7a2bce582d9b2a624f6217133dfbac 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java b/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java index 27cb44916121358a017a61618429dc41b7d23d90..0a35967aae0868a1184f7bd2773808678640a8a3 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java index bbf5e79a60e92b6b6b11f689bab4549d60f53c81..2cfe4943743c100bcb19eb6c37af015760c6bff9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java index 760d5e423b4f7cbf0ea7801e6ca04b5b24da2e31..22377f74410b755d6313f46af92ce65b7fef502f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java index 643c2066edc5a005193a8ad46de840e823b2945f..a2e75d83f7dca938062285e3fced4b76438a00bb 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java index dacd5c6ae000a6e23746a573ba6ce2c64f7912b0..ca72d6e0c02a64d628dc497e7b3fbb99e146c5dd 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java index 6c9ed3b5ca3afcc73b61ba61b58bc56c38c0df51..99f20105d604c49b8fdd4dbc64d2c87e961f1348 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java index d121c13a5f646ff4c63070742ab9c620ddbd0925..7ac4e09f8c3b2ea9e2e7ec62f9f84e20e5b3fc6d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java index ef89bf9f2dcc2aa31908d8831845f749ea1d4c45..20a5aaa43369bc300a830054a521a6c892781010 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java index 60e6f9a65e24d5777cb4847e79d0c584eece5911..a2ed4920131e3903b76dd0b2413a0fe3d97fc266 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java index 39319d8cafb3427019eeb413dd27eb6f157ac8bf..bb945ca6acb972812fa2d0ca63aa373433427261 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java index 6291b613121a040af56ba1085063cf859a875249..f832e16b043f06a7bc990da6f4ba4ede71815d3a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java index 9f2b7c6069bb242bbe04b72527f8168a4c11fcca..91c9ada5b01aea0ce0c4c315fa8cbcef1d9c3474 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java index c692742185fe4db0050ba780e74b781d34e29774..1beb15a71560812a036c3cdaeefc6a5e77b7d859 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java index 9c1197fab39287bc43ced87046fb1a2aff73ab0b..c81131e24ffd093e820756cd254b67fea4a14f42 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java index 5fa1e652ada813ba04785d9536f647f2b1a82b33..d641af79aefcc17110cf19b01a9de8109490df74 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java index 9bcae65e91395f5e91a0a802d8c9b1d0eba6590a..19a249513cd813db90634e4875fcf63ad24e2eb3 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java index da4a2ebbd98685a9c701d7c962f9cae68da298d9..2b4d62fffe912c9d2649383399784acee781aa16 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java index f3d1dca1814ddd534d0715e4e687bd8606203fd9..fcdaa5ce46b32c2054a69c6005faad5d61abbeb5 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java index 523d339d79e9fc896aef22bfcc0eb81b5ceef5d4..f31c7b3f8dd715d72944b2b26aa5feced99179e3 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java index b2c92b0dba2c9856ac1efd4d43a252a786cdf4b9..11238bc7a95cc1ba3209673d03bb0b2d531f0c1e 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java index 7573fac94348e407d9e8341d655370f5f6ba0a3b..01d805df03f06c4a0dd5cff0fe1f182674a7eefe 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java index 9199329f1e4b4d6b108880622ce243a665989477..eab4fdad05a646270b8e8294aebe9545bd3716ad 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java index 2bf23dfc42499d6dc97a01294761cafd25015b46..cdd5a582faab79accf06d15bfa3bd36c872f24c9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java index 6aff606463b23ae2c15f861914daa0cb6d9c6ce8..8e37bba1e2cc720e1c388f93c5e69d23cb4c50e9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java index 8e4a8aafb95ae84fc804ce1445e711dc1c19bc44..3256b18e8e8601f0f52aff07bd997656d7379c9e 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java index 0c18eba23602b64e2e54db42e1e78b6e2d89d411..df58c24efb17bf1d8a6b7a7e30c2f056e3432051 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java index fe1d48a210121177975c1b2984394a9646c79a6d..8ed3f4fe694a89d51496b99a79b024d6e5c34de3 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java index a7f6987470f2ca69fec9a41ed92f2682570136da..587a2cea038c599cfa47f99d6981afa9f9273eb8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java index 25021f9fdb90085ba570f614a6f0cd94282731d9..6a5d2c00ea3bb7296ac2a8b4f5c8880111a6114c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java index f7699d282b4ea25e9d53ac5fa9ea1b377be98780..6a155e52bea9543b76a9c54af9434d966a6d52d4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java index 18e329daa27e41941506788e1e9d25aee62cd193..26c4b20238f70c5753b17abb9453c206ee9fe5c4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java index 7e90851468ddb81e81a9f030d94483179cd8bf16..32209848f418efaeae8e913305d6b3a0ee8a2a1f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java index bd4471ff1df742f73e20f22aa1f4b4b556546f95..5dae9f9b1eda8a5f600dd719dcd2b6d1d41fa2d8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java index 83c6ab452ab29d03c8212f30ca5e98bdff3b2dd2..21459c8a81f957a1b2788f9e60514dca33de84c9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java index a57c629263f6d63661a0cfff7b523d969a01c1ff..966cb6e6bbec66f8aa2c5537637e056d1440c434 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java index 193634b2aea0f695890bc260ce32edbdac46658f..ae9b3f3952150c8567eb50691b30595aa45bd226 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java index d2392f781e28a47bc32e5566274d8266d9c063d8..6a614e60b1722836e1058292936d8de8b4d84163 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java index 18c296bf4f00e17ddd18f9bd2490b8e5b9bf44f7..53fb8835a73a9d8eab91e24327a4b9f2bff2c181 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java index e447b1adb8027743f0462288d54f73c8b758a741..03a875505a58ae1406782b138e4b9d1a5ce81122 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java index cef38e26b466a1f7d368e605ed22d83669a4ea84..5b10fb915e72da130ba7ec95e5578fac7ad59253 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java index d42666fe528efe2e45dc3d5d946d975d637bb4f7..1cb459346f850d89945a02090d6918a511abe8a0 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java index 1486b54e61603b5da4345a5a2b44c96ddfcbd0f7..90c2becac90f7afa48b269f707abe92007b0e19f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java index 982ff994d5487b0a870c3732d618ade1547e2e57..64839c34ca79c5bd59fbcf8209943c60c5e80382 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java index 6bf8f075950880bf52b95f75faae74abc05df9a1..b1055c88f9bfe434c452cfe3c94b0264d3ca9152 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java index ef07c126e2a4d642a61374d4aae2a856f352e452..ae3ea7b8790a601c2bbbd1d0d4eaeb5c452da152 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java index 83583e1406847302aa718b2229901bc3b3cb9469..b63cb0e97cbf926411f6591cf4cb2fd21484a749 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java index d18e0b6f9426ebc04f3487c312b3abe1aac1b442..f4d036bacead79262b597f7c522a1d1ef1167dda 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java index 737466203b12a8a7feef28e71cb2457bf641a9a1..75f9f0d3bc2d6577b46349dfddaa7996f658ba36 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java index ef20e894c8b8dae35fa617e77d8f25860dda51a9..d09c6da0614c76a29979277c6188c33f857e2346 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java index f10caeac3c3244b9cc6725c70efa8acae05091e8..2e8824716a900bfc6f9cc49dd5105985ec8d358d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java index 95075acddc48d637bfda4a139be7e2056f6f44db..efe10156fd4f2061bcd2d3e9998e8402536254a8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java index 9b2774297dd0eca35e0b0c6bbc30405cc9188ad8..4843d2d9d72786bf29c6a78ef5b7ae5a85ab3475 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java index a5bbcdd97b96311db53df62373c8f783a9325af8..ea7eb947863148eb14f7222f8d0352c8545ad137 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java index 561650f7320c3de239c7730c85e3012e1a60ca02..2788e7887ec15f41c6c0a73220d9b60dc6abb019 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java index c9fac12d749eadba46921f7560bade9424bbf222..bb584864bdb5701162ac8a40d5c00ef37e42fb4c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java b/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java index 20eaef68079374218779a7178fa7eae53b5afab1..30b103b3fe1d6fe0abf6324912b381aa0099ac3a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java b/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java index 7ccb35f311737c3a9e5fb4574c5868bc64330337..7b10070c9556b5310b104d5b49b6564255e4159d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java index 4d457a0c3893f14b0a8a2cf7ecd193006053e0c9..0bae46b7b0b86ef745d6acd0d26ccae85b0408fe 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java index 2c169009e7954338706524c82f8798f60e453513..f0946aab58acbc5c21dff8af1fdcd01a7c2c23fe 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java index 13ebaef2be98212cfb3eb1ed5780b7591f85eb68..15b25bf1cbe78c627a43729ca764767c6a982b02 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java index bf8d00cdb4018de51abe19a11567a42c606b84b7..4d1d361ed8126d1905a109545e8d3f0e55a5ebec 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java index ba8736eb12b2fed89648a8b6cc32ff50f988b355..b5ade9b19e5765227f6e1867cd1d77ce9c365794 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java index 297afe21ede48ad7ff0f11f8b29384c8f6a0c14f..2c310d84a8116a15b2840c4420ee7d3da93816b1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java index 429fd98f94aea45f27ea0b7680064b2e3a8ff1d4..39955185666d53e6fd6f1b1c2e5e5612086d4eb1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java index a3c07ca8e752e295015ef2fe15ccc4b805e2438d..80f70b7d454091f8a16cf4599410d4d604c2478f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java index e2f8463faa3afef31860a734e8275ae03f7358b3..71fc2659df8ac91e2010a32fadbd4e8b0ddee77d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java index 9fc2e27a52750cd125a8b044f01e0498479e1cb1..baf194abccad1b0228f586f0f337334d87104cbc 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java index 4b87d8a2c7a9e2af4cc26a1d1f0b5748809bfce4..c95844696ae06493980e096ff57dad2289879b0d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java index 1485b9256726fa51d4d1622170c24d925219ea62..70c9b7cb83df810026c12962545061ecace16e32 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java index 675c7d6a64dbe16c189134668474dcd9922ffda6..66cc95af3cad40474fa90859ea4fc80aa77d7a39 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java index 4bd59af0592dd92b5b29d50114f53600c4bd79f5..64ac4a5130c3fa4f4cfa586f220726400ad4c123 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java index 706244aae0ba25784a25e9aa4622a6c239d02121..f8fa6840b9d10ac462df1fd1a554a818c82d02f8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java index c90adce90b729a54746965244d7c14dff3981660..681af28218e0b54bc86ad8db339505907775b654 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java index 1aa2d3e2197d53bcdf0062addcb8e251bb6f9619..ac58eab9354dfea667378e4b2911657558ed6983 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java index 91b52576cf11cefc7abd059545d363bbff9358c5..66d4141ab02cd7325570b49d02d0d7b5a965a4bd 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java index 9e8400d4684f475cd7a7fc4fcf546e0b0a457f6d..1e21bb47087ef9ea9ab0a4ca593fc972e7906da7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java index be072120711536c437c764a0f74e4010151909e8..017398bc2404d129b8680fff427daba5378d121c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java index 08529a63aa09c582ca5b9b47d901ea8644814bdd..b28373d0376820124fbffdc8479287dc6275dd74 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java index db9bb35d257c53b6254c2cd951f132970e2ab80d..3aa1ab9e88d48c90c653197846aec5b361a390c6 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java index 9f6a7101fd6066978ed5f1ca05af98a9ecdcc712..726a328f61e4eab1c73f5efc1f473a85b4744406 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java index b3c8d3568ecc0727fa4710aff6ad80f583e70600..a944effeae9fa2465bab05fb527ba14135a21333 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java index 58e8f0c92c1d91f7cbf369d7d1275fd18168411c..0ee1472dd958e7d527008e0d718aa70cd9c35a59 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java index dd454b48bdb1365407df099d2201d2b727dd3ce7..7b39d0db4c4f2f46785d98c50689d016b30acb8e 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java index f9063cccaa975f8ca451738940738945ca2898bc..f3d7fbb10fa5c795f1eadc6dec52f50a5396d54b 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java index c2476e11b5b370c499c4bd8af725e4d71361fd9a..095f8fb7333f91d26ebb40f4dc28fc4534d749eb 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java index 81cd6df4d9699f1ce5c7fda8956d336bec7a7c13..f5d2faebee32a5df3ec6ce0839c084f6c43db064 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java index 5cf476c54aef2c65f98a7d54116d01c36a0aea54..bc894bebeee76640e36f4aa41cb30aa56703e032 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java index b26d53484d02495391367a5dbc45619ddac9c2e1..2e788df8aee2db76a720335399dc66600bc8900a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java index 5c11f863445ecb98e8384ef1cc2d0f7685d87651..2589ec51000ea54a8bc9c5385d87e6ef80daf91c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java index 10d2476d33e62b36b7e57fb5487e4f3d22827e8b..4001b4c3e39750f72688b28bba8f7f820721d9ec 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java index a4d01ce960ea33efc3ab3c9e8f0cac1a0e302a70..e4e063a3c7a20beaf29e687b7c6ff21bfd49f1e9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java index 7cb951b907d91ec00aab7b6a3a894ad91d9c0787..93ecb7514552ee7c459afe947f130b57b0ae6fc2 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java index 004ff7bd19ac615d78762c9168c844249fdf4426..b3960dedbe43336bcad7810a6f9ed2e46a2e836d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java index 3d5e5e9b6a6be96e3bf76f15cc1e7a0ecd1c63d0..1285cd109de2f24c0748aa4b1ea9f7df938c2b6d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java index e1f1fbecac90fd9567969a1379692e8f97de8778..d864788d0a0b7cb7b1f009dedaa633573663292a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java index 6a3b8602caaa8980130971029d19c13a8fe6309d..71159d3ced84a5918b0caa177d350b329c975bc7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java index 697924f45cb5d8f4b5e67217ebc7d0230018a33f..0c78c1e135f42ee44a1fcb13b51c03c77ea81794 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java index 205b3e1330d6e3b8926ceb0b4a73c5801e3af58e..44477433f2e0d38dba4a921bdb56c67b21a19fc6 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java index 07f3076e7801b703fe4024a2012c9543071af180..fdc48415b1b4c951c6ee66ef3ab8268c4e1abffa 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java index d6ef07990e18606d7c5e4dd71a0492b55f6d64ce..4701f656928a1fedf4b84c04d9a295ed4972fd8d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java index b093d15d555df3a46788ba128be4ff9bb1a30977..575a4fce78f1fb4bd573abbca4dcc2d2f90e6dc1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java index 24cf2d8961a51deae664087e2d55a482bc5cf7bf..4b05e0bcb615102407ace40cfb0f581b12f80b86 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java index 326df220a0b1396bad4eca7d9a7c68751aecc621..b263c293cbbb53cc79aef4c099899372042dd279 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java index a684218df8e9ff9b1a599ecd351cc766372d67bd..1a57c482b607f4751bfd52c8145ca1ab817bfa47 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java index c42fc081a71373ef0167421749aa47facd99f2f5..5e682ee646dba85817c01bcc5cae091f5b6299eb 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java index c1947ae32edfbfd4ca7aa3b560150c63656b32aa..11f7b8b31b300c2b2bec7211b848f3bb5f5eafc4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java index a4b39ef434b9b9a6f5c1466a386c921d55128e69..4e48c924d880899ee9f5d7b18c97a30e664aa5c9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java index 0deb437ff3a9d852ee98a6c021c83e9fa9d7c3c5..46e79a8221bbdb1eba440e461d607675d5610c5e 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java index a6a7bf955387f47c7239e87cf45b54946a4bb780..458eac3bee887d931b37bd25c9e8dee213e64a02 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java index 93fe9162fb288bd3f075b522db07e4a7f780da3c..c47107ed9d442b8ef35ec565b4ce1a14511eedca 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/main/resources/application.yml b/src/policy/src/main/resources/application.yml index d0fca91427e5d0242db5abcd349ea1cdf9bb5364..806472f138ce775150316228fd9c1981a783ca38 100644 --- a/src/policy/src/main/resources/application.yml +++ b/src/policy/src/main/resources/application.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java index 668a4a5fee2d377e79bb0a97c6f93e922b82ab93..829df1e63c6157f27652f73b2216122598593ac2 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java index 0fd999ed491b9c42f3ec88f65029cce3fe4188d1..1d9ed5dcfe733ba51678c5e06e46725b8211068d 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java index 6f02ee4bb3485280ae468115f1a8d90120299d4d..024e877c0b369549901039a8b4b4e3b469e59a8d 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java index 9072d7df0b7e058eac0852c8aafdb3603c9901e8..7d8a079631bd959d85260e69552ee57b3ed4edb2 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java index 03b6dee313c126f13c54a0a761417ab02161c0eb..2f2295a8ab0807b2822fcd47802386f142145e54 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java index 1297ecd2a4b5a482496dc6afd6d988d1951031e6..b085b97e9f30e171af452deb56a9dd9a315857da 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java index c2acd12f1fb9c24cb24d65b12688210c35022c9b..9af7ac316a2b1367e1b4d341a5176e71ec8a43a4 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java index 1d4bf0ad4ccfac43aeee295f368f6370ea27396d..6d0ab633da27a6e7119a51e8d731ba9978e25c7d 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java index a2f7c5be8a855c56f7dd2b7afb0b3fd5d6e83c3b..3fa19b32a0f35ec73a78ff369aab6f6cc992844b 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java index 9ff1935e003264667236bbe84735f3df7e7b5d77..53ff695ec0b7f0c86df5807d915f70eac94cd52f 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java index 8e40adc607564e600680ef9531e9569bd1cc7822..8c6594806d0eac15680f21f9324f82b7afdc1d93 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java index 895f0ec3be9df5487bb89b1bbeb0ad7e637e0e9a..c70819ae64e3082db5850d60bfdc1763fc68a1fe 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java index f073e1a4e6368aa4f99e1bdb0a47532dfcddfada..8c533e0f15c18f322da818c0e0bc1a71451c239c 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java index d403a7df256858096719c3abd7a7d2a10be1d9af..a8abdb10c53f8dfb0c5731e84ebff508887229c0 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java index 911fcbdb9f3b2ab32c3586a8aa71662ec8923ef1..4c7c0508bca3e0f18f798915418f78b45da53e5c 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/policy/util/set_version.sh b/src/policy/util/set_version.sh index 7c5171eb0785001ad4af4aecabc4b0d660e543d3..b6dc3cca2e91b973fa6a19890bad717a772f084a 100755 --- a/src/policy/util/set_version.sh +++ b/src/policy/util/set_version.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/.gitlab-ci.yml b/src/qkd_app/.gitlab-ci.yml index 85ee2b5e04bce3077086d0cc831043483a995aef..bec178877f1a8b7fa1f24ff373d06d2d64428330 100644 --- a/src/qkd_app/.gitlab-ci.yml +++ b/src/qkd_app/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/Config.py b/src/qkd_app/Config.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/Config.py +++ b/src/qkd_app/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/Dockerfile b/src/qkd_app/Dockerfile index 4d2b8d61bd61ca98d62316b021d2486de3777977..26729f3848e46cb330f87c0b362a831099326c68 100644 --- a/src/qkd_app/Dockerfile +++ b/src/qkd_app/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/__init__.py b/src/qkd_app/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/__init__.py +++ b/src/qkd_app/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/client/QKDAppClient.py b/src/qkd_app/client/QKDAppClient.py index a35b18f1d9f380ae4f95f1a643716075642e31d6..0bde55aba1dfbf2087d1e3c9900e00f72a795af7 100644 --- a/src/qkd_app/client/QKDAppClient.py +++ b/src/qkd_app/client/QKDAppClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/client/__init__.py b/src/qkd_app/client/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/client/__init__.py +++ b/src/qkd_app/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/requirements.in b/src/qkd_app/requirements.in index a9bce93b569792a75687811f08e03d398ae4aeb5..7b3310fc1fc99ecc130a47e86948e3f905f9d818 100644 --- a/src/qkd_app/requirements.in +++ b/src/qkd_app/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/QKDAppService.py b/src/qkd_app/service/QKDAppService.py index b9b34ed9b8239ea119c5af1364bbc53914b42c51..67018aed1d0bf4ed6046b5eac8fa12c8c97d338a 100644 --- a/src/qkd_app/service/QKDAppService.py +++ b/src/qkd_app/service/QKDAppService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/QKDAppServiceServicerImpl.py b/src/qkd_app/service/QKDAppServiceServicerImpl.py index 3ef13b75e5510a95b91a9a67fa65ed06c32a3526..d37da857a860d0a55e05139310d4a311eab57b1d 100644 --- a/src/qkd_app/service/QKDAppServiceServicerImpl.py +++ b/src/qkd_app/service/QKDAppServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/__init__.py b/src/qkd_app/service/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/service/__init__.py +++ b/src/qkd_app/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/__main__.py b/src/qkd_app/service/__main__.py index 17f3ac240c33b28454e2df43862dd66a50eb5c45..82cd0869a1799a52c520d9dea7eb69c7090c7d59 100644 --- a/src/qkd_app/service/__main__.py +++ b/src/qkd_app/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/Engine.py b/src/qkd_app/service/database/Engine.py index ec86618218cc396dea31404b88d33e46d320ed58..e4ebed9273efb2aa1d10adbf32673cab35cb36a8 100644 --- a/src/qkd_app/service/database/Engine.py +++ b/src/qkd_app/service/database/Engine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/QKDApp.py b/src/qkd_app/service/database/QKDApp.py index 539555a4dac055d56158298ed7db6dceec39f446..5b415ea3606fd7650af117b015fffda699be88ff 100644 --- a/src/qkd_app/service/database/QKDApp.py +++ b/src/qkd_app/service/database/QKDApp.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/__init__.py b/src/qkd_app/service/database/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/service/database/__init__.py +++ b/src/qkd_app/service/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/QKDAppModel.py b/src/qkd_app/service/database/models/QKDAppModel.py index d9797d73c9c168efee5810014a70e0425f67e051..0fe7ba3f25263d180e0920ce48290f4081783497 100644 --- a/src/qkd_app/service/database/models/QKDAppModel.py +++ b/src/qkd_app/service/database/models/QKDAppModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/_Base.py b/src/qkd_app/service/database/models/_Base.py index f17fb9a56dcd120ad1dc95ceee720aa942f6ae6c..afd7e86d2ade61f1621b08139e7957ae678c12fd 100644 --- a/src/qkd_app/service/database/models/_Base.py +++ b/src/qkd_app/service/database/models/_Base.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/__init__.py b/src/qkd_app/service/database/models/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/service/database/models/__init__.py +++ b/src/qkd_app/service/database/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/enums/QKDAppStatus.py b/src/qkd_app/service/database/models/enums/QKDAppStatus.py index 980a8b14adca8c69eaf567037dc09872f33622f9..c5ebe4ccd71520eb2bc5f788b10dd45fe99267fb 100644 --- a/src/qkd_app/service/database/models/enums/QKDAppStatus.py +++ b/src/qkd_app/service/database/models/enums/QKDAppStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/enums/QKDAppTypes.py b/src/qkd_app/service/database/models/enums/QKDAppTypes.py index fdd318cec49b7b7ec8e1a0347c8b0f8c1aeb3a5c..20e4120c1d40e4961a3e54a834476fd394c25b35 100644 --- a/src/qkd_app/service/database/models/enums/QKDAppTypes.py +++ b/src/qkd_app/service/database/models/enums/QKDAppTypes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/enums/_GrpcToEnum.py b/src/qkd_app/service/database/models/enums/_GrpcToEnum.py index 0dcad039f7be240acbbec418d12475557e4c42c1..b8d9c384f09c1f82f3a2b406ba3ef1aa34097a61 100644 --- a/src/qkd_app/service/database/models/enums/_GrpcToEnum.py +++ b/src/qkd_app/service/database/models/enums/_GrpcToEnum.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/models/enums/__init__.py b/src/qkd_app/service/database/models/enums/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..72fe289dd8ff53a6cdb3bf97aa47d8f2ce67cf35 100644 --- a/src/qkd_app/service/database/models/enums/__init__.py +++ b/src/qkd_app/service/database/models/enums/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/uuids/QKDApp.py b/src/qkd_app/service/database/uuids/QKDApp.py index f6c0e1e12d591e747adf9497c77177e0fdd4dc51..5622b7253113cd1f68ba3f18180993437d934d58 100644 --- a/src/qkd_app/service/database/uuids/QKDApp.py +++ b/src/qkd_app/service/database/uuids/QKDApp.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qkd_app/service/database/uuids/_Builder.py b/src/qkd_app/service/database/uuids/_Builder.py index c5996b0f9d2cced27fd05e3966c3a60fa9bae24d..976b647eda48ee47989d46c17496d6e531cda3f4 100644 --- a/src/qkd_app/service/database/uuids/_Builder.py +++ b/src/qkd_app/service/database/uuids/_Builder.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/.gitlab-ci.yml b/src/qos_profile/.gitlab-ci.yml index a688cdb0590701d1f2659cac0c1049368a2228a2..7ed0f6e830f276f4a6e182f8abf4c94ed39b98e4 100644 --- a/src/qos_profile/.gitlab-ci.yml +++ b/src/qos_profile/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/Config.py b/src/qos_profile/Config.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/qos_profile/Config.py +++ b/src/qos_profile/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/Dockerfile b/src/qos_profile/Dockerfile index 361dc588c298b384b597edc2709333ba29cf28de..20d39cc1f2e096a062fd829ba4a19e1ce8cd9d7d 100644 --- a/src/qos_profile/Dockerfile +++ b/src/qos_profile/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/__init__.py b/src/qos_profile/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/qos_profile/__init__.py +++ b/src/qos_profile/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/client/QoSProfileClient.py b/src/qos_profile/client/QoSProfileClient.py index 748b3f208cc44e80c2e7b88f163f937328249633..d70966fa6fc089e582a36df2bbad7fd357992b86 100644 --- a/src/qos_profile/client/QoSProfileClient.py +++ b/src/qos_profile/client/QoSProfileClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/client/__init__.py b/src/qos_profile/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/qos_profile/client/__init__.py +++ b/src/qos_profile/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/requirements.in b/src/qos_profile/requirements.in index 3e98fef362277dbf60019902e115d1c733bea9e7..264e08853708a78c5321b8e85377a595eca1078a 100644 --- a/src/qos_profile/requirements.in +++ b/src/qos_profile/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/QoSProfileService.py b/src/qos_profile/service/QoSProfileService.py index ce5c5591b498787240c5390bbe5575822bc9da91..4d5d3690c41aa6575f566a09d1e5ee734867ee3f 100644 --- a/src/qos_profile/service/QoSProfileService.py +++ b/src/qos_profile/service/QoSProfileService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/QoSProfileServiceServicerImpl.py b/src/qos_profile/service/QoSProfileServiceServicerImpl.py index e705b35ae1e1bf8f2398ba95601c5a4723ba39a1..0ec2730018af0eb49fb53f5a53faedbd2efc3b63 100644 --- a/src/qos_profile/service/QoSProfileServiceServicerImpl.py +++ b/src/qos_profile/service/QoSProfileServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/__init__.py b/src/qos_profile/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/qos_profile/service/__init__.py +++ b/src/qos_profile/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/__main__.py b/src/qos_profile/service/__main__.py index 7f9e6de92b3ddf24e46a53f478bf90046e32d523..1d9280af4d4ef208709d95884d5c30a3fac47cf4 100644 --- a/src/qos_profile/service/__main__.py +++ b/src/qos_profile/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/database/Engine.py b/src/qos_profile/service/database/Engine.py index 6ba1a82d0b5790deded242ecde682020a0c785f8..262703fa70a6c2c49011e7a311e32f9641532469 100644 --- a/src/qos_profile/service/database/Engine.py +++ b/src/qos_profile/service/database/Engine.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/database/QoSProfile.py b/src/qos_profile/service/database/QoSProfile.py index 86823c16586bb15db4cfd846c97d141095aa6944..d65a6cf3bca4c5b50ddee6efe4973a963f505db4 100644 --- a/src/qos_profile/service/database/QoSProfile.py +++ b/src/qos_profile/service/database/QoSProfile.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/database/__init__.py b/src/qos_profile/service/database/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/qos_profile/service/database/__init__.py +++ b/src/qos_profile/service/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/database/models/QoSProfile.py b/src/qos_profile/service/database/models/QoSProfile.py index bfbdeef0a35490b1a62b80bddb098fd2bf90c2e4..195760a9bb96f77764966deb3fc9e29f49f8887c 100644 --- a/src/qos_profile/service/database/models/QoSProfile.py +++ b/src/qos_profile/service/database/models/QoSProfile.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/database/models/_Base.py b/src/qos_profile/service/database/models/_Base.py index d94dad3cdfc4dad473cc12eb00d502b05595b8f4..9839606df27e17c69fe8419789ba29aaf63debfd 100644 --- a/src/qos_profile/service/database/models/_Base.py +++ b/src/qos_profile/service/database/models/_Base.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/service/database/models/__init__.py b/src/qos_profile/service/database/models/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/qos_profile/service/database/models/__init__.py +++ b/src/qos_profile/service/database/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/tests/__init__.py b/src/qos_profile/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/qos_profile/tests/__init__.py +++ b/src/qos_profile/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/tests/conftest.py b/src/qos_profile/tests/conftest.py index 6e8d42b336accef155967ab8d736272f17efcbdc..76a862daf916da525430879c11de62b68a0a72f2 100644 --- a/src/qos_profile/tests/conftest.py +++ b/src/qos_profile/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/tests/test_constraints.py b/src/qos_profile/tests/test_constraints.py index 78fe73d64c11502c6468134f937003d2700e5b71..523147a31b9e74d43dd1cfa4341b603c70eb44bb 100644 --- a/src/qos_profile/tests/test_constraints.py +++ b/src/qos_profile/tests/test_constraints.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/qos_profile/tests/test_crud.py b/src/qos_profile/tests/test_crud.py index 9b92646c3341d2801e3b04741430075b4956a263..04125401cd7c20e196b63a81294e0dba71deb892 100644 --- a/src/qos_profile/tests/test_crud.py +++ b/src/qos_profile/tests/test_crud.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/.gitlab-ci.yml b/src/service/.gitlab-ci.yml index 8eda9d2be00bae67299b56e6f48ec21d33969c55..1204e833ad7818119a57ab71f4f3d7d6dfb0d786 100644 --- a/src/service/.gitlab-ci.yml +++ b/src/service/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/Config.py b/src/service/Config.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/Config.py +++ b/src/service/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/Dockerfile b/src/service/Dockerfile index 6f23f0a89387e2db3802ee20e003ccb6482844ff..564cae1b1e92df17d58f9955a608ad7e9408f0cb 100644 --- a/src/service/Dockerfile +++ b/src/service/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/__init__.py b/src/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/__init__.py +++ b/src/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/client/ServiceClient.py b/src/service/client/ServiceClient.py index 3fb66e680c7df402e21f4bff31f055a296064236..84604eb54c2755c53e2bb17584896d50bf83616a 100644 --- a/src/service/client/ServiceClient.py +++ b/src/service/client/ServiceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/client/TEServiceClient.py b/src/service/client/TEServiceClient.py index d71621b37c95fd74b9cc90e548d8a7e8424d7838..1c7c408a7058628ddaa6c89f1f377dbdc106ea90 100644 --- a/src/service/client/TEServiceClient.py +++ b/src/service/client/TEServiceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/client/__init__.py b/src/service/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/client/__init__.py +++ b/src/service/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/requirements.in b/src/service/requirements.in index a3a4b9147478cbf172e7493184e40a06bc33ed2e..3f8d2a35453691420a9469dfffd0a0d2648c6397 100644 --- a/src/service/requirements.in +++ b/src/service/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/ServiceService.py b/src/service/service/ServiceService.py index e1b0c93ffdfc4a7e8c12cff2ce8389d907cf7413..e088a99ebcc2e1b8258500df33ed8e319202d41c 100644 --- a/src/service/service/ServiceService.py +++ b/src/service/service/ServiceService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,6 +14,7 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.service_pb2 import DESCRIPTOR as SERVICE_DESCRIPTOR from common.proto.service_pb2_grpc import add_ServiceServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .ServiceServiceServicerImpl import ServiceServiceServicerImpl @@ -27,3 +28,5 @@ class ServiceService(GenericGrpcService): def install_servicers(self): add_ServiceServiceServicer_to_server(self.service_servicer, self.server) + + self.add_reflection_service_name(SERVICE_DESCRIPTOR, 'ServiceService') diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 45a8e0b6c0fd9a26b45fc47d55074d8863c0caed..9120d475b8b2bb88bfcf7d7da3cadba2bf9931e4 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -17,7 +17,8 @@ from typing import Optional from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.method_wrappers.ServiceExceptions import ( AlreadyExistsException, InvalidArgumentException, NotFoundException, NotImplementedException, - OperationFailedException) + OperationFailedException +) from common.proto.context_pb2 import ( Connection, ConstraintActionEnum, Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, TopologyId @@ -42,7 +43,8 @@ from .service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory from .task_scheduler.TaskScheduler import TasksScheduler from .tools.GeodesicDistance import gps_distance from .tools.OpticalTools import ( - add_lightpath, delete_lightpath, adapt_reply, get_device_name_from_uuid, get_optical_band + add_lightpath, delete_lightpath, adapt_reply, get_device_name_from_uuid, + get_optical_band, refresh_opticalcontroller, DelFlexLightpath ) @@ -257,6 +259,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): DEFAULT_TOPOLOGY_NAME, context_id_x) topology_details = context_client.GetTopologyDetails( TopologyId(**topology_id_x)) + + refresh_opticalcontroller(topology_id_x) # devices = get_devices_in_topology(context_client, TopologyId(**topology_id_x), ContextId(**context_id_x)) devices = topology_details.devices context_uuid_x = topology_details.topology_id.context_id.context_uuid.uuid @@ -284,6 +288,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): # reply with 2 transponders and 2 roadms reply_json = json.loads(reply_txt) + LOGGER.debug('[optical] reply_json[{:s}]={:s}'.format(str(type(reply_json)), str(reply_json))) optical_band_txt = "" if "new_optical_band" in reply_json.keys(): if reply_json["new_optical_band"] == 1: @@ -292,7 +297,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): parent_ob = reply_json["parent_opt_band"] LOGGER.debug('Parent optical-band={}'.format(parent_ob)) optical_band_txt = get_optical_band(parent_ob) - LOGGER.info('optical-band details={}'.format(optical_band_txt)) + else: LOGGER.debug('expected optical band not found') else: @@ -301,12 +306,11 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): LOGGER.debug('Using existing optical band') else: LOGGER.debug('Using existing optical band') + if reply_txt is not None: optical_reply = adapt_reply( devices, _service, reply_json, context_uuid_x, topology_uuid_x, optical_band_txt ) - LOGGER.info('optical_reply={:s}'.format( - grpc_message_to_json_string(optical_reply))) tasks_scheduler.compose_from_pathcompreply( optical_reply, is_delete=False) @@ -342,6 +346,10 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): if service is None: raise Exception('Service({:s}) not found'.format(grpc_message_to_json_string(request))) # pylint: disable=no-member service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PENDING_REMOVAL + + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_ACTIVE + context_client.SetService(service) if is_deployed_te() and service.service_type == ServiceTypeEnum.SERVICETYPE_TE: @@ -351,7 +359,14 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): context_client.RemoveService(request) return Empty() - if is_deployed_optical() and service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + params = { + "src" : None, + "dst" : None, + "bitrate" : None, + 'ob_id' : None, + 'flow_id' : None + } devs = [] context_id_x = json_context_id(DEFAULT_CONTEXT_NAME) @@ -364,15 +379,38 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): devs.append(endpoint_id.device_id.device_uuid.uuid) src = get_device_name_from_uuid(devices, devs[0]) dst = get_device_name_from_uuid(devices, devs[1]) - - bitrate = int( - float(service.service_constraints[0].custom.constraint_value)) + bitrate = 100 + for constraint in service.service_constraints: + if "bandwidth" in constraint.custom.constraint_type: + bitrate = int(float(constraint.custom.constraint_value)) + break + + bitrate = int(float( + service.service_constraints[0].custom.constraint_value + )) if len(service.service_config.config_rules) > 0: c_rules_dict = json.loads( service.service_config.config_rules[0].custom.resource_value) + ob_id = None + flow_id = None + + if "ob_id" in c_rules_dict: + ob_id = c_rules_dict["ob_id"] if ("flow_id" in c_rules_dict): flow_id = c_rules_dict["flow_id"] - reply = delete_lightpath(flow_id, src, dst, bitrate) + #if ("ob_id" in c_rules_dict): + # ob_id = c_rules_dict["ob_id"] + + params['bitrate'] = bitrate + params['dst' ] = dst + params['src' ] = src + params['ob_id' ] = ob_id + params['flow_id'] = flow_id + + tasks_scheduler = TasksScheduler(self.service_handler_factory) + tasks_scheduler.compose_from_optical_service(service, params=params, is_delete=True) + tasks_scheduler.execute_all() + return Empty() # Normal service # Feed TaskScheduler with this service and the sub-services and sub-connections related to this service. diff --git a/src/service/service/__init__.py b/src/service/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/__init__.py +++ b/src/service/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/__main__.py b/src/service/service/__main__.py index ae8a9e960cf6a0d720b508fe3ea5592632420c18..68d47f021d2bf17a82a71c0e1fa0f7081b88df95 100644 --- a/src/service/service/__main__.py +++ b/src/service/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,7 +16,8 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Constants import ServiceNameEnum from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_log_level, get_metrics_port, + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, get_metrics_port, wait_for_environment_variables ) from .ServiceService import ServiceService diff --git a/src/service/service/service_handler_api/AnyTreeTools.py b/src/service/service/service_handler_api/AnyTreeTools.py index 670da212374dcdf72d2d24cda674c6ee0dea39cb..761e90a1b65c2495ea4f9824b1ddf00a116104a4 100644 --- a/src/service/service/service_handler_api/AnyTreeTools.py +++ b/src/service/service/service_handler_api/AnyTreeTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handler_api/Exceptions.py b/src/service/service/service_handler_api/Exceptions.py index 7ea65b9a1db6c06adff62d2ad5120b071d81e2ce..7785e4926f9e0544114d260c716b81f6b6b2a3ef 100644 --- a/src/service/service/service_handler_api/Exceptions.py +++ b/src/service/service/service_handler_api/Exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index 494e59e3c6698c6ae052e1f4b35b7a56e8dc3fba..78f084605bcd759825975cb7f11abc659506755b 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handler_api/ServiceHandlerFactory.py b/src/service/service/service_handler_api/ServiceHandlerFactory.py index b05af2c7620fe3ac7d80c29a162eed644dd122e7..e692a9e773c9c54c843b2fe1ed7ed3d7b1158802 100644 --- a/src/service/service/service_handler_api/ServiceHandlerFactory.py +++ b/src/service/service/service_handler_api/ServiceHandlerFactory.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handler_api/SettingsHandler.py b/src/service/service/service_handler_api/SettingsHandler.py index 293de54aa84be11f3c31bc1b47fce852df19a16a..5607173ac86072b21312defb1299e9113d6064e3 100644 --- a/src/service/service/service_handler_api/SettingsHandler.py +++ b/src/service/service/service_handler_api/SettingsHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -57,6 +57,11 @@ class SettingsHandler: def get(self, key_or_path : Union[str, List[str]], default : Optional[Any] = None) -> Optional[TreeNode]: return get_subnode(self.__resolver, self.__config, key_or_path, default=default) + def get_service_settings(self) -> Optional[TreeNode]: + service_settings_uri = '/settings' + service_settings = self.get(service_settings_uri) + return service_settings + def get_device_settings(self, device : Device) -> Optional[TreeNode]: device_keys = device.device_id.device_uuid.uuid, device.name diff --git a/src/service/service/service_handler_api/Tools.py b/src/service/service/service_handler_api/Tools.py index 7faa95312a9923c924f1a42661f87380cc731352..35c439ae176ac67adb8933fadc7ba12a703ce80b 100644 --- a/src/service/service/service_handler_api/Tools.py +++ b/src/service/service/service_handler_api/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handler_api/_ServiceHandler.py b/src/service/service/service_handler_api/_ServiceHandler.py index f266bc1b157bed03457fb9e7f234369c2cfca580..9e90ade1da362b0d4f5bb043541bf96cd26a985d 100644 --- a/src/service/service/service_handler_api/_ServiceHandler.py +++ b/src/service/service/service_handler_api/_ServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handler_api/__init__.py b/src/service/service/service_handler_api/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handler_api/__init__.py +++ b/src/service/service/service_handler_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 3beb7c9ee95c79d7219550a62166c648e061a01d..f93cf011fe02139ae350b91eab52eb71ded0574d 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py b/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py index 6559436a434c8d0453492f5b8d391cf15e81a29d..9512f242c90db54dbf1952a4294bcf6a74d1d121 100644 --- a/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py +++ b/src/service/service/service_handlers/e2e_orch/E2EOrchestratorServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/e2e_orch/__init__.py b/src/service/service/service_handlers/e2e_orch/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/e2e_orch/__init__.py +++ b/src/service/service/service_handlers/e2e_orch/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py index d099bdec0126e83be68c3150a864d2330f8cc40a..e906780272efc734908955e1d13585f37b3cba9e 100644 --- a/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_emulated/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py index af865d2b877946bd21c6ba2795fb27966562d995..3d7a393f3730fa1d7249f94112f2491e985098ac 100644 --- a/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_emulated/L2NMEmulatedServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_emulated/__init__.py b/src/service/service/service_handlers/l2nm_emulated/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l2nm_emulated/__init__.py +++ b/src/service/service/service_handlers/l2nm_emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py b/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py index 8ce66c2f3ac58b6d8654019b2908e6d1a10f2991..d63d2640b350ec2a3fb713294e58c0a953ca67cc 100644 --- a/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_ietfl2vpn/L2NM_IETFL2VPN_ServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py b/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py +++ b/src/service/service/service_handlers/l2nm_ietfl2vpn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py index 9e37611cbcef8396d692882b58a4f9e1fec044a1..47d26b58b1c7a2553fd86fcfd017ce418979b27f 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py index fd58a365988bb856060a82f4985134c178a46e96..bde44ac5c7225732f40197756670c2bdd0e407c7 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l2nm_openconfig/__init__.py b/src/service/service/service_handlers/l2nm_openconfig/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/__init__.py +++ b/src/service/service/service_handlers/l2nm_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py index 44245705ecdb48d33c9152328a352d736cc3dd27..1d6764619e81864e9b048319a087f1a10f17d601 100644 --- a/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_emulated/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py index 35ad6222d315c53b7e1686b75b2db34aba02570f..de206a30c51ee1285f4e71d3a0624bd45fc9a9c1 100644 --- a/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_emulated/L3NMEmulatedServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_emulated/__init__.py b/src/service/service/service_handlers/l3nm_emulated/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l3nm_emulated/__init__.py +++ b/src/service/service/service_handlers/l3nm_emulated/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py index be314a8c1ee5112dd9d321dd2c1ee1dc6173aca4..277d6d7e1a574afafa138d517cfec4c644e25023 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,33 +12,67 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Dict, List, Optional, Tuple -from common.proto.context_pb2 import Device, EndPoint +import json, logging, netaddr, re +from typing import Dict, List, Optional, Set, Tuple +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import ConfigActionEnum, Device, EndPoint, Service from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set - from service.service.service_handler_api.AnyTreeTools import TreeNode -def _interface(if_name, sif_index, ipv4_address, ipv4_prefix, enabled) -> Tuple[str, Dict]: - str_path = '/interface[{:s}]'.format(if_name) - str_data = {'name': if_name, 'enabled': enabled, 'sub_if_index': sif_index, - 'sub_if_enabled': enabled, 'sub_if_ipv4_enabled': enabled, - 'sub_if_ipv4_address': ipv4_address, 'sub_if_ipv4_prefix': ipv4_prefix} - return str_path, str_data +LOGGER = logging.getLogger(__name__) + +#NETWORK_INSTANCE = 'teraflowsdn' # TODO: investigate; sometimes it does not create/delete static rules properly +NETWORK_INSTANCE = 'default' +DEFAULT_NETWORK_INSTANCE = 'default' + +RE_IF = re.compile(r'^\/interface\[([^\]]+)\]$') +RE_SUBIF = re.compile(r'^\/interface\[([^\]]+)\]\/subinterface\[([^\]]+)\]$') +RE_SR = re.compile(r'^\/network_instance\[([^\]]+)\]\/protocols\[STATIC\]/route\[([^\:]+)\:([^\]]+)\]$') + +def _interface( + interface : str, if_type : Optional[str] = 'l3ipvlan', index : int = 0, vlan_id : Optional[int] = None, + address_ip : Optional[str] = None, address_prefix : Optional[int] = None, mtu : Optional[int] = None, + enabled : bool = True +) -> Tuple[str, Dict]: + path = '/interface[{:s}]/subinterface[{:d}]'.format(interface, index) + data = {'name': interface, 'type': if_type, 'index': index, 'enabled': enabled} + if if_type is not None: data['type'] = if_type + if vlan_id is not None: data['vlan_id'] = vlan_id + if address_ip is not None: data['address_ip'] = address_ip + if address_prefix is not None: data['address_prefix'] = address_prefix + if mtu is not None: data['mtu'] = mtu + return path, data + +def _network_instance(ni_name : str, ni_type : str) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]'.format(ni_name) + data = {'name': ni_name, 'type': ni_type} + return path, data -def _network_instance(ni_name, ni_type) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]'.format(ni_name) - str_data = {'name': ni_name, 'type': ni_type} - return str_path, str_data +def _network_instance_protocol(ni_name : str, protocol : str) -> Tuple[str, Dict]: + path = '/network_instance[{:s}]/protocols[{:s}]'.format(ni_name, protocol) + data = {'name': ni_name, 'identifier': protocol, 'protocol_name': protocol} + return path, data -def _network_instance_static_route(ni_name, prefix, next_hop, next_hop_index=0) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]/static_route[{:s}]'.format(ni_name, prefix) - str_data = {'name': ni_name, 'prefix': prefix, 'next_hop': next_hop, 'next_hop_index': next_hop_index} - return str_path, str_data +def _network_instance_protocol_static(ni_name : str) -> Tuple[str, Dict]: + return _network_instance_protocol(ni_name, 'STATIC') -def _network_instance_interface(ni_name, if_name, sif_index) -> Tuple[str, Dict]: - str_path = '/network_instance[{:s}]/interface[{:s}.{:d}]'.format(ni_name, if_name, sif_index) - str_data = {'name': ni_name, 'if_name': if_name, 'sif_index': sif_index} - return str_path, str_data +def _network_instance_protocol_static_route( + ni_name : str, prefix : str, next_hop : str, metric : int +) -> Tuple[str, Dict]: + protocol = 'STATIC' + path = '/network_instance[{:s}]/protocols[{:s}]/static_route[{:s}:{:d}]'.format(ni_name, protocol, prefix, metric) + index = 'AUTO_{:d}_{:s}'.format(metric, next_hop.replace('.', '-')) + data = { + 'name': ni_name, 'identifier': protocol, 'protocol_name': protocol, + 'prefix': prefix, 'index': index, 'next_hop': next_hop, 'metric': metric + } + return path, data + +def _network_instance_interface(ni_name : str, interface : str, sub_interface_index : int) -> Tuple[str, Dict]: + sub_interface_name = '{:s}.{:d}'.format(interface, sub_interface_index) + path = '/network_instance[{:s}]/interface[{:s}]'.format(ni_name, sub_interface_name) + data = {'name': ni_name, 'id': sub_interface_name, 'interface': interface, 'subinterface': sub_interface_index} + return path, data class EndpointComposer: def __init__(self, endpoint_uuid : str) -> None: @@ -46,74 +80,223 @@ class EndpointComposer: self.objekt : Optional[EndPoint] = None self.sub_interface_index = 0 self.ipv4_address = None - self.ipv4_prefix = None + self.ipv4_prefix_len = None - def configure(self, endpoint_obj : EndPoint, settings : Optional[TreeNode]) -> None: - self.objekt = endpoint_obj + def configure(self, endpoint_obj : Optional[EndPoint], settings : Optional[TreeNode]) -> None: + if endpoint_obj is not None: + self.objekt = endpoint_obj if settings is None: return json_settings : Dict = settings.value - self.ipv4_address = json_settings['ipv4_address'] - self.ipv4_prefix = json_settings['ipv4_prefix'] - self.sub_interface_index = json_settings['sub_interface_index'] + + if 'address_ip' in json_settings: + self.ipv4_address = json_settings['address_ip'] + elif 'ip_address' in json_settings: + self.ipv4_address = json_settings['ip_address'] + else: + MSG = 'IP Address not found. Tried: address_ip and ip_address. endpoint_obj={:s} settings={:s}' + LOGGER.warning(MSG.format(str(endpoint_obj), str(settings))) + + if 'address_prefix' in json_settings: + self.ipv4_prefix_len = json_settings['address_prefix'] + elif 'prefix_length' in json_settings: + self.ipv4_prefix_len = json_settings['prefix_length'] + else: + MSG = 'IP Address Prefix not found. Tried: address_prefix and prefix_length. endpoint_obj={:s} settings={:s}' + LOGGER.warning(MSG.format(str(endpoint_obj), str(settings))) + + self.sub_interface_index = json_settings.get('index', 0) def get_config_rules(self, network_instance_name : str, delete : bool = False) -> List[Dict]: + if self.ipv4_address is None: return [] + if self.ipv4_prefix_len is None: return [] json_config_rule = json_config_rule_delete if delete else json_config_rule_set - return [ - json_config_rule(*_interface( - self.objekt.name, self.sub_interface_index, self.ipv4_address, self.ipv4_prefix, True - )), - json_config_rule(*_network_instance_interface( + + config_rules : List[Dict] = list() + if network_instance_name != DEFAULT_NETWORK_INSTANCE: + config_rules.append(json_config_rule(*_network_instance_interface( network_instance_name, self.objekt.name, self.sub_interface_index - )), - ] + ))) + + if delete: + config_rules.extend([ + json_config_rule(*_interface( + self.objekt.name, index=self.sub_interface_index, address_ip=None, + address_prefix=None, enabled=False + )), + ]) + else: + config_rules.extend([ + json_config_rule(*_interface( + self.objekt.name, index=self.sub_interface_index, address_ip=self.ipv4_address, + address_prefix=self.ipv4_prefix_len, enabled=True + )), + ]) + return config_rules + + def dump(self) -> Dict: + return { + 'index' : self.sub_interface_index, + 'address_ip' : self.ipv4_address, + 'address_prefix': self.ipv4_prefix_len, + } + + def __str__(self): + data = {'uuid': self.uuid} + if self.objekt is not None: data['name'] = self.objekt.name + data.update(self.dump()) + return json.dumps(data) class DeviceComposer: def __init__(self, device_uuid : str) -> None: self.uuid = device_uuid self.objekt : Optional[Device] = None - self.endpoints : Dict[str, EndpointComposer] = dict() - self.static_routes : Dict[str, str] = dict() - + self.aliases : Dict[str, str] = dict() # endpoint_name => endpoint_uuid + self.endpoints : Dict[str, EndpointComposer] = dict() # endpoint_uuid => EndpointComposer + self.connected : Set[str] = set() + self.static_routes : Dict[str, Dict[int, str]] = dict() # {prefix => {metric => next_hop}} + + def set_endpoint_alias(self, endpoint_name : str, endpoint_uuid : str) -> None: + self.aliases[endpoint_name] = endpoint_uuid + def get_endpoint(self, endpoint_uuid : str) -> EndpointComposer: + endpoint_uuid = self.aliases.get(endpoint_uuid, endpoint_uuid) if endpoint_uuid not in self.endpoints: self.endpoints[endpoint_uuid] = EndpointComposer(endpoint_uuid) return self.endpoints[endpoint_uuid] def configure(self, device_obj : Device, settings : Optional[TreeNode]) -> None: self.objekt = device_obj + for endpoint_obj in device_obj.device_endpoints: + endpoint_uuid = endpoint_obj.endpoint_id.endpoint_uuid.uuid + self.set_endpoint_alias(endpoint_obj.name, endpoint_uuid) + self.get_endpoint(endpoint_obj.name).configure(endpoint_obj, None) + + # Find management interfaces + mgmt_ifaces = set() + for config_rule in device_obj.device_config.config_rules: + if config_rule.action != ConfigActionEnum.CONFIGACTION_SET: continue + if config_rule.WhichOneof('config_rule') != 'custom': continue + config_rule_custom = config_rule.custom + match = RE_IF.match(config_rule_custom.resource_key) + if match is None: continue + if_name = match.groups()[0] + resource_value = json.loads(config_rule_custom.resource_value) + management = resource_value.get('management', False) + if management: mgmt_ifaces.add(if_name) + + # Find data plane interfaces + for config_rule in device_obj.device_config.config_rules: + if config_rule.action != ConfigActionEnum.CONFIGACTION_SET: continue + if config_rule.WhichOneof('config_rule') != 'custom': continue + config_rule_custom = config_rule.custom + + match = RE_SUBIF.match(config_rule_custom.resource_key) + if match is not None: + if_name, subif_index = match.groups() + if if_name in mgmt_ifaces: continue + resource_value = json.loads(config_rule_custom.resource_value) + if 'address_ip' not in resource_value: continue + if 'address_prefix' not in resource_value: continue + ipv4_network = str(resource_value['address_ip']) + ipv4_prefix_len = int(resource_value['address_prefix']) + endpoint = self.get_endpoint(if_name) + endpoint.ipv4_address = ipv4_network + endpoint.ipv4_prefix_len = ipv4_prefix_len + endpoint.sub_interface_index = int(subif_index) + endpoint_ip_network = netaddr.IPNetwork('{:s}/{:d}'.format(ipv4_network, ipv4_prefix_len)) + if '0.0.0.0/' not in str(endpoint_ip_network.cidr): + self.connected.add(str(endpoint_ip_network.cidr)) + + match = RE_SR.match(config_rule_custom.resource_key) + if match is not None: + ni_name, prefix, metric = match.groups() + if ni_name != NETWORK_INSTANCE: continue + resource_value : Dict = json.loads(config_rule_custom.resource_value) + next_hop = resource_value['next_hop'] + self.static_routes.setdefault(prefix, dict())[metric] = next_hop + if settings is None: return json_settings : Dict = settings.value - static_routes = json_settings.get('static_routes', []) + static_routes : List[Dict] = json_settings.get('static_routes', []) for static_route in static_routes: prefix = static_route['prefix'] next_hop = static_route['next_hop'] - self.static_routes[prefix] = next_hop + metric = static_route.get('metric', 0) + self.static_routes.setdefault(prefix, dict())[metric] = next_hop def get_config_rules(self, network_instance_name : str, delete : bool = False) -> List[Dict]: + SELECTED_DEVICES = {DeviceTypeEnum.PACKET_ROUTER.value, DeviceTypeEnum.EMULATED_PACKET_ROUTER.value} + if self.objekt.device_type not in SELECTED_DEVICES: return [] + json_config_rule = json_config_rule_delete if delete else json_config_rule_set - config_rules = [ + config_rules : List[Dict] = list() + if network_instance_name != DEFAULT_NETWORK_INSTANCE: json_config_rule(*_network_instance(network_instance_name, 'L3VRF')) - ] for endpoint in self.endpoints.values(): config_rules.extend(endpoint.get_config_rules(network_instance_name, delete=delete)) - for prefix, next_hop in self.static_routes.items(): + if len(self.static_routes) > 0: config_rules.append( - json_config_rule(*_network_instance_static_route(network_instance_name, prefix, next_hop)) + json_config_rule(*_network_instance_protocol_static(network_instance_name)) ) + for prefix, metric_next_hop in self.static_routes.items(): + for metric, next_hop in metric_next_hop.items(): + config_rules.append( + json_config_rule(*_network_instance_protocol_static_route( + network_instance_name, prefix, next_hop, metric + )) + ) if delete: config_rules = list(reversed(config_rules)) return config_rules + def dump(self) -> Dict: + return { + 'endpoints' : { + endpoint_uuid : endpoint.dump() + for endpoint_uuid, endpoint in self.endpoints.items() + }, + 'connected' : list(self.connected), + 'static_routes' : self.static_routes, + } + + def __str__(self): + data = {'uuid': self.uuid} + if self.objekt is not None: data['name'] = self.objekt.name + data.update(self.dump()) + return json.dumps(data) + class ConfigRuleComposer: def __init__(self) -> None: - self.devices : Dict[str, DeviceComposer] = dict() + self.objekt : Optional[Service] = None + self.aliases : Dict[str, str] = dict() # device_name => device_uuid + self.devices : Dict[str, DeviceComposer] = dict() # device_uuid => DeviceComposer + + def set_device_alias(self, device_name : str, device_uuid : str) -> None: + self.aliases[device_name] = device_uuid def get_device(self, device_uuid : str) -> DeviceComposer: + device_uuid = self.aliases.get(device_uuid, device_uuid) if device_uuid not in self.devices: self.devices[device_uuid] = DeviceComposer(device_uuid) return self.devices[device_uuid] - def get_config_rules(self, network_instance_name : str, delete : bool = False) -> Dict[str, List[Dict]]: + def configure(self, service_obj : Service, settings : Optional[TreeNode]) -> None: + self.objekt = service_obj + if settings is None: return + #json_settings : Dict = settings.value + # For future use + + def get_config_rules( + self, network_instance_name : str = NETWORK_INSTANCE, delete : bool = False + ) -> Dict[str, List[Dict]]: return { device_uuid : device.get_config_rules(network_instance_name, delete=delete) for device_uuid, device in self.devices.items() } + + def dump(self) -> Dict: + return { + 'devices' : { + device_uuid : device.dump() + for device_uuid, device in self.devices.items() + } + } diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py index 5856b5f61893174a92ce02a303ae9ad30be16005..4099675fa57df11b11302c210113189f0153b599 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/L3NMGnmiOpenConfigServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -15,14 +15,17 @@ import json, logging from typing import Any, Dict, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method -from common.proto.context_pb2 import ConfigRule, DeviceId, Service +from common.proto.context_pb2 import ConfigRule, ConnectionId, DeviceId, Service +from common.tools.object_factory.Connection import json_connection_id from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type -from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching from service.service.service_handler_api._ServiceHandler import _ServiceHandler from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching from service.service.task_scheduler.TaskExecutor import TaskExecutor +from service.service.tools.EndpointIdFormatters import endpointids_to_raw from .ConfigRuleComposer import ConfigRuleComposer +from .StaticRouteGenerator import StaticRouteGenerator LOGGER = logging.getLogger(__name__) @@ -35,24 +38,36 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): self.__service = service self.__task_executor = task_executor self.__settings_handler = SettingsHandler(service.service_config, **settings) - self.__composer = ConfigRuleComposer() - self.__endpoint_map : Dict[Tuple[str, str], str] = dict() + self.__config_rule_composer = ConfigRuleComposer() + self.__static_route_generator = StaticRouteGenerator(self.__config_rule_composer) + self.__endpoint_map : Dict[Tuple[str, str], Tuple[str, str]] = dict() def _compose_config_rules(self, endpoints : List[Tuple[str, str, Optional[str]]]) -> None: + if len(endpoints) % 2 != 0: raise Exception('Number of endpoints should be even') + + service_settings = self.__settings_handler.get_service_settings() + self.__config_rule_composer.configure(self.__service, service_settings) + for endpoint in endpoints: device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) device_settings = self.__settings_handler.get_device_settings(device_obj) - _device = self.__composer.get_device(device_obj.name) + self.__config_rule_composer.set_device_alias(device_obj.name, device_uuid) + _device = self.__config_rule_composer.get_device(device_obj.name) _device.configure(device_obj, device_settings) endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) + _device.set_endpoint_alias(endpoint_obj.name, endpoint_uuid) _endpoint = _device.get_endpoint(endpoint_obj.name) _endpoint.configure(endpoint_obj, endpoint_settings) - self.__endpoint_map[(device_uuid, endpoint_uuid)] = device_obj.name + self.__endpoint_map[(device_uuid, endpoint_uuid)] = (device_obj.name, endpoint_obj.name) + + LOGGER.debug('[pre] config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) + self.__static_route_generator.compose(endpoints) + LOGGER.debug('[post] config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) def _do_configurations( self, config_rules_per_device : Dict[str, List[Dict]], endpoints : List[Tuple[str, str, Optional[str]]], @@ -62,7 +77,7 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): results_per_device = dict() for device_name,json_config_rules in config_rules_per_device.items(): try: - device_obj = self.__composer.get_device(device_name).objekt + device_obj = self.__config_rule_composer.get_device(device_name).objekt if len(json_config_rules) == 0: continue del device_obj.device_config.config_rules[:] for json_config_rule in json_config_rules: @@ -78,7 +93,8 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): results = [] for endpoint in endpoints: device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) - device_name = self.__endpoint_map[(device_uuid, endpoint_uuid)] + device_name, _ = self.__endpoint_map[(device_uuid, endpoint_uuid)] + if device_name not in results_per_device: continue results.append(results_per_device[device_name]) return results @@ -88,12 +104,16 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): ) -> List[Union[bool, Exception]]: chk_type('endpoints', endpoints, list) if len(endpoints) == 0: return [] - service_uuid = self.__service.service_id.service_uuid.uuid - #settings = self.__settings_handler.get('/settings') - self._compose_config_rules(endpoints) - network_instance_name = service_uuid.split('-')[0] - config_rules_per_device = self.__composer.get_config_rules(network_instance_name, delete=False) - results = self._do_configurations(config_rules_per_device, endpoints) + #service_uuid = self.__service.service_id.service_uuid.uuid + connection = self.__task_executor.get_connection(ConnectionId(**json_connection_id(connection_uuid))) + connection_endpoint_ids = endpointids_to_raw(connection.path_hops_endpoint_ids) + self._compose_config_rules(connection_endpoint_ids) + #network_instance_name = service_uuid.split('-')[0] + #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=False) + config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=False) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) + results = self._do_configurations(config_rules_per_device, endpoints, delete=False) + LOGGER.debug('results={:s}'.format(str(results))) return results @metered_subclass_method(METRICS_POOL) @@ -102,12 +122,16 @@ class L3NMGnmiOpenConfigServiceHandler(_ServiceHandler): ) -> List[Union[bool, Exception]]: chk_type('endpoints', endpoints, list) if len(endpoints) == 0: return [] - service_uuid = self.__service.service_id.service_uuid.uuid - #settings = self.__settings_handler.get('/settings') - self._compose_config_rules(endpoints) - network_instance_name = service_uuid.split('-')[0] - config_rules_per_device = self.__composer.get_config_rules(network_instance_name, delete=True) + #service_uuid = self.__service.service_id.service_uuid.uuid + connection = self.__task_executor.get_connection(ConnectionId(**json_connection_id(connection_uuid))) + connection_endpoint_ids = endpointids_to_raw(connection.path_hops_endpoint_ids) + self._compose_config_rules(connection_endpoint_ids) + #network_instance_name = service_uuid.split('-')[0] + #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=True) + config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=True) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) results = self._do_configurations(config_rules_per_device, endpoints, delete=True) + LOGGER.debug('results={:s}'.format(str(results))) return results @metered_subclass_method(METRICS_POOL) diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py new file mode 100644 index 0000000000000000000000000000000000000000..cdc58049d8c22dbd0ed4b338aa5c0f0e61e9842e --- /dev/null +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/StaticRouteGenerator.py @@ -0,0 +1,215 @@ +# Copyright 2022-2024 ETSI 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. + +import json, logging, netaddr, sys +from typing import List, Optional, Tuple +from .ConfigRuleComposer import ConfigRuleComposer + +LOGGER = logging.getLogger(__name__) + +# Used to infer routing networks for adjacent ports when there is no hint in device/endpoint settings +ROOT_NEIGHBOR_ROUTING_NETWORK = netaddr.IPNetwork('10.254.254.0/16') +NEIGHBOR_ROUTING_NETWORKS_PREFIX_LEN = 30 +NEIGHBOR_ROUTING_NETWORKS = set(ROOT_NEIGHBOR_ROUTING_NETWORK.subnet(NEIGHBOR_ROUTING_NETWORKS_PREFIX_LEN)) + +def _generate_neighbor_addresses() -> Tuple[netaddr.IPAddress, netaddr.IPAddress, int]: + ip_network = NEIGHBOR_ROUTING_NETWORKS.pop() + ip_addresses = list(ip_network.iter_hosts()) + ip_addresses.append(NEIGHBOR_ROUTING_NETWORKS_PREFIX_LEN) + return ip_addresses + +def _compute_gateway(ip_network : netaddr.IPNetwork, gateway_host=1) -> netaddr.IPAddress: + return netaddr.IPAddress(ip_network.cidr.first + gateway_host) + +def _compose_ipv4_network(ipv4_network, ipv4_prefix_len) -> netaddr.IPNetwork: + return netaddr.IPNetwork('{:s}/{:d}'.format(str(ipv4_network), int(ipv4_prefix_len))) + +class StaticRouteGenerator: + def __init__(self, config_rule_composer : ConfigRuleComposer) -> None: + self._config_rule_composer = config_rule_composer + + def compose(self, connection_hop_list : List[Tuple[str, str, Optional[str]]]) -> None: + link_endpoints = self._compute_link_endpoints(connection_hop_list) + LOGGER.debug('link_endpoints = {:s}'.format(str(link_endpoints))) + + self._compute_link_addresses(link_endpoints) + LOGGER.debug('config_rule_composer = {:s}'.format(json.dumps(self._config_rule_composer.dump()))) + + self._discover_connected_networks(connection_hop_list) + LOGGER.debug('config_rule_composer = {:s}'.format(json.dumps(self._config_rule_composer.dump()))) + + # Compute and propagate static routes forward (service_endpoint_a => service_endpoint_b) + self._compute_static_routes(link_endpoints) + + # Compute and propagate static routes backward (service_endpoint_b => service_endpoint_a) + reversed_endpoints = list(reversed(connection_hop_list)) + reversed_link_endpoints = self._compute_link_endpoints(reversed_endpoints) + LOGGER.debug('reversed_link_endpoints = {:s}'.format(str(reversed_link_endpoints))) + self._compute_static_routes(reversed_link_endpoints) + + LOGGER.debug('config_rule_composer = {:s}'.format(json.dumps(self._config_rule_composer.dump()))) + + def _compute_link_endpoints( + self, connection_hop_list : List[Tuple[str, str, Optional[str]]] + ) -> List[Tuple[Tuple[str, str, Optional[str]], Tuple[str, str, Optional[str]]]]: + # In some cases connection_hop_list might contain repeated endpoints, remove them here. + added_connection_hops = set() + filtered_connection_hop_list = list() + for connection_hop in connection_hop_list: + if connection_hop in added_connection_hops: continue + filtered_connection_hop_list.append(connection_hop) + added_connection_hops.add(connection_hop) + connection_hop_list = filtered_connection_hop_list + + # In some cases connection_hop_list first and last items might be internal endpoints of + # devices instead of link endpoints. Filter those endpoints not reaching a new device. + if len(connection_hop_list) > 2 and connection_hop_list[0][0] == connection_hop_list[1][0]: + # same device on first 2 endpoints + connection_hop_list = connection_hop_list[1:] + if len(connection_hop_list) > 2 and connection_hop_list[-1][0] == connection_hop_list[-2][0]: + # same device on last 2 endpoints + connection_hop_list = connection_hop_list[:-1] + + num_connection_hops = len(connection_hop_list) + if num_connection_hops % 2 != 0: raise Exception('Number of connection hops must be even') + if num_connection_hops < 4: raise Exception('Number of connection hops must be >= 4') + + it_connection_hops = iter(connection_hop_list) + return list(zip(it_connection_hops, it_connection_hops)) + + def _compute_link_addresses( + self, link_endpoints_list : List[Tuple[Tuple[str, str, Optional[str]], Tuple[str, str, Optional[str]]]] + ) -> None: + for link_endpoints in link_endpoints_list: + device_endpoint_a, device_endpoint_b = link_endpoints + + device_uuid_a, endpoint_uuid_a = device_endpoint_a[0:2] + endpoint_a = self._config_rule_composer.get_device(device_uuid_a).get_endpoint(endpoint_uuid_a) + + device_uuid_b, endpoint_uuid_b = device_endpoint_b[0:2] + endpoint_b = self._config_rule_composer.get_device(device_uuid_b).get_endpoint(endpoint_uuid_b) + + if endpoint_a.ipv4_address is None and endpoint_b.ipv4_address is None: + ip_endpoint_a, ip_endpoint_b, prefix_len = _generate_neighbor_addresses() + endpoint_a.ipv4_address = str(ip_endpoint_a) + endpoint_a.ipv4_prefix_len = prefix_len + endpoint_b.ipv4_address = str(ip_endpoint_b) + endpoint_b.ipv4_prefix_len = prefix_len + elif endpoint_a.ipv4_address is not None and endpoint_b.ipv4_address is None: + prefix_len = endpoint_a.ipv4_prefix_len + ip_network_a = _compose_ipv4_network(endpoint_a.ipv4_address, prefix_len) + if prefix_len > 30: + MSG = 'Unsupported prefix_len for {:s}: {:s}' + raise Exception(MSG.format(str(endpoint_a), str(prefix_len))) + ip_endpoint_b = _compute_gateway(ip_network_a, gateway_host=1) + if ip_endpoint_b == ip_network_a.ip: + ip_endpoint_b = _compute_gateway(ip_network_a, gateway_host=2) + endpoint_b.ipv4_address = str(ip_endpoint_b) + endpoint_b.ipv4_prefix_len = prefix_len + elif endpoint_a.ipv4_address is None and endpoint_b.ipv4_address is not None: + prefix_len = endpoint_b.ipv4_prefix_len + ip_network_b = _compose_ipv4_network(endpoint_b.ipv4_address, prefix_len) + if prefix_len > 30: + MSG = 'Unsupported prefix_len for {:s}: {:s}' + raise Exception(MSG.format(str(endpoint_b), str(prefix_len))) + ip_endpoint_a = _compute_gateway(ip_network_b, gateway_host=1) + if ip_endpoint_a == ip_network_b.ip: + ip_endpoint_a = _compute_gateway(ip_network_b, gateway_host=2) + endpoint_a.ipv4_address = str(ip_endpoint_a) + endpoint_a.ipv4_prefix_len = prefix_len + elif endpoint_a.ipv4_address is not None and endpoint_b.ipv4_address is not None: + ip_network_a = _compose_ipv4_network(endpoint_a.ipv4_address, endpoint_a.ipv4_prefix_len) + ip_network_b = _compose_ipv4_network(endpoint_b.ipv4_address, endpoint_b.ipv4_prefix_len) + if ip_network_a.cidr != ip_network_b.cidr: + MSG = 'Incompatible CIDRs: endpoint_a({:s})=>{:s} endpoint_b({:s})=>{:s}' + raise Exception(MSG.format(str(endpoint_a), str(ip_network_a), str(endpoint_b), str(ip_network_b))) + if ip_network_a.ip == ip_network_b.ip: + MSG = 'Duplicated IP: endpoint_a({:s})=>{:s} endpoint_b({:s})=>{:s}' + raise Exception(MSG.format(str(endpoint_a), str(ip_network_a), str(endpoint_b), str(ip_network_b))) + + def _discover_connected_networks(self, connection_hop_list : List[Tuple[str, str, Optional[str]]]) -> None: + for connection_hop in connection_hop_list: + device_uuid, endpoint_uuid = connection_hop[0:2] + device = self._config_rule_composer.get_device(device_uuid) + endpoint = device.get_endpoint(endpoint_uuid) + + if endpoint.ipv4_address is None: continue + ip_network = _compose_ipv4_network(endpoint.ipv4_address, endpoint.ipv4_prefix_len) + + if '0.0.0.0/' in str(ip_network.cidr): continue + device.connected.add(str(ip_network.cidr)) + + def _compute_static_routes( + self, link_endpoints_list : List[Tuple[Tuple[str, str, Optional[str]], Tuple[str, str, Optional[str]]]] + ) -> None: + for link_endpoints in link_endpoints_list: + device_endpoint_a, device_endpoint_b = link_endpoints + + device_uuid_a, endpoint_uuid_a = device_endpoint_a[0:2] + device_a = self._config_rule_composer.get_device(device_uuid_a) + endpoint_a = device_a.get_endpoint(endpoint_uuid_a) + + device_uuid_b, endpoint_uuid_b = device_endpoint_b[0:2] + device_b = self._config_rule_composer.get_device(device_uuid_b) + endpoint_b = device_b.get_endpoint(endpoint_uuid_b) + + # Compute static routes from networks connected in device_a + for ip_network_a in device_a.connected: + if ip_network_a in device_b.connected: continue + if ip_network_a in device_b.static_routes: continue + if ip_network_a in ROOT_NEIGHBOR_ROUTING_NETWORK: continue + endpoint_a_ip_network = _compose_ipv4_network(endpoint_a.ipv4_address, endpoint_a.ipv4_prefix_len) + next_hop = str(endpoint_a_ip_network.ip) + metric = 1 + device_b.static_routes.setdefault(ip_network_a, dict())[metric] = next_hop + + # Compute static routes from networks connected in device_b + for ip_network_b in device_b.connected: + if ip_network_b in device_a.connected: continue + if ip_network_b in device_a.static_routes: continue + if ip_network_b in ROOT_NEIGHBOR_ROUTING_NETWORK: continue + endpoint_b_ip_network = _compose_ipv4_network(endpoint_b.ipv4_address, endpoint_b.ipv4_prefix_len) + next_hop = str(endpoint_b_ip_network.ip) + metric = 1 + device_a.static_routes.setdefault(ip_network_b, dict())[metric] = next_hop + + # Propagate static routes from networks connected in device_a + for ip_network_a, metric_next_hop in device_a.static_routes.items(): + if ip_network_a in device_b.connected: continue + if ip_network_a in ROOT_NEIGHBOR_ROUTING_NETWORK: continue + endpoint_a_ip_network = _compose_ipv4_network(endpoint_a.ipv4_address, endpoint_a.ipv4_prefix_len) + if ip_network_a in device_b.static_routes: + current_metric = min(device_b.static_routes[ip_network_a].keys()) + else: + current_metric = int(sys.float_info.max) + for metric, next_hop in metric_next_hop.items(): + new_metric = metric + 1 + if new_metric >= current_metric: continue + next_hop_a = str(endpoint_a_ip_network.ip) + device_b.static_routes.setdefault(ip_network_a, dict())[metric] = next_hop_a + + # Propagate static routes from networks connected in device_b + for ip_network_b in device_b.static_routes.keys(): + if ip_network_b in device_a.connected: continue + if ip_network_b in ROOT_NEIGHBOR_ROUTING_NETWORK: continue + endpoint_b_ip_network = _compose_ipv4_network(endpoint_b.ipv4_address, endpoint_b.ipv4_prefix_len) + if ip_network_b in device_a.static_routes: + current_metric = min(device_a.static_routes[ip_network_b].keys()) + else: + current_metric = int(sys.float_info.max) + for metric, next_hop in metric_next_hop.items(): + new_metric = metric + 1 + if new_metric >= current_metric: continue + next_hop_b = str(endpoint_b_ip_network.ip) + device_a.static_routes.setdefault(ip_network_b, dict())[metric] = next_hop_b diff --git a/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py b/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py +++ b/src/service/service/service_handlers/l3nm_gnmi_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py b/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py index 35d396f4f8abcfb0bba617ecd302362a257f97fa..c33b2918770bde7236a5dc08f727425fa1342e9c 100644 --- a/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py +++ b/src/service/service/service_handlers/l3nm_ietf_actn/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py b/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py index bf447464555469f558a8408ba8c7788936233434..40726f9fc48910d1ef6be49572b56f53d0155f25 100644 --- a/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_ietf_actn/L3NMIetfActnServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py b/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py +++ b/src/service/service/service_handlers/l3nm_ietf_actn/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py index 7527932877f47a092a35f286defb3744e05db109..37f8256b1b294724ee017e925c8879777c56008d 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py index 5fa1d0b5b6931902b4ac50847c90bf67738032ba..28b20b05f33b262b82385fc0e2a6984b1d801b9f 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules_test_ocnos.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py index 2c944bfe4772b2f55ff16d1a3c726af3ee4c6e8f..012cd33ab21e32001522b9e4e23e341b4b0bf37a 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/l3nm_openconfig/__init__.py b/src/service/service/service_handlers/l3nm_openconfig/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/__init__.py +++ b/src/service/service/service_handlers/l3nm_openconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py index 340e64b5c3d0a1b1f2c1ce17fbaac2366605f21e..a07964a548e207a853aaf9bfcb177f0aa889418d 100644 --- a/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py +++ b/src/service/service/service_handlers/microwave/MicrowaveServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/microwave/__init__.py b/src/service/service/service_handlers/microwave/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/microwave/__init__.py +++ b/src/service/service/service_handlers/microwave/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/oc/ConfigRules.py b/src/service/service/service_handlers/oc/ConfigRules.py deleted file mode 100644 index 44245705ecdb48d33c9152328a352d736cc3dd27..0000000000000000000000000000000000000000 --- a/src/service/service/service_handlers/oc/ConfigRules.py +++ /dev/null @@ -1,255 +0,0 @@ -# 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. - -from typing import Dict, List -from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set -from service.service.service_handler_api.AnyTreeTools import TreeNode - -def setup_config_rules( - service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, - service_settings : TreeNode, endpoint_settings : TreeNode -) -> List[Dict]: - - if service_settings is None: return [] - if endpoint_settings is None: return [] - - json_settings : Dict = service_settings.value - json_endpoint_settings : Dict = endpoint_settings.value - - service_short_uuid = service_uuid.split('-')[-1] - network_instance_name = '{:s}-NetInst'.format(service_short_uuid) - network_interface_desc = '{:s}-NetIf'.format(service_uuid) - network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) - - mtu = json_settings.get('mtu', 1450 ) # 1512 - #address_families = json_settings.get('address_families', [] ) # ['IPV4'] - bgp_as = json_settings.get('bgp_as', 0 ) # 65000 - bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 - - #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' - route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' - sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 - vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 - address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' - address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 - if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) - - json_config_rules = [ - json_config_rule_set( - '/network_instance[{:s}]'.format(network_instance_name), { - 'name': network_instance_name, 'description': network_interface_desc, 'type': 'L3VRF', - 'route_distinguisher': route_distinguisher, - #'router_id': router_id, 'address_families': address_families, - }), - json_config_rule_set( - '/interface[{:s}]'.format(endpoint_name), { - 'name': endpoint_name, 'description': network_interface_desc, 'mtu': mtu, - }), - json_config_rule_set( - '/interface[{:s}]/subinterface[{:d}]'.format(endpoint_name, sub_interface_index), { - 'name': endpoint_name, 'index': sub_interface_index, - 'description': network_subinterface_desc, 'vlan_id': vlan_id, - 'address_ip': address_ip, 'address_prefix': address_prefix, - }), - json_config_rule_set( - '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { - 'name': network_instance_name, 'id': if_subif_name, 'interface': endpoint_name, - 'subinterface': sub_interface_index, - }), - json_config_rule_set( - '/network_instance[{:s}]/protocols[BGP]'.format(network_instance_name), { - 'name': network_instance_name, 'identifier': 'BGP', 'protocol_name': 'BGP', 'as': bgp_as, - }), - json_config_rule_set( - '/network_instance[{:s}]/table_connections[STATIC][BGP][IPV4]'.format(network_instance_name), { - 'name': network_instance_name, 'src_protocol': 'STATIC', 'dst_protocol': 'BGP', - 'address_family': 'IPV4', #'default_import_policy': 'REJECT_ROUTE', - }), - json_config_rule_set( - '/network_instance[{:s}]/table_connections[DIRECTLY_CONNECTED][BGP][IPV4]'.format( - network_instance_name), { - 'name': network_instance_name, 'src_protocol': 'DIRECTLY_CONNECTED', 'dst_protocol': 'BGP', - 'address_family': 'IPV4', #'default_import_policy': 'REJECT_ROUTE', - }), - json_config_rule_set( - '/routing_policy/bgp_defined_set[{:s}_rt_import]'.format(network_instance_name), { - 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), - }), - json_config_rule_set( - '/routing_policy/bgp_defined_set[{:s}_rt_import][route-target:{:s}]'.format( - network_instance_name, bgp_route_target), { - 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), - 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), - }), - json_config_rule_set( - '/routing_policy/policy_definition[{:s}_import]'.format(network_instance_name), { - 'policy_name': '{:s}_import'.format(network_instance_name), - }), - json_config_rule_set( - '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format( - network_instance_name, '3'), { - 'policy_name': '{:s}_import'.format(network_instance_name), 'statement_name': '3', - 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), - 'match_set_options': 'ANY', 'policy_result': 'ACCEPT_ROUTE', - }), - json_config_rule_set( - # pylint: disable=duplicate-string-formatting-argument - '/network_instance[{:s}]/inter_instance_policies[{:s}_import]'.format( - network_instance_name, network_instance_name), { - 'name': network_instance_name, 'import_policy': '{:s}_import'.format(network_instance_name), - }), - json_config_rule_set( - '/routing_policy/bgp_defined_set[{:s}_rt_export]'.format(network_instance_name), { - 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), - }), - json_config_rule_set( - '/routing_policy/bgp_defined_set[{:s}_rt_export][route-target:{:s}]'.format( - network_instance_name, bgp_route_target), { - 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), - 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), - }), - json_config_rule_set( - '/routing_policy/policy_definition[{:s}_export]'.format(network_instance_name), { - 'policy_name': '{:s}_export'.format(network_instance_name), - }), - json_config_rule_set( - '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format( - network_instance_name, '3'), { - 'policy_name': '{:s}_export'.format(network_instance_name), 'statement_name': '3', - 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), - 'match_set_options': 'ANY', 'policy_result': 'ACCEPT_ROUTE', - }), - json_config_rule_set( - # pylint: disable=duplicate-string-formatting-argument - '/network_instance[{:s}]/inter_instance_policies[{:s}_export]'.format( - network_instance_name, network_instance_name), { - 'name': network_instance_name, 'export_policy': '{:s}_export'.format(network_instance_name), - }), - ] - - return json_config_rules - -def teardown_config_rules( - service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str, - service_settings : TreeNode, endpoint_settings : TreeNode -) -> List[Dict]: - - if service_settings is None: return [] - if endpoint_settings is None: return [] - - json_settings : Dict = service_settings.value - json_endpoint_settings : Dict = endpoint_settings.value - - #mtu = json_settings.get('mtu', 1450 ) # 1512 - #address_families = json_settings.get('address_families', [] ) # ['IPV4'] - #bgp_as = json_settings.get('bgp_as', 0 ) # 65000 - bgp_route_target = json_settings.get('bgp_route_target', '0:0') # 65000:333 - - #router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' - #route_distinguisher = json_endpoint_settings.get('route_distinguisher', '0:0' ) # '60001:801' - sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 - vlan_id = json_endpoint_settings.get('vlan_id', 1 ) # 400 - #address_ip = json_endpoint_settings.get('address_ip', '0.0.0.0') # '2.2.2.1' - #address_prefix = json_endpoint_settings.get('address_prefix', 24 ) # 30 - - if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) - service_short_uuid = service_uuid.split('-')[-1] - network_instance_name = '{:s}-NetInst'.format(service_short_uuid) - #network_interface_desc = '{:s}-NetIf'.format(service_uuid) - #network_subinterface_desc = '{:s}-NetSubIf'.format(service_uuid) - - json_config_rules = [ - json_config_rule_delete( - '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { - 'name': network_instance_name, 'id': if_subif_name, - }), - json_config_rule_delete( - '/interface[{:s}]/subinterface[{:d}]'.format(endpoint_name, sub_interface_index), { - 'name': endpoint_name, 'index': sub_interface_index, - }), - json_config_rule_delete( - '/interface[{:s}]'.format(endpoint_name), { - 'name': endpoint_name, - }), - json_config_rule_delete( - '/network_instance[{:s}]/table_connections[DIRECTLY_CONNECTED][BGP][IPV4]'.format( - network_instance_name), { - 'name': network_instance_name, 'src_protocol': 'DIRECTLY_CONNECTED', 'dst_protocol': 'BGP', - 'address_family': 'IPV4', - }), - json_config_rule_delete( - '/network_instance[{:s}]/table_connections[STATIC][BGP][IPV4]'.format(network_instance_name), { - 'name': network_instance_name, 'src_protocol': 'STATIC', 'dst_protocol': 'BGP', - 'address_family': 'IPV4', - }), - json_config_rule_delete( - '/network_instance[{:s}]/protocols[BGP]'.format(network_instance_name), { - 'name': network_instance_name, 'identifier': 'BGP', 'protocol_name': 'BGP', - }), - json_config_rule_delete( - # pylint: disable=duplicate-string-formatting-argument - '/network_instance[{:s}]/inter_instance_policies[{:s}_import]'.format( - network_instance_name, network_instance_name), { - 'name': network_instance_name, - }), - json_config_rule_delete( - '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format( - network_instance_name, '3'), { - 'policy_name': '{:s}_import'.format(network_instance_name), 'statement_name': '3', - }), - json_config_rule_delete( - '/routing_policy/policy_definition[{:s}_import]'.format(network_instance_name), { - 'policy_name': '{:s}_import'.format(network_instance_name), - }), - json_config_rule_delete( - '/routing_policy/bgp_defined_set[{:s}_rt_import][route-target:{:s}]'.format( - network_instance_name, bgp_route_target), { - 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), - 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), - }), - json_config_rule_delete( - '/routing_policy/bgp_defined_set[{:s}_rt_import]'.format(network_instance_name), { - 'ext_community_set_name': '{:s}_rt_import'.format(network_instance_name), - }), - json_config_rule_delete( - # pylint: disable=duplicate-string-formatting-argument - '/network_instance[{:s}]/inter_instance_policies[{:s}_export]'.format( - network_instance_name, network_instance_name), { - 'name': network_instance_name, - }), - json_config_rule_delete( - '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format( - network_instance_name, '3'), { - 'policy_name': '{:s}_export'.format(network_instance_name), 'statement_name': '3', - }), - json_config_rule_delete( - '/routing_policy/policy_definition[{:s}_export]'.format(network_instance_name), { - 'policy_name': '{:s}_export'.format(network_instance_name), - }), - json_config_rule_delete( - '/routing_policy/bgp_defined_set[{:s}_rt_export][route-target:{:s}]'.format( - network_instance_name, bgp_route_target), { - 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), - 'ext_community_member' : 'route-target:{:s}'.format(bgp_route_target), - }), - json_config_rule_delete( - '/routing_policy/bgp_defined_set[{:s}_rt_export]'.format(network_instance_name), { - 'ext_community_set_name': '{:s}_rt_export'.format(network_instance_name), - }), - json_config_rule_delete( - '/network_instance[{:s}]'.format(network_instance_name), { - 'name': network_instance_name - }), - ] - return json_config_rules diff --git a/src/service/service/service_handlers/oc/OCServiceHandler.py b/src/service/service/service_handlers/oc/OCServiceHandler.py index 73ff3b89dea808d7a857cd52d5b4d4e581d218cc..462685c3d1e40dd7af9a2f5dc297a2ae06d02588 100644 --- a/src/service/service/service_handlers/oc/OCServiceHandler.py +++ b/src/service/service/service_handlers/oc/OCServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -15,15 +15,18 @@ import json, logging from typing import Any, List, Optional, Tuple, Union from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method -from common.proto.context_pb2 import ConfigRule, DeviceId, Service +from common.proto.context_pb2 import DeviceId, Service from common.tools.object_factory.Device import json_device_id from common.type_checkers.Checkers import chk_type -from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from common.DeviceTypes import DeviceTypeEnum +from service.service.service_handler_api.Tools import get_endpoint_matching from service.service.service_handler_api._ServiceHandler import _ServiceHandler from service.service.service_handler_api.SettingsHandler import SettingsHandler from service.service.task_scheduler.TaskExecutor import TaskExecutor -from .ConfigRules import setup_config_rules, teardown_config_rules -from .OCTools import convert_endpoints_to_flows, handle_flows_names +from .OCTools import ( + convert_endpoints_to_flows, endpoints_to_flows, + #handle_flows_names, check_media_channel_existance +) LOGGER = logging.getLogger(__name__) @@ -47,70 +50,92 @@ class OCServiceHandler(_ServiceHandler): is_opticalband =False #service_uuid = self.__service.service_id.service_uuid.uuid settings=None + if self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)): is_opticalband=True settings = self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)) else: settings = self.__settings_handler.get('/settings') - + bidir = settings.value.get("bidir") + LOGGER.debug(f"Bidir bvalue is: {bidir}") # settings = self.__settings_handler.get('/settings') #flow is the new variable that stores input-output relationship - flows = convert_endpoints_to_flows(endpoints) + LOGGER.info(f"endpoints {endpoints} is_opticalband {is_opticalband} ") + #flows = endpoints_to_flows(endpoints, bidir, is_opticalband) #handled_flows=handle_flows_names(flows=flows,task_executor=self.__task_executor) - - #LOGGER.info("Handled Flows %s",handled_flows) - + results = [] + LOGGER.info(f"flows {flows} ") + LOGGER.info(f"settings {settings} ") + #new cycle for setting optical devices - for device_uuid in flows.keys(): + for device_uuid, dev_flows in flows.items(): try: - dev_flows = flows[device_uuid] device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) - - - if (settings): - + LOGGER.info(f"device {device_obj.name} ") + if settings: self.__task_executor.configure_optical_device(device_obj, settings, dev_flows, is_opticalband) results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to configure Device({:s})'.format(str(device_uuid))) results.append(e) - + return results @metered_subclass_method(METRICS_POOL) def DeleteEndpoint( self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None ) -> List[Union[bool, Exception]]: + is_opticalband =False + flows = convert_endpoints_to_flows(endpoints) + chk_type('endpoints', endpoints, list) if len(endpoints) == 0: return [] - service_uuid = self.__service.service_id.service_uuid.uuid - settings = self.__settings_handler.get('/settings') + if self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)): + is_opticalband =True + settings = self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)) + else: + settings = self.__settings_handler.get('/settings') results = [] - for endpoint in endpoints: + for device_uuid, dev_flows in flows.items(): try: - device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) - + channel_indexes= [] device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) - endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) - endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) - endpoint_name = endpoint_obj.name - - json_config_rules = teardown_config_rules( - service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, - settings, endpoint_settings) - - if len(json_config_rules) > 0: - del device_obj.device_config.config_rules[:] - for json_config_rule in json_config_rules: - device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) - self.__task_executor.configure_device(device_obj) + if (device_obj.device_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_): + for endpoint in dev_flows: + src , dst = endpoint + src_enpoint_name='0' + dist_enpoint_name='0' + if src !="0": + src_endponit_obj =get_endpoint_matching(device_obj, src) + src_enpoint_name=src_endponit_obj.name + if dst !="0": + dst_endpoint_obj = get_endpoint_matching(device_obj, dst) + dist_enpoint_name=dst_endpoint_obj.name + channel_indexes.append((src_enpoint_name,dist_enpoint_name)) + else: + if not is_opticalband: + if 'flow_id' in settings.value: + channel_indexes.append(settings.value["flow_id"]) + elif is_opticalband: + if "ob_id" in settings.value: + channel_indexes.append(settings.value["ob_id"]) + + if len(channel_indexes) > 0: + errors = self.__task_executor.deconfigure_optical_device( + device=device_obj, channel_indexes=channel_indexes, + is_opticalband=is_opticalband, dev_flow=dev_flows + ) + # if (len(errors)==0): + # service_id =self.__service.service_id + # if not is_opticalband : + # self.__task_executor.delete_setting(service_id,"/settings","value") results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) @@ -157,13 +182,21 @@ class OCServiceHandler(_ServiceHandler): def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: chk_type('resources', resources, list) if len(resources) == 0: return [] + service_id = self.__service.service_id results = [] for resource in resources: try: self.__settings_handler.delete(resource[0]) + # self.__task_executor.delete_setting(service_id,"/settings","value") except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) results.append(e) return results + + def check_media_channel(self,connection_uuid): + if self.__settings_handler.get('/settings-ob_{}'.format(connection_uuid)): + return False + else: + return True diff --git a/src/service/service/service_handlers/oc/OCTools.py b/src/service/service/service_handlers/oc/OCTools.py index 7b6c344ede5512f32098fd019076ae57fe87028e..7dd662963cd0f6a8109d58b444cd6b5b5487343a 100644 --- a/src/service/service/service_handlers/oc/OCTools.py +++ b/src/service/service/service_handlers/oc/OCTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching -from typing import Dict, Any, List, Optional, Tuple -import logging -from common.proto.context_pb2 import ConfigRule, DeviceId, Service +import logging, json +from typing import Dict, List, Optional, Tuple +from common.proto.context_pb2 import DeviceId, Service from common.tools.object_factory.Device import json_device_id +from service.service.service_handler_api.Tools import get_endpoint_matching log = logging.getLogger(__name__) @@ -116,27 +116,227 @@ def convert_endpoints_to_flows(endpoints : List[Tuple[str, str, Optional[str]]]) return entries -def get_device_endpint_name (endpoint_uuid:str,device_uuid:str,task_executor)->Tuple: +def ob_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): + entries = {} + end = len(endpoints) + i = 0 + if bidir: + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + entry_tuple = "0", endpoint_uuid + entries[device_uuid].append(entry_tuple) + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + if next_device_uuid not in entries.keys(): + entries[next_device_uuid] = [] + entry_tuple = next_endpoint_uuid, "0" + entries[next_device_uuid].append(entry_tuple) + else: + log.info("error expected device_id {}, found {}".format(device_uuid, next_device_uuid)) + return {} + i = i + 2 + if end > 4: + + while(i < end-2): + #i + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + log.debug("current OCTools step {}, {}, {}".format(i, device_uuid, endpoint_uuid)) + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + #i+1 + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = endpoint_uuid, next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + else: + log.debug("ERROR in bidirectional ob") + log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) + return {} + #i+2 + next_2_endpoint = endpoints[i+2] + next_2_device_uuid, next_2_endpoint_uuid = next_2_endpoint[0:2] + #i+3 + next_3_endpoint = endpoints[i+3] + next_3_device_uuid, next_3_endpoint_uuid = next_3_endpoint[0:2] + if next_2_device_uuid == next_3_device_uuid and next_3_device_uuid == device_uuid: + entry_tuple = next_2_endpoint_uuid, next_3_endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 4 + else: + log.debug("ERROR in bidirection ob") + return {} + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + entry_tuple = endpoint_uuid, "0", + entries[device_uuid].append(entry_tuple) + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + if next_device_uuid not in entries.keys(): + entries[next_device_uuid] = [] + entry_tuple = "0", next_endpoint_uuid + entries[next_device_uuid].append(entry_tuple) + else: + log.debug("error expected device_id {}, found {}".format(device_uuid, next_device_uuid)) + else: + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + entry_tuple = "0", endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 1 + if end > 2: + + while(i < end-1): + #i + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + #i+1 + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = endpoint_uuid, next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + else: + log.debug("ERROR in bidirectional ob") + log.debug("{}, {}, {}".format(i, next_device_uuid, device_uuid)) + return {} + i = i + 2 + next_endpoint = endpoints[i] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid not in entries.keys(): + entries[next_device_uuid] = [] + entry_tuple = next_endpoint_uuid, "0" + entries[next_device_uuid].append(entry_tuple) + return entries + + +def conn_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int): + entries = {} + end = len(endpoints) + i = 0 + #tx tp + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + entry_tuple = "0", endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 1 + #if bidir reading 4 endpoints per node + if bidir: + i = i + 1 + while(i < end-2): + #i + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + #i+1 + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = endpoint_uuid, next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + else: + + return {} + #i+2 + + next_2_endpoint = endpoints[i+2] + next_2_device_uuid, next_2_endpoint_uuid = next_2_endpoint[0:2] + #i+3 + next_3_endpoint = endpoints[i+3] + next_3_device_uuid, next_3_endpoint_uuid = next_3_endpoint[0:2] + if next_2_device_uuid == next_3_device_uuid and next_3_device_uuid == device_uuid: + entry_tuple = next_2_endpoint_uuid, next_3_endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 4 + else: + + return {} + else: + while(i < end-1): + #i + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + #i+1 + next_endpoint = endpoints[i+1] + next_device_uuid, next_endpoint_uuid = next_endpoint[0:2] + if next_device_uuid == device_uuid: + entry_tuple = endpoint_uuid, next_endpoint_uuid + entries[device_uuid].append(entry_tuple) + i = i + 2 + else: + return {} + #rx tp + endpoint = endpoints[i] + device_uuid, endpoint_uuid = endpoint[0:2] + if device_uuid not in entries.keys(): + entries[device_uuid] = [] + entry_tuple = endpoint_uuid, "0", + entries[device_uuid].append(entry_tuple) + return entries + +def endpoints_to_flows(endpoints : List[Tuple[str, str, Optional[str]]], bidir : int, is_ob: bool)->Dict: + if is_ob: + entries = ob_flows(endpoints, bidir) + else: + entries = conn_flows(endpoints, bidir) + return entries + +def get_device_endpint_name(endpoint_uuid : str, device_uuid : str, task_executor) -> Tuple: device_obj = task_executor.get_device(DeviceId(**json_device_id(device_uuid))) endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) endpoint_name = endpoint_obj.name return (device_obj.name, endpoint_name) -def handle_flows_names (task_executor,flows:dict)->Dict : - new_flows={} - for index,( device_uuid_key , device_endpoints_list) in enumerate(flows.items()): +def handle_flows_names(task_executor, flows : dict) -> Dict: + new_flows = {} + for index, (device_uuid_key, device_endpoints_list) in enumerate(flows.items()): for endpoint_tupple in device_endpoints_list: - source_port=None - destination_port=None - device_name="" - source_endpoint,destination_endpoint =endpoint_tupple - if (source_endpoint !='0'): - if get_device_endpint_name(source_endpoint,device_uuid_key,task_executor) is not None: - device_name,source_port=get_device_endpint_name(source_endpoint,device_uuid_key,task_executor) - if (destination_endpoint !='0'): - if get_device_endpint_name(destination_endpoint,device_uuid_key,task_executor) is not None: - device_name,destination_port=get_device_endpint_name(destination_endpoint,device_uuid_key,task_executor) - if (device_name not in new_flows): - new_flows[device_name]=[] - new_flows[device_name].append((source_port,destination_port)) + source_port = None + destination_port = None + device_name = "" + source_endpoint, destination_endpoint = endpoint_tupple + if source_endpoint != '0': + if get_device_endpint_name(source_endpoint, device_uuid_key, task_executor) is not None: + device_name, source_port = get_device_endpint_name( + source_endpoint, device_uuid_key, task_executor + ) + if destination_endpoint != '0': + if get_device_endpint_name(destination_endpoint, device_uuid_key, task_executor) is not None: + device_name, destination_port = get_device_endpint_name( + destination_endpoint, device_uuid_key, task_executor + ) + if device_name not in new_flows: + new_flows[device_name] = [] + new_flows[device_name].append((source_port, destination_port)) return new_flows + +def check_media_channel_existance(service : Service): + has_media_channel = False + for config_rule in service.service_config.config_rules: + if isinstance(config_rule.custom.resource_value, str): + settings = json.dumps(config_rule.custom.resource_value) + if "flow_id" in settings: + has_media_channel = True + return has_media_channel diff --git a/src/service/service/service_handlers/oc/__init__.py b/src/service/service/service_handlers/oc/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/oc/__init__.py +++ b/src/service/service/service_handlers/oc/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/p4/__init__.py b/src/service/service/service_handlers/p4/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/service/service/service_handlers/p4/__init__.py +++ b/src/service/service/service_handlers/p4/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/p4/p4_service_handler.py b/src/service/service/service_handlers/p4/p4_service_handler.py index 9347f2058f39b5f615ac409acb10f4cf90595171..49bedbb22f0c9ea18cf3e3b2c8444bd1c956f4ff 100644 --- a/src/service/service/service_handlers/p4/p4_service_handler.py +++ b/src/service/service/service_handlers/p4/p4_service_handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/qkd/__init__.py b/src/service/service/service_handlers/qkd/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/qkd/__init__.py +++ b/src/service/service/service_handlers/qkd/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/qkd/qkd_service_handler.py b/src/service/service/service_handlers/qkd/qkd_service_handler.py index 2bfbcb59dd045d10b9267dc15119e1d17e1929d4..8d9e8d63068467639907efc293e244904341f57b 100644 --- a/src/service/service/service_handlers/qkd/qkd_service_handler.py +++ b/src/service/service/service_handlers/qkd/qkd_service_handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py index 8c2739ebc810dac97af5a8bd49f82a13d57ae098..e6f3129a81ff923f7a1c4121cdd5d4c010ae1b55 100644 --- a/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py +++ b/src/service/service/service_handlers/tapi_tapi/TapiServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/tapi_tapi/__init__.py b/src/service/service/service_handlers/tapi_tapi/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/tapi_tapi/__init__.py +++ b/src/service/service/service_handlers/tapi_tapi/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py b/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py index 343033c3900fed198a99ce0d0a4dad439ca937d8..6bcd6b44bcc83c8ae8f23529c37ddb4e9033130c 100644 --- a/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py +++ b/src/service/service/service_handlers/tapi_xr/TapiXrServiceHandler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/service_handlers/tapi_xr/__init__.py b/src/service/service/service_handlers/tapi_xr/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/service_handlers/tapi_xr/__init__.py +++ b/src/service/service/service_handlers/tapi_xr/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/task_scheduler/ConnectionExpander.py b/src/service/service/task_scheduler/ConnectionExpander.py index 332007233e16aeab3c3493be4263f57b7cee9073..da3d984726e2a5dabc88f3fdb1e9d86c25cde7dc 100644 --- a/src/service/service/task_scheduler/ConnectionExpander.py +++ b/src/service/service/task_scheduler/ConnectionExpander.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 67f6a516c9bc3031b5cdd2aed80cd6fdd7e1c9c2..6fb1eca3497fef311605e2cd202ca74bd9cb730f 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,13 +14,13 @@ import json, logging from enum import Enum -from typing import TYPE_CHECKING, Any, Dict, Optional, Union +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union +from common.DeviceTypes import DeviceTypeEnum from common.method_wrappers.ServiceExceptions import NotFoundException -from typing import List from common.proto.qkd_app_pb2 import QKDAppStatusEnum from common.proto.context_pb2 import ( Connection, ConnectionId, Device, DeviceDriverEnum, DeviceId, Service, ServiceId, - OpticalConfig, OpticalConfigId + OpticalConfig, OpticalConfigId, ConnectionList, ServiceConfigRule ) from common.proto.qkd_app_pb2 import App, AppId from common.proto.context_pb2 import ContextId @@ -37,6 +37,7 @@ from service.service.service_handler_api.Exceptions import ( ) from service.service.service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory, get_service_handler_class from service.service.tools.ObjectKeys import get_connection_key, get_device_key, get_service_key, get_qkd_app_key +from service.service.tools.object_uuid import opticalconfig_get_uuid if TYPE_CHECKING: from service.service.service_handler_api._ServiceHandler import _ServiceHandler @@ -125,17 +126,27 @@ class TaskExecutor: self._store_grpc_object(CacheableObjectType.DEVICE, device_key, device) # New function Andrea for Optical Devices - def configure_optical_device(self, device : Device, settings : str, flows : list, is_opticalband : bool): + def configure_optical_device( + self, device : Device, settings : str, flows : list, is_opticalband : bool + ): device_key = get_device_key(device.device_id) optical_config_id = OpticalConfigId() - optical_config_id.opticalconfig_uuid = device.device_id.device_uuid.uuid + optical_config_id.opticalconfig_uuid = opticalconfig_get_uuid(device.device_id) + optical_config = OpticalConfig() - setting = settings.value if settings else '' + + setting = settings.value if settings else "" + config_type = None try: result = self._context_client.SelectOpticalConfig(optical_config_id) - if result is not None: - new_config = json.loads(result.config) + + new_config = json.loads(result.config) + if 'type' in new_config: + config_type=new_config['type'] + if config_type == 'optical-transponder': + setting['status']='ENABLED' + if result is not None : new_config["new_config"] = setting new_config["is_opticalband"] = is_opticalband new_config["flow"] = flows @@ -144,7 +155,104 @@ class TaskExecutor: self._device_client.ConfigureOpticalDevice(optical_config) self._store_grpc_object(CacheableObjectType.DEVICE, device_key, device) except Exception as e: - LOGGER.info("error in config my config %s",e) + LOGGER.info("error in configure_optical_device %s",e) + + # Deconfiguring Optical Devices ( CNIT ) + def deconfigure_optical_device( + self, device : Device, channel_indexes : list, is_opticalband : bool, dev_flow : list + ): + errors = [] + flows = [] + indexes = {} + new_config = {} + optical_config_id = OpticalConfigId() + optical_config_id.opticalconfig_uuid = opticalconfig_get_uuid(device.device_id) + # if transponder the channel index is same as its endpoint + if device.device_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + for index in channel_indexes : + flows.append(index) + # if Roadm the channel index is the flow_id ,or ob_id + else: + for index in channel_indexes: + if not is_opticalband: + indexes["flow_id"] = index + else: + indexes["ob_id"] = index + + try: + result = self._context_client.SelectOpticalConfig(optical_config_id) + # for extractor in device service to extract the index , dummy data for freq and band required + indexes["frequency"] = None + indexes["band"] = None + if result is not None: + new_config = json.loads(result.config) + new_config["new_config"]=indexes + new_config["flow"] = flows if len(flows)>0 else dev_flow + new_config["is_opticalband"] = is_opticalband + result.config = json.dumps(new_config) + # new_optical_config.config= json.dumps(new_config) + # new_optical_config.opticalconfig_id.CopyFrom (optical_config_id) + # new_optical_config.device_id.CopyFrom(device.device_id) + self._device_client.DisableOpticalDevice(result) + except Exception as e: + errors.append(e) + LOGGER.info("error in deconfigure_optical_device %s",e) + return errors + + def delete_setting( + self, service_id : ServiceId, config_key : str, config_value : str + ): + service_configRule = ServiceConfigRule() + service_configRule.service_id.CopyFrom( service_id) + service_configRule.configrule_custom.resource_key = config_key + service_configRule.configrule_custom.resource_value = config_value + try: + ctxt = ContextClient() + ctxt.connect() + ctxt.DeleteServiceConfigRule(service_configRule) + ctxt.close() + except Exception as e : + LOGGER.info("error in delete service config rule %s",e) + + def check_service_for_media_channel(self, connections : ConnectionList, item) -> bool: + service = item + if (isinstance(item, ServiceId)): + service = self.get_service(item) + service_handler = None + service_handler_settings = {} + for connection in connections.connections: + connection_uuid=connection.connection_id.connection_uuid + if service_handler is None: + service_handlers = self.get_service_handlers( + connection, service, **service_handler_settings + ) + # TODO: improve to select different service handlers when needed + # By now, assume a single service handler is retrieved for all the + # device types in the path, i.e., all entries carry the same + # service handler, so we choose the first one retrieved. + if len(service_handlers) < 1: + raise Exception('Unsupported case: {:s}'.format(str(service_handlers))) + service_handler,_ = list(service_handlers.values())[0] + if service_handler.check_media_channel(connection_uuid): + return True + return False + + def check_connection_for_media_channel( + self, connection : Connection, service : Service + ) -> bool: + service_handler_settings = {} + connection_uuid = connection.connection_id.connection_uuid + classes_service_handlers = self.get_service_handlers( + connection, service, **service_handler_settings + ) + # TODO: improve to select different service handlers when needed + # By now, assume a single service handler is retrieved for all the + # device types in the path, i.e., all entries carry the same + # service handler, so we choose the first one retrieved. + if len(classes_service_handlers) < 1: + raise Exception('Unsupported case: {:s}'.format(str(classes_service_handlers))) + service_handler_class,_ = list(classes_service_handlers.values())[0] + return service_handler_class.check_media_channel(connection_uuid) def get_device_controller(self, device : Device) -> Optional[Device]: #json_controller = None @@ -166,8 +274,8 @@ class TaskExecutor: def get_devices_from_connection( self, connection : Connection, exclude_managed_by_controller : bool = False - ) -> Dict[str, Device]: - devices = dict() + ) -> Dict[DeviceTypeEnum, Dict[str, Device]]: + devices : Dict[DeviceTypeEnum, Dict[str, Device]] = dict() for endpoint_id in connection.path_hops_endpoint_ids: device = self.get_device(endpoint_id.device_id) device_uuid = endpoint_id.device_id.device_uuid.uuid @@ -175,11 +283,14 @@ class TaskExecutor: controller = self.get_device_controller(device) if controller is None: - devices[device_uuid] = device + device_type = DeviceTypeEnum._value2member_map_[device.device_type] + devices.setdefault(device_type, dict())[device_uuid] = device else: if not exclude_managed_by_controller: - devices[device_uuid] = device - devices[controller.device_id.device_uuid.uuid] = controller + device_type = DeviceTypeEnum._value2member_map_[device.device_type] + devices.setdefault(device_type, dict())[device_uuid] = device + device_type = DeviceTypeEnum._value2member_map_[controller.device_type] + devices.setdefault(device_type, dict())[controller.device_id.device_uuid.uuid] = controller return devices # ----- Service-related methods ------------------------------------------------------------------------------------ @@ -206,28 +317,36 @@ class TaskExecutor: # ----- Service Handler Factory ------------------------------------------------------------------------------------ - def get_service_handler( + def get_service_handlers( self, connection : Connection, service : Service, **service_handler_settings - ) -> '_ServiceHandler': - connection_devices = self.get_devices_from_connection(connection, exclude_managed_by_controller=True) - try: - service_handler_class = get_service_handler_class( - self._service_handler_factory, service, connection_devices) - return service_handler_class(service, self, **service_handler_settings) - except (UnsatisfiedFilterException, UnsupportedFilterFieldException, UnsupportedFilterFieldValueException): - dict_connection_devices = { - cd_data.name : (cd_uuid, cd_data.name, { - (device_driver, DeviceDriverEnum.Name(device_driver)) - for device_driver in cd_data.device_drivers - }) - for cd_uuid,cd_data in connection_devices.items() - } - LOGGER.exception( - 'Unable to select service handler. service={:s} connection={:s} connection_devices={:s}'.format( + ) -> Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]]: + connection_device_types : Dict[DeviceTypeEnum, Dict[str, Device]] = self.get_devices_from_connection( + connection, exclude_managed_by_controller=True + ) + service_handlers : Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]] = dict() + for device_type, connection_devices in connection_device_types.items(): + try: + service_handler_class = get_service_handler_class( + self._service_handler_factory, service, connection_devices) + service_handler = service_handler_class(service, self, **service_handler_settings) + service_handlers[device_type] = (service_handler, connection_devices) + except ( + UnsatisfiedFilterException, UnsupportedFilterFieldException, + UnsupportedFilterFieldValueException + ): + dict_connection_devices = { + cd_data.name : (cd_uuid, cd_data.name, { + (device_driver, DeviceDriverEnum.Name(device_driver)) + for device_driver in cd_data.device_drivers + }) + for cd_uuid,cd_data in connection_devices.items() + } + MSG = 'Unable to select service handler. service={:s} connection={:s} connection_devices={:s}' + LOGGER.exception(MSG.format( grpc_message_to_json_string(service), grpc_message_to_json_string(connection), str(dict_connection_devices) - ) - ) + )) + return service_handlers # ----- QkdApp-related methods ------------------------------------------------------------------------------------- @@ -284,4 +403,3 @@ class TaskExecutor: except Exception as e: LOGGER.error(f"Failed to delete QKD app with AppId {app_id}: {str(e)}") raise e - diff --git a/src/service/service/task_scheduler/TaskScheduler.py b/src/service/service/task_scheduler/TaskScheduler.py index b492b4581b05cb34bed624efd9be2d4f62da5856..e849e855f9d91c2dc51a99237bcfa389dc0b414d 100644 --- a/src/service/service/task_scheduler/TaskScheduler.py +++ b/src/service/service/task_scheduler/TaskScheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,17 +14,23 @@ import graphlib, logging, queue, time from typing import TYPE_CHECKING, Dict, Tuple -from common.proto.context_pb2 import Connection, ConnectionId, Service, ServiceId, ServiceStatusEnum +from common.proto.context_pb2 import ( + Connection, ConnectionId, Service, ServiceId, ServiceStatusEnum, ConnectionList +) from common.proto.pathcomp_pb2 import PathCompReply from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from service.service.tools.ObjectKeys import get_connection_key, get_service_key from .tasks._Task import _Task from .tasks.Task_ConnectionConfigure import Task_ConnectionConfigure +from .tasks.Task_OpticalConnectionDeconfigure import Task_OpticalConnectionDeconfigure +from .tasks.Task_OpticalServiceDelete import Task_OpticalServiceDelete from .tasks.Task_ConnectionDeconfigure import Task_ConnectionDeconfigure from .tasks.Task_ServiceDelete import Task_ServiceDelete from .tasks.Task_ServiceSetStatus import Task_ServiceSetStatus from .TaskExecutor import CacheableObjectType, TaskExecutor +from .tasks.Task_OpticalServiceConfigDelete import Task_OpticalServiceConfigDelete +from service.service.tools.OpticalTools import delete_lightpath if TYPE_CHECKING: from service.service.service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory @@ -70,6 +76,7 @@ class TasksScheduler: return service_planned_key, service_active_key def _service_remove(self, service_id : ServiceId) -> Tuple[str, str]: + service_removing_key = self._add_task_if_not_exists(Task_ServiceSetStatus( self._executor, service_id, ServiceStatusEnum.SERVICESTATUS_PENDING_REMOVAL)) @@ -79,6 +86,21 @@ class TasksScheduler: self._dag.add(service_delete_key, service_removing_key) return service_removing_key, service_delete_key + def _optical_service_remove( + self, service_id : ServiceId, has_media_channel : bool, has_optical_band = True + ) -> Tuple[str, str]: + service_removing_key = self._add_task_if_not_exists(Task_ServiceSetStatus( + self._executor, service_id, ServiceStatusEnum.SERVICESTATUS_ACTIVE + )) + + service_delete_key = self._add_task_if_not_exists(Task_OpticalServiceDelete( + self._executor, service_id, has_media_channel, has_optical_band + )) + + # deleting a service requires the service is in removing state + self._dag.add(service_delete_key, service_removing_key) + return service_removing_key, service_delete_key + def _connection_configure(self, connection_id : ConnectionId, service_id : ServiceId) -> str: connection_configure_key = self._add_task_if_not_exists(Task_ConnectionConfigure( self._executor, connection_id)) @@ -97,20 +119,56 @@ class TasksScheduler: def _connection_deconfigure(self, connection_id : ConnectionId, service_id : ServiceId) -> str: connection_deconfigure_key = self._add_task_if_not_exists(Task_ConnectionDeconfigure( - self._executor, connection_id)) + self._executor, connection_id + )) # the connection deconfiguration depends on its connection's service being in removing state service_pending_removal_key = self._add_task_if_not_exists(Task_ServiceSetStatus( - self._executor, service_id, ServiceStatusEnum.SERVICESTATUS_PENDING_REMOVAL)) + self._executor, service_id, ServiceStatusEnum.SERVICESTATUS_PENDING_REMOVAL + )) self._dag.add(connection_deconfigure_key, service_pending_removal_key) # the connection's service depends on the connection deconfiguration to transition to delete service_delete_key = self._add_task_if_not_exists(Task_ServiceDelete( - self._executor, service_id)) + self._executor, service_id + )) self._dag.add(service_delete_key, connection_deconfigure_key) return connection_deconfigure_key + def _optical_connection_deconfigure( + self, connection_id : ConnectionId, service_id : ServiceId, + has_media_channel : bool, has_optical_band = True + ) -> str: + connection_deconfigure_key = self._add_task_if_not_exists(Task_OpticalConnectionDeconfigure( + self._executor, connection_id, has_media_channel=has_media_channel + )) + + # the connection deconfiguration depends on its connection's service being in removing state + service_pending_removal_key = self._add_task_if_not_exists(Task_ServiceSetStatus( + self._executor, service_id, ServiceStatusEnum.SERVICESTATUS_ACTIVE + )) + self._dag.add(connection_deconfigure_key, service_pending_removal_key) + + service_delete_key = self._add_task_if_not_exists(Task_OpticalServiceDelete( + self._executor, service_id, has_media_channel, has_optical_band + )) + self._dag.add(service_delete_key, connection_deconfigure_key) + + return connection_deconfigure_key + + def _optical_service_config_remove( + self, connection_id : ConnectionId, service_id : ServiceId + ) -> str: + service_config_key = self._add_task_if_not_exists(Task_OpticalServiceConfigDelete( + self._executor, connection_id, service_id + )) + service_pending_removal_key = self._add_task_if_not_exists(Task_ServiceSetStatus( + self._executor, service_id, ServiceStatusEnum.SERVICESTATUS_ACTIVE + )) + self._dag.add(service_config_key, service_pending_removal_key) + return service_config_key + def compose_from_pathcompreply(self, pathcomp_reply : PathCompReply, is_delete : bool = False) -> None: t0 = time.time() include_service = self._service_remove if is_delete else self._service_create @@ -132,6 +190,143 @@ class TasksScheduler: t1 = time.time() LOGGER.debug('[compose_from_pathcompreply] elapsed_time: {:f} sec'.format(t1-t0)) + def check_service_for_media_channel( + self, connections : ConnectionList, item + )->Tuple[bool, bool]: + service = item + has_media_channel = False + has_optical_band = False + if isinstance(item, ServiceId): + service = self._executor.get_service(item) + class_service_handler = None + service_handler_settings = {} + for connection in connections.connections: + connection_uuid = connection.connection_id.connection_uuid.uuid + if class_service_handler is None: + classes_service_handlers = self._executor.get_service_handlers( + connection, service, **service_handler_settings + ) + # TODO: improve to select different service handlers when needed + # By now, assume a single service handler is retrieved for all the + # device types in the path, i.e., all entries carry the same + # service handler, so we choose the first one retrieved. + if len(classes_service_handlers) < 1: + raise Exception('Unsupported case: {:s}'.format(str(classes_service_handlers))) + class_service_handler,_ = list(classes_service_handlers.values())[0] + if class_service_handler.check_media_channel(connection_uuid): + has_media_channel = True + else : + has_optical_band = True + return (has_media_channel, has_optical_band) + + def compose_from_optical_service( + self, service : Service, params : dict, is_delete : bool = False + ) -> None: + t0 = time.time() + include_service = self._optical_service_remove if is_delete else self._service_create + include_connection = self._optical_connection_deconfigure if is_delete else self._connection_configure + include_service_config = self._optical_service_config_remove if is_delete else None + + explored_items = set() + pending_items_to_explore = queue.Queue() + pending_items_to_explore.put(service) + has_media_channel = None + has_optical_band = None + reply = None + code = 0 + reply_not_allowed = "DELETE_NOT_ALLOWED" + while not pending_items_to_explore.empty(): + try: + item = pending_items_to_explore.get(block=False) + except queue.Empty: + break + + if isinstance(item, Service): + str_item_key = grpc_message_to_json_string(item.service_id) + if str_item_key in explored_items: continue + connections = self._context_client.ListConnections(item.service_id) + has_media_channel, has_optical_band = self.check_service_for_media_channel( + connections=connections, item=item.service_id + ) + + if len(service.service_config.config_rules) > 0: + reply, code = delete_lightpath( + params['src'], params ['dst'], params['bitrate'], params['ob_id'], + delete_band=not has_media_channel, flow_id= params['flow_id'] + ) + + if code == 400 and reply_not_allowed in reply: + MSG = 'Deleteion for the service is not Allowed , Served Lightpaths is not empty' + raise Exception(MSG) + + include_service( + item.service_id, has_media_channel=has_media_channel, has_optical_band=has_optical_band + ) + self._add_service_to_executor_cache(item) + + for connection in connections.connections: + self._add_connection_to_executor_cache(connection) + pending_items_to_explore.put(connection) + explored_items.add(str_item_key) + + elif isinstance(item, ServiceId): + if code == 400 and reply_not_allowed in reply: break + str_item_key = grpc_message_to_json_string(item) + if str_item_key in explored_items: continue + connections = self._context_client.ListConnections(item) + has_media_channel, has_optical_band = self.check_service_for_media_channel( + connections=connections, item=item + ) + include_service( + item, has_media_channel=has_media_channel, has_optical_band=has_optical_band + ) + self._executor.get_service(item) + + for connection in connections.connections: + self._add_connection_to_executor_cache(connection) + pending_items_to_explore.put(connection) + explored_items.add(str_item_key) + + elif isinstance(item, Connection): + if code == 400 and reply_not_allowed in reply:break + str_item_key = grpc_message_to_json_string(item.connection_id) + if str_item_key in explored_items: continue + connection_key = include_connection( + item.connection_id, item.service_id, has_media_channel=has_media_channel, + has_optical_band=has_optical_band + ) + self._add_connection_to_executor_cache(connection) + + if include_service_config is not None : + connections_list = ConnectionList() + connections_list.connections.append(item) + is_media_channel, _ = self.check_service_for_media_channel( + connections=connections_list, item=service + ) + if has_optical_band and is_media_channel: + include_service_config( + item.connection_id, item.service_id + ) + self._executor.get_service(item.service_id) + pending_items_to_explore.put(item.service_id) + + for sub_service_id in item.sub_service_ids: + _,service_key_done = include_service( + sub_service_id, has_media_channel=has_media_channel, + has_optical_band=has_optical_band + ) + self._executor.get_service(sub_service_id) + self._dag.add(service_key_done, connection_key) + pending_items_to_explore.put(sub_service_id) + + explored_items.add(str_item_key) + else: + MSG = 'Unsupported item {:s}({:s})' + raise Exception(MSG.format(type(item).__name__, grpc_message_to_json_string(item))) + + t1 = time.time() + LOGGER.debug('[compose_from_service] elapsed_time: {:f} sec'.format(t1-t0)) + def compose_from_service(self, service : Service, is_delete : bool = False) -> None: t0 = time.time() include_service = self._service_remove if is_delete else self._service_create @@ -157,7 +352,6 @@ class TasksScheduler: for connection in connections.connections: self._add_connection_to_executor_cache(connection) pending_items_to_explore.put(connection) - explored_items.add(str_item_key) elif isinstance(item, ServiceId): @@ -170,7 +364,6 @@ class TasksScheduler: for connection in connections.connections: self._add_connection_to_executor_cache(connection) pending_items_to_explore.put(connection) - explored_items.add(str_item_key) elif isinstance(item, Connection): @@ -179,7 +372,6 @@ class TasksScheduler: connection_key = include_connection(item.connection_id, item.service_id) self._add_connection_to_executor_cache(connection) - self._executor.get_service(item.service_id) pending_items_to_explore.put(item.service_id) @@ -208,16 +400,20 @@ class TasksScheduler: self._add_connection_to_executor_cache(new_connection) service_updating_key = self._add_task_if_not_exists(Task_ServiceSetStatus( - self._executor, service.service_id, ServiceStatusEnum.SERVICESTATUS_UPDATING)) + self._executor, service.service_id, ServiceStatusEnum.SERVICESTATUS_UPDATING + )) old_connection_deconfigure_key = self._add_task_if_not_exists(Task_ConnectionDeconfigure( - self._executor, old_connection.connection_id)) + self._executor, old_connection.connection_id + )) new_connection_configure_key = self._add_task_if_not_exists(Task_ConnectionConfigure( - self._executor, new_connection.connection_id)) + self._executor, new_connection.connection_id + )) service_active_key = self._add_task_if_not_exists(Task_ServiceSetStatus( - self._executor, service.service_id, ServiceStatusEnum.SERVICESTATUS_ACTIVE)) + self._executor, service.service_id, ServiceStatusEnum.SERVICESTATUS_ACTIVE + )) # the old connection deconfiguration depends on service being in updating state self._dag.add(old_connection_deconfigure_key, service_updating_key) @@ -239,7 +435,7 @@ class TasksScheduler: def execute_all(self, dry_run : bool = False) -> None: ordered_task_keys = list(self._dag.static_order()) - LOGGER.debug('[execute_all] ordered_task_keys={:s}'.format(str(ordered_task_keys))) + LOGGER.info('[execute_all] ordered_task_keys={:s}'.format(str(ordered_task_keys))) results = [] for task_key in ordered_task_keys: diff --git a/src/service/service/task_scheduler/__init__.py b/src/service/service/task_scheduler/__init__.py index 25bef274026ede05ad28f4f65a113dd9c0abfcb6..db1415453d83b51b390772a137f4225eb1f948ee 100644 --- a/src/service/service/task_scheduler/__init__.py +++ b/src/service/service/task_scheduler/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py index f6c543c1ccb947eb01c3d5f5fb93c0504a77ca95..fac991432028e2c042bfce5dc02dd22d44cac5d0 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionConfigure.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,8 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import TYPE_CHECKING, Dict, Tuple +from common.DeviceTypes import DeviceTypeEnum from common.method_wrappers.ServiceExceptions import OperationFailedException -from common.proto.context_pb2 import ConnectionId +from common.proto.context_pb2 import ConnectionId, Device from common.tools.grpc.Tools import grpc_message_to_json_string from service.service.service_handler_api.Tools import check_errors_setendpoint from service.service.task_scheduler.TaskExecutor import TaskExecutor @@ -21,6 +23,9 @@ from service.service.tools.EndpointIdFormatters import endpointids_to_raw from service.service.tools.ObjectKeys import get_connection_key from ._Task import _Task +if TYPE_CHECKING: + from service.service.service_handler_api._ServiceHandler import _ServiceHandler + KEY_TEMPLATE = 'connection({connection_id:s}):configure' class Task_ConnectionConfigure(_Task): @@ -44,12 +49,24 @@ class Task_ConnectionConfigure(_Task): service = self._task_executor.get_service(connection.service_id) service_handler_settings = {} - service_handler = self._task_executor.get_service_handler(connection, service, **service_handler_settings) + service_handlers : Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]] = \ + self._task_executor.get_service_handlers(connection, service, **service_handler_settings) - endpointids_to_set = endpointids_to_raw(connection.path_hops_endpoint_ids) connection_uuid = connection.connection_id.connection_uuid.uuid - results_setendpoint = service_handler.SetEndpoint(endpointids_to_set, connection_uuid=connection_uuid) - errors = check_errors_setendpoint(endpointids_to_set, results_setendpoint) + endpointids_to_set = endpointids_to_raw(connection.path_hops_endpoint_ids) + + errors = list() + for _, (service_handler, connection_devices) in service_handlers.items(): + _endpointids_to_set = [ + (device_uuid, endpoint_uuid, topology_uuid) + for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_set + if device_uuid in connection_devices + ] + results_setendpoint = service_handler.SetEndpoint( + _endpointids_to_set, connection_uuid=connection_uuid + ) + errors.extend(check_errors_setendpoint(endpointids_to_set, results_setendpoint)) + if len(errors) > 0: MSG = 'SetEndpoint for Connection({:s}) from Service({:s})' str_connection = grpc_message_to_json_string(connection) diff --git a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py index 7b6b7951befbd6abd4d052ce5eec39d3398aa6e7..cb1e91cc2172162858f3cf0246fa4ce46497b82e 100644 --- a/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py +++ b/src/service/service/task_scheduler/tasks/Task_ConnectionDeconfigure.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,8 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import TYPE_CHECKING, Dict, Tuple +from common.DeviceTypes import DeviceTypeEnum from common.method_wrappers.ServiceExceptions import OperationFailedException -from common.proto.context_pb2 import ConnectionId +from common.proto.context_pb2 import ConnectionId, Device from common.tools.grpc.Tools import grpc_message_to_json_string from service.service.service_handler_api.Tools import check_errors_deleteendpoint from service.service.task_scheduler.TaskExecutor import TaskExecutor @@ -21,6 +23,9 @@ from service.service.tools.EndpointIdFormatters import endpointids_to_raw from service.service.tools.ObjectKeys import get_connection_key from ._Task import _Task +if TYPE_CHECKING: + from service.service.service_handler_api._ServiceHandler import _ServiceHandler + KEY_TEMPLATE = 'connection({connection_id:s}):deconfigure' class Task_ConnectionDeconfigure(_Task): @@ -44,12 +49,24 @@ class Task_ConnectionDeconfigure(_Task): service = self._task_executor.get_service(connection.service_id) service_handler_settings = {} - service_handler = self._task_executor.get_service_handler(connection, service, **service_handler_settings) + service_handlers : Dict[DeviceTypeEnum, Tuple['_ServiceHandler', Dict[str, Device]]] = \ + self._task_executor.get_service_handlers(connection, service, **service_handler_settings) - endpointids_to_delete = endpointids_to_raw(connection.path_hops_endpoint_ids) connection_uuid = connection.connection_id.connection_uuid.uuid - results_deleteendpoint = service_handler.DeleteEndpoint(endpointids_to_delete, connection_uuid=connection_uuid) - errors = check_errors_deleteendpoint(endpointids_to_delete, results_deleteendpoint) + endpointids_to_delete = endpointids_to_raw(connection.path_hops_endpoint_ids) + + errors = list() + for _, (service_handler, connection_devices) in service_handlers.items(): + _endpointids_to_delete = [ + (device_uuid, endpoint_uuid, topology_uuid) + for device_uuid, endpoint_uuid, topology_uuid in endpointids_to_delete + if device_uuid in connection_devices + ] + results_deleteendpoint = service_handler.DeleteEndpoint( + _endpointids_to_delete, connection_uuid=connection_uuid + ) + errors.extend(check_errors_deleteendpoint(endpointids_to_delete, results_deleteendpoint)) + if len(errors) > 0: MSG = 'DeleteEndpoint for Connection({:s}) from Service({:s})' str_connection = grpc_message_to_json_string(connection) diff --git a/src/service/service/task_scheduler/tasks/Task_OpticalConnectionDeconfigure.py b/src/service/service/task_scheduler/tasks/Task_OpticalConnectionDeconfigure.py new file mode 100644 index 0000000000000000000000000000000000000000..08e428ae625a46bc1cf75bb6b7cb50ba2dd3f83e --- /dev/null +++ b/src/service/service/task_scheduler/tasks/Task_OpticalConnectionDeconfigure.py @@ -0,0 +1,84 @@ +# Copyright 2022-2024 ETSI 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. + +from common.method_wrappers.ServiceExceptions import OperationFailedException +from common.proto.context_pb2 import ConnectionId +from common.tools.grpc.Tools import grpc_message_to_json_string +from service.service.service_handler_api.Tools import check_errors_deleteendpoint +from service.service.task_scheduler.TaskExecutor import TaskExecutor +from service.service.tools.EndpointIdFormatters import endpointids_to_raw +from service.service.tools.ObjectKeys import get_connection_key +from ._Task import _Task + +KEY_TEMPLATE = 'optical_connection({connection_id:s}):deconfigure' + +class Task_OpticalConnectionDeconfigure(_Task): + def __init__( + self, task_executor : TaskExecutor, connection_id : ConnectionId, + has_media_channel : bool + ) -> None: + super().__init__(task_executor) + self._connection_id = connection_id + self._has_media_channel = has_media_channel + + @property + def connection_id(self) -> ConnectionId: return self._connection_id + + @staticmethod + def build_key(connection_id : ConnectionId) -> str: # pylint: disable=arguments-differ + str_connection_id = get_connection_key(connection_id) + return KEY_TEMPLATE.format(connection_id=str_connection_id) + + @property + def key(self) -> str: return self.build_key(self._connection_id) + + def execute(self) -> None: + connection = self._task_executor.get_connection(self._connection_id) + service = self._task_executor.get_service(connection.service_id) + errors = [] + service_handler_settings = {} + service_handlers = self._task_executor.get_service_handlers( + connection, service, **service_handler_settings + ) + # TODO: improve to select different service handlers when needed + # By now, assume a single service handler is retrieved for all the + # device types in the path, i.e., all entries carry the same + # service handler, so we choose the first one retrieved. + if len(service_handlers) < 1: + raise Exception('Unsupported case: {:s}'.format(str(service_handlers))) + service_handler,_ = list(service_handlers.values())[0] + + endpointids_to_delete = endpointids_to_raw(connection.path_hops_endpoint_ids) + connection_uuid = connection.connection_id.connection_uuid.uuid + if self._has_media_channel: + is_media_channel = service_handler.check_media_channel(connection_uuid) + if is_media_channel: + results_deleteendpoint = service_handler.DeleteEndpoint(endpointids_to_delete, connection_uuid=connection_uuid) + errors = check_errors_deleteendpoint(endpointids_to_delete, results_deleteendpoint) + if len(errors) > 0: + MSG = 'DeleteEndpoint for OpticalConnection({:s}) from Service({:s})' + str_connection = grpc_message_to_json_string(connection) + str_service = grpc_message_to_json_string(service) + raise OperationFailedException(MSG.format(str_connection, str_service), extra_details=errors) + if is_media_channel: + self._task_executor.delete_connection(self._connection_id) + else: + results_deleteendpoint = service_handler.DeleteEndpoint(endpointids_to_delete, connection_uuid=connection_uuid) + errors = check_errors_deleteendpoint(endpointids_to_delete, results_deleteendpoint) + if len(errors) > 0: + MSG = 'DeleteEndpoint for OpticalConnection({:s}) from Service({:s})' + str_connection = grpc_message_to_json_string(connection) + str_service = grpc_message_to_json_string(service) + raise OperationFailedException(MSG.format(str_connection, str_service), extra_details=errors) + self._task_executor.delete_connection(self._connection_id) diff --git a/src/service/service/task_scheduler/tasks/Task_OpticalServiceConfigDelete.py b/src/service/service/task_scheduler/tasks/Task_OpticalServiceConfigDelete.py new file mode 100644 index 0000000000000000000000000000000000000000..d3e0e108ffeb87745ae9ea623d2f796e66973561 --- /dev/null +++ b/src/service/service/task_scheduler/tasks/Task_OpticalServiceConfigDelete.py @@ -0,0 +1,43 @@ +# Copyright 2022-2024 ETSI 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. + +from common.proto.context_pb2 import ServiceId , ConnectionId +from service.service.task_scheduler.TaskExecutor import TaskExecutor +from service.service.tools.ObjectKeys import get_service_key +from ._Task import _Task + +KEY_TEMPLATE = 'optical_service({service_id:s})_Config:delete' + +class Task_OpticalServiceConfigDelete(_Task): + def __init__( + self, task_executor : TaskExecutor, connection_id : ConnectionId, + service_id : ServiceId + ) -> None: + super().__init__(task_executor) + self._connection_id = connection_id + self._service_id = service_id + + @property + def service_id(self) -> ServiceId: return self._service_id + + @staticmethod + def build_key(service_id : ServiceId) -> str: # pylint: disable=arguments-differ + str_service_id = get_service_key(service_id) + return KEY_TEMPLATE.format(service_id=str_service_id) + + @property + def key(self) -> str: return self.build_key(self._service_id) + + def execute(self) -> None: + self._task_executor.delete_setting(self._service_id, '/settings', 'value') diff --git a/src/service/service/task_scheduler/tasks/Task_OpticalServiceDelete.py b/src/service/service/task_scheduler/tasks/Task_OpticalServiceDelete.py new file mode 100644 index 0000000000000000000000000000000000000000..83f7c4f7824d46e84047795538bf49bb0c3758fc --- /dev/null +++ b/src/service/service/task_scheduler/tasks/Task_OpticalServiceDelete.py @@ -0,0 +1,45 @@ +# Copyright 2022-2024 ETSI 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. + +from common.proto.context_pb2 import ServiceId +from service.service.task_scheduler.TaskExecutor import TaskExecutor +from service.service.tools.ObjectKeys import get_service_key +from ._Task import _Task + +KEY_TEMPLATE = 'optical_service({service_id:s}):delete' + +class Task_OpticalServiceDelete(_Task): + def __init__( + self, task_executor : TaskExecutor, service_id : ServiceId, + has_media_channel : bool, has_optical_band : bool + ) -> None: + super().__init__(task_executor) + self._service_id = service_id + self._has_media_channel = has_media_channel + self._has_optical_band = has_optical_band + + @property + def service_id(self) -> ServiceId: return self._service_id + + @staticmethod + def build_key(service_id : ServiceId) -> str: # pylint: disable=arguments-differ + str_service_id = get_service_key(service_id) + return KEY_TEMPLATE.format(service_id=str_service_id) + + @property + def key(self) -> str: return self.build_key(self._service_id) + + def execute(self) -> None: + if not self._has_media_channel or not self._has_optical_band: + self._task_executor.delete_service(self._service_id) diff --git a/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py b/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py index 20928f1771d26f810f59ef84a9d1e5471512542b..87f3516e5555942c11cb284dbbe2dedc6e10a265 100644 --- a/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py +++ b/src/service/service/task_scheduler/tasks/Task_ServiceDelete.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py b/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py index 7da277b2f0bb1af6acb062017f9d3b7a0d9d1f76..3caa7b7c4ca619d1af3927e624f8f0ce4885cf8d 100644 --- a/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py +++ b/src/service/service/task_scheduler/tasks/Task_ServiceSetStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/task_scheduler/tasks/_Task.py b/src/service/service/task_scheduler/tasks/_Task.py index 2a7738f5acad1c9bb69df06a268ea23d1ee09a53..acf6f3ce79b4f9782fe51ac34ec9340b64bebd76 100644 --- a/src/service/service/task_scheduler/tasks/_Task.py +++ b/src/service/service/task_scheduler/tasks/_Task.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/task_scheduler/tasks/__init__.py b/src/service/service/task_scheduler/tasks/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/task_scheduler/tasks/__init__.py +++ b/src/service/service/task_scheduler/tasks/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/tools/ConnectionToString.py b/src/service/service/tools/ConnectionToString.py index edc20b12035ac95779e6f4628b4dbe32a95b806d..07fa0d22d85608d9bc228a1ffcb19f86dce487f8 100644 --- a/src/service/service/tools/ConnectionToString.py +++ b/src/service/service/tools/ConnectionToString.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/tools/EndpointIdFormatters.py b/src/service/service/tools/EndpointIdFormatters.py index 88608377b4dd80f771974bb883165bffc595e882..bcc73ba07976ec628e5d8cf7f41c4f37c0819d12 100644 --- a/src/service/service/tools/EndpointIdFormatters.py +++ b/src/service/service/tools/EndpointIdFormatters.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/tools/GeodesicDistance.py b/src/service/service/tools/GeodesicDistance.py index e337673d399d36f6703d173e3c262927a6d38bce..fe9f75f540f36586033626a7d2565c29989630ef 100644 --- a/src/service/service/tools/GeodesicDistance.py +++ b/src/service/service/tools/GeodesicDistance.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/tools/ObjectKeys.py b/src/service/service/tools/ObjectKeys.py index f67cb02e143b78127484d6644a7fdd8c9c71e29c..6e4d2340e3bd0df5313e002f977ada1478cca867 100644 --- a/src/service/service/tools/ObjectKeys.py +++ b/src/service/service/tools/ObjectKeys.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/tools/OpticalTools.py b/src/service/service/tools/OpticalTools.py index ca73dce480a46369b47ce4c6baed516168b24817..b7df3dd1428718f1d8141c557fddf8e572312afc 100644 --- a/src/service/service/tools/OpticalTools.py +++ b/src/service/service/tools/OpticalTools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -91,6 +91,7 @@ def get_names_from_uuids(devices: List[Device], device_uuid: str, port_uuid: str return device_name, port_name return "", "" + def get_device_name_from_uuid(devices: List[Device], device_uuid: str): device_name = "" @@ -101,6 +102,17 @@ def get_device_name_from_uuid(devices: List[Device], device_uuid: str): return "" +def refresh_opticalcontroller(topology_id : dict): + topo_id_str = topology_id["topology_uuid"]["uuid"] + cxt_id_str = topology_id["context_id"]["context_uuid"]["uuid"] + headers = {"Content-Type": "application/json"} + base_url = get_optical_controller_base_url() + urlx = "{:s}/GetTopology/{:s}/{:s}".format(base_url, cxt_id_str, topo_id_str) + res = requests.get(urlx, headers=headers) + if res is not None: + log.debug(f"DELETELIGHTPATH Response {res}") + + def add_lightpath(src, dst, bitrate, bidir, ob_band) -> str: if not TESTING: urlx = "" @@ -115,6 +127,7 @@ def add_lightpath(src, dst, bitrate, bidir, ob_band) -> str: bidir = 1 urlx = "{:s}/AddFlexLightpath/{:s}/{:s}/{:s}/{:s}/{:s}".format(base_url, src, dst, str(bitrate), str(bidir), str(ob_band)) r = requests.put(urlx, headers=headers) + print(f"addpathlight {r}") reply = r.text return reply else: @@ -139,17 +152,30 @@ def get_optical_band(idx) -> str: return optical_band_uni_txt -def delete_lightpath(flow_id, src, dst, bitrate) -> str: +def delete_lightpath( src, dst, bitrate, ob_id, delete_band, flow_id=None) -> str: reply = "200" + delete_band = 1 if delete_band else 0 + base_url = get_optical_controller_base_url() if not TESTING: - base_url = get_optical_controller_base_url() - urlx = "{:s}/DelLightpath/{:s}/{:s}/{:s}/{:s}".format(base_url, str(flow_id), src, dst, str(bitrate)) - + if flow_id is not None: + urlx = "{:s}/DelFlexLightpath/{}/{}/{}/{}/{}".format(base_url, src, dst, bitrate, ob_id, flow_id) + else : + urlx = "{:s}/DelOpticalBand/{}/{}/{}".format(base_url, src, dst, ob_id) headers = {"Content-Type": "application/json"} r = requests.delete(urlx, headers=headers) reply = r.text - return reply + code = r.status_code + return (reply, code) +def DelFlexLightpath (flow_id, src, dst, bitrate, o_band_id): + reply = "200" + base_url = get_optical_controller_base_url() + if not TESTING: + urlx = "{:s}/DelFlexLightpath/{}/{}/{}/{}/{}".format(base_url, flow_id, src, dst, bitrate, o_band_id) + headers = {"Content-Type": "application/json"} + r = requests.delete(urlx, headers=headers) + reply = r.text + return reply def get_lightpaths() -> str: base_url = get_optical_controller_base_url() @@ -160,14 +186,24 @@ def get_lightpaths() -> str: reply = r.text return reply - def adapt_reply(devices, service, reply_json, context_id, topology_id, optical_band_txt) -> PathCompReply: opt_reply = PathCompReply() - topo = TopologyId(context_id=ContextId(context_uuid=Uuid(uuid=context_id)),topology_uuid=Uuid(uuid=topology_id)) + topo = TopologyId( + context_id=ContextId(context_uuid=Uuid(uuid=context_id)), + topology_uuid=Uuid(uuid=topology_id) + ) #add optical band connection first rules_ob= [] ob_id = 0 connection_ob=None + + r = reply_json + if "parent_opt_band" in r.keys(): + ob_id = r["parent_opt_band"] + if "bidir" in r.keys(): + bidir_f = r["bidir"] + else: + bidir_f = False if optical_band_txt != "": ob_json = json.loads(optical_band_txt) ob = ob_json @@ -187,9 +223,18 @@ def adapt_reply(devices, service, reply_json, context_id, topology_id, optical_b freq = ob["freq"] bx = ob["band"] - lf = int(int(freq)-int(bx/2)) + #+1 is added to avoid overlap in the WSS of MGONs + lf = int(int(freq)-int(bx/2))+1 uf = int(int(freq)+int(bx/2)) - val_ob = {"band_type": band_type, "low-freq": lf, "up-freq": uf, "frequency": freq, "band": bx, "ob_id": ob_id} + val_ob = { + "band_type" : band_type, + "low-freq" : lf, + "up-freq" : uf, + "frequency" : freq, + "band" : bx, + "ob_id" : ob_id, + "bidir" : bidir_f + } rules_ob.append(ConfigRule_Custom(resource_key="/settings-ob_{}".format(uuuid_x), resource_value=json.dumps(val_ob))) bidir_ob = ob["bidir"] for devxb in ob["flows"].keys(): @@ -234,8 +279,7 @@ def adapt_reply(devices, service, reply_json, context_id, topology_id, optical_b else: log.info("no map device port for device {} port {}".format(devxb, out_end_point_b)) log.debug("optical-band connection {}".format(connection_ob)) - r = reply_json - bidir_f = r["bidir"] + connection_f = add_connection_to_reply(opt_reply) connection_f.connection_id.connection_uuid.uuid = str(uuid.uuid4()) connection_f.service_id.CopyFrom(service.service_id) @@ -278,12 +322,13 @@ def adapt_reply(devices, service, reply_json, context_id, topology_id, optical_b end_point = EndPointId(topology_id=topo, device_id=DeviceId(device_uuid=Uuid(uuid=d)), endpoint_uuid=Uuid(uuid=p)) connection_f.path_hops_endpoint_ids.add().CopyFrom(end_point) else: - log.info("no map device port for device {} port {}".format(devx, out_end_point_b)) + log.info("no map device port for device {} port {}".format(devx, out_end_point_b)) + #check that list of endpoints is not empty if connection_ob is not None and len(connection_ob.path_hops_endpoint_ids) == 0: log.debug("deleting empty optical-band connection") opt_reply.connections.remove(connection_ob) - + #inizialize custom optical parameters band = r["band"] if "band" in r else None op_mode = r["op-mode"] if "op-mode" in r else None @@ -298,27 +343,26 @@ def adapt_reply(devices, service, reply_json, context_id, topology_id, optical_b band_type = "C_BAND" if ob_id != 0: - val = {"frequency": frequency, "operational-mode": op_mode, "band": band, "flow_id": flow_id, "ob_id": ob_id, "band_type": band_type,} + val = {"target-output-power": "1.0", "frequency": frequency, "operational-mode": op_mode, "band": band, "flow_id": flow_id, "ob_id": ob_id, "band_type": band_type, "bidir": bidir_f} else: - val = {"frequency": frequency, "operational-mode": op_mode, "band": band, "flow_id": flow_id, "band_type": band_type,} + val = {"target-output-power": "1.0", "frequency": frequency, "operational-mode": op_mode, "band": band, "flow_id": flow_id, "band_type": band_type, "bidir": bidir_f} custom_rule = ConfigRule_Custom(resource_key="/settings", resource_value=json.dumps(val)) rule = ConfigRule(action=ConfigActionEnum.CONFIGACTION_SET, custom=custom_rule) service.service_config.config_rules.add().CopyFrom(rule) if len(rules_ob) > 0: - for rulex in rules_ob: - rule_ob = ConfigRule(action=ConfigActionEnum.CONFIGACTION_SET, custom=rulex) - service.service_config.config_rules.add().CopyFrom(rule_ob) - + for rulex in rules_ob: + rule_ob = ConfigRule(action=ConfigActionEnum.CONFIGACTION_SET, custom=rulex) + service.service_config.config_rules.add().CopyFrom(rule_ob) + opt_reply.services.add().CopyFrom(service) - - return opt_reply + return opt_reply -def add_service_to_reply(reply : PathCompReply, service : Service)-> Service: +def add_service_to_reply(reply : PathCompReply, service : Service) -> Service: service_x = reply.services.add() service_x.CopyFrom(service) return service_x - -def add_connection_to_reply(reply : PathCompReply)-> Connection: + +def add_connection_to_reply(reply : PathCompReply) -> Connection: conn = reply.connections.add() return conn diff --git a/src/service/service/tools/__init__.py b/src/service/service/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/service/tools/__init__.py +++ b/src/service/service/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/service/tools/object_uuid.py b/src/service/service/tools/object_uuid.py new file mode 100644 index 0000000000000000000000000000000000000000..3ab6f651e86c3145142dd85554d6a1254a7ee6c6 --- /dev/null +++ b/src/service/service/tools/object_uuid.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI 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. + + +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from typing import Optional, Union +from uuid import UUID, uuid5 +from common.proto.context_pb2 import DeviceId + +# Generate a UUIDv5-like from the SHA-1 of "TFS" and no namespace to be used as the NAMESPACE for all +# the context UUIDs generated. For efficiency purposes, the UUID is hardcoded; however, it is produced +# using the following code: +# from hashlib import sha1 +# from uuid import UUID +# hash = sha1(bytes('TFS', 'utf-8')).digest() +# NAMESPACE_TFS = UUID(bytes=hash[:16], version=5) +NAMESPACE_TFS = UUID('200e3a1f-2223-534f-a100-758e29c37f40') + +def get_uuid_from_string(str_uuid_or_name : Union[str, UUID], prefix_for_name : Optional[str] = None) -> str: + # if UUID given, assume it is already a valid UUID + if isinstance(str_uuid_or_name, UUID): return str_uuid_or_name + if not isinstance(str_uuid_or_name, str): + MSG = 'Parameter({:s}) cannot be used to produce a UUID' + raise Exception(MSG.format(str(repr(str_uuid_or_name)))) + try: + # try to parse as UUID + return str(UUID(str_uuid_or_name)) + except: # pylint: disable=bare-except + # produce a UUID within TFS namespace from parameter + if prefix_for_name is not None: + str_uuid_or_name = '{:s}/{:s}'.format(prefix_for_name, str_uuid_or_name) + return str(uuid5(NAMESPACE_TFS, str_uuid_or_name)) + +def opticalconfig_get_uuid(device_id: DeviceId) -> str: + device_uuid = device_id.device_uuid.uuid + if len(device_uuid) > 0: + return get_uuid_from_string(f"{device_uuid}_opticalconfig") + + raise InvalidArgumentsException([ + ('DeviceId ', device_id), + + ], extra_details=['device_id is required to produce a OpticalConfig UUID']) diff --git a/src/service/service/tools/replies.py b/src/service/service/tools/replies.py index ccaaa221f56103552c6f2114841b846497006529..2a296a48da540c4ce72ccc0b7e4d765eb76d1494 100644 --- a/src/service/service/tools/replies.py +++ b/src/service/service/tools/replies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/CommonObjects.py b/src/service/tests/CommonObjects.py index 8de29010fa1af652eacf2737241ad55cbd74f1cc..c160463140f3aaf8e1e40d32b7f2693165e87add 100644 --- a/src/service/tests/CommonObjects.py +++ b/src/service/tests/CommonObjects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/MockService_Dependencies.py b/src/service/tests/MockService_Dependencies.py index 7563e61771a5fbdbb057b3c56750ed9204d7608b..e06442149d2ca7ca6b247e0b60778e1f2a2b23ce 100644 --- a/src/service/tests/MockService_Dependencies.py +++ b/src/service/tests/MockService_Dependencies.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/PrepareTestScenario.py b/src/service/tests/PrepareTestScenario.py index 680d368d7dd8bc873f7b41484e1533bb40bcf607..317668a098072181cccb3c56f34991af1734eba0 100644 --- a/src/service/tests/PrepareTestScenario.py +++ b/src/service/tests/PrepareTestScenario.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/ServiceHandler_L3NM_EMU.py b/src/service/tests/ServiceHandler_L3NM_EMU.py index 65981b07c831281b30717d42e2f4f1b1a226759b..d3da4820a1731946c0f92d6195b118615121c882 100644 --- a/src/service/tests/ServiceHandler_L3NM_EMU.py +++ b/src/service/tests/ServiceHandler_L3NM_EMU.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/ServiceHandler_L3NM_OC.py b/src/service/tests/ServiceHandler_L3NM_OC.py index 3003c6c2a82009c772b89e783341993524e3f0e6..458c12762d551b17850f860a334bb8f4758e4cf1 100644 --- a/src/service/tests/ServiceHandler_L3NM_OC.py +++ b/src/service/tests/ServiceHandler_L3NM_OC.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/ServiceHandlersToTest.py b/src/service/tests/ServiceHandlersToTest.py index 729a7308d93fcbd07a4e1dc8d0842bf87c0732e3..eb0c4ccbc276b5a244caea2ce6d5cddee4c4511f 100644 --- a/src/service/tests/ServiceHandlersToTest.py +++ b/src/service/tests/ServiceHandlersToTest.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/__init__.py b/src/service/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/service/tests/__init__.py +++ b/src/service/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..a480f6b31884610782b15340ff1c40b6209b062d --- /dev/null +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockServiceHandler.py @@ -0,0 +1,207 @@ +# Copyright 2022-2024 ETSI 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. + +import json, logging +from typing import Any, Dict, List, Optional, Tuple, Union +from common.proto.context_pb2 import ConfigRule, ConnectionId, DeviceId, Service +from common.tools.object_factory.Connection import json_connection_id +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +#from service.service.service_handler_api.AnyTreeTools import TreeNode +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from .MockTaskExecutor import MockTaskExecutor +from service.service.tools.EndpointIdFormatters import endpointids_to_raw +from service.service.service_handlers.l3nm_gnmi_openconfig.ConfigRuleComposer import ConfigRuleComposer +from service.service.service_handlers.l3nm_gnmi_openconfig.StaticRouteGenerator import StaticRouteGenerator + +LOGGER = logging.getLogger(__name__) + +class MockServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : MockTaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + self.__config_rule_composer = ConfigRuleComposer() + self.__static_route_generator = StaticRouteGenerator(self.__config_rule_composer) + self.__endpoint_map : Dict[Tuple[str, str], Tuple[str, str]] = dict() + + def _compose_config_rules(self, endpoints : List[Tuple[str, str, Optional[str]]]) -> None: + if len(endpoints) % 2 != 0: raise Exception('Number of endpoints should be even') + + service_settings = self.__settings_handler.get_service_settings() + self.__config_rule_composer.configure(self.__service, service_settings) + + #prev_endpoint_obj = None + #prev_endpoint = None + #settings_for_next = None + #for i,endpoint in enumerate(endpoints): + for endpoint in endpoints: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) + + device_obj = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + device_settings = self.__settings_handler.get_device_settings(device_obj) + self.__config_rule_composer.set_device_alias(device_obj.name, device_uuid) + _device = self.__config_rule_composer.get_device(device_obj.name) + _device.configure(device_obj, device_settings) + + endpoint_obj = get_endpoint_matching(device_obj, endpoint_uuid) + endpoint_settings = self.__settings_handler.get_endpoint_settings(device_obj, endpoint_obj) + _device.set_endpoint_alias(endpoint_obj.name, endpoint_uuid) + _endpoint = _device.get_endpoint(endpoint_obj.name) + _endpoint.configure(endpoint_obj, endpoint_settings) + + #if settings_for_next is not None: + # _endpoint.configure(endpoint_obj, settings_for_next) + # settings_for_next = None + + #if endpoint_settings is not None and 'neighbor_address' in endpoint_settings.value: + # _neighbor_settings = {'address_ip': endpoint_settings.value['neighbor_address']} + # + # if 'address_prefix' in endpoint_settings.value: + # _neighbor_settings['address_prefix'] = endpoint_settings.value['address_prefix'] + # elif 'prefix_length' in endpoint_settings.value: + # _neighbor_settings['address_prefix'] = endpoint_settings.value['prefix_length'] + # else: + # MSG = 'IP Address Prefix not found. Tried: address_prefix and prefix_length. endpoint_settings.value={:s}' + # raise Exception(MSG.format(str(endpoint_settings.value))) + # + # neighbor_settings = TreeNode('.') + # neighbor_settings.value = _neighbor_settings + # if i % 2 == 0: + # # configure in next endpoint + # settings_for_next = neighbor_settings + # else: + # # configure in previous endpoint + # prev_endpoint.configure(prev_endpoint_obj, neighbor_settings) + + self.__endpoint_map[(device_uuid, endpoint_uuid)] = (device_obj.name, endpoint_obj.name) + + #prev_endpoint = _endpoint + #prev_endpoint_obj = endpoint_obj + + self.__static_route_generator.compose(endpoints) + LOGGER.debug('config_rule_composer = {:s}'.format(json.dumps(self.__config_rule_composer.dump()))) + + def _do_configurations( + self, config_rules_per_device : Dict[str, List[Dict]], endpoints : List[Tuple[str, str, Optional[str]]], + delete : bool = False + ) -> List[Union[bool, Exception]]: + # Configuration is done atomically on each device, all OK / all KO per device + results_per_device = dict() + for device_name,json_config_rules in config_rules_per_device.items(): + try: + device_obj = self.__config_rule_composer.get_device(device_name).objekt + if len(json_config_rules) == 0: continue + del device_obj.device_config.config_rules[:] + for json_config_rule in json_config_rules: + device_obj.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device_obj) + results_per_device[device_name] = True + except Exception as e: # pylint: disable=broad-exception-caught + verb = 'deconfigure' if delete else 'configure' + MSG = 'Unable to {:s} Device({:s}) : ConfigRules({:s})' + LOGGER.exception(MSG.format(verb, str(device_name), str(json_config_rules))) + results_per_device[device_name] = e + + results = [] + for endpoint in endpoints: + device_uuid, endpoint_uuid = get_device_endpoint_uuids(endpoint) + device_name, _ = self.__endpoint_map[(device_uuid, endpoint_uuid)] + if device_name not in results_per_device: continue + results.append(results_per_device[device_name]) + return results + + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + #service_uuid = self.__service.service_id.service_uuid.uuid + connection = self.__task_executor.get_connection(ConnectionId(**json_connection_id(connection_uuid))) + connection_endpoint_ids = endpointids_to_raw(connection.path_hops_endpoint_ids) + self._compose_config_rules(connection_endpoint_ids) + #network_instance_name = service_uuid.split('-')[0] + #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=False) + config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=False) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) + results = self._do_configurations(config_rules_per_device, endpoints) + LOGGER.debug('results={:s}'.format(str(results))) + return results + + def DeleteEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: return [] + #service_uuid = self.__service.service_id.service_uuid.uuid + connection = self.__task_executor.get_connection(ConnectionId(**json_connection_id(connection_uuid))) + connection_endpoint_ids = endpointids_to_raw(connection.path_hops_endpoint_ids) + self._compose_config_rules(connection_endpoint_ids) + #network_instance_name = service_uuid.split('-')[0] + #config_rules_per_device = self.__config_rule_composer.get_config_rules(network_instance_name, delete=True) + config_rules_per_device = self.__config_rule_composer.get_config_rules(delete=True) + LOGGER.debug('config_rules_per_device={:s}'.format(json.dumps(config_rules_per_device))) + results = self._do_configurations(config_rules_per_device, endpoints, delete=True) + LOGGER.debug('results={:s}'.format(str(results))) + return results + + def SetConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[SetConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + def DeleteConstraint(self, constraints : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('constraints', constraints, list) + if len(constraints) == 0: return [] + + msg = '[DeleteConstraint] Method not implemented. Constraints({:s}) are being ignored.' + LOGGER.warning(msg.format(str(constraints))) + return [True for _ in range(len(constraints))] + + def SetConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + resource_value = json.loads(resource[1]) + self.__settings_handler.set(resource[0], resource_value) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetConfig({:s})'.format(str(resource))) + results.append(e) + + return results + + def DeleteConfig(self, resources : List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + chk_type('resources', resources, list) + if len(resources) == 0: return [] + + results = [] + for resource in resources: + try: + self.__settings_handler.delete(resource[0]) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to DeleteConfig({:s})'.format(str(resource))) + results.append(e) + + return results diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockTaskExecutor.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockTaskExecutor.py new file mode 100644 index 0000000000000000000000000000000000000000..87e2b583d3c434f13759b75a1fd95f7a9d5b8c97 --- /dev/null +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/MockTaskExecutor.py @@ -0,0 +1,85 @@ +# Copyright 2022-2024 ETSI 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. + +import logging +from enum import Enum +from typing import Any, Dict, Optional, Union +from common.method_wrappers.ServiceExceptions import NotFoundException +from common.proto.context_pb2 import ( + Connection, ConnectionId, Device, DeviceId, Service +) +from service.service.tools.ObjectKeys import get_connection_key, get_device_key + +LOGGER = logging.getLogger(__name__) + +CacheableObject = Union[Connection, Device, Service] + +class CacheableObjectType(Enum): + CONNECTION = 'connection' + DEVICE = 'device' + SERVICE = 'service' + +class MockTaskExecutor: + def __init__(self) -> None: + self._grpc_objects_cache : Dict[str, CacheableObject] = dict() + + # ----- Common methods --------------------------------------------------------------------------------------------- + + def _load_grpc_object(self, object_type : CacheableObjectType, object_key : str) -> Optional[CacheableObject]: + object_key = '{:s}:{:s}'.format(object_type.value, object_key) + return self._grpc_objects_cache.get(object_key) + + def _store_grpc_object(self, object_type : CacheableObjectType, object_key : str, grpc_object) -> None: + object_key = '{:s}:{:s}'.format(object_type.value, object_key) + self._grpc_objects_cache[object_key] = grpc_object + + def _delete_grpc_object(self, object_type : CacheableObjectType, object_key : str) -> None: + object_key = '{:s}:{:s}'.format(object_type.value, object_key) + self._grpc_objects_cache.pop(object_key, None) + + def _store_editable_grpc_object( + self, object_type : CacheableObjectType, object_key : str, grpc_class, grpc_ro_object + ) -> Any: + grpc_rw_object = grpc_class() + grpc_rw_object.CopyFrom(grpc_ro_object) + self._store_grpc_object(object_type, object_key, grpc_rw_object) + return grpc_rw_object + + # ----- Connection-related methods --------------------------------------------------------------------------------- + + def get_connection(self, connection_id : ConnectionId) -> Connection: + connection_key = get_connection_key(connection_id) + connection = self._load_grpc_object(CacheableObjectType.CONNECTION, connection_key) + if connection is None: raise NotFoundException('Connection', connection_key) + return connection + + def set_connection(self, connection : Connection) -> None: + connection_key = get_connection_key(connection.connection_id) + self._store_grpc_object(CacheableObjectType.CONNECTION, connection_key, connection) + + def delete_connection(self, connection_id : ConnectionId) -> None: + connection_key = get_connection_key(connection_id) + self._delete_grpc_object(CacheableObjectType.CONNECTION, connection_key) + + # ----- Device-related methods ------------------------------------------------------------------------------------- + + def get_device(self, device_id : DeviceId) -> Device: + device_key = get_device_key(device_id) + device = self._load_grpc_object(CacheableObjectType.DEVICE, device_key) + if device is None: raise NotFoundException('Device', device_key) + return device + + def configure_device(self, device : Device) -> None: + device_key = get_device_key(device.device_id) + self._store_grpc_object(CacheableObjectType.DEVICE, device_key, device) diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/__init__.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary.py new file mode 100644 index 0000000000000000000000000000000000000000..ed575767e9228696bba243f0019c700fb2f520cc --- /dev/null +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary.py @@ -0,0 +1,147 @@ +# Copyright 2022-2024 ETSI 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. + +# Run with: +# $ PYTHONPATH=./src python -m service.tests.test_l3nm_gnmi_static_rule_gen.test_unitary + +import logging +from typing import List, Optional, Tuple +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import Device, DeviceOperationalStatusEnum, Service +from common.tools.object_factory.ConfigRule import json_config_rule_set +from common.tools.object_factory.Device import json_device, json_device_id +from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_id +from common.tools.object_factory.Service import json_service_l3nm_planned +from .MockServiceHandler import MockServiceHandler +from .MockTaskExecutor import CacheableObjectType, MockTaskExecutor + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +SERVICE_DC1_DC2 = Service(**json_service_l3nm_planned( + 'svc-dc1-dc2-uuid', + endpoint_ids=[ + json_endpoint_id(json_device_id('DC1'), 'int'), + json_endpoint_id(json_device_id('DC2'), 'int'), + ], + config_rules=[ + json_config_rule_set('/device[DC1]/endpoint[eth0]/settings', { + 'ipv4_address': '192.168.10.10', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + }), + json_config_rule_set('/device[R1]/endpoint[1/2]/settings', { + 'ipv4_address': '10.0.1.1', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + }), + #json_config_rule_set('/device[R2]/endpoint[1/2]/settings', { + # 'ipv4_address': '10.0.2.1', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + #}), + json_config_rule_set('/device[DC2]/endpoint[eth0]/settings', { + 'ipv4_address': '192.168.20.10', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + }), + ] +)) + +SERVICE_DC1_DC3 = Service(**json_service_l3nm_planned( + 'svc-dc1-dc3-uuid', + endpoint_ids=[ + json_endpoint_id(json_device_id('DC1'), 'int'), + json_endpoint_id(json_device_id('DC3'), 'int'), + ], + config_rules=[ + json_config_rule_set('/device[DC1]/endpoint[eth0]/settings', { + 'ipv4_address': '192.168.10.10', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + }), + #json_config_rule_set('/device[R1]/endpoint[1/2]/settings', { + # 'ipv4_address': '10.0.1.1', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + #}), + json_config_rule_set('/device[R4]/endpoint[1/1]/settings', { + 'ipv4_address': '10.0.4.1', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + }), + json_config_rule_set('/device[DC3]/endpoint[eth0]/settings', { + 'ipv4_address': '192.168.30.10', 'ipv4_prefix_len': 24, 'sub_interface_index': 0 + }), + ] +)) + +CONNECTION_ENDPOINTS_DC1_DC2 : List[Tuple[str, str, Optional[str]]] = [ + ('DC1', 'int', None), ('DC1', 'eth0', None), + ('R1', '1/1', None), ('R1', '1/2', None), + ('R2', '1/1', None), ('R2', '1/2', None), + ('R3', '1/1', None), ('R3', '1/2', None), + ('DC2', 'eth0', None), ('DC2', 'int', None), +] + +CONNECTION_ENDPOINTS_DC1_DC3 : List[Tuple[str, str, Optional[str]]] = [ + ('DC1', 'int', None), ('DC1', 'eth0', None), + ('R1', '1/1', None), ('R1', '1/2', None), + ('R2', '1/1', None), ('R2', '1/3', None), + ('R4', '1/1', None), ('R4', '1/2', None), + ('DC3', 'eth0', None), ('DC3', 'int', None), +] + +def test_l3nm_gnmi_static_rule_gen() -> None: + dev_op_st_enabled = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + mock_task_executor = MockTaskExecutor() + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'DC1', Device(**json_device( + 'uuid-DC1', DeviceTypeEnum.EMULATED_DATACENTER.value, dev_op_st_enabled, name='DC1', endpoints=[ + json_endpoint(json_device_id('uuid-DC1'), 'uuid-int', 'packet', name='int' ), + json_endpoint(json_device_id('uuid-DC1'), 'uuid-eth0', 'packet', name='eth0'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'DC2', Device(**json_device( + 'uuid-DC2', DeviceTypeEnum.EMULATED_DATACENTER.value, dev_op_st_enabled, name='DC2', endpoints=[ + json_endpoint(json_device_id('uuid-DC2'), 'uuid-int', 'packet', name='int' ), + json_endpoint(json_device_id('uuid-DC2'), 'uuid-eth0', 'packet', name='eth0'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'DC3', Device(**json_device( + 'uuid-DC3', DeviceTypeEnum.EMULATED_DATACENTER.value, dev_op_st_enabled, name='DC3', endpoints=[ + json_endpoint(json_device_id('uuid-DC3'), 'uuid-int', 'packet', name='int' ), + json_endpoint(json_device_id('uuid-DC3'), 'uuid-eth0', 'packet', name='eth0'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'R1', Device(**json_device( + 'uuid-R1', DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, dev_op_st_enabled, name='R1', endpoints=[ + json_endpoint(json_device_id('uuid-R1'), 'uuid-1/1', 'packet', name='1/1'), + json_endpoint(json_device_id('uuid-R1'), 'uuid-1/2', 'packet', name='1/2'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'R2', Device(**json_device( + 'uuid-R2', DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, dev_op_st_enabled, name='R2', endpoints=[ + json_endpoint(json_device_id('uuid-R2'), 'uuid-1/1', 'packet', name='1/1'), + json_endpoint(json_device_id('uuid-R2'), 'uuid-1/2', 'packet', name='1/2'), + json_endpoint(json_device_id('uuid-R2'), 'uuid-1/3', 'packet', name='1/3'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'R3', Device(**json_device( + 'uuid-R3', DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, dev_op_st_enabled, name='R3', endpoints=[ + json_endpoint(json_device_id('uuid-R3'), 'uuid-1/1', 'packet', name='1/1'), + json_endpoint(json_device_id('uuid-R3'), 'uuid-1/2', 'packet', name='1/2'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'R4', Device(**json_device( + 'uuid-R4', DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, dev_op_st_enabled, name='R4', endpoints=[ + json_endpoint(json_device_id('uuid-R4'), 'uuid-1/1', 'packet', name='1/1'), + json_endpoint(json_device_id('uuid-R4'), 'uuid-1/2', 'packet', name='1/2'), + ] + ))) + + mock_service_handler = MockServiceHandler(SERVICE_DC1_DC2, mock_task_executor) + mock_service_handler.SetEndpoint(CONNECTION_ENDPOINTS_DC1_DC2) + + mock_service_handler = MockServiceHandler(SERVICE_DC1_DC3, mock_task_executor) + mock_service_handler.SetEndpoint(CONNECTION_ENDPOINTS_DC1_DC3) + +if __name__ == '__main__': + test_l3nm_gnmi_static_rule_gen() diff --git a/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py b/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py new file mode 100644 index 0000000000000000000000000000000000000000..64035f1bbf4bb80bb5192488bffcbb4962458617 --- /dev/null +++ b/src/service/tests/test_l3nm_gnmi_static_rule_gen/test_unitary_sns4sns.py @@ -0,0 +1,104 @@ +# Copyright 2022-2024 ETSI 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. + +# Run with: +# $ PYTHONPATH=./src python -m service.tests.test_l3nm_gnmi_static_rule_gen.test_unitary_sns4sns + +import logging +from typing import List, Optional, Tuple +from common.DeviceTypes import DeviceTypeEnum +from common.proto.context_pb2 import Connection, Device, DeviceOperationalStatusEnum, Service +from common.tools.object_factory.ConfigRule import json_config_rule_set +from common.tools.object_factory.Connection import json_connection +from common.tools.object_factory.Device import json_device, json_device_id +from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_id +from common.tools.object_factory.Service import json_service_l3nm_planned +from .MockServiceHandler import MockServiceHandler +from .MockTaskExecutor import CacheableObjectType, MockTaskExecutor + +logging.basicConfig(level=logging.DEBUG) +LOGGER = logging.getLogger(__name__) + +SERVICE = Service(**json_service_l3nm_planned( + 'svc-core-edge-uuid', + endpoint_ids=[ + json_endpoint_id(json_device_id('core-net'), 'eth1'), + json_endpoint_id(json_device_id('edge-net'), 'eth1'), + ], + config_rules=[ + json_config_rule_set('/settings', {'address_families': ['IPV4'], 'mtu': 1500}), + json_config_rule_set('/static_routing', {}), + + json_config_rule_set('/device[core-net]/endpoint[eth1]/settings', { + 'address_ip': '10.10.10.0', 'neighbor_address': '10.10.10.229', 'address_prefix': 24, 'index': 0 + }), + json_config_rule_set('/device[edge-net]/endpoint[eth1]/settings', { + 'address_ip': '10.158.72.0', 'neighbor_address': '10.158.72.229', 'address_prefix': 24, 'index': 0 + }), + ] +)) + +CONNECTION_ENDPOINTS : List[Tuple[str, str, Optional[str]]] = [ + #('core-net', 'int', None), + ('core-net', 'eth1', None), ('r1', 'eth10', None), + ('r1', 'eth2', None), ('r2', 'eth1', None), + ('r2', 'eth10', None), ('edge-net', 'eth1', None), + #('edge-net', 'int', None), +] + +def test_l3nm_gnmi_static_rule_gen() -> None: + dev_op_st_enabled = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + mock_task_executor = MockTaskExecutor() + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'core-net', Device(**json_device( + 'core-net', DeviceTypeEnum.EMULATED_DATACENTER.value, dev_op_st_enabled, name='core-net', + endpoints=[ + json_endpoint(json_device_id('core-net'), 'int', 'packet', name='int' ), + json_endpoint(json_device_id('core-net'), 'eth1', 'packet', name='eth1'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'edge-net', Device(**json_device( + 'edge-net', DeviceTypeEnum.EMULATED_DATACENTER.value, dev_op_st_enabled, name='edge-net', + endpoints=[ + json_endpoint(json_device_id('edge-net'), 'int', 'packet', name='int' ), + json_endpoint(json_device_id('edge-net'), 'eth1', 'packet', name='eth1'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'r1', Device(**json_device( + 'r1', DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, dev_op_st_enabled, name='r1', + endpoints=[ + json_endpoint(json_device_id('r1'), 'eth2', 'packet', name='eth2' ), + json_endpoint(json_device_id('r1'), 'eth10', 'packet', name='eth10'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.DEVICE, 'r2', Device(**json_device( + 'r2', DeviceTypeEnum.EMULATED_PACKET_ROUTER.value, dev_op_st_enabled, name='r2', + endpoints=[ + json_endpoint(json_device_id('r1'), 'eth1', 'packet', name='eth1' ), + json_endpoint(json_device_id('r1'), 'eth10', 'packet', name='eth10'), + ] + ))) + mock_task_executor._store_grpc_object(CacheableObjectType.CONNECTION, 'conn', Connection(**json_connection( + 'conn', path_hops_endpoint_ids=[ + json_endpoint_id(json_device_id(device_uuid), endpoint_uuid=endpoint_uuid) + for device_uuid, endpoint_uuid, _ in CONNECTION_ENDPOINTS + ] + ))) + + mock_service_handler = MockServiceHandler(SERVICE, mock_task_executor) + mock_service_handler.SetEndpoint(CONNECTION_ENDPOINTS, connection_uuid='conn') + mock_service_handler.DeleteEndpoint(CONNECTION_ENDPOINTS, connection_uuid='conn') + +if __name__ == '__main__': + test_l3nm_gnmi_static_rule_gen() diff --git a/src/service/tests/test_service_recompute_cons.sh b/src/service/tests/test_service_recompute_cons.sh index db3f74a9afb1b85a7cedb4d7163b2c80aa67c291..6dd204cb725e1ab0747f90f18a2af47fd67613b2 100644 --- a/src/service/tests/test_service_recompute_cons.sh +++ b/src/service/tests/test_service_recompute_cons.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/test_unitary.py b/src/service/tests/test_unitary.py index c4155751023b13039ce06a7c23f58987c253b183..dae63fe8da7cc519f244adf4ea25b284f787c828 100644 --- a/src/service/tests/test_unitary.py +++ b/src/service/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/test_unitary_recompute_conns.py b/src/service/tests/test_unitary_recompute_conns.py index 5b15fe7fe00470008906aeb484d05f5b72163d3e..011b49c3ea91758dbe7374604caab32406208a75 100644 --- a/src/service/tests/test_unitary_recompute_conns.py +++ b/src/service/tests/test_unitary_recompute_conns.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/service/tests/test_unitary_task_scheduler.py b/src/service/tests/test_unitary_task_scheduler.py index 90cdbd15e32f2760fcced0cf9818d56ea442ef12..6d8dfef39058dc35742b6193eb6cc2756738689b 100644 --- a/src/service/tests/test_unitary_task_scheduler.py +++ b/src/service/tests/test_unitary_task_scheduler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/.gitlab-ci.yml b/src/slice/.gitlab-ci.yml index 7420ed31e37c6cd4ae2c232ea7364cd91b6c3794..343bf27664d4e8ec38ff521dd23c4305cf2ad808 100644 --- a/src/slice/.gitlab-ci.yml +++ b/src/slice/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/Config.py b/src/slice/Config.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/slice/Config.py +++ b/src/slice/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/Dockerfile b/src/slice/Dockerfile index 0107bd369b577f7e98dccc967212efcff76a7701..1108030fef81395fd9640af4019ef0360d3b005c 100644 --- a/src/slice/Dockerfile +++ b/src/slice/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/__init__.py b/src/slice/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/slice/__init__.py +++ b/src/slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/client/SliceClient.py b/src/slice/client/SliceClient.py index 0752501a4012cd0a2a85005376b791150a389feb..2637391385f8cabf07e88c4b1cf93031dd8736f0 100644 --- a/src/slice/client/SliceClient.py +++ b/src/slice/client/SliceClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/client/__init__.py b/src/slice/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/slice/client/__init__.py +++ b/src/slice/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/old_code/ConstraintsChecker.py b/src/slice/old_code/ConstraintsChecker.py index 5ca88635edd09a485fc9d2d26891564f37e4f737..de1b33c62380091a953c58cfd7c10ff7afc92018 100644 --- a/src/slice/old_code/ConstraintsChecker.py +++ b/src/slice/old_code/ConstraintsChecker.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/old_code/SliceCheckers.py b/src/slice/old_code/SliceCheckers.py index 2cc4788b194e486068f6a808bc8c0a5232ed548a..a687830c1c91c725afe55deb364fd01100abb620 100644 --- a/src/slice/old_code/SliceCheckers.py +++ b/src/slice/old_code/SliceCheckers.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/old_code/SliceStatus.py b/src/slice/old_code/SliceStatus.py index 37c69ca843e5440fe0277c573eb9b37e303aa1d2..aef6b491069f616c822d094b0497ab70344a2124 100644 --- a/src/slice/old_code/SliceStatus.py +++ b/src/slice/old_code/SliceStatus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/old_code/Tools.py b/src/slice/old_code/Tools.py index 497dd2b93680fc07e887347ae2a29917dd5dc3de..27e19256759c0abff6a021eebd745f8541898178 100644 --- a/src/slice/old_code/Tools.py +++ b/src/slice/old_code/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/old_code/Tools_2.py b/src/slice/old_code/Tools_2.py index 950c8848f5af2a8f83b94ead36a20e75b76e27e8..e363f57fa1743f9faff0ba795753ba55767b2a97 100644 --- a/src/slice/old_code/Tools_2.py +++ b/src/slice/old_code/Tools_2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/requirements.in b/src/slice/requirements.in index 158355b697b14265c7ce965953c9d75b9bfdea65..16066c50b1d6b80722a965e031f2ab8a4ebb9303 100644 --- a/src/slice/requirements.in +++ b/src/slice/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/SliceService.py b/src/slice/service/SliceService.py index 8d6f04aadb2a81ef3abffb1ac6bb36bc88d39104..ac4e809762c1ffb6097506f34d519056f2bd3426 100644 --- a/src/slice/service/SliceService.py +++ b/src/slice/service/SliceService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,9 +14,10 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc +from common.proto.slice_pb2 import DESCRIPTOR as SLICE_DESCRIPTOR from common.proto.slice_pb2_grpc import add_SliceServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService -from slice.service.SliceServiceServicerImpl import SliceServiceServicerImpl +from .SliceServiceServicerImpl import SliceServiceServicerImpl class SliceService(GenericGrpcService): def __init__(self, cls_name: str = __name__) -> None: @@ -26,3 +27,5 @@ class SliceService(GenericGrpcService): def install_servicers(self): add_SliceServiceServicer_to_server(self.slice_servicer, self.server) + + self.add_reflection_service_name(SLICE_DESCRIPTOR, 'SliceService') diff --git a/src/slice/service/SliceServiceServicerImpl.py b/src/slice/service/SliceServiceServicerImpl.py index c3adb9f31ef30d0cc7cae9a233cca07e48591fa6..007d012ed432a6d4ab589f6dfe28648a9a6d2a85 100644 --- a/src/slice/service/SliceServiceServicerImpl.py +++ b/src/slice/service/SliceServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/__init__.py b/src/slice/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/slice/service/__init__.py +++ b/src/slice/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/__main__.py b/src/slice/service/__main__.py index 424b8db84267782a2b4f6ab71cd46b862317f4f0..9d20d72a4a7ebbad102ec3630206bd59be6192a6 100644 --- a/src/slice/service/__main__.py +++ b/src/slice/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/slice_grouper/Constants.py b/src/slice/service/slice_grouper/Constants.py index d44e6afd0fc232addb6e5372dd6960640ed67815..d071838c5d4a0717d56c2594e8e5a3987d28ab25 100644 --- a/src/slice/service/slice_grouper/Constants.py +++ b/src/slice/service/slice_grouper/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/slice_grouper/MetricsExporter.py b/src/slice/service/slice_grouper/MetricsExporter.py index 71b7535993bcdaeed45d78ef08299dac049cf840..9d9a6d0276d61ea290e2ce16b84c05426f17b151 100644 --- a/src/slice/service/slice_grouper/MetricsExporter.py +++ b/src/slice/service/slice_grouper/MetricsExporter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/slice_grouper/SliceGrouper.py b/src/slice/service/slice_grouper/SliceGrouper.py index d2c58b778c4b5758731809006771dc5d35853421..02bf0a03e9c5b72c464092dcbff4c0102d9ad24e 100644 --- a/src/slice/service/slice_grouper/SliceGrouper.py +++ b/src/slice/service/slice_grouper/SliceGrouper.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/slice_grouper/Tools.py b/src/slice/service/slice_grouper/Tools.py index 8a46088e97c5387d49b1a08acd57e1715287e994..7d37e9173e8d94e0b535b2fd8530a2e9af56f0d2 100644 --- a/src/slice/service/slice_grouper/Tools.py +++ b/src/slice/service/slice_grouper/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/service/slice_grouper/__init__.py b/src/slice/service/slice_grouper/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/slice/service/slice_grouper/__init__.py +++ b/src/slice/service/slice_grouper/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/tests/__init__.py b/src/slice/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/slice/tests/__init__.py +++ b/src/slice/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/tests/old/Main.py b/src/slice/tests/old/Main.py index bd964025110e4e986ada237816d3f5f4d79279d3..6549dee4e8d6c0d669fbd88e1ff30ee7d6a4c35b 100644 --- a/src/slice/tests/old/Main.py +++ b/src/slice/tests/old/Main.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/tests/old/MetricsExporter.py b/src/slice/tests/old/MetricsExporter.py index 16a7f00ead896757317b1a8232951d53238ac187..6c45b8a1114e8253ccee99e9153fbe35a88df130 100644 --- a/src/slice/tests/old/MetricsExporter.py +++ b/src/slice/tests/old/MetricsExporter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/tests/old/test_kmeans.py b/src/slice/tests/old/test_kmeans.py index b8fa2ec036edd0494a621933d32e23f16ca08d70..8fd2b5044dcd2bd98f188467c8d5f8fb63255bcf 100644 --- a/src/slice/tests/old/test_kmeans.py +++ b/src/slice/tests/old/test_kmeans.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/tests/old/test_subslices.py b/src/slice/tests/old/test_subslices.py index d1bf119a18b0436d2e60c0b22da63da085d90622..7be714e6f27c94c97fc473a2c7eaaacd7af965fa 100644 --- a/src/slice/tests/old/test_subslices.py +++ b/src/slice/tests/old/test_subslices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/slice/tests/test_unitary.py b/src/slice/tests/test_unitary.py index 5af87502a798d1f94c2de80a485967eecfd62bd3..d52cdde283b07e3c3524da3672f1f1169f0eaf62 100644 --- a/src/slice/tests/test_unitary.py +++ b/src/slice/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/te/Dockerfile b/src/te/Dockerfile index a7d2a73b1263d8a101cd0edff26341e5bdf084ad..9d152b306b8a100ca49ed0288b23cd9cfe42fdab 100644 --- a/src/te/Dockerfile +++ b/src/te/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/epce/src/epce.app.src b/src/te/apps/epce/src/epce.app.src index fc1f5e88d8978a4869befdb60923ef957174665f..dff3fcabaa7ebc98d2eb9bf0e1a67b12a783a315 100644 --- a/src/te/apps/epce/src/epce.app.src +++ b/src/te/apps/epce/src/epce.app.src @@ -1,4 +1,4 @@ -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/epce/src/epce_app.erl b/src/te/apps/epce/src/epce_app.erl index 91b891f528adaf47a84773eed2e44beb10891d2e..33a75a050498ad4c04022dce0092dd6200af174c 100644 --- a/src/te/apps/epce/src/epce_app.erl +++ b/src/te/apps/epce/src/epce_app.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/epce/src/epce_pcep_server_handler.erl b/src/te/apps/epce/src/epce_pcep_server_handler.erl index fb8e07331164398c5f0045b8e12004e1a57be25a..7fae5bd4f70193769b4379d640a3ecefb868b1c1 100644 --- a/src/te/apps/epce/src/epce_pcep_server_handler.erl +++ b/src/te/apps/epce/src/epce_pcep_server_handler.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/epce/src/epce_server.erl b/src/te/apps/epce/src/epce_server.erl index 336fd3d518c1a3df938e3781d506a443d61d0ffa..328910e4fbc45d7a547ca16833c7c0804ff7e6d7 100644 --- a/src/te/apps/epce/src/epce_server.erl +++ b/src/te/apps/epce/src/epce_server.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/epce/src/epce_sup.erl b/src/te/apps/epce/src/epce_sup.erl index 59a3e3d020965d119c7047e088c180cdafa47b7a..79b5081aee90e58f40390360dcef6f55d53e293c 100644 --- a/src/te/apps/epce/src/epce_sup.erl +++ b/src/te/apps/epce/src/epce_sup.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/epce/src/epce_ted.erl b/src/te/apps/epce/src/epce_ted.erl index 84a11e70b149ed66d678ff2c5133c9dc1341da43..a48445b8ec43c8582b8affaacec1992d6916bf3c 100644 --- a/src/te/apps/epce/src/epce_ted.erl +++ b/src/te/apps/epce/src/epce_ted.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte.app.src b/src/te/apps/tfte/src/tfte.app.src index 0793ab801ff795bcaa89122662cd0f1b20d59746..a7ff59b455031abcc5a3143e22d339a3ea03926d 100644 --- a/src/te/apps/tfte/src/tfte.app.src +++ b/src/te/apps/tfte/src/tfte.app.src @@ -1,4 +1,4 @@ -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_app.erl b/src/te/apps/tfte/src/tfte_app.erl index 39565ba82aec8cdb3a4b7e461f042dc4a8be9a56..4b82b29e03c2525d4156923cff8c9fadf28e70a8 100644 --- a/src/te/apps/tfte/src/tfte_app.erl +++ b/src/te/apps/tfte/src/tfte_app.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_context.erl b/src/te/apps/tfte/src/tfte_context.erl index 49d6710b9b661f4a5219f0b0898270c44e7c2b3f..0bdc018740cc93bbf0cfcb238c8ee377dc0d7f51 100644 --- a/src/te/apps/tfte/src/tfte_context.erl +++ b/src/te/apps/tfte/src/tfte_context.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_server.erl b/src/te/apps/tfte/src/tfte_server.erl index 47a851d554c658d2a49faa13c0aaf43ffbab27df..5bfd6216370273c2360a7c3dd1a405862caaf5c2 100644 --- a/src/te/apps/tfte/src/tfte_server.erl +++ b/src/te/apps/tfte/src/tfte_server.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_service_sup.erl b/src/te/apps/tfte/src/tfte_service_sup.erl index cd80f5cf2cfd993ddf2ed3c3733e8da4fd60fab8..cdb32f23f1b356f8eab54a298e85778d0a3f037c 100644 --- a/src/te/apps/tfte/src/tfte_service_sup.erl +++ b/src/te/apps/tfte/src/tfte_service_sup.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_sup.erl b/src/te/apps/tfte/src/tfte_sup.erl index 14deadc768c5ad4c3b0e144c82478fad91aaf960..e8cec9aa2ae9dd7b17c3df4971794a9f20725734 100644 --- a/src/te/apps/tfte/src/tfte_sup.erl +++ b/src/te/apps/tfte/src/tfte_sup.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_te_service.erl b/src/te/apps/tfte/src/tfte_te_service.erl index 94d0f2ead0a5f78869f68e5cc9719d5e925daaa6..4c0caae5cac5de0a41da7bb9167ca91863444ead 100644 --- a/src/te/apps/tfte/src/tfte_te_service.erl +++ b/src/te/apps/tfte/src/tfte_te_service.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_topology.erl b/src/te/apps/tfte/src/tfte_topology.erl index b7720cb49b91d03e7c86a9a539549b63b3a3a039..426ac10cc8316d6dd696ff6217311cdfc8219290 100644 --- a/src/te/apps/tfte/src/tfte_topology.erl +++ b/src/te/apps/tfte/src/tfte_topology.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/apps/tfte/src/tfte_util.erl b/src/te/apps/tfte/src/tfte_util.erl index 737daa2e05285c7d4f952b46af5bdb32c1acb94d..aab9317a00f2e6a8d72dd7c405fcbeeb4989e7f8 100644 --- a/src/te/apps/tfte/src/tfte_util.erl +++ b/src/te/apps/tfte/src/tfte_util.erl @@ -1,5 +1,5 @@ %%%----------------------------------------------------------------------------- -%% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +%% Copyright 2022-2024 ETSI 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. diff --git a/src/te/config/dev.config.template b/src/te/config/dev.config.template index d6d67341a179090ff3a19c8c145dea08dc4f9252..ccd92895c28d79de93e1d468473959934ccbc6f1 100644 --- a/src/te/config/dev.config.template +++ b/src/te/config/dev.config.template @@ -1,4 +1,4 @@ -% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI 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. diff --git a/src/te/config/sys.config.src b/src/te/config/sys.config.src index 6efa8c15d8259779aaa5edea9b682ebccd4d30e2..9ae737bf4968127b779edf39be01941079c5ebfc 100644 --- a/src/te/config/sys.config.src +++ b/src/te/config/sys.config.src @@ -1,4 +1,4 @@ -% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI 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. diff --git a/src/te/rebar.config b/src/te/rebar.config index def36790397d3d207562413f285759bd1d7e61ee..63c5fc154b9e316ee39ec4121d6725e5c2c4de6b 100644 --- a/src/te/rebar.config +++ b/src/te/rebar.config @@ -1,4 +1,4 @@ -% Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +% Copyright 2022-2024 ETSI 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. diff --git a/src/te/tests/deploy_specs.sh b/src/te/tests/deploy_specs.sh index 1562021e77a7a4ea5f08a0ad66e4e89f31e5e2e5..1534f3ac2588df4c9d1ff829af2940729e9afac3 100644 --- a/src/te/tests/deploy_specs.sh +++ b/src/te/tests/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -76,9 +76,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/te/tests/netgen-config.yml b/src/te/tests/netgen-config.yml index 3dee8cc105f32ed68e161c4e4827e541f3156c5e..8d67600043c69ceb31944c96bf89a4b2eeefbd62 100644 --- a/src/te/tests/netgen-config.yml +++ b/src/te/tests/netgen-config.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/te/tests/netgen-topology.yml.template b/src/te/tests/netgen-topology.yml.template index 8021d433bd6aa113e043c44b79c3451678534581..fab5f57bc881f82cd3bb17e62926e3b587fdcb29 100644 --- a/src/te/tests/netgen-topology.yml.template +++ b/src/te/tests/netgen-topology.yml.template @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/te/tests/start-testbed.sh b/src/te/tests/start-testbed.sh index f66275c0e63960863740eea69946c233adf8e217..84a63843abce78ef98713c0aa17a83df82ad3e9c 100755 --- a/src/te/tests/start-testbed.sh +++ b/src/te/tests/start-testbed.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/te/tests/test_te_service.py b/src/te/tests/test_te_service.py index b7b3cbfc35d56fd8e9604e0e0ab477dbffa7cbd1..851535aa7ff9ddd07d7630ce6041e48def58941d 100644 --- a/src/te/tests/test_te_service.py +++ b/src/te/tests/test_te_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml index 358a93af8d309c3ea8e80c9b905792763ad51de8..9ac995e63dedb82a1d2741f90fe22005a074be77 100644 --- a/src/telemetry/.gitlab-ci.yml +++ b/src/telemetry/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/README.md b/src/telemetry/README.md index da43bd471c384ae9133871a097e94043f70ed7de..7acef89f974c29b4c4370d4c4230c7fada6407c2 100644 --- a/src/telemetry/README.md +++ b/src/telemetry/README.md @@ -1,10 +1,23 @@ # How to locally run and test Telemetry service ### Pre-requisets -The following requirements should be fulfilled before the execuation of Telemetry service. +The following requirements should be fulfilled before the execuation of Analytics service. -1. verify that [telmetry_frontend.proto](https://labs.etsi.org/rep/tfs/controller/-/blob/feat/71-cttc-separation-of-monitoring/proto/telemetry_frontend.proto) file exists and grpcs file are generated sucessfully. -2. virtual enviornment exist with all the required packages listed in ["requirements.in"](https://labs.etsi.org/rep/tfs/controller/-/blob/feat/71-cttc-separation-of-monitoring/src/telemetry/telemetry_virenv.txt) are installed sucessfully. -3. verify the creation of required database and table. -[DB test](https://labs.etsi.org/rep/tfs/controller/-/blob/feat/71-cttc-separation-of-monitoring/src/telemetry/database/tests/managementDBtests.py) python file enlist the functions to create tables and database. -[KPI Engine](https://labs.etsi.org/rep/tfs/controller/-/blob/feat/71-cttc-separation-of-monitoring/src/kpi_manager/service/database/KpiEngine.py) contains the DB string, update the string as per your deployment. +1. A virtual enviornment exist with all the required packages listed in [requirements.in](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/telemetry/requirements.in) sucessfully installed. +2. The Telemetry backend service should be running. +3. All required Kafka topics must exist. Call `create_all_topics` from the [Kafka class](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/common/tools/kafka/Variables.py) to create any topics that do not already exist. +``` +from common.tools.kafka.Variables import KafkaTopic +KafkaTopic.create_all_topics() +``` + +## Steps to create telemetry collector +The collector can be declared as below but there are many other ways to declare: + +``` +_create_collector_request = telemetry_frontend_pb2.Collector() +_create_collector_request.collector_id.collector_id.uuid = str(uuid.uuid4()) +_create_collector_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) +_create_collector_request.duration_s = 100 # in seconds +_create_collector_request.interval_s = 10 # in seconds +``` diff --git a/src/telemetry/__init__.py b/src/telemetry/__init__.py index 234a1af6588c91f6a17f3963f69120cd6e2248d9..2ef1f525b7ab8126267e7f169bfbe682676b4896 100644 --- a/src/telemetry/__init__.py +++ b/src/telemetry/__init__.py @@ -1,5 +1,5 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/Dockerfile b/src/telemetry/backend/Dockerfile index eebfe24ab3ca457b9d05b02a07f4b28d6f196987..4bc5605d59bdb2e2b24cf580ce8e2a6978caa2e8 100644 --- a/src/telemetry/backend/Dockerfile +++ b/src/telemetry/backend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/__init__.py b/src/telemetry/backend/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/telemetry/backend/__init__.py +++ b/src/telemetry/backend/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/requirements.in b/src/telemetry/backend/requirements.in index 4c5921998fc9d2b2cd6c7f2fba1d3e908ece0dc1..2843bdbf68defcc1a972b49bfa12a8107b696aaa 100644 --- a/src/telemetry/backend/requirements.in +++ b/src/telemetry/backend/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 559ba3c326e988253e908e2c5fe9e61d77b70e3e..a1f17df3cb65a6bd13ffb8e96a6a07b536200825 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/service/__init__.py b/src/telemetry/backend/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/telemetry/backend/service/__init__.py +++ b/src/telemetry/backend/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/service/__main__.py b/src/telemetry/backend/service/__main__.py index 9ec9e191fd22e07da46f80214ade0ac516032433..61ff397214fa21ff2d767c2eda4b3a7ee1f796b5 100644 --- a/src/telemetry/backend/service/__main__.py +++ b/src/telemetry/backend/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/tests/__init__.py b/src/telemetry/backend/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/telemetry/backend/tests/__init__.py +++ b/src/telemetry/backend/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/tests/messages.py b/src/telemetry/backend/tests/messages.py index e6c9b9e167f3f592d811f8ace017268e2e80399f..f6a2bb247f28d10654746e0c75b6ed1973382e38 100644 --- a/src/telemetry/backend/tests/messages.py +++ b/src/telemetry/backend/tests/messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/backend/tests/test_backend.py b/src/telemetry/backend/tests/test_backend.py index a8d47da454df9c894e7e3f1a805d58d5cf7d777f..e75b33ca58c6bf27c5d2e1c2012dc31de5274ad3 100644 --- a/src/telemetry/backend/tests/test_backend.py +++ b/src/telemetry/backend/tests/test_backend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/database/TelemetryModel.py b/src/telemetry/database/TelemetryModel.py index 4e71ce8138af39e51c80791dbd6683d855231d7b..fb563ed2e3580c2783a7b82ab580a6ecd0fa6350 100644 --- a/src/telemetry/database/TelemetryModel.py +++ b/src/telemetry/database/TelemetryModel.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/database/Telemetry_DB.py b/src/telemetry/database/Telemetry_DB.py index 110c7e80a4c36eed15417bfa05c4057ccb7fe292..c4ba61a132836ee0d973a7c0b9f727953dc93046 100644 --- a/src/telemetry/database/Telemetry_DB.py +++ b/src/telemetry/database/Telemetry_DB.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/database/__init__.py b/src/telemetry/database/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/telemetry/database/__init__.py +++ b/src/telemetry/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/database/__main__.py b/src/telemetry/database/__main__.py index 5cf553eaaec41de7599b6723e31e4ca3f82cbcae..0dc5506ab42d67d67a88cf8976409472213fe098 100644 --- a/src/telemetry/database/__main__.py +++ b/src/telemetry/database/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/Dockerfile b/src/telemetry/frontend/Dockerfile index 7125d31fe74f7c44a52c2783369c2dc7a4a31160..0e7827895312313e7d76e2f0234ecd59a407f1d6 100644 --- a/src/telemetry/frontend/Dockerfile +++ b/src/telemetry/frontend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/__init__.py b/src/telemetry/frontend/__init__.py index 234a1af6588c91f6a17f3963f69120cd6e2248d9..2ef1f525b7ab8126267e7f169bfbe682676b4896 100644 --- a/src/telemetry/frontend/__init__.py +++ b/src/telemetry/frontend/__init__.py @@ -1,5 +1,5 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/client/TelemetryFrontendClient.py b/src/telemetry/frontend/client/TelemetryFrontendClient.py index afcf241530a41f1f4ab1729379a4e5196c25d04f..6d1db1fe4dd1ab3cb1e3068422715b2b80b813a3 100644 --- a/src/telemetry/frontend/client/TelemetryFrontendClient.py +++ b/src/telemetry/frontend/client/TelemetryFrontendClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/client/__init__.py b/src/telemetry/frontend/client/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/telemetry/frontend/client/__init__.py +++ b/src/telemetry/frontend/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/requirements.in b/src/telemetry/frontend/requirements.in index 231dc04e820387c95ffea72cbe67b9f0a9a0865a..5ca81a10fbe1c0137ee8e83848371a4dbccd4271 100644 --- a/src/telemetry/frontend/requirements.in +++ b/src/telemetry/frontend/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/service/TelemetryFrontendService.py b/src/telemetry/frontend/service/TelemetryFrontendService.py index 49def20a1ce3cee1062d1e582fd8ec28308652b7..5c4ad53c0a3246c3b58f9b3e00eacdd87cf47dc7 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendService.py +++ b/src/telemetry/frontend/service/TelemetryFrontendService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index b7dcdbb6b14c2860e8e62ccdcdee38822bad9778..f74e97ffd4998ca0b3255ca4e1ebe496ebc6737b 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/service/__init__.py b/src/telemetry/frontend/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/telemetry/frontend/service/__init__.py +++ b/src/telemetry/frontend/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/service/__main__.py b/src/telemetry/frontend/service/__main__.py index 6697ff5f10e58b494736738e631a29a20691732d..e1b9dba4e97fe30b962a1deb9050c67671cbe976 100644 --- a/src/telemetry/frontend/service/__main__.py +++ b/src/telemetry/frontend/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/tests/Messages.py b/src/telemetry/frontend/tests/Messages.py index e6d8ef439f4ad4764c5a6f8b5f36ec68cbb10867..177bcc0b7e3829d2cdfd54c404618af9ebe43161 100644 --- a/src/telemetry/frontend/tests/Messages.py +++ b/src/telemetry/frontend/tests/Messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/frontend/tests/test_frontend.py b/src/telemetry/frontend/tests/test_frontend.py index 988d76af0380302cd6351d46eccf6159bf1dc5ab..067925a285f6e6d69b89b518e6a96c1ed495b7e0 100644 --- a/src/telemetry/frontend/tests/test_frontend.py +++ b/src/telemetry/frontend/tests/test_frontend.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in index 503468a662599f0225b293d0ef4c4e4313fa3e0f..36ba1ca0439587a702e3d303148ea75edb7d89d1 100644 --- a/src/telemetry/requirements.in +++ b/src/telemetry/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/tests/messages.py b/src/telemetry/tests/messages.py index 6919eecc62da0794869f334c4de85cb129fbab14..206da4621713dfbf62fe721cc44b4d9352e7cce1 100644 --- a/src/telemetry/tests/messages.py +++ b/src/telemetry/tests/messages.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/telemetry/tests/test_telemetryDB.py b/src/telemetry/tests/test_telemetryDB.py index bbc02a2a22fbbae3a1064fc5f9606ec8b29ff0f9..212e134bf5d753e86bfe61e21cea28372f51274e 100644 --- a/src/telemetry/tests/test_telemetryDB.py +++ b/src/telemetry/tests/test_telemetryDB.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/.gitlab-ci.yml b/src/tests/.gitlab-ci.yml index 808aebf2173361e05fee5ed2806b9c7aa6362753..fdc86805ba4824f64844a9b4bc78c3e27b606945 100644 --- a/src/tests/.gitlab-ci.yml +++ b/src/tests/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -20,4 +20,5 @@ include: #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' #- local: '/src/tests/ofc23/.gitlab-ci.yml' - local: '/src/tests/ofc24/.gitlab-ci.yml' + - local: '/src/tests/eucnc24/.gitlab-ci.yml' #- local: '/src/tests/ecoc24/.gitlab-ci.yml' diff --git a/src/tests/Fixtures.py b/src/tests/Fixtures.py index 0d075822712adab1ba1adfabae27c4ecf115e597..68fbffa520dcaa035cdfedc0497ff83ae56df4bd 100644 --- a/src/tests/Fixtures.py +++ b/src/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/__init__.py b/src/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/__init__.py +++ b/src/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/PolicyAddService.js b/src/tests/benchmark/policy/PolicyAddService.js index 18e4f230ccd27f5ae9b6257af662073285294e17..1e6ccdcdacd21f6574c49ab47a31636182cf41d7 100644 --- a/src/tests/benchmark/policy/PolicyAddService.js +++ b/src/tests/benchmark/policy/PolicyAddService.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/PolicyDelete.js b/src/tests/benchmark/policy/PolicyDelete.js index d363dfe4528ba7c4610fb750f76b2ef310f360bb..2126f48ac3bee7ab542d4f1028c3223e314d2d4a 100644 --- a/src/tests/benchmark/policy/PolicyDelete.js +++ b/src/tests/benchmark/policy/PolicyDelete.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/PolicyUpdateService.js b/src/tests/benchmark/policy/PolicyUpdateService.js index 07e85d627a07a619e0d0c606944a3682597bd273..1acb4009add1c076b02452d912ca8ca8c8db6522 100644 --- a/src/tests/benchmark/policy/PolicyUpdateService.js +++ b/src/tests/benchmark/policy/PolicyUpdateService.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/__init__.py b/src/tests/benchmark/policy/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/benchmark/policy/__init__.py +++ b/src/tests/benchmark/policy/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/deploy_specs.sh b/src/tests/benchmark/policy/deploy_specs.sh index fbff2ad7d79dbe295d4fa7ccd7cce9b7e94615ed..e691313536c712806aa19441727278ec9b535096 100644 --- a/src/tests/benchmark/policy/deploy_specs.sh +++ b/src/tests/benchmark/policy/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -48,9 +48,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/tests/benchmark/policy/run_test_01_bootstrap.sh b/src/tests/benchmark/policy/run_test_01_bootstrap.sh index f47704a0b8be6e9873519a895c01644eaf74e448..c06f77d7621afbe58b703f18190d61738d6caaa7 100755 --- a/src/tests/benchmark/policy/run_test_01_bootstrap.sh +++ b/src/tests/benchmark/policy/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/run_test_02_create_service.sh b/src/tests/benchmark/policy/run_test_02_create_service.sh index 26ad37b4a4bff42f5a915fd8a79b0a8dab6cc41b..73030476775fc06fc263a6624d8545b411f3e420 100755 --- a/src/tests/benchmark/policy/run_test_02_create_service.sh +++ b/src/tests/benchmark/policy/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/run_test_03_delete_service.sh b/src/tests/benchmark/policy/run_test_03_delete_service.sh index a4e919f6af5a4b4d2fb6817606c2b94cce280bc8..c4c146f507a15e9847e9eed3a0138226ac12d40e 100755 --- a/src/tests/benchmark/policy/run_test_03_delete_service.sh +++ b/src/tests/benchmark/policy/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/run_test_04_cleanup.sh b/src/tests/benchmark/policy/run_test_04_cleanup.sh index 792844664e44104108e75232b961d5c7448be62a..870fea766e49e96bbb41c9b5034f8edc9bc2470d 100755 --- a/src/tests/benchmark/policy/run_test_04_cleanup.sh +++ b/src/tests/benchmark/policy/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/Fixtures.py b/src/tests/benchmark/policy/tests/Fixtures.py index e2752dce9927cce1217c1e4316f2b07e50731c2a..f1b42d39ecb4e77200991d9df40e1390099bbede 100644 --- a/src/tests/benchmark/policy/tests/Fixtures.py +++ b/src/tests/benchmark/policy/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/Objects.py b/src/tests/benchmark/policy/tests/Objects.py index a2ec63adc5876ba9fc92f2d6a6517c1a1a5d79fb..f85d8950868559b07f60bbcec0ceb78148eca744 100644 --- a/src/tests/benchmark/policy/tests/Objects.py +++ b/src/tests/benchmark/policy/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/__init__.py b/src/tests/benchmark/policy/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/benchmark/policy/tests/__init__.py +++ b/src/tests/benchmark/policy/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py index f31e576cf1d00355081408c455d925c5ac7d41e8..386602b60713609b4c4f8c6e42056108b32ba664 100644 --- a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py +++ b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/test_functional_cleanup.py b/src/tests/benchmark/policy/tests/test_functional_cleanup.py index fdbeb3c1461047defc3bec393a9c49396cd463ee..297aabfd98eb4435e06f46172718da400e059ab6 100644 --- a/src/tests/benchmark/policy/tests/test_functional_cleanup.py +++ b/src/tests/benchmark/policy/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/test_functional_create_service.py b/src/tests/benchmark/policy/tests/test_functional_create_service.py index e4e196678bd8b7dedcfffb2ddb065adf237d0e52..87fdc57326224c79020510f16a5ae80d48a7fb3e 100644 --- a/src/tests/benchmark/policy/tests/test_functional_create_service.py +++ b/src/tests/benchmark/policy/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/policy/tests/test_functional_delete_service.py b/src/tests/benchmark/policy/tests/test_functional_delete_service.py index 524a5b09ae4e713287c48b8b38f276a7f678ca4f..5d26433452c816beccb6bd0d9f2d7b09fdf03383 100644 --- a/src/tests/benchmark/policy/tests/test_functional_delete_service.py +++ b/src/tests/benchmark/policy/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/ZtpAdd.js b/src/tests/benchmark/ztp/ZtpAdd.js index 3aaad035f4aecb729ca0fd8113795d6cb3029241..6e49b118e5e487d123caa4c6180143e01d12943d 100644 --- a/src/tests/benchmark/ztp/ZtpAdd.js +++ b/src/tests/benchmark/ztp/ZtpAdd.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/ZtpDelete.js b/src/tests/benchmark/ztp/ZtpDelete.js index 3a21aeb89f64de53caeb2a53787d6e49caf81bda..787284aeed5cbc8fa3aa4f6921a31e983113e084 100644 --- a/src/tests/benchmark/ztp/ZtpDelete.js +++ b/src/tests/benchmark/ztp/ZtpDelete.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/ZtpUpdate.js b/src/tests/benchmark/ztp/ZtpUpdate.js index 13749d234bc2cfe4b440431f5a72f0f08c4899ff..c22154393597d174ac6882b13d750df395f522d6 100644 --- a/src/tests/benchmark/ztp/ZtpUpdate.js +++ b/src/tests/benchmark/ztp/ZtpUpdate.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/__init__.py b/src/tests/benchmark/ztp/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/benchmark/ztp/__init__.py +++ b/src/tests/benchmark/ztp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/run_test_01_bootstrap.sh b/src/tests/benchmark/ztp/run_test_01_bootstrap.sh index fc1c6ce18387f93e29b7ff59a305fc087be545d4..54fa17e524ab0d9bf90b26f2a327b654a897fd0a 100755 --- a/src/tests/benchmark/ztp/run_test_01_bootstrap.sh +++ b/src/tests/benchmark/ztp/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/run_test_02_cleanup.sh b/src/tests/benchmark/ztp/run_test_02_cleanup.sh index 728033e3c9224e37d9c2af223bec55e46b76bdd8..2dc55eff702a7f4cfa439e0ee26c7e60274980cb 100755 --- a/src/tests/benchmark/ztp/run_test_02_cleanup.sh +++ b/src/tests/benchmark/ztp/run_test_02_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/tests/Fixtures.py b/src/tests/benchmark/ztp/tests/Fixtures.py index e2752dce9927cce1217c1e4316f2b07e50731c2a..f1b42d39ecb4e77200991d9df40e1390099bbede 100644 --- a/src/tests/benchmark/ztp/tests/Fixtures.py +++ b/src/tests/benchmark/ztp/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/tests/Objects.py b/src/tests/benchmark/ztp/tests/Objects.py index afaf8e5ac6c62ee6ff9abdeac2cd8f3bc7968f2b..087ef4c50a91ac6b2e03c5caf9755a409bf48557 100644 --- a/src/tests/benchmark/ztp/tests/Objects.py +++ b/src/tests/benchmark/ztp/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/tests/__init__.py b/src/tests/benchmark/ztp/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/benchmark/ztp/tests/__init__.py +++ b/src/tests/benchmark/ztp/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py b/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py index f586bb4ed0bc0db978572b1739ccd1e9577cd5ab..caca640ab23706cae00c664529cf05fe3928c3a6 100644 --- a/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py +++ b/src/tests/benchmark/ztp/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/benchmark/ztp/tests/test_functional_cleanup.py b/src/tests/benchmark/ztp/tests/test_functional_cleanup.py index f3cbdff0aad3c4d2de57dd1b2a445aadb224daf3..79d67f645a09142740a8709a9ddb5ff18ec40b39 100644 --- a/src/tests/benchmark/ztp/tests/test_functional_cleanup.py +++ b/src/tests/benchmark/ztp/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/.gitlab-ci.yml b/src/tests/ecoc22/.gitlab-ci.yml index e17194cfc94b9fb2f3a5fca4a92661baa349be9b..467f2f8fd4766e2fe6e9e382a0b422075f8cc15d 100644 --- a/src/tests/ecoc22/.gitlab-ci.yml +++ b/src/tests/ecoc22/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/Dockerfile b/src/tests/ecoc22/Dockerfile index bc02bc08c7c07dee17b3c58ced4b53e529b01ffa..b0489e023d96f58d07e7be241f2ed5de92154264 100644 --- a/src/tests/ecoc22/Dockerfile +++ b/src/tests/ecoc22/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/__init__.py b/src/tests/ecoc22/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ecoc22/__init__.py +++ b/src/tests/ecoc22/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/deploy_specs.sh b/src/tests/ecoc22/deploy_specs.sh index 9632f3fdcfda703af620ba761049fadec97e152b..e5b02eba159036845084e615338b485f491c6035 100755 --- a/src/tests/ecoc22/deploy_specs.sh +++ b/src/tests/ecoc22/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -92,9 +92,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/tests/ecoc22/redeploy.sh b/src/tests/ecoc22/redeploy.sh index 26a998ee20d93500ef06c6dc9c58b3c56e9548a9..638f8c015473eee41013b0ccd57dc7e879e5a725 100755 --- a/src/tests/ecoc22/redeploy.sh +++ b/src/tests/ecoc22/redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/requirements.in b/src/tests/ecoc22/requirements.in index 468af1a17931d6e545647e3e7a057433d74826b3..d733b0adb03957eb23b685c8a901cdc4b3a6d8d6 100644 --- a/src/tests/ecoc22/requirements.in +++ b/src/tests/ecoc22/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/run_test_01_bootstrap.sh b/src/tests/ecoc22/run_test_01_bootstrap.sh index a69a2a142846d2b550f119deeae4c99ffaf4fc7c..b7b2f68ce3f4f2f147e53302f53570a40615b758 100755 --- a/src/tests/ecoc22/run_test_01_bootstrap.sh +++ b/src/tests/ecoc22/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/run_test_02_create_service.sh b/src/tests/ecoc22/run_test_02_create_service.sh index c7e5e38667cde40d730db539984c0b5807ddb311..774dae81d0b986b0032254c52c641e1f423539ec 100755 --- a/src/tests/ecoc22/run_test_02_create_service.sh +++ b/src/tests/ecoc22/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/run_test_03_delete_service.sh b/src/tests/ecoc22/run_test_03_delete_service.sh index 30592ad6f5e3d6106a8dd5e1e304064e6b3fdd09..e15e33e52bb801a87f65143ab47c19d8f183e3dd 100755 --- a/src/tests/ecoc22/run_test_03_delete_service.sh +++ b/src/tests/ecoc22/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/run_test_04_cleanup.sh b/src/tests/ecoc22/run_test_04_cleanup.sh index f2c87f25c138ee7f21e58379a4cd08250fd68f9b..25ab4ffa31e51c708ff38b0a3ab945b06da1647e 100755 --- a/src/tests/ecoc22/run_test_04_cleanup.sh +++ b/src/tests/ecoc22/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/run_tests.sh b/src/tests/ecoc22/run_tests.sh index 56318a9ce305286b6129c20b257e44f345300ec9..be84b0a22079276f21a188c7dadba1a6d00b179a 100755 --- a/src/tests/ecoc22/run_tests.sh +++ b/src/tests/ecoc22/run_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/Fixtures.py b/src/tests/ecoc22/tests/Fixtures.py index e2752dce9927cce1217c1e4316f2b07e50731c2a..f1b42d39ecb4e77200991d9df40e1390099bbede 100644 --- a/src/tests/ecoc22/tests/Fixtures.py +++ b/src/tests/ecoc22/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/Objects.py b/src/tests/ecoc22/tests/Objects.py index 3a96e6625ab248dbde78c355ad14b300d0f20633..39058fc2caa466723cd0deeccde01ed31cf1e7ff 100644 --- a/src/tests/ecoc22/tests/Objects.py +++ b/src/tests/ecoc22/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/Tools.py b/src/tests/ecoc22/tests/Tools.py index de35f8f01f1ba92bdb4a819a239f64a3e12b8de1..10e4e3c079e7b22a87227619ef53b0d0454dfd29 100644 --- a/src/tests/ecoc22/tests/Tools.py +++ b/src/tests/ecoc22/tests/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/__init__.py b/src/tests/ecoc22/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ecoc22/tests/__init__.py +++ b/src/tests/ecoc22/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/old_code/BuildDescriptors.py b/src/tests/ecoc22/tests/old_code/BuildDescriptors.py index 2e61d274e2f2571d69a3e4044886d18e7d1db35b..4f2561111692caffdfcdf32565f0f80eaccffef7 100644 --- a/src/tests/ecoc22/tests/old_code/BuildDescriptors.py +++ b/src/tests/ecoc22/tests/old_code/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/old_code/LoadDescriptors.py b/src/tests/ecoc22/tests/old_code/LoadDescriptors.py index 0ae730de3496b8b9a47b3f212c5505b837e9be48..edcba9862894c6aa045a1cf595dce244ddac276e 100644 --- a/src/tests/ecoc22/tests/old_code/LoadDescriptors.py +++ b/src/tests/ecoc22/tests/old_code/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/old_code/Objects_BigNet.py b/src/tests/ecoc22/tests/old_code/Objects_BigNet.py index 22b71f2516e5a442fe4b3a85b401bd47fde64488..7b3f4222e91ceec71caf3e8f3d150a123bdd0222 100644 --- a/src/tests/ecoc22/tests/old_code/Objects_BigNet.py +++ b/src/tests/ecoc22/tests/old_code/Objects_BigNet.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_OLS.py b/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_OLS.py index e2cef3c22e5f85ae98aa901e32563b47bfbc0653..55e16bba2028a4d0e6eef34d1b6aea22d2a7c31e 100644 --- a/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_OLS.py +++ b/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_OLS.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN.py b/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN.py index 1aee0e3e1556cd903cbfd85ab264c18a7b821b4d..7ea5710d4397231dc08c742f27af59939b383190 100644 --- a/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN.py +++ b/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN_OLS.py b/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN_OLS.py index 5b9335979329f34119320ff164f6d982d7eea661..5676f8cdd50b169faec2bff5d10e2bff3add371a 100644 --- a/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN_OLS.py +++ b/src/tests/ecoc22/tests/old_code/Objects_DC_CSGW_TN_OLS.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/test_functional_bootstrap.py b/src/tests/ecoc22/tests/test_functional_bootstrap.py index 57dec540611cda62b89f2ebab150ca9bb8056e56..37cdf37b7a6e704196065346543ae02bf0f84b1d 100644 --- a/src/tests/ecoc22/tests/test_functional_bootstrap.py +++ b/src/tests/ecoc22/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/test_functional_cleanup.py b/src/tests/ecoc22/tests/test_functional_cleanup.py index 0e2580a9969ac6d4f7fbcf7375ab0a96197d07cc..34c1d440f029467d4c42552d935fedc519a53916 100644 --- a/src/tests/ecoc22/tests/test_functional_cleanup.py +++ b/src/tests/ecoc22/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/test_functional_create_service.py b/src/tests/ecoc22/tests/test_functional_create_service.py index 2e6f693bf9c9c83b3378b2a33c99f429897d7a88..a02ec33c3a8965fd8f6f55602215a859674d8e9d 100644 --- a/src/tests/ecoc22/tests/test_functional_create_service.py +++ b/src/tests/ecoc22/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc22/tests/test_functional_delete_service.py b/src/tests/ecoc22/tests/test_functional_delete_service.py index b1e46702f00f7bfb31327e54a7879d2bc0363e22..7e9fd2678f667e6bbaf6732397e7a078eb4e57ff 100644 --- a/src/tests/ecoc22/tests/test_functional_delete_service.py +++ b/src/tests/ecoc22/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/__init__.py b/src/tests/ecoc24/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ecoc24/__init__.py +++ b/src/tests/ecoc24/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/deploy_e2e.sh b/src/tests/ecoc24/deploy_e2e.sh index 23ff8b7f037b8f2497e6ef851c3aa9f301772e1a..e728d5a7c203e766ba22eb122021bf95d94f614a 100755 --- a/src/tests/ecoc24/deploy_e2e.sh +++ b/src/tests/ecoc24/deploy_e2e.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/deploy_ip.sh b/src/tests/ecoc24/deploy_ip.sh index a6c5e82557d02c89f67bbbf0ee0a6f88650ba9d1..a578e43aa5bf2177ffbe13d7ea44612a93669fb1 100755 --- a/src/tests/ecoc24/deploy_ip.sh +++ b/src/tests/ecoc24/deploy_ip.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/deploy_opt.sh b/src/tests/ecoc24/deploy_opt.sh index 3a9523768ec21c2e177a3567a51cdc94f4db992b..4ff4f8b0137b6de16d4af7ef72039cd53150e7f7 100755 --- a/src/tests/ecoc24/deploy_opt.sh +++ b/src/tests/ecoc24/deploy_opt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/deploy_specs_e2e.sh b/src/tests/ecoc24/deploy_specs_e2e.sh index e1e358cfcebe6d079f175e10a67bd097bf46dd7e..d36dae7eced6f0c59b8fe15359796355be84989a 100755 --- a/src/tests/ecoc24/deploy_specs_e2e.sh +++ b/src/tests/ecoc24/deploy_specs_e2e.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/deploy_specs_ip.sh b/src/tests/ecoc24/deploy_specs_ip.sh index 7542a0fb54bacf0273a5b38ca23ca67fae352c0c..8179dfbc7a1a9d10c157ebdaf97fa771b76f5aac 100755 --- a/src/tests/ecoc24/deploy_specs_ip.sh +++ b/src/tests/ecoc24/deploy_specs_ip.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/deploy_specs_opt.sh b/src/tests/ecoc24/deploy_specs_opt.sh index 5d258e60fdb632c692bd1a0ba6ab911e98ae7dc4..9a7e964fedbc9984d3e93f12838a99fbad8660fe 100755 --- a/src/tests/ecoc24/deploy_specs_opt.sh +++ b/src/tests/ecoc24/deploy_specs_opt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/dump_logs.sh b/src/tests/ecoc24/dump_logs.sh index bb9a35d126a94812d4157d2ba5b4725acbde4caf..48ac8e9a0fc070b3e022ba4a665fad22aa8a7313 100755 --- a/src/tests/ecoc24/dump_logs.sh +++ b/src/tests/ecoc24/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/nginx-ingress-controller-e2e.yaml b/src/tests/ecoc24/nginx-ingress-controller-e2e.yaml index b5f2447aab2ad557e1dc56cdb86a61962494f67d..b1ea5aac952d55ad1e19eaf998ab95f375b8d69e 100644 --- a/src/tests/ecoc24/nginx-ingress-controller-e2e.yaml +++ b/src/tests/ecoc24/nginx-ingress-controller-e2e.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/nginx-ingress-controller-ip.yaml b/src/tests/ecoc24/nginx-ingress-controller-ip.yaml index 4735ae264a27e6f691d2900701afdd2b0ef2e3d4..e292bad70a6f6bf344c27b8153d25f29ad66dd21 100644 --- a/src/tests/ecoc24/nginx-ingress-controller-ip.yaml +++ b/src/tests/ecoc24/nginx-ingress-controller-ip.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/nginx-ingress-controller-opt.yaml b/src/tests/ecoc24/nginx-ingress-controller-opt.yaml index d62898b60bed4f16999ff71f3c6173fd5d334e12..1d9cb29494d8934bb507e0c6e28f7fbb8b788e08 100644 --- a/src/tests/ecoc24/nginx-ingress-controller-opt.yaml +++ b/src/tests/ecoc24/nginx-ingress-controller-opt.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/show_deploy.sh b/src/tests/ecoc24/show_deploy.sh index 295dd29b4d132c6f809a01e5dc2cb17a956531a2..ecd5a64b4bc01d0cb2b6a5df3ae304f9fbfeeda7 100755 --- a/src/tests/ecoc24/show_deploy.sh +++ b/src/tests/ecoc24/show_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/subscription_ws_e2e.sh b/src/tests/ecoc24/subscription_ws_e2e.sh index 33f5a5109044b1aa7384da41965d1b84a29cb945..26c430cdf412b34bfec1c0a4ae1a28b0e34da5f2 100755 --- a/src/tests/ecoc24/subscription_ws_e2e.sh +++ b/src/tests/ecoc24/subscription_ws_e2e.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/subscription_ws_ip.sh b/src/tests/ecoc24/subscription_ws_ip.sh index 795469e8fcb026cd1734a6330fc7b8c4a1e97aac..379929d739d4a348f560f09c0c2330a8d1ad7aec 100755 --- a/src/tests/ecoc24/subscription_ws_ip.sh +++ b/src/tests/ecoc24/subscription_ws_ip.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/tfs-ingress-e2e.yaml b/src/tests/ecoc24/tfs-ingress-e2e.yaml index 1b82ae44ca0945163701bc18a250a1742e921519..c75a22cb3e7ed630c7616f6670d76b221e2b57d9 100644 --- a/src/tests/ecoc24/tfs-ingress-e2e.yaml +++ b/src/tests/ecoc24/tfs-ingress-e2e.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/tfs-ingress-ip.yaml b/src/tests/ecoc24/tfs-ingress-ip.yaml index 6ee6ada32f3f278c5f36dfbb08d936a432bfef23..aefcfcffede6fd6faa9540fac9ba3dc66d582681 100644 --- a/src/tests/ecoc24/tfs-ingress-ip.yaml +++ b/src/tests/ecoc24/tfs-ingress-ip.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ecoc24/tfs-ingress-opt.yaml b/src/tests/ecoc24/tfs-ingress-opt.yaml index 50ddd4f046acf74cfe57e73f55e29e1b77fd32af..57e1f9141608c659366f028eb99800bddd870f2c 100644 --- a/src/tests/ecoc24/tfs-ingress-opt.yaml +++ b/src/tests/ecoc24/tfs-ingress-opt.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/eucnc24/.gitignore b/src/tests/eucnc24/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..24a4b233365e23a9462f4b64e8b60fef6a62bee4 --- /dev/null +++ b/src/tests/eucnc24/.gitignore @@ -0,0 +1,5 @@ +clab-*/ +images/ +*.clab.yml.bak +*.tar +*.tar.gz diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..02c4cced3981f4c12042e636652dca95c384a169 --- /dev/null +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -0,0 +1,257 @@ +# Copyright 2022-2024 ETSI 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. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build eucnc24: + variables: + TEST_NAME: 'eucnc24' + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "${TEST_NAME}:latest" -f ./src/tests/${TEST_NAME}/Dockerfile . + - docker tag "${TEST_NAME}:latest" "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + - docker push "$CI_REGISTRY_IMAGE/${TEST_NAME}:latest" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/tests/${TEST_NAME}/**/*.{py,in,sh,yml} + - src/tests/${TEST_NAME}/Dockerfile + - .gitlab-ci.yml + +# Deploy TeraFlowSDN and Execute end-2-end test +end2end_test eucnc24: + variables: + TEST_NAME: 'eucnc24' + stage: end2end_test + # Disable to force running it after all other tasks + #needs: + # - build eucnc24 + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - docker rm -f ${TEST_NAME} || true + - sudo containerlab destroy --all --cleanup || true + + script: + # Download Docker image to run the test + - docker pull "${CI_REGISTRY_IMAGE}/${TEST_NAME}:latest" + + # Check MicroK8s is ready + - microk8s status --wait-ready + - kubectl get pods --all-namespaces + + # Deploy ContainerLab Scenario + - RUNNER_PATH=`pwd` + #- cd $PWD/src/tests/${TEST_NAME} + - mkdir -p /tmp/clab/${TEST_NAME} + - cp -R src/tests/${TEST_NAME}/clab/* /tmp/clab/${TEST_NAME} + - tree -la /tmp/clab/${TEST_NAME} + - cd /tmp/clab/${TEST_NAME} + - sudo containerlab deploy --reconfigure --topo eucnc24.clab.yml + - cd $RUNNER_PATH + + # Wait for initialization of Device NOSes + - sleep 3 + - docker ps -a + + # Dump configuration of the routers (before any configuration) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + + # Configure TeraFlowSDN deployment + # Uncomment if DEBUG log level is needed for the components + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml + #- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml + + - source src/tests/${TEST_NAME}/deploy_specs.sh + #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" + #- export TFS_SKIP_BUILD="YES" + #- export TFS_IMAGE_TAG="latest" + #- echo "TFS_REGISTRY_IMAGES=${CI_REGISTRY_IMAGE}" + + # Deploy TeraFlowSDN + - ./deploy/crdb.sh + - ./deploy/nats.sh + - ./deploy/qdb.sh + - ./deploy/kafka.sh + - ./deploy/tfs.sh + - ./deploy/show.sh + + ## Wait for Context to be subscribed to NATS + ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). + ## Investigate if we can use a counter to limit the number of iterations. + ## For now, keep it commented out. + #- LOOP_MAX_ATTEMPTS=180 + #- LOOP_COUNTER=0 + #- > + # while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do + # echo "Attempt: $LOOP_COUNTER" + # kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1; + # sleep 1; + # LOOP_COUNTER=$((LOOP_COUNTER + 1)) + # if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then + # echo "Max attempts reached, exiting the loop." + # break + # fi + # done + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + + # Run end-to-end test: onboard scenario + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-onboarding.sh + + # Run end-to-end test: configure service TFS + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-create.sh + + # Dump configuration of the routers (after configure TFS service) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + + # Run end-to-end test: test connectivity with ping + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) + - echo $TEST1_10 + - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) + - echo $TEST1_1 + - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) + - echo $TEST2_1 + - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) + - echo $TEST2_10 + - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) + - echo $TEST3_1 + - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) + - echo $TEST3_10 + - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' + + # Run end-to-end test: deconfigure service TFS + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-tfs-remove.sh + + # Dump configuration of the routers (after deconfigure TFS service) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + + # Run end-to-end test: configure service IETF + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-create.sh + + # Dump configuration of the routers (after configure IETF service) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + + # Run end-to-end test: test connectivity with ping + - export TEST1_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.10' --format json) + - echo $TEST1_10 + - echo $TEST1_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST1_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.1.1' --format json) + - echo $TEST1_1 + - echo $TEST1_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST2_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.1' --format json) + - echo $TEST2_1 + - echo $TEST2_1 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST2_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.2.10' --format json) + - echo $TEST2_10 + - echo $TEST2_10 | grep -E '3 packets transmitted, 3 received, 0\% packet loss' + - export TEST3_1=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.1' --format json) + - echo $TEST3_1 + - echo $TEST3_1 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' + - export TEST3_10=$(sudo containerlab exec --name eucnc24 --label clab-node-name=dc1 --cmd 'ping -n -c3 172.16.3.10' --format json) + - echo $TEST3_10 + - echo $TEST3_10 | grep -E '3 packets transmitted, 0 received, 100\% packet loss' + + # Run end-to-end test: deconfigure service IETF + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-service-ietf-remove.sh + + # Dump configuration of the routers (after deconfigure IETF service) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + + # Run end-to-end test: cleanup scenario + - > + docker run -t --rm --name ${TEST_NAME} --network=host + --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh" + --volume "$PWD/src/tests/${TEST_NAME}:/opt/results" + $CI_REGISTRY_IMAGE/${TEST_NAME}:latest /var/teraflow/run-cleanup.sh + + after_script: + # Dump configuration of the routers (on after_script) + - sudo containerlab exec --name eucnc24 --label clab-node-name=r1 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r2 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + - sudo containerlab exec --name eucnc24 --label clab-node-name=r3 --cmd "Cli --command \"enable"$'\n'$"show running-config\"" + + # Dump TeraFlowSDN component logs + - source src/tests/${TEST_NAME}/deploy_specs.sh + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server + - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/monitoringservice -c server + + # Destroy Scenario + - docker rm -f ${TEST_NAME} || true + - RUNNER_PATH=`pwd` + #- cd $PWD/src/tests/${TEST_NAME} + - cd /tmp/clab/${TEST_NAME} + - sudo containerlab destroy --topo eucnc24.clab.yml --cleanup || true + - sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak || true + - cd $RUNNER_PATH + - kubectl delete namespaces tfs || true + + # Clean old docker images + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + + #coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + artifacts: + when: always + reports: + junit: ./src/tests/${TEST_NAME}/report_*.xml diff --git a/src/tests/eucnc24/Dockerfile b/src/tests/eucnc24/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3235c74cf00876359ef2e672f4170058f64894c8 --- /dev/null +++ b/src/tests/eucnc24/Dockerfile @@ -0,0 +1,84 @@ +# Copyright 2022-2024 ETSI 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. + +FROM python:3.9-slim + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Get generic Python packages +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install --upgrade setuptools wheel +RUN python3 -m pip install --upgrade pip-tools + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/tests/eucnc24 +WORKDIR /var/teraflow/tests/eucnc24 +COPY src/tests/eucnc24/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/__init__.py ./__init__.py +COPY src/common/*.py ./common/ +COPY src/common/tests/. ./common/tests/ +COPY src/common/tools/. ./common/tools/ +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/device/__init__.py device/__init__.py +COPY src/device/client/. device/client/ +COPY src/monitoring/__init__.py monitoring/__init__.py +COPY src/monitoring/client/. monitoring/client/ +COPY src/service/__init__.py service/__init__.py +COPY src/service/client/. service/client/ +COPY src/slice/__init__.py slice/__init__.py +COPY src/slice/client/. slice/client/ +COPY src/tests/*.py ./tests/ +COPY src/tests/eucnc24/__init__.py ./tests/eucnc24/__init__.py +COPY src/tests/eucnc24/data/. ./tests/eucnc24/data/ +COPY src/tests/eucnc24/tests/. ./tests/eucnc24/tests/ +COPY src/tests/eucnc24/scripts/. ./ + +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install tree && \ + rm -rf /var/lib/apt/lists/* + +RUN tree -la /var/teraflow diff --git a/src/tests/eucnc24/README.md b/src/tests/eucnc24/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3cc7974568028faa2bfbad70942ff2cc82bbafa0 --- /dev/null +++ b/src/tests/eucnc24/README.md @@ -0,0 +1,111 @@ +# DataPlane-in-a-Box - Control an Emulated DataPlane through TeraFlowSDN + +## Emulated DataPlane Deployment +- ContainerLab +- Scenario +- Descriptor + +## TeraFlowSDN Deployment +```bash +cd ~/tfs-ctrl +source ~/tfs-ctrl/src/tests/eucnc24/deploy_specs.sh +./deploy/all.sh +``` + +# ContainerLab - Arista cEOS - Commands + +## Download and install ContainerLab +```bash +sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0 +``` + +## Download Arista cEOS image and create Docker image +```bash +cd ~/tfs-ctrl/src/tests/eucnc24/ +docker import arista/cEOS64-lab-4.32.2F.tar ceos:4.32.2F +``` + +## Deploy scenario +```bash +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab deploy --topo eucnc24.clab.yml +``` + +## Inspect scenario +```bash +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab inspect --topo eucnc24.clab.yml +``` + +## Destroy scenario +```bash +cd ~/tfs-ctrl/src/tests/eucnc24/ +sudo containerlab destroy --topo eucnc24.clab.yml +sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak +``` + +## Access cEOS Bash/CLI +```bash +docker exec -it clab-eucnc24-r1 bash +docker exec -it clab-eucnc24-r2 bash +docker exec -it clab-eucnc24-r3 bash +docker exec -it clab-eucnc24-r1 Cli +docker exec -it clab-eucnc24-r2 Cli +docker exec -it clab-eucnc24-r3 Cli +``` + +## Configure ContainerLab clients +```bash +docker exec -it clab-eucnc24-dc1 bash + ip address add 172.16.1.10/24 dev eth1 + ip route add 172.16.2.0/24 via 172.16.1.1 + ping 172.16.2.10 + +docker exec -it clab-eucnc24-dc2 bash + ip address add 172.16.2.10/24 dev eth1 + ip route add 172.16.1.0/24 via 172.16.2.1 + ping 172.16.1.10 +``` + +## Install gNMIc +```bash +sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" +``` + +## gNMI Capabilities request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure capabilities +``` + +## gNMI Get request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json +``` + +## gNMI Set request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value srl11 +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname +``` + +## Subscribe request +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ + +# In another terminal, you can generate traffic opening SSH connection +ssh admin@clab-eucnc24-r1 +``` + +# Check configurations done: +```bash +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json +gnmic --address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json +``` + +# Delete elements: +```bash +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' +--address clab-eucnc24-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]' +``` diff --git a/src/tests/eucnc24/__init__.py b/src/tests/eucnc24/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/tests/eucnc24/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/tests/eucnc24/clab/eucnc24.clab.yml b/src/tests/eucnc24/clab/eucnc24.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..aaf971e360b4770913b9aade3c21b348d700fa86 --- /dev/null +++ b/src/tests/eucnc24/clab/eucnc24.clab.yml @@ -0,0 +1,74 @@ +# Copyright 2022-2024 ETSI 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 - Arista devices + Linux clients + +name: eucnc24 + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + #image: ceos:4.31.2F + #image: ceos:4.31.5M # tested, works + #image: ceos:4.32.0F + image: ceos:4.32.2F # tested, works + #image: ceos:4.32.2.1F + #image: ceos:4.33.1F # does not work, libyang.util.LibyangError: failed to parse data tree: No module named "openconfig-platform-healthz" in the context. + linux: + kind: linux + image: ghcr.io/hellt/network-multitool:latest + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + startup-config: r1-startup.cfg + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + startup-config: r2-startup.cfg + + r3: + kind: arista_ceos + mgmt-ipv4: 172.20.20.103 + startup-config: r3-startup.cfg + + dc1: + kind: linux + mgmt-ipv4: 172.20.20.201 + exec: + - ip link set address 00:c1:ab:00:01:01 dev eth1 + - ip address add 172.16.1.10/24 dev eth1 + - ip route add 172.16.2.0/24 via 172.16.1.1 + + dc2: + kind: linux + mgmt-ipv4: 172.20.20.202 + exec: + - ip link set address 00:c1:ab:00:02:01 dev eth1 + - ip address add 172.16.2.10/24 dev eth1 + - ip route add 172.16.1.0/24 via 172.16.2.1 + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r2:eth3", "r3:eth2"] + - endpoints: ["r1:eth10", "dc1:eth1"] + - endpoints: ["r3:eth10", "dc2:eth1"] diff --git a/src/tests/eucnc24/clab/r1-startup.cfg b/src/tests/eucnc24/clab/r1-startup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b7feebe067b9c77572d63b719a588a4a2aa44cb9 --- /dev/null +++ b/src/tests/eucnc24/clab/r1-startup.cfg @@ -0,0 +1,48 @@ +! device: r1 (cEOSLab, EOS-4.32.2F-38195967.4322F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$OmfaAwJRg/r44r5U$9Fca1O1G6Bgsd4NKwSyvdRJcHHk71jHAR3apDWAgSTN/t/j1iroEhz5J36HjWjOF/jEVC/R8Wa60VmbX6.cr70 +! +management api http-commands + no shutdown +! +no service interface inactive port-id allocation disabled +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r1 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.101/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +router multicast + ipv4 + software-forwarding kernel + ! + ipv6 + software-forwarding kernel +! +end diff --git a/src/tests/eucnc24/clab/r2-startup.cfg b/src/tests/eucnc24/clab/r2-startup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e1ab661a0ab455ab22f025ec6b2f96cf42a9f2dd --- /dev/null +++ b/src/tests/eucnc24/clab/r2-startup.cfg @@ -0,0 +1,48 @@ +! device: r2 (cEOSLab, EOS-4.32.2F-38195967.4322F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$OmfaAwJRg/r44r5U$9Fca1O1G6Bgsd4NKwSyvdRJcHHk71jHAR3apDWAgSTN/t/j1iroEhz5J36HjWjOF/jEVC/R8Wa60VmbX6.cr70 +! +management api http-commands + no shutdown +! +no service interface inactive port-id allocation disabled +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r2 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet1 +! +interface Ethernet3 +! +interface Management0 + ip address 172.20.20.102/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +router multicast + ipv4 + software-forwarding kernel + ! + ipv6 + software-forwarding kernel +! +end diff --git a/src/tests/eucnc24/clab/r3-startup.cfg b/src/tests/eucnc24/clab/r3-startup.cfg new file mode 100644 index 0000000000000000000000000000000000000000..63c0625931e5a4645c8ae8741a2b5bd5fe8a28d6 --- /dev/null +++ b/src/tests/eucnc24/clab/r3-startup.cfg @@ -0,0 +1,48 @@ +! device: r3 (cEOSLab, EOS-4.32.2F-38195967.4322F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$OmfaAwJRg/r44r5U$9Fca1O1G6Bgsd4NKwSyvdRJcHHk71jHAR3apDWAgSTN/t/j1iroEhz5J36HjWjOF/jEVC/R8Wa60VmbX6.cr70 +! +management api http-commands + no shutdown +! +no service interface inactive port-id allocation disabled +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r3 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 +! +interface Ethernet10 +! +interface Management0 + ip address 172.20.20.103/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +! +router multicast + ipv4 + software-forwarding kernel + ! + ipv6 + software-forwarding kernel +! +end diff --git a/src/tests/eucnc24/data/ietf-l3vpn-service.json b/src/tests/eucnc24/data/ietf-l3vpn-service.json new file mode 100644 index 0000000000000000000000000000000000000000..a0f28ee063c97aaabdd3fdda679e8ebbcd8089dc --- /dev/null +++ b/src/tests/eucnc24/data/ietf-l3vpn-service.json @@ -0,0 +1,83 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-svc"}]}, + "sites": { + "site": [ + { + "site-id": "site_DC1", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "DC1"}]}, + "devices": {"device": [{"device-id": "dc1", "location": "DC1"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "dc1", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:spoke-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.16.1.1", + "customer-address": "172.16.1.10", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + }, + { + "site-id": "site_DC2", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "DC2"}]}, + "devices": {"device": [{"device-id": "dc2", "location": "DC2"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "dc2", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:hub-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "172.16.2.1", + "customer-address": "172.16.2.10", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + } + ] + } + } +} diff --git a/src/tests/eucnc24/data/tfs-service.json b/src/tests/eucnc24/data/tfs-service.json new file mode 100644 index 0000000000000000000000000000000000000000..e4bb7c2d255d2f119cd5c9646d01450ac4bffd9c --- /dev/null +++ b/src/tests/eucnc24/data/tfs-service.json @@ -0,0 +1,26 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "tfs-l3vpn-svc"} + }, + "service_type": "SERVICETYPE_L3NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "int"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "int"}} + ], + "service_constraints": [], + "service_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[dc1]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "172.16.1.10", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[dc2]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "172.16.2.10", "address_prefix": 24, "index": 0} + }} + ]} + } + ] +} diff --git a/src/tests/eucnc24/data/tfs-topology.json b/src/tests/eucnc24/data/tfs-topology.json new file mode 100644 index 0000000000000000000000000000000000000000..ac87af62d31e4728c12687c525233d8e840d7441 --- /dev/null +++ b/src/tests/eucnc24/data/tfs-topology.json @@ -0,0 +1,126 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "dc1"}}, "device_type": "emu-datacenter", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "dc2"}}, "device_type": "emu-datacenter", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r3"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.103"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet3==r3/Ethernet2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet3"}}, + {"device_id": {"device_uuid": {"uuid": "r3"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "r3/Ethernet2==r2/Ethernet3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r3"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet3"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==dc1/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "dc1/eth1==r1/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r3/Ethernet10==dc2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r3"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "dc2/eth1==r3/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r3"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + } + ] +} diff --git a/src/tests/eucnc24/deploy-scripts/clab-cli-dc1.sh b/src/tests/eucnc24/deploy-scripts/clab-cli-dc1.sh new file mode 100755 index 0000000000000000000000000000000000000000..4c636a42dd67cbdc8930e91d134030739ac1ab5e --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-cli-dc1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-eucnc24-dc1 bash diff --git a/src/tests/eucnc24/deploy-scripts/clab-cli-dc2.sh b/src/tests/eucnc24/deploy-scripts/clab-cli-dc2.sh new file mode 100755 index 0000000000000000000000000000000000000000..3cc8ff69fe4b98d3fd81bf6f4204debbcaa9b4bb --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-cli-dc2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-eucnc24-dc2 bash diff --git a/src/tests/eucnc24/deploy-scripts/clab-cli-r1.sh b/src/tests/eucnc24/deploy-scripts/clab-cli-r1.sh new file mode 100755 index 0000000000000000000000000000000000000000..6626d80694fc805ddb12c3432d147508b4301eb1 --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-cli-r1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-eucnc24-r1 Cli diff --git a/src/tests/eucnc24/deploy-scripts/clab-cli-r2.sh b/src/tests/eucnc24/deploy-scripts/clab-cli-r2.sh new file mode 100755 index 0000000000000000000000000000000000000000..d8910a4c717378f831e61b95a6311fdac22d0aaf --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-cli-r2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-eucnc24-r2 Cli diff --git a/src/tests/eucnc24/deploy-scripts/clab-cli-r3.sh b/src/tests/eucnc24/deploy-scripts/clab-cli-r3.sh new file mode 100755 index 0000000000000000000000000000000000000000..234fb74c4104d82e293c9367b87e83a2c603f31c --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-cli-r3.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-eucnc24-r3 Cli diff --git a/src/tests/eucnc24/deploy-scripts/clab-deploy.sh b/src/tests/eucnc24/deploy-scripts/clab-deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..5621c47f446f8b185b13986cc8ded2a43807f085 --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/src/tests/eucnc24 +sudo containerlab deploy --topo eucnc24.clab.yml diff --git a/src/tests/eucnc24/deploy-scripts/clab-destroy.sh b/src/tests/eucnc24/deploy-scripts/clab-destroy.sh new file mode 100755 index 0000000000000000000000000000000000000000..b97f79aab5451cf9431c1a196ee6bb0d6b071671 --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-destroy.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/src/tests/eucnc24 +sudo containerlab destroy --topo eucnc24.clab.yml +sudo rm -rf clab-eucnc24/ .eucnc24.clab.yml.bak diff --git a/src/tests/eucnc24/deploy-scripts/clab-inspect.sh b/src/tests/eucnc24/deploy-scripts/clab-inspect.sh new file mode 100755 index 0000000000000000000000000000000000000000..b92aae77ab319ce75fb314a7b517bb985999e8c8 --- /dev/null +++ b/src/tests/eucnc24/deploy-scripts/clab-inspect.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd ~/tfs-ctrl/src/tests/eucnc24 +sudo containerlab inspect --topo eucnc24.clab.yml diff --git a/src/tests/eucnc24/deploy_specs.sh b/src/tests/eucnc24/deploy_specs.sh new file mode 100755 index 0000000000000000000000000000000000000000..9b581635436e1b00d78e3504f5913df419017eea --- /dev/null +++ b/src/tests/eucnc24/deploy_specs.sh @@ -0,0 +1,208 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service nbi" + +# Uncomment to activate Monitoring (old) +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate Monitoring Framework (new) +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" + +# Uncomment to activate BGP-LS Speaker +#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" + +# Uncomment to activate Optical Controller +# To manage optical connections, "service" requires "opticalcontroller" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}" +#fi + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Uncomment to activate E2E Orchestrator +#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" + +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Set NATS installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/nats.sh for additional details +export NATS_DEPLOY_MODE="single" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9009" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" + + +# ----- Apache Kafka ----------------------------------------------------------- + +# Set the namespace where Apache Kafka will be deployed. +export KFK_NAMESPACE="kafka" + +# Set the port Apache Kafka server will be exposed to. +export KFK_SERVER_PORT="9092" + +# Set the flag to YES for redeploying of Apache Kafka +export KFK_REDEPLOY="" diff --git a/src/tests/eucnc24/redeploy-tfs.sh b/src/tests/eucnc24/redeploy-tfs.sh new file mode 100755 index 0000000000000000000000000000000000000000..0aa7ce9bdd49294f69e6e8e0869f4eb1c2c1560f --- /dev/null +++ b/src/tests/eucnc24/redeploy-tfs.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source ~/tfs-ctrl/src/tests/eucnc24/deploy_specs.sh +./deploy/all.sh diff --git a/src/tests/eucnc24/requirements.in b/src/tests/eucnc24/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..d733b0adb03957eb23b685c8a901cdc4b3a6d8d6 --- /dev/null +++ b/src/tests/eucnc24/requirements.in @@ -0,0 +1,15 @@ +# Copyright 2022-2024 ETSI 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. + +requests==2.27.* diff --git a/src/tests/eucnc24/scripts/run-cleanup.sh b/src/tests/eucnc24/scripts/run-cleanup.sh new file mode 100755 index 0000000000000000000000000000000000000000..c50cc6af2edbcc5d9f5dcb15d855ad7c0d1ec772 --- /dev/null +++ b/src/tests/eucnc24/scripts/run-cleanup.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_cleanup.xml \ + /var/teraflow/tests/eucnc24/tests/test_cleanup.py diff --git a/src/tests/eucnc24/scripts/run-onboarding.sh b/src/tests/eucnc24/scripts/run-onboarding.sh new file mode 100755 index 0000000000000000000000000000000000000000..efb60e6cab3fa52a75842cd6100542f96554a531 --- /dev/null +++ b/src/tests/eucnc24/scripts/run-onboarding.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_onboarding.xml \ + /var/teraflow/tests/eucnc24/tests/test_onboarding.py diff --git a/src/tests/eucnc24/scripts/run-service-ietf-create.sh b/src/tests/eucnc24/scripts/run-service-ietf-create.sh new file mode 100755 index 0000000000000000000000000000000000000000..020a7e938c433dd79e54a0ca4fc2e1ac38132d83 --- /dev/null +++ b/src/tests/eucnc24/scripts/run-service-ietf-create.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_service_ietf_create.xml \ + /var/teraflow/tests/eucnc24/tests/test_service_ietf_create.py diff --git a/src/tests/eucnc24/scripts/run-service-ietf-remove.sh b/src/tests/eucnc24/scripts/run-service-ietf-remove.sh new file mode 100755 index 0000000000000000000000000000000000000000..9df6373c7e7fde04ec5131ee2b7cc91021500216 --- /dev/null +++ b/src/tests/eucnc24/scripts/run-service-ietf-remove.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_service_ietf_remove.xml \ + /var/teraflow/tests/eucnc24/tests/test_service_ietf_remove.py diff --git a/src/tests/eucnc24/scripts/run-service-tfs-create.sh b/src/tests/eucnc24/scripts/run-service-tfs-create.sh new file mode 100755 index 0000000000000000000000000000000000000000..2bb7bbd02fbbe2549e00203317a1a990dc7ad64b --- /dev/null +++ b/src/tests/eucnc24/scripts/run-service-tfs-create.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_service_tfs_create.xml \ + /var/teraflow/tests/eucnc24/tests/test_service_tfs_create.py diff --git a/src/tests/eucnc24/scripts/run-service-tfs-remove.sh b/src/tests/eucnc24/scripts/run-service-tfs-remove.sh new file mode 100755 index 0000000000000000000000000000000000000000..648032672938fc2f461ae2fd7ffd20c1ac667b23 --- /dev/null +++ b/src/tests/eucnc24/scripts/run-service-tfs-remove.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source /var/teraflow/tfs_runtime_env_vars.sh +export PYTHONPATH=/var/teraflow +pytest --verbose --log-level=INFO \ + --junitxml=/opt/results/report_service_tfs_remove.xml \ + /var/teraflow/tests/eucnc24/tests/test_service_tfs_remove.py diff --git a/src/tests/eucnc24/tests/Fixtures.py b/src/tests/eucnc24/tests/Fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..15978851faae668339fa4eed6db8ab7e1be2eb5e --- /dev/null +++ b/src/tests/eucnc24/tests/Fixtures.py @@ -0,0 +1,43 @@ +# Copyright 2022-2024 ETSI 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. + +import pytest +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from monitoring.client.MonitoringClient import MonitoringClient +from service.client.ServiceClient import ServiceClient + +@pytest.fixture(scope='session') +def context_client(): + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_client(): + _client = DeviceClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def monitoring_client(): + _client = MonitoringClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def service_client(): + _client = ServiceClient() + yield _client + _client.close() diff --git a/src/tests/eucnc24/tests/Tools.py b/src/tests/eucnc24/tests/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..f6ecf468477307572a8043e75833e5a9f925405b --- /dev/null +++ b/src/tests/eucnc24/tests/Tools.py @@ -0,0 +1,109 @@ +# Copyright 2022-2024 ETSI 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. + +import enum, logging, requests +from typing import Any, Dict, List, Optional, Set, Union +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_http + +NBI_ADDRESS = get_service_host(ServiceNameEnum.NBI) +NBI_PORT = get_service_port_http(ServiceNameEnum.NBI) +NBI_USERNAME = 'admin' +NBI_PASSWORD = 'admin' +NBI_BASE_URL = '' + +class RestRequestMethod(enum.Enum): + GET = 'get' + POST = 'post' + PUT = 'put' + PATCH = 'patch' + DELETE = 'delete' + +EXPECTED_STATUS_CODES : Set[int] = { + requests.codes['OK' ], + requests.codes['CREATED' ], + requests.codes['ACCEPTED' ], + requests.codes['NO_CONTENT'], +} + +def do_rest_request( + method : RestRequestMethod, url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + request_url = 'http://{:s}:{:s}@{:s}:{:d}{:s}{:s}'.format( + NBI_USERNAME, NBI_PASSWORD, NBI_ADDRESS, NBI_PORT, str(NBI_BASE_URL), url + ) + + if logger is not None: + msg = 'Request: {:s} {:s}'.format(str(method.value).upper(), str(request_url)) + if body is not None: msg += ' body={:s}'.format(str(body)) + logger.warning(msg) + reply = requests.request(method.value, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) + if logger is not None: + logger.warning('Reply: {:s}'.format(str(reply.text))) + assert reply.status_code in expected_status_codes, 'Reply failed with status code {:d}'.format(reply.status_code) + + if reply.content and len(reply.content) > 0: return reply.json() + return None + +def do_rest_get_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.GET, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_post_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.POST, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_put_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PUT, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_patch_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.PATCH, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) + +def do_rest_delete_request( + url : str, body : Optional[Any] = None, timeout : int = 10, + allow_redirects : bool = True, expected_status_codes : Set[int] = EXPECTED_STATUS_CODES, + logger : Optional[logging.Logger] = None +) -> Optional[Union[Dict, List]]: + return do_rest_request( + RestRequestMethod.DELETE, url, body=body, timeout=timeout, allow_redirects=allow_redirects, + expected_status_codes=expected_status_codes, logger=logger + ) diff --git a/src/tests/eucnc24/tests/__init__.py b/src/tests/eucnc24/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/tests/eucnc24/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/tests/eucnc24/tests/test_cleanup.py b/src/tests/eucnc24/tests/test_cleanup.py new file mode 100644 index 0000000000000000000000000000000000000000..0ee3e7ed3b3b0b11c58025a7ba305e529b053c1a --- /dev/null +++ b/src/tests/eucnc24/tests/test_cleanup.py @@ -0,0 +1,44 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'tfs-topology.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/eucnc24/tests/test_onboarding.py b/src/tests/eucnc24/tests/test_onboarding.py new file mode 100644 index 0000000000000000000000000000000000000000..0eb5e6e885b1dfa896bf2197a529dac35033ac65 --- /dev/null +++ b/src/tests/eucnc24/tests/test_onboarding.py @@ -0,0 +1,67 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, os, time +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from .Fixtures import context_client, device_client # pylint: disable=unused-import + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'tfs-topology.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + +def test_scenario_onboarding( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name +) -> None: + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient, # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices diff --git a/src/tests/eucnc24/tests/test_service_ietf_create.py b/src/tests/eucnc24/tests/test_service_ietf_create.py new file mode 100644 index 0000000000000000000000000000000000000000..83bcedf266d2c48f6734f6c23d9914cc673be970 --- /dev/null +++ b/src/tests/eucnc24/tests/test_service_ietf_create.py @@ -0,0 +1,71 @@ +# Copyright 2022-2024 ETSI 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. + +import json, logging, os +from typing import Dict +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from .Fixtures import context_client # pylint: disable=unused-import +from .Tools import do_rest_get_request, do_rest_post_request + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +REQUEST_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'ietf-l3vpn-service.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + + +# pylint: disable=redefined-outer-name, unused-argument +def test_service_ietf_creation( + context_client : ContextClient, +): + # Issue service creation request + with open(REQUEST_FILE, 'r', encoding='UTF-8') as f: + svc1_data = json.load(f) + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services' + do_rest_post_request(URL, body=svc1_data, logger=LOGGER, expected_status_codes={201}) + vpn_id = svc1_data['ietf-l3vpn-svc:l3vpn-svc']['vpn-services']['vpn-service'][0]['vpn-id'] + + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(vpn_id) + service_data = do_rest_get_request(URL, logger=LOGGER, expected_status_codes={200}) + service_uuid = service_data['service-id'] + + # Verify service was created + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format( + len(response.services), grpc_message_to_json_string(response) + )) + assert len(response.services) == 1 + + for service in response.services: + service_id = service.service_id + assert service_id.service_uuid.uuid == service_uuid + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + assert service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), + grpc_message_to_json_string(response) + )) + assert len(response.connections) == 1 diff --git a/src/tests/eucnc24/tests/test_service_ietf_remove.py b/src/tests/eucnc24/tests/test_service_ietf_remove.py new file mode 100644 index 0000000000000000000000000000000000000000..fa466524b956e9f33cc669b8c0f49694ed6c7513 --- /dev/null +++ b/src/tests/eucnc24/tests/test_service_ietf_remove.py @@ -0,0 +1,77 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, os +from typing import Dict, Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from .Fixtures import context_client # pylint: disable=unused-import +from .Tools import do_rest_delete_request + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +REQUEST_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'ietf-l3vpn-service.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + + +# pylint: disable=redefined-outer-name, unused-argument +def test_service_ietf_removal( + context_client : ContextClient, # pylint: disable=redefined-outer-name +): + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + service_uuids : Set[str] = set() + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + assert service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), + grpc_message_to_json_string(response) + )) + assert len(response.connections) == 1 + + service_uuids.add(service_id.service_uuid.uuid) + + # Identify service to delete + assert len(service_uuids) == 1 + service_uuid = set(service_uuids).pop() + + URL = '/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service={:s}/'.format(service_uuid) + do_rest_delete_request(URL, logger=LOGGER, expected_status_codes={204}) + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 diff --git a/src/tests/eucnc24/tests/test_service_tfs_create.py b/src/tests/eucnc24/tests/test_service_tfs_create.py new file mode 100644 index 0000000000000000000000000000000000000000..e2cfddd436bed9b29e2f15c3503a1a3c3b001ae8 --- /dev/null +++ b/src/tests/eucnc24/tests/test_service_tfs_create.py @@ -0,0 +1,76 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from .Fixtures import context_client, device_client, service_client # pylint: disable=unused-import + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'tfs-service.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + + +def test_service_tfs_creation( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESCRIPTOR_FILE, context_client=context_client, + device_client=device_client, service_client=service_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format( + len(response.slices), grpc_message_to_json_string(response) + )) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format( + len(response.services), grpc_message_to_json_string(response) + )) + assert len(response.services) == 1 + + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + assert service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), + grpc_message_to_json_string(response) + )) + assert len(response.connections) == 1 diff --git a/src/tests/eucnc24/tests/test_service_tfs_remove.py b/src/tests/eucnc24/tests/test_service_tfs_remove.py new file mode 100644 index 0000000000000000000000000000000000000000..4b5a40d6e0e0338ad3c53941a1773d653617903b --- /dev/null +++ b/src/tests/eucnc24/tests/test_service_tfs_remove.py @@ -0,0 +1,80 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, os +from typing import Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, ServiceId, ServiceStatusEnum, ServiceTypeEnum +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Service import json_service_id +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from .Fixtures import context_client, service_client # pylint: disable=unused-import + + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +DESCRIPTOR_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data', 'tfs-service.json') +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) + + +def test_service_tfs_removal( + context_client : ContextClient, # pylint: disable=redefined-outer-name + service_client : ServiceClient, # pylint: disable=redefined-outer-name +): + # Verify the scenario has 1 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 1 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + context_service_uuids : Set[Tuple[str, str]] = set() + for service in response.services: + service_id = service.service_id + assert service.service_status.service_status == ServiceStatusEnum.SERVICESTATUS_ACTIVE + assert service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM + + response = context_client.ListConnections(service_id) + LOGGER.warning(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), + grpc_message_to_json_string(response) + )) + assert len(response.connections) == 1 + + context_uuid = service_id.context_id.context_uuid.uuid + service_uuid = service_id.service_uuid.uuid + context_service_uuids.add((context_uuid, service_uuid)) + + # Identify service to delete + assert len(context_service_uuids) == 1 + context_uuid, service_uuid = set(context_service_uuids).pop() + + # Delete Service + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 diff --git a/src/tests/hackfest3/__init__.py b/src/tests/hackfest3/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/hackfest3/__init__.py +++ b/src/tests/hackfest3/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/deploy_specs.sh b/src/tests/hackfest3/deploy_specs.sh index 9f492cde22a04abcc5c162602dff30393d664689..f3fd68f8cf527953adbade200a363a27a5c18e69 100755 --- a/src/tests/hackfest3/deploy_specs.sh +++ b/src/tests/hackfest3/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -79,9 +79,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/tests/hackfest3/grpc/addPolicy.sh b/src/tests/hackfest3/grpc/addPolicy.sh index 84dd09cac4fdaf68caebc2f607955493a7f63f4c..2f8b74d8be9a80b1fcf84c96106a68345a2afcb2 100755 --- a/src/tests/hackfest3/grpc/addPolicy.sh +++ b/src/tests/hackfest3/grpc/addPolicy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/grpc/removePolicy.sh b/src/tests/hackfest3/grpc/removePolicy.sh index 694177eb4a28838c4b7fbc822f822dfdadf64d38..16a7b392fa2e654f0e25de35665c516c43f32551 100755 --- a/src/tests/hackfest3/grpc/removePolicy.sh +++ b/src/tests/hackfest3/grpc/removePolicy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/build_p4.sh b/src/tests/hackfest3/int/build_p4.sh index 1bab41f692f85c7cd9071996c75f2c31a841d1d8..107c0a22dfb9c03cec5ae59f008d3bc007b26ca5 100755 --- a/src/tests/hackfest3/int/build_p4.sh +++ b/src/tests/hackfest3/int/build_p4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/connect_to_mininet.sh b/src/tests/hackfest3/int/connect_to_mininet.sh index ab748e65ac591a93a924afb8b2a0ef3fbbc31935..ea6e63b0e7c7f8b950ca70dc105749447c90fb1b 100755 --- a/src/tests/hackfest3/int/connect_to_mininet.sh +++ b/src/tests/hackfest3/int/connect_to_mininet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/copy_int_helpers.sh b/src/tests/hackfest3/int/copy_int_helpers.sh index ae9ca7b61cfc0e61ded604a51a178edb6b79851d..98dd27f80957fa82b9d7c326f2498d4e96e7dfb2 100755 --- a/src/tests/hackfest3/int/copy_int_helpers.sh +++ b/src/tests/hackfest3/int/copy_int_helpers.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/install-scapy.sh b/src/tests/hackfest3/int/install-scapy.sh index 6db0ff45ce82ce0072786c9ff2781853cfa1e9e3..438465ac96e9c6a67e0811167200cf3647289505 100755 --- a/src/tests/hackfest3/int/install-scapy.sh +++ b/src/tests/hackfest3/int/install-scapy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/receive.py b/src/tests/hackfest3/int/receive.py index 3734e8ed7d2933ff497cca3f3803962a078d417c..549b9b396186bb29eb85c6ffd9a201bf5bdea847 100644 --- a/src/tests/hackfest3/int/receive.py +++ b/src/tests/hackfest3/int/receive.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/send.py b/src/tests/hackfest3/int/send.py index 907865d7b30a685cf26a03d9677f580f4124e554..cd7bd129d89e5f77b332964c8d2afdccf4a9ad34 100644 --- a/src/tests/hackfest3/int/send.py +++ b/src/tests/hackfest3/int/send.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/solution/p4_service_handler.py b/src/tests/hackfest3/int/solution/p4_service_handler.py index bcbe3c1d4a9b9002d540be4ac82d412a8ce0387d..fe2cc80b6fb0b2c0b3f396d38f072b97b747ed82 100644 --- a/src/tests/hackfest3/int/solution/p4_service_handler.py +++ b/src/tests/hackfest3/int/solution/p4_service_handler.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/int/solution/timestamp/receive2.py b/src/tests/hackfest3/int/solution/timestamp/receive2.py index 3f32dd68049b5b5d5a8086a49f7906625dbd8112..7c5fd157d1bf1db10a09cdb05eecebf24b085bcb 100644 --- a/src/tests/hackfest3/int/solution/timestamp/receive2.py +++ b/src/tests/hackfest3/int/solution/timestamp/receive2.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/agent.py b/src/tests/hackfest3/new-probe/agent.py index 2a91d2cad755ccfab33e973b3efd7d141eb78afd..2f7ec73fe301c859fe8a95b5e1205dc44cdf2ca9 100644 --- a/src/tests/hackfest3/new-probe/agent.py +++ b/src/tests/hackfest3/new-probe/agent.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/connect_to_mininet.sh b/src/tests/hackfest3/new-probe/connect_to_mininet.sh index ab748e65ac591a93a924afb8b2a0ef3fbbc31935..ea6e63b0e7c7f8b950ca70dc105749447c90fb1b 100755 --- a/src/tests/hackfest3/new-probe/connect_to_mininet.sh +++ b/src/tests/hackfest3/new-probe/connect_to_mininet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/copy.sh b/src/tests/hackfest3/new-probe/copy.sh index d1f54edb180e820f8a544932244ac687f0bbf425..9555fd304f7c8cdf5408e764ada3fedf341ea24f 100755 --- a/src/tests/hackfest3/new-probe/copy.sh +++ b/src/tests/hackfest3/new-probe/copy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/ping2.py b/src/tests/hackfest3/new-probe/ping2.py index 4934578e58bc03d9595efe1189efdce2cab4e4d8..121344ee45e53c9e887d392354cf5511583620de 100644 --- a/src/tests/hackfest3/new-probe/ping2.py +++ b/src/tests/hackfest3/new-probe/ping2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/solution/agent.py b/src/tests/hackfest3/new-probe/solution/agent.py index 999e20060f3b6bfc31fb1e11273af7789cf0f367..ecacdf0c9e3224c4942b94f11395cd43fd143d6f 100644 --- a/src/tests/hackfest3/new-probe/solution/agent.py +++ b/src/tests/hackfest3/new-probe/solution/agent.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh b/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh index ab748e65ac591a93a924afb8b2a0ef3fbbc31935..ea6e63b0e7c7f8b950ca70dc105749447c90fb1b 100755 --- a/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh +++ b/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/solution/copy.sh b/src/tests/hackfest3/new-probe/solution/copy.sh index d1f54edb180e820f8a544932244ac687f0bbf425..9555fd304f7c8cdf5408e764ada3fedf341ea24f 100755 --- a/src/tests/hackfest3/new-probe/solution/copy.sh +++ b/src/tests/hackfest3/new-probe/solution/copy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/new-probe/solution/ping2.py b/src/tests/hackfest3/new-probe/solution/ping2.py index 87b8323a4e29c531885597ed6685332c804b5552..c303f261106b4b165622fab1e54b60d23be3a21d 100644 --- a/src/tests/hackfest3/new-probe/solution/ping2.py +++ b/src/tests/hackfest3/new-probe/solution/ping2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/monitoring_kpis.py b/src/tests/hackfest3/probe/monitoring_kpis.py index 25a1eab66bc4bc2b9567879a395d33ae3eea6689..dc3757718d5a973e1629de63f7e61a09998842c1 100644 --- a/src/tests/hackfest3/probe/monitoring_kpis.py +++ b/src/tests/hackfest3/probe/monitoring_kpis.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/probe-tfs/Cargo.toml b/src/tests/hackfest3/probe/probe-tfs/Cargo.toml index 5ee07d7844ea4a2b42970f9ff09c6dc5db22207c..da64d7a325d690666ca285fc9621ce3edaa52425 100644 --- a/src/tests/hackfest3/probe/probe-tfs/Cargo.toml +++ b/src/tests/hackfest3/probe/probe-tfs/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/probe-tfs/build.rs b/src/tests/hackfest3/probe/probe-tfs/build.rs index 0d9af6c48a1017e99976948f4824041a2d54f25d..4da300f68f40ac7d6cb4eacfeab90d9003675cd4 100644 --- a/src/tests/hackfest3/probe/probe-tfs/build.rs +++ b/src/tests/hackfest3/probe/probe-tfs/build.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh b/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh index 2a71cbb151d4f4c2249d801773341289aedc32dc..86a823ed964482e08deba3aaa6f71c753f4ebb98 100755 --- a/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh +++ b/src/tests/hackfest3/probe/probe-tfs/connect_to_mininet.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/probe-tfs/deploy.sh b/src/tests/hackfest3/probe/probe-tfs/deploy.sh index c18e96559d8d90f9328fe7c77fa66c2ca374665f..d88549a12c1cad339455d161871245849c5f57a1 100755 --- a/src/tests/hackfest3/probe/probe-tfs/deploy.sh +++ b/src/tests/hackfest3/probe/probe-tfs/deploy.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/probe-tfs/src/agent.rs b/src/tests/hackfest3/probe/probe-tfs/src/agent.rs index 749e42a6c81ce0523ae2cf52a29e9c90c43f48e7..a01ac70273ca781bb097191dad2fc9bbe916faea 100644 --- a/src/tests/hackfest3/probe/probe-tfs/src/agent.rs +++ b/src/tests/hackfest3/probe/probe-tfs/src/agent.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/probe/probe-tfs/src/ping.rs b/src/tests/hackfest3/probe/probe-tfs/src/ping.rs index bec984b66cb24ee6e6f3dc707fe9cd392b5ebb28..cb192586bcb1555f6bda47f201346a8ee679cb7c 100644 --- a/src/tests/hackfest3/probe/probe-tfs/src/ping.rs +++ b/src/tests/hackfest3/probe/probe-tfs/src/ping.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/run_test_01_bootstrap.sh b/src/tests/hackfest3/run_test_01_bootstrap.sh index fc80fa48f8284f6561a113c67c4081c9143b69c4..6901d0748f73b2eb7c19c1551af8c99ec1950da0 100755 --- a/src/tests/hackfest3/run_test_01_bootstrap.sh +++ b/src/tests/hackfest3/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/run_test_02_create_service.sh b/src/tests/hackfest3/run_test_02_create_service.sh index 86ddf10a25969fd4388bb1cb22d0a889a1366c3f..30fd908f240e30f71a6fb2669afcda411f8c2bb4 100755 --- a/src/tests/hackfest3/run_test_02_create_service.sh +++ b/src/tests/hackfest3/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/run_test_03_delete_service.sh b/src/tests/hackfest3/run_test_03_delete_service.sh index 92a058c50cb2b65cff4dd5a07e66e3c159aed1dd..ab2e6821310efb0571eec79388804c15734631ce 100755 --- a/src/tests/hackfest3/run_test_03_delete_service.sh +++ b/src/tests/hackfest3/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/run_test_04_cleanup.sh b/src/tests/hackfest3/run_test_04_cleanup.sh index 248e1b22d128c64ea97215971b1e717137a9add3..64176f788aebcbcc74527ef15fd096376a8e4b67 100755 --- a/src/tests/hackfest3/run_test_04_cleanup.sh +++ b/src/tests/hackfest3/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/setup.sh b/src/tests/hackfest3/setup.sh index cc05ea6c6df29d29cfcadcd0ae3010f13d3ac12c..3654dcd54ce51ec9534992e70919e36766d33405 100755 --- a/src/tests/hackfest3/setup.sh +++ b/src/tests/hackfest3/setup.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/BuildDescriptors.py b/src/tests/hackfest3/tests/BuildDescriptors.py index cfd29eea0cb80306f402ef71530016599b570eb1..c0f01ee7537e88883704e3af36f6c51b672a607e 100644 --- a/src/tests/hackfest3/tests/BuildDescriptors.py +++ b/src/tests/hackfest3/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/LoadDescriptors.py b/src/tests/hackfest3/tests/LoadDescriptors.py index 407d5b6dc6b46ba7dd920cb1f60be391f839bda7..c47bea18d43c3a71656169cbb3855bd1602240fd 100644 --- a/src/tests/hackfest3/tests/LoadDescriptors.py +++ b/src/tests/hackfest3/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/Objects.py b/src/tests/hackfest3/tests/Objects.py index e5f394070f403f780abe39a2c1e73288ff8cf3b1..64009c3b5c5a844e9ab25aecb2ca5190e2a40103 100644 --- a/src/tests/hackfest3/tests/Objects.py +++ b/src/tests/hackfest3/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/__init__.py b/src/tests/hackfest3/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/hackfest3/tests/__init__.py +++ b/src/tests/hackfest3/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/test_functional_bootstrap.py b/src/tests/hackfest3/tests/test_functional_bootstrap.py index 0f4ea07a370593bf38c8c602311296bc5fb4f2c6..fe622c908b44ed28a5c91ca8b35b8524511de388 100644 --- a/src/tests/hackfest3/tests/test_functional_bootstrap.py +++ b/src/tests/hackfest3/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/test_functional_cleanup.py b/src/tests/hackfest3/tests/test_functional_cleanup.py index 59835696445c9f55f179a7cda14152ec0b0f30cd..07503b170c5181cf6d88d2b91c613b43f9ca9c99 100644 --- a/src/tests/hackfest3/tests/test_functional_cleanup.py +++ b/src/tests/hackfest3/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/test_functional_create_service.py b/src/tests/hackfest3/tests/test_functional_create_service.py index a358c4c022be3216e29c23515a3192c8acbe8ce1..17c9faa89d5976db7ade02b99dfb4b3d30da5bc4 100644 --- a/src/tests/hackfest3/tests/test_functional_create_service.py +++ b/src/tests/hackfest3/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/hackfest3/tests/test_functional_delete_service.py b/src/tests/hackfest3/tests/test_functional_delete_service.py index 8542e671a85511821835a79574d8431c2a3c109e..98b6a01c1be2a00003b3be267839a4513967d4f7 100644 --- a/src/tests/hackfest3/tests/test_functional_delete_service.py +++ b/src/tests/hackfest3/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/__init__.py b/src/tests/oeccpsc22/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/oeccpsc22/__init__.py +++ b/src/tests/oeccpsc22/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/delete_all.sh b/src/tests/oeccpsc22/delete_all.sh index 3c3cd7d1277f521aa34b7165a349fed66b8bbaa5..999eb909f31dcc5a4145565b88fa57a1229007e5 100755 --- a/src/tests/oeccpsc22/delete_all.sh +++ b/src/tests/oeccpsc22/delete_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/deploy_all.sh b/src/tests/oeccpsc22/deploy_all.sh index 7620bd8b4c50c8236c005dccc0443a4d52999b4e..4378b2b85af3571739a32a3ee6a1f618edbfead8 100755 --- a/src/tests/oeccpsc22/deploy_all.sh +++ b/src/tests/oeccpsc22/deploy_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/deploy_dom1.sh b/src/tests/oeccpsc22/deploy_dom1.sh index cf7ccf82007557b80e03b8efcde97ab1af537745..a8d473b282705affbcd260ef1571ff8c0ea5e45e 100755 --- a/src/tests/oeccpsc22/deploy_dom1.sh +++ b/src/tests/oeccpsc22/deploy_dom1.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/deploy_dom2.sh b/src/tests/oeccpsc22/deploy_dom2.sh index 4fd62edabee2abe455e5723b4931f52accc1cd83..fbe3bce0ead0112d3e0d9ea2f39785656e3de626 100755 --- a/src/tests/oeccpsc22/deploy_dom2.sh +++ b/src/tests/oeccpsc22/deploy_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/deploy_specs_dom1.sh b/src/tests/oeccpsc22/deploy_specs_dom1.sh index 759fd07d2463b302d6a5dee6cfce93a04643fa71..d9e2ad49c8768246e30bee1eeeb8990d93aff561 100755 --- a/src/tests/oeccpsc22/deploy_specs_dom1.sh +++ b/src/tests/oeccpsc22/deploy_specs_dom1.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/deploy_specs_dom2.sh b/src/tests/oeccpsc22/deploy_specs_dom2.sh index ca0046ba97db9b8a5125b28ee61fe22802efcd17..45604f2bc7816b991d56a0db7761199e9c4f491b 100755 --- a/src/tests/oeccpsc22/deploy_specs_dom2.sh +++ b/src/tests/oeccpsc22/deploy_specs_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/dump_logs.sh b/src/tests/oeccpsc22/dump_logs.sh index d652a240b3351e60cc05d010825f88c7a0affe36..f3a7ce825889fa4c1f457fcb2dc5d434665e947d 100755 --- a/src/tests/oeccpsc22/dump_logs.sh +++ b/src/tests/oeccpsc22/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/expose_interdomain_dom2.sh b/src/tests/oeccpsc22/expose_interdomain_dom2.sh index 09c707ce222a0b429056dd9a9595435625dfba79..0989839202ee604b9212f4bfee915a0ddbdbdffe 100755 --- a/src/tests/oeccpsc22/expose_interdomain_dom2.sh +++ b/src/tests/oeccpsc22/expose_interdomain_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/fast_redeploy.sh b/src/tests/oeccpsc22/fast_redeploy.sh index 3ee1a2ca93d4345b9d22aa9800a22444691b7a6f..b97eb5318923da4051887001ec4d422039799fe1 100755 --- a/src/tests/oeccpsc22/fast_redeploy.sh +++ b/src/tests/oeccpsc22/fast_redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml b/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml index 70a0f45f4091a4e6ba94fe7e0fb2012bfe63528c..779a5fce8426b71e07a6c4f24e188c74e6df41c0 100644 --- a/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-controller-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml b/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml index 11e4ccf254d7cb938cd777ce35e77e05eefd604f..d80804508e578c57138ce7e0661b744afd89c52b 100644 --- a/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-controller-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml b/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml index 39502bb20df16c4ceadeff0f3fe8fd219d81e640..3027dc21d902aeb3b54017643f3532e4b58d74cb 100644 --- a/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-http-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml b/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml index 1c0ff6de94e1cdc208880823e70b7817c36fe97c..ceedd0d17512813eef676d4df47f1f6c8a741154 100644 --- a/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml +++ b/src/tests/oeccpsc22/nginx-ingress-http-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh b/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh index 9786ac913c93a4c580ca402aa28161e2cd2606cb..6b26e56083e8a1f03df857a7bf33435dd475abcd 100755 --- a/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh +++ b/src/tests/oeccpsc22/old/deploy_in_kubernetes.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/old/expose-services-dom1.yaml b/src/tests/oeccpsc22/old/expose-services-dom1.yaml index 8188e49704559cf0026309159405814715900fdf..f5d9a3beaa5e0d8ff26c94d620f7900d1ce6fb1f 100644 --- a/src/tests/oeccpsc22/old/expose-services-dom1.yaml +++ b/src/tests/oeccpsc22/old/expose-services-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/old/expose-services-dom2.yaml b/src/tests/oeccpsc22/old/expose-services-dom2.yaml index 181c1d569bdc4e77b0883982c3d28635c99a8690..8fa8ebb400865e8527a56b142ff608de7b38f8dc 100644 --- a/src/tests/oeccpsc22/old/expose-services-dom2.yaml +++ b/src/tests/oeccpsc22/old/expose-services-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/run_test_01_bootstrap.sh b/src/tests/oeccpsc22/run_test_01_bootstrap.sh index 1e92bbba32108e3dbad811f06ccd0ad1024da003..5cb15495f8bea7777c23ce4129334c29a73ec022 100755 --- a/src/tests/oeccpsc22/run_test_01_bootstrap.sh +++ b/src/tests/oeccpsc22/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh b/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh index e37b7e40323c18170b962b10dbcb96f3cca62759..f0a94791522fe56537ee1795a1e1747ea15c38e4 100755 --- a/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh +++ b/src/tests/oeccpsc22/run_test_02_create_interdomain_slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh b/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh index 88aec3ce52a1cabd644d1292205ac4a9d8245846..a4579b69f1fa1a8b45665cebc1eb622841880c71 100755 --- a/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh +++ b/src/tests/oeccpsc22/run_test_03_delete_interdomain_slice.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/run_test_04_cleanup.sh b/src/tests/oeccpsc22/run_test_04_cleanup.sh index 3ab2df2c03d5cd08c66af26f291fba04e8e4fa41..3638cd4db7eebca905d1b83e12c140650c049a35 100755 --- a/src/tests/oeccpsc22/run_test_04_cleanup.sh +++ b/src/tests/oeccpsc22/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/show_deploy.sh b/src/tests/oeccpsc22/show_deploy.sh index c54d7eface6e79464a93a74f2c1f0db485db1887..31464d080111f90147c1416300af276dfccc42ee 100755 --- a/src/tests/oeccpsc22/show_deploy.sh +++ b/src/tests/oeccpsc22/show_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/Objects_Domain_1.py b/src/tests/oeccpsc22/tests/Objects_Domain_1.py index e3f8e7fcc41dfd6bc636dac739a9b1efd0cc48d5..522922972c903628e77dde7a66cfb3840b5bc13d 100644 --- a/src/tests/oeccpsc22/tests/Objects_Domain_1.py +++ b/src/tests/oeccpsc22/tests/Objects_Domain_1.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/Objects_Domain_2.py b/src/tests/oeccpsc22/tests/Objects_Domain_2.py index b5964b8800d59f466f10aafc22cfbeb4faa45f3c..4d1e79ce6219220bb225d007f5a843b6ad5f9b79 100644 --- a/src/tests/oeccpsc22/tests/Objects_Domain_2.py +++ b/src/tests/oeccpsc22/tests/Objects_Domain_2.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/Objects_Service.py b/src/tests/oeccpsc22/tests/Objects_Service.py index 1a37592c4e225b543186316cc7fdb837fe759694..9fd9a12a4ed9a7cc78b32f8bcf8eed84530da7db 100644 --- a/src/tests/oeccpsc22/tests/Objects_Service.py +++ b/src/tests/oeccpsc22/tests/Objects_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/Tools.py b/src/tests/oeccpsc22/tests/Tools.py index 9b61d43fe0da9197ad70ad9b81c54952125e4e50..088559e6464170a751258a8fc448caf1498b9b54 100644 --- a/src/tests/oeccpsc22/tests/Tools.py +++ b/src/tests/oeccpsc22/tests/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/__init__.py b/src/tests/oeccpsc22/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/oeccpsc22/tests/__init__.py +++ b/src/tests/oeccpsc22/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/test_functional_bootstrap.py b/src/tests/oeccpsc22/tests/test_functional_bootstrap.py index 44427f916328a291748eb0d1d7c2a6429b1278f6..f968f3331819562259a8f051db8fea3cb2731ef2 100644 --- a/src/tests/oeccpsc22/tests/test_functional_bootstrap.py +++ b/src/tests/oeccpsc22/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/test_functional_cleanup.py b/src/tests/oeccpsc22/tests/test_functional_cleanup.py index 862db8e2931526b18b6d60a8e4a6269e111d539e..a8bba718e5ce8ce913163b4b5c3a0ccedc0fb5d8 100644 --- a/src/tests/oeccpsc22/tests/test_functional_cleanup.py +++ b/src/tests/oeccpsc22/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py b/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py index 7e2491dae482238a3ce4dc35508b8e39882c7dbb..15347826355dba52c034a5d57c470b8af9c53bd7 100644 --- a/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py +++ b/src/tests/oeccpsc22/tests/test_functional_create_interdomain_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py b/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py index 0327de366b9cd838ad53a36240bbadb7852cc59a..aacf577572bd675812ae0acea62b9843ed802fcd 100644 --- a/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py +++ b/src/tests/oeccpsc22/tests/test_functional_delete_interdomain_slice.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/.gitlab-ci.yml b/src/tests/ofc22/.gitlab-ci.yml index 836d70791604bfd6e5b924f60eae77d83fa8b09a..0fbe2375a0ea0689946ed955861167efc17da31b 100644 --- a/src/tests/ofc22/.gitlab-ci.yml +++ b/src/tests/ofc22/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/Dockerfile b/src/tests/ofc22/Dockerfile index b1749469a2a22e4b4da7af0645a53643c649bcae..a06f66fd0e954999722832cd7757b520a9141467 100644 --- a/src/tests/ofc22/Dockerfile +++ b/src/tests/ofc22/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/__init__.py b/src/tests/ofc22/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ofc22/__init__.py +++ b/src/tests/ofc22/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/deploy_specs.sh b/src/tests/ofc22/deploy_specs.sh index 1fc290c7045088bfd0bd9b3d86aa25c3ca59a492..4662020ab721cab1e4d502432fcf8adfe5cd73e9 100755 --- a/src/tests/ofc22/deploy_specs.sh +++ b/src/tests/ofc22/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -92,9 +92,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/tests/ofc22/redeploy.sh b/src/tests/ofc22/redeploy.sh index 7d84fe5646c49978cd283b3645b87e488965ce87..80e7f487de103fe88ce7e688e8ef3d6130527242 100755 --- a/src/tests/ofc22/redeploy.sh +++ b/src/tests/ofc22/redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/requirements.in b/src/tests/ofc22/requirements.in index 468af1a17931d6e545647e3e7a057433d74826b3..d733b0adb03957eb23b685c8a901cdc4b3a6d8d6 100644 --- a/src/tests/ofc22/requirements.in +++ b/src/tests/ofc22/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/run_test_01_bootstrap.sh b/src/tests/ofc22/run_test_01_bootstrap.sh index 13825d1950d8f65b0159579ccf5f73ad28dff753..2df9d55f0dff674ace0c14e5d34e13bf2cdb5b24 100755 --- a/src/tests/ofc22/run_test_01_bootstrap.sh +++ b/src/tests/ofc22/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/run_test_02_create_service.sh b/src/tests/ofc22/run_test_02_create_service.sh index 326511020b1f3db8ef68a1b9eec325e7da60e388..b1eba6a44f1a74c240e238168b5a9b55651cca02 100755 --- a/src/tests/ofc22/run_test_02_create_service.sh +++ b/src/tests/ofc22/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/run_test_03_delete_service.sh b/src/tests/ofc22/run_test_03_delete_service.sh index a0868b2fd4ceadd0095f55f590fb89cf2d4b5b33..c918e953b770f9ad8ba3ed41c8ef6842abb75108 100755 --- a/src/tests/ofc22/run_test_03_delete_service.sh +++ b/src/tests/ofc22/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/run_test_04_cleanup.sh b/src/tests/ofc22/run_test_04_cleanup.sh index 6e44f7760d78357a519926a98f9843c298f8ad11..d45c15feba3dbba89438f44fdd924f47491b7b88 100755 --- a/src/tests/ofc22/run_test_04_cleanup.sh +++ b/src/tests/ofc22/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/run_tests.sh b/src/tests/ofc22/run_tests.sh index 36f5f8597a2f6e98c35c4771e89435cef1a5dd5b..7559543f02d3b903b0dea7cff097a194ebcc629f 100755 --- a/src/tests/ofc22/run_tests.sh +++ b/src/tests/ofc22/run_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/Fixtures.py b/src/tests/ofc22/tests/Fixtures.py index e2752dce9927cce1217c1e4316f2b07e50731c2a..f1b42d39ecb4e77200991d9df40e1390099bbede 100644 --- a/src/tests/ofc22/tests/Fixtures.py +++ b/src/tests/ofc22/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/Objects.py b/src/tests/ofc22/tests/Objects.py index b895467478f3ea48b05640c2445be354d56ef2d8..78e18a39d7887cb2d65cc707f950a223df2f5708 100644 --- a/src/tests/ofc22/tests/Objects.py +++ b/src/tests/ofc22/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/ObjectsXr.py b/src/tests/ofc22/tests/ObjectsXr.py index 4f1ad638023d7d75d042294da04b24bbf3e704f2..17a9e937f7d48b0d4bf92e4ecab198d3f8d2f714 100644 --- a/src/tests/ofc22/tests/ObjectsXr.py +++ b/src/tests/ofc22/tests/ObjectsXr.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/__init__.py b/src/tests/ofc22/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ofc22/tests/__init__.py +++ b/src/tests/ofc22/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/test_functional_bootstrap.py b/src/tests/ofc22/tests/test_functional_bootstrap.py index 4101882a80e3e2bf8674cbcb5bbf8aa506be2740..c8a4803ed6ac5e6d3f6084de2ec0372d69042382 100644 --- a/src/tests/ofc22/tests/test_functional_bootstrap.py +++ b/src/tests/ofc22/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/test_functional_cleanup.py b/src/tests/ofc22/tests/test_functional_cleanup.py index 0e2580a9969ac6d4f7fbcf7375ab0a96197d07cc..34c1d440f029467d4c42552d935fedc519a53916 100644 --- a/src/tests/ofc22/tests/test_functional_cleanup.py +++ b/src/tests/ofc22/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/test_functional_create_service.py b/src/tests/ofc22/tests/test_functional_create_service.py index cbb9655eb870e7005da33d558ab54c22f519bf47..e0874a22d274117fcd557337180f2253125cb4a4 100644 --- a/src/tests/ofc22/tests/test_functional_create_service.py +++ b/src/tests/ofc22/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/test_functional_create_service_xr.py b/src/tests/ofc22/tests/test_functional_create_service_xr.py index a930474591b8241c668a931a2bf0a2a5b0824657..183410e8d0b2fcc22e082febb9ca26d63e6a20a3 100644 --- a/src/tests/ofc22/tests/test_functional_create_service_xr.py +++ b/src/tests/ofc22/tests/test_functional_create_service_xr.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/test_functional_delete_service.py b/src/tests/ofc22/tests/test_functional_delete_service.py index e8296d291f371101104b07247a008bcbfe685dd7..544c7a703a55a56a458e91450f6ba019a6c5c2c9 100644 --- a/src/tests/ofc22/tests/test_functional_delete_service.py +++ b/src/tests/ofc22/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc22/tests/test_functional_delete_service_xr.py b/src/tests/ofc22/tests/test_functional_delete_service_xr.py index b92283c83d38765d7c73b03d9978cec3bb2cd7b4..b23b683872e196a7225f23adc814b537705da62f 100644 --- a/src/tests/ofc22/tests/test_functional_delete_service_xr.py +++ b/src/tests/ofc22/tests/test_functional_delete_service_xr.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/__init__.py b/src/tests/ofc23/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ofc23/__init__.py +++ b/src/tests/ofc23/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/delete_hierar.sh b/src/tests/ofc23/delete_hierar.sh index bfcc04302d22cbddb217158d8e90a0a2cc0505d7..e31ee26bb49ad238ab1082a3789346739d6c62fa 100755 --- a/src/tests/ofc23/delete_hierar.sh +++ b/src/tests/ofc23/delete_hierar.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/delete_sligrp.sh b/src/tests/ofc23/delete_sligrp.sh index 77aa5dd2ab57bb2d81832c0b1a7c95952ba08e69..903d091ec2e02de6b1d1cd9e5d0f82254b838b76 100755 --- a/src/tests/ofc23/delete_sligrp.sh +++ b/src/tests/ofc23/delete_sligrp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_child.sh b/src/tests/ofc23/deploy_child.sh index 023dd39b4eeacf881d69f45eaa4974dd85eb35a3..9235466305a2a4faadc53dd443432ff42776719d 100755 --- a/src/tests/ofc23/deploy_child.sh +++ b/src/tests/ofc23/deploy_child.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_hierar.sh b/src/tests/ofc23/deploy_hierar.sh index 1ef38f2ba3148929aceaba237066f43eafa8bff0..0d2d6381becf86257dcbed7de6d14367dbdbbddd 100755 --- a/src/tests/ofc23/deploy_hierar.sh +++ b/src/tests/ofc23/deploy_hierar.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_parent.sh b/src/tests/ofc23/deploy_parent.sh index 96cb0c5a2b209319514195f639ad9188bb240ab6..2d149a1b089a017d96f152e6d8d677b227ec2e32 100755 --- a/src/tests/ofc23/deploy_parent.sh +++ b/src/tests/ofc23/deploy_parent.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_sligrp.sh b/src/tests/ofc23/deploy_sligrp.sh index 6618aaddd735d0715f29bd3e6ae3212ebda30a9e..b49ac6895f5077d8585f6063ab9a719e7bb72029 100755 --- a/src/tests/ofc23/deploy_sligrp.sh +++ b/src/tests/ofc23/deploy_sligrp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_specs_child.sh b/src/tests/ofc23/deploy_specs_child.sh index 9da5eaf7de80c015a0bcbc3ba62a317abb3754ae..1bbc7de432370908ebabdc7bf2ca70ca1255c76b 100755 --- a/src/tests/ofc23/deploy_specs_child.sh +++ b/src/tests/ofc23/deploy_specs_child.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_specs_parent.sh b/src/tests/ofc23/deploy_specs_parent.sh index ec8a9eefc7b13dac80574c9a14c8f0c66cad610c..ab41cb34492f54b061c39fe76c3df51f013a1fe1 100755 --- a/src/tests/ofc23/deploy_specs_parent.sh +++ b/src/tests/ofc23/deploy_specs_parent.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/deploy_specs_sligrp.sh b/src/tests/ofc23/deploy_specs_sligrp.sh index 8c2601a7439aeb23e11ba49fe3958ab18839e62d..a05c44c87f47a06b3219d1a8f2d4a87d5f931883 100755 --- a/src/tests/ofc23/deploy_specs_sligrp.sh +++ b/src/tests/ofc23/deploy_specs_sligrp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/dump_logs.sh b/src/tests/ofc23/dump_logs.sh index c74ac4879cd469f2d5124c7bc024492ae99d8f30..d0b0f66ac3d45751c099248e133c6cb6a51945d3 100755 --- a/src/tests/ofc23/dump_logs.sh +++ b/src/tests/ofc23/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/fast_redeploy.sh b/src/tests/ofc23/fast_redeploy.sh index 66c523eb4a4929f52d64fa3e39b331c005ad0cae..7160778fa875c99f55e90083d74b3d07db507eed 100755 --- a/src/tests/ofc23/fast_redeploy.sh +++ b/src/tests/ofc23/fast_redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/nginx-ingress-controller-child.yaml b/src/tests/ofc23/nginx-ingress-controller-child.yaml index 87a1cdd1455d026f94c41f93f80a30ae127ac96b..1e3281c9a5bd28b542e39ab16918938156562d4b 100644 --- a/src/tests/ofc23/nginx-ingress-controller-child.yaml +++ b/src/tests/ofc23/nginx-ingress-controller-child.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/nginx-ingress-controller-parent.yaml b/src/tests/ofc23/nginx-ingress-controller-parent.yaml index 1529c7a4cfb906a9d10889bae7d4767261e1f962..fc79f0710dfce6fd2d70b10b41d64a38328c86af 100644 --- a/src/tests/ofc23/nginx-ingress-controller-parent.yaml +++ b/src/tests/ofc23/nginx-ingress-controller-parent.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/show_deploy.sh b/src/tests/ofc23/show_deploy.sh index 641c4495a42ba193fc5b299c421b5b2fbbe04661..d3dd4fc77923b436e632e49334298245844de82a 100755 --- a/src/tests/ofc23/show_deploy.sh +++ b/src/tests/ofc23/show_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/show_deploy_sligrp.sh b/src/tests/ofc23/show_deploy_sligrp.sh index 4111f230c77ac7e202974f4e76cce4543a15bb27..f219d14e55cd8f3ad82b9eca08f22bc366e726d1 100755 --- a/src/tests/ofc23/show_deploy_sligrp.sh +++ b/src/tests/ofc23/show_deploy_sligrp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/tfs-ingress-child.yaml b/src/tests/ofc23/tfs-ingress-child.yaml index ab0e948bc7ab00ec3a128d9413970291266200f9..bd00f636a2ddb50c863f245ebbf41db13a1f54ff 100644 --- a/src/tests/ofc23/tfs-ingress-child.yaml +++ b/src/tests/ofc23/tfs-ingress-child.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc23/tfs-ingress-parent.yaml b/src/tests/ofc23/tfs-ingress-parent.yaml index 8d67a7cbdf9234adc13777d256959d390cc15f02..417ef60283e42e61470873c13cc648a3603d1e97 100644 --- a/src/tests/ofc23/tfs-ingress-parent.yaml +++ b/src/tests/ofc23/tfs-ingress-parent.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/.gitlab-ci.yml b/src/tests/ofc24/.gitlab-ci.yml index d7bda488689abe88b8abba9a054307fcf377af46..7937fd1be870d11c78f2042ab98c727f7ad1eb0b 100644 --- a/src/tests/ofc24/.gitlab-ci.yml +++ b/src/tests/ofc24/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -136,7 +136,6 @@ end2end_test ofc24: - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server - - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/opticalcontrollerservice -c server - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi diff --git a/src/tests/ofc24/Dockerfile b/src/tests/ofc24/Dockerfile index 734cf6233e3f9e6b3839c5a054143de57c0a0e92..4e4e9f9e91f3a681fa6951aaa6f257746b98ebb1 100644 --- a/src/tests/ofc24/Dockerfile +++ b/src/tests/ofc24/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -92,8 +92,9 @@ export PYTHONPATH=/var/teraflow pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_bootstrap.py --junitxml=/opt/results/report_bootstrap.xml pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_create_service_unidir.py --junitxml=/opt/results/report_create_service_unidir.xml pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_delete_service_unidir.py --junitxml=/opt/results/report_delete_service_unidir.xml -pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_create_service_bidir.py --junitxml=/opt/results/report_create_service_bidir.xml -pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_delete_service_bidir.py --junitxml=/opt/results/report_delete_service_bidir.xml +# TODO: review bidirectional code. For now, test is disabled til reworked. +#pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_create_service_bidir.py --junitxml=/opt/results/report_create_service_bidir.xml +#pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_delete_service_bidir.py --junitxml=/opt/results/report_delete_service_bidir.xml pytest --verbose --log-level=INFO /var/teraflow/tests/ofc24/tests/test_functional_cleanup.py --junitxml=/opt/results/report_cleanup.xml EOF RUN chmod ug+x ./run_tests.sh diff --git a/src/tests/ofc24/__init__.py b/src/tests/ofc24/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ofc24/__init__.py +++ b/src/tests/ofc24/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/_old/startExtraNetConfigAgent.sh b/src/tests/ofc24/_old/startExtraNetConfigAgent.sh index 197171d2f5e2653e9c38d51c60502984c4d0b345..cdc00ebf3ce51680adc2b0129df175d81d4a668a 100755 --- a/src/tests/ofc24/_old/startExtraNetConfigAgent.sh +++ b/src/tests/ofc24/_old/startExtraNetConfigAgent.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -15,10 +15,14 @@ +docker stop na1 +docker rm na1 +docker stop na2 +docker rm na2 -screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.4:2023:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na1 -it asgamb1/oc23bgp.img:latest bash" -screen -dmS t2 -T xterm sh -c "docker run -p 10.0.2.4:2024:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na2 -it asgamb1/oc23bgp.img:latest bash" +screen -dmS t1 -T xterm sh -c "docker run -p 10.0.2.4:2023:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na1 -it asgamb1/oc23bgp.img:latest sh" +screen -dmS t2 -T xterm sh -c "docker run -p 10.0.2.4:2024:2022 -v ~/tfs-ctrl/src/tests/ofc24/tempOC/files:/files --name na2 -it asgamb1/oc23bgp.img:latest sh" @@ -26,7 +30,7 @@ sleep 4 echo "starting transponder1 " if [ "$( docker container inspect -f '{{.State.Running}}' na1)" = "true" ]; then - docker exec na1 sh -c " cp /files/platform_t1.xml demoECOC21.xml ; + docker exec na1 bash -c " cp /files/platform_t1.xml demoECOC21.xml ; /confd/examples.confd/OC23/startNetconfAgent.sh;" else @@ -36,7 +40,7 @@ fi echo "starting transponder2 " if [ "$( docker container inspect -f '{{.State.Running}}' na2)" = "true" ]; then - docker exec na2 sh -c " cp /files/platform_t2.xml demoECOC21.xml; + docker exec na2 bash -c " cp /files/platform_t2.xml demoECOC21.xml; /confd/examples.confd/OC23/startNetconfAgent.sh " else diff --git a/src/tests/ofc24/_old/start_topo.sh b/src/tests/ofc24/_old/start_topo.sh index 69a763eecfe73b69aabcc22b4ead0364cd10f84f..2ca70d23c10aaf7e75aaa8358fb24396cae88d19 100755 --- a/src/tests/ofc24/_old/start_topo.sh +++ b/src/tests/ofc24/_old/start_topo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/deploy-node-agents.sh b/src/tests/ofc24/deploy-node-agents.sh index 48fa95fd8c00081b63d89618aafb23e0846ea734..40ba750b132f96554ec7f4547b55f758301da0ac 100755 --- a/src/tests/ofc24/deploy-node-agents.sh +++ b/src/tests/ofc24/deploy-node-agents.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/deploy_specs.sh b/src/tests/ofc24/deploy_specs.sh index 4cd0e7fa0c1d64ff965bcf4b66042fe3fc8fd557..f91103d977cc8b3b2a1d2c5b4ab43d11dd77ad98 100755 --- a/src/tests/ofc24/deploy_specs.sh +++ b/src/tests/ofc24/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -21,7 +21,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. #export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" -export TFS_COMPONENTS="context device pathcomp service slice nbi webui" +export TFS_COMPONENTS="context device pathcomp service nbi" # Uncomment to activate Monitoring #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" @@ -99,9 +99,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" @@ -110,7 +107,7 @@ export CRDB_DEPLOY_MODE="single" export CRDB_DROP_DATABASE_IF_EXISTS="YES" # Disable flag for re-deploying CockroachDB from scratch. -export CRDB_REDEPLOY="" +export CRDB_REDEPLOY="YES" # ----- NATS ------------------------------------------------------------------- diff --git a/src/tests/ofc24/descriptors/service-bidir.json b/src/tests/ofc24/descriptors/service-bidir.json index 05547a19d2d375d2a8202266b1a1a5ffcfe46eb6..8cb587ccf8c31ed994f7e81c6d58331d4b7430cb 100755 --- a/src/tests/ofc24/descriptors/service-bidir.json +++ b/src/tests/ofc24/descriptors/service-bidir.json @@ -3,13 +3,13 @@ { "service_id": { "context_id": {"context_uuid": {"uuid": "admin"}}, - "service_uuid": {"uuid": "optical-connection"} + "service_uuid": {"uuid": "optical-connection-bidir"} }, "service_type": 6, "service_status": {"service_status": 1}, "service_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, - {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + {"device_id": {"device_uuid": {"uuid": "T1.1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "T2.1"}}, "endpoint_uuid": {"uuid": "6"}} ], "service_constraints": [ {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "100.0"}}, diff --git a/src/tests/ofc24/descriptors/service-unidir.json b/src/tests/ofc24/descriptors/service-unidir.json index d9b4e88479c17aaf03f65d08b8d4b0ca22121e74..e96f10b156948568945def99ea91a4d704ffd4d5 100755 --- a/src/tests/ofc24/descriptors/service-unidir.json +++ b/src/tests/ofc24/descriptors/service-unidir.json @@ -3,13 +3,13 @@ { "service_id": { "context_id": {"context_uuid": {"uuid": "admin"}}, - "service_uuid": {"uuid": "optical-connection"} + "service_uuid": {"uuid": "optical-connection-unidir"} }, "service_type": 6, "service_status": {"service_status": 1}, "service_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, - {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + {"device_id": {"device_uuid": {"uuid": "T1.2"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "T2.2"}}, "endpoint_uuid": {"uuid": "6"}} ], "service_constraints": [ {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "100.0"}}, diff --git a/src/tests/ofc24/descriptors/topology.json b/src/tests/ofc24/descriptors/topology.json index 85bbad55eb8608d2d2a7abad7fffab8fffdae682..f358bf94cebc5ebe51cef25dd3816622dcdb7b64 100644 --- a/src/tests/ofc24/descriptors/topology.json +++ b/src/tests/ofc24/descriptors/topology.json @@ -7,144 +7,1564 @@ ], "devices": [ { - "device_id": {"device_uuid": {"uuid": "T1"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_id": {"device_uuid": {"uuid": "T1.1"}}, "device_type": "optical-transponder", "device_drivers": [11], "device_operational_status": 1, - "device_endpoints": [ - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.101"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, - "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, - "endpoints": [{"uuid": "1", "type": "optical", "sample_types": [101, 102, 201, 202]}] + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} }}} ]} }, { - "device_id": {"device_uuid": {"uuid": "T2"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_id": {"device_uuid": {"uuid": "T1.2"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T1.3"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2.1"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2.2"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2.3"}}, "device_type": "optical-transponder", "device_drivers": [11], "device_operational_status": 1, - "device_endpoints": [ - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.102"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, - "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, - "endpoints": [{"uuid": "6", "type": "optical", "sample_types": [101, 102, 201, 202]}] + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} }}} ]} }, { "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "optical-roadm", "device_drivers": [11], "device_operational_status": 1, - "device_endpoints": [ - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.201"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, - "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, - "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, - "endpoints": [ - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "2"}, - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "3"}, - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "12"}, - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "13"} - ]} - }}] - } + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, "type": "optical-roadm", + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} + }}} + ]} }, { "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "optical-roadm", "device_drivers": [11], "device_operational_status": 1, - "device_endpoints": [ - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }}, - {"endpoint_id": { - "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}, - "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} - }} - ], "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.202"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, - "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, - "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, - "endpoints": [ - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "4"}, - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "5"}, - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "14"}, - {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "15"} - ] + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, "type": "optical-roadm", + "device_params": {"name": "default"}, "manager_params": {"timeout": 120} }}} ]} } ], - "links": [ - {"link_id": {"link_uuid": {"uuid": "T1->R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1->T1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}}, - {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R1->R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2->R1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}}, - {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "T2->R2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}}, - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}} - ]}, - {"link_id": {"link_uuid": {"uuid": "R2->T2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}}, - {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} - ]} - ] + "optical_links": [ + { + "name": "T1.1-R1", + "link_id": { + "link_uuid": { + "uuid": "T1.1->R1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T1.1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "12" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "1", + "dst_port": "12", + "local_peer_port": "1", + "remote_peer_port": "2", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "T1.2-R1", + "link_id": { + "link_uuid": { + "uuid": "T1.2->R1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T1.2" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "13" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "1", + "dst_port": "13", + "local_peer_port": "1", + "remote_peer_port": "3", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "T1.3-R1", + "link_id": { + "link_uuid": { + "uuid": "T1.3->R1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T1.3" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "14" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "1", + "dst_port": "14", + "local_peer_port": "1", + "remote_peer_port": "4", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R1-T1.1", + "link_id": { + "link_uuid": { + "uuid": "R1->T1.1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T1.1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "2", + "dst_port": "1", + "local_peer_port": "12", + "remote_peer_port": "1", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R1-T1.2", + "link_id": { + "link_uuid": { + "uuid": "R1->T1.2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "3" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T1.2" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "3", + "dst_port": "1", + "local_peer_port": "13", + "remote_peer_port": "1", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R1-T1.3", + "link_id": { + "link_uuid": { + "uuid": "R1->T1.3" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "4" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T1.3" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "4", + "dst_port": "1", + "local_peer_port": "14", + "remote_peer_port": "1", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R1-R2", + "link_id": { + "link_uuid": { + "uuid": "R1->R2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "101" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "111" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "101", + "dst_port": "111", + "local_peer_port": "111", + "remote_peer_port": "101", + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R2-R1", + "link_id": { + "link_uuid": { + "uuid": "R2->R1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "101" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R1" + } + }, + "endpoint_uuid": { + "uuid": "111" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "101", + "dst_port": "111", + "local_peer_port": "111", + "remote_peer_port": "101", + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "T2.1-R2", + "link_id": { + "link_uuid": { + "uuid": "T2.1->R2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T2.1" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "12" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "6", + "dst_port": "12", + "local_peer_port": "6", + "remote_peer_port": "2", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "T2.2-R2", + "link_id": { + "link_uuid": { + "uuid": "T2.2->R2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T2.2" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "13" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "6", + "dst_port": "13", + "local_peer_port": "6", + "remote_peer_port": "3", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "T2.3-R2", + "link_id": { + "link_uuid": { + "uuid": "T2.3->R2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "T2.3" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "14" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "6", + "dst_port": "14", + "local_peer_port": "6", + "remote_peer_port": "4", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R2-T2.1", + "link_id": { + "link_uuid": { + "uuid": "R2->T2.1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T2.1" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "2", + "dst_port": "6", + "local_peer_port": "12", + "remote_peer_port": "6", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R2-T2.2", + "link_id": { + "link_uuid": { + "uuid": "R1->T2.2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "3" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T2.2" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "3", + "dst_port": "6", + "local_peer_port": "13", + "remote_peer_port": "6", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + }, + { + "name": "R2-T2.3", + "link_id": { + "link_uuid": { + "uuid": "R2->T2.3" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "R2" + } + }, + "endpoint_uuid": { + "uuid": "4" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "T2.3" + } + }, + "endpoint_uuid": { + "uuid": "6" + } + } + ], + "optical_details": { + "length": 0, + "src_port": "4", + "dst_port": "6", + "local_peer_port": "14", + "remote_peer_port": "6", + "used": false, + "c_slots": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 1, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1 + }, + "l_slots": { + "101": 1, + "102": 1, + "103": 1, + "104": 1, + "105": 1, + "106": 1, + "107": 1, + "108": 1, + "109": 1, + "110": 1, + "111": 1, + "112": 1, + "113": 1, + "114": 1, + "115": 1, + "116": 1, + "117": 1, + "118": 1, + "119": 1, + "120": 1 + }, + "s_slots": { + "501": 1, + "502": 1, + "503": 1, + "504": 1, + "505": 1, + "506": 1, + "507": 1, + "508": 1, + "509": 1, + "510": 1, + "511": 1, + "512": 1, + "513": 1, + "514": 1, + "515": 1, + "516": 1, + "517": 1, + "518": 1, + "519": 1, + "520": 1 + } + } + } + ] } diff --git a/src/tests/ofc24/destroy-node-agents.sh b/src/tests/ofc24/destroy-node-agents.sh index bda864727e1cd6dcbb2ee60fb52a754f21476afb..85a5ed01a8b9c1d4039f9a65e97a81a95e685025 100755 --- a/src/tests/ofc24/destroy-node-agents.sh +++ b/src/tests/ofc24/destroy-node-agents.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/get_all.sh b/src/tests/ofc24/get_all.sh new file mode 100755 index 0000000000000000000000000000000000000000..7a1a233eb144435d8d628e241b840ca5a61d0b15 --- /dev/null +++ b/src/tests/ofc24/get_all.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 diff --git a/src/tests/ofc24/get_bands.sh b/src/tests/ofc24/get_bands.sh new file mode 100755 index 0000000000000000000000000000000000000000..0ad917c2d03a3182ea5cea95518a56a4daffaa48 --- /dev/null +++ b/src/tests/ofc24/get_bands.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 + +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 diff --git a/src/tests/ofc24/get_lightpath.sh b/src/tests/ofc24/get_lightpath.sh new file mode 100755 index 0000000000000000000000000000000000000000..83475684a38051839d9239f20ed5becd61fdfd46 --- /dev/null +++ b/src/tests/ofc24/get_lightpath.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 + +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 diff --git a/src/tests/ofc24/get_links.sh b/src/tests/ofc24/get_links.sh new file mode 100755 index 0000000000000000000000000000000000000000..6c608f01d732d81b52b6c0eb95d0cfce7b1e1b11 --- /dev/null +++ b/src/tests/ofc24/get_links.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 + +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 diff --git a/src/tests/ofc24/node-agents-config/platform_r1.xml b/src/tests/ofc24/node-agents-config/platform_r1.xml index b9412d1bda3e5eafc17fc6d3233d2bcc1dffec04..92442a3a0f592dbc69f1e927421d2ec494da0493 100644 --- a/src/tests/ofc24/node-agents-config/platform_r1.xml +++ b/src/tests/ofc24/node-agents-config/platform_r1.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. @@ -132,5 +132,122 @@ </property> </properties> </component> - </components> -</config> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>4</name> + <config> + <name>4</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>14</name> + <config> + <name>14</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>101</name> + <config> + <name>101</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>111</name> + <config> + <name>111</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + </components> +</config> \ No newline at end of file diff --git a/src/tests/ofc24/node-agents-config/platform_r2.xml b/src/tests/ofc24/node-agents-config/platform_r2.xml index 317203483a89348c51e354a6c7973239b494f42d..66f9ecd85fa11a762febd2c99547cd3ecd44a7ca 100644 --- a/src/tests/ofc24/node-agents-config/platform_r2.xml +++ b/src/tests/ofc24/node-agents-config/platform_r2.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. @@ -16,6 +16,122 @@ <config xmlns="http://tail-f.com/ns/config/1.0"> <components xmlns="http://openconfig.net/yang/platform"> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>2</name> + <config> + <name>2</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D1</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>12</name> + <config> + <name>12</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D1</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>3</name> + <config> + <name>3</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>13</name> + <config> + <name>13</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> <name>4</name> <config> @@ -40,7 +156,7 @@ <name>MG_ON_PORT_DEGREE</name> <config> <name>MG_ON_PORT_DEGREE</name> - <value>D1</value> + <value>D2</value> </config> </property> </properties> @@ -69,15 +185,16 @@ <name>MG_ON_PORT_DEGREE</name> <config> <name>MG_ON_PORT_DEGREE</name> - <value>D1</value> + <value>D2</value> </config> </property> </properties> </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> - <name>5</name> + <name>101</name> <config> - <name>5</name> + <name>101</name> </config> <properties> <property> @@ -104,9 +221,9 @@ </properties> </component> <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> - <name>15</name> + <name>111</name> <config> - <name>15</name> + <name>111</name> </config> <properties> <property> @@ -132,5 +249,5 @@ </property> </properties> </component> - </components> -</config> + </components> +</config> \ No newline at end of file diff --git a/src/tests/ofc24/node-agents-config/platform_t1.xml b/src/tests/ofc24/node-agents-config/platform_t1.xml index 2ef7a1a4e51cc69986277d1d30ffe1452227d065..0fed3a0711da8a50235e3989565685eb88a957ac 100644 --- a/src/tests/ofc24/node-agents-config/platform_t1.xml +++ b/src/tests/ofc24/node-agents-config/platform_t1.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/node-agents-config/platform_t2.xml b/src/tests/ofc24/node-agents-config/platform_t2.xml index f071badaa963e3b5affc4912798c01051887a056..55b7b047ec718660359966918beac6d0f584e469 100644 --- a/src/tests/ofc24/node-agents-config/platform_t2.xml +++ b/src/tests/ofc24/node-agents-config/platform_t2.xml @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh b/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh index 3c34298d9fa9318fcf00b66d44414dde70052689..d33d930bf3e1f4910da246e437c97098e7ec6cdb 100755 --- a/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh +++ b/src/tests/ofc24/node-agents-config/startNetconfAgent-mg-on.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh b/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh index c6479a9aa3f5510f0ad00953b2d9aff9c922cee1..615ae221ca08a23eab0899494f5ad8d2924e3c1d 100755 --- a/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh +++ b/src/tests/ofc24/node-agents-config/startNetconfAgent-tp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/node-agents-config/transponders_x4.xml b/src/tests/ofc24/node-agents-config/transponders_x4.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7fa5868e182b11195caff5601feaa54104fcb7f --- /dev/null +++ b/src/tests/ofc24/node-agents-config/transponders_x4.xml @@ -0,0 +1,1055 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component> + <name>device</name> + <config> + <name>device</name> + </config> + <state> + <name>MellanoxSwitch</name> + <mfg-name>SSSA-CNIT</mfg-name> + <hardware-version>1.0.0</hardware-version> + <firmware-version>1.0.0</firmware-version> + <software-version>1.0.0</software-version> + <serial-no>610610</serial-no> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:OPERATING_SYSTEM</type> + </state> + </component> + <component> + <name>channel-1</name> + <config> + <name>channel-1</name> + </config> + <state> + <name>channel-1</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-1</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-1</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-2</name> + <config> + <name>channel-2</name> + </config> + <state> + <name>channel-2</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-2</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-2</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-3</name> + <config> + <name>channel-3</name> + </config> + <state> + <name>channel-3</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-3</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-3</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-4</name> + <config> + <name>channel-4</name> + </config> + <state> + <name>channel-4</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-4</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-4</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>transceiver-1</name> + <config> + <name>transceiver-1</name> + </config> + <state> + <name>transceiver-1</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-1</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-2</name> + <config> + <name>transceiver-2</name> + </config> + <state> + <name>transceiver-2</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-2</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-3</name> + <config> + <name>transceiver-3</name> + </config> + <state> + <name>transceiver-3</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-3</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + + <component> + <name>transceiver-4</name> + <config> + <name>transceiver-4</name> + </config> + <state> + <name>transceiver-4</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-4</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>port-1</name> + <config> + <name>port-1</name> + </config> + <state> + <name>port-1</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-1</name> + <config> + <name>channel-1</name> + </config> + <state> + <name>channel-1</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>1</value> + </config> + <state> + <name>onos-index</name> + <value>1</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-2</name> + <config> + <name>port-2</name> + </config> + <state> + <name>port-2</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-2</name> + <config> + <name>channel-2</name> + </config> + <state> + <name>channel-2</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>2</value> + </config> + <state> + <name>onos-index</name> + <value>2</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-3</name> + <config> + <name>port-3</name> + </config> + <state> + <name>port-3</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-3</name> + <config> + <name>channel-3</name> + </config> + <state> + <name>channel-3</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>3</value> + </config> + <state> + <name>onos-index</name> + <value>3</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-4</name> + <config> + <name>port-4</name> + </config> + <state> + <name>port-4</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-4</name> + <config> + <name>channel-4</name> + </config> + <state> + <name>channel-4</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>4</value> + </config> + <state> + <name>onos-index</name> + <value>4</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + </components> + <terminal-device xmlns="http://openconfig.net/yang/terminal-device"> + <logical-channels> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>1</index> + <config> + <index>1</index> + <description>Logical channel 1</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>1</index> + <description>Logical channel 1</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-1</transceiver> + </config> + <state> + <transceiver>transceiver-1</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-1</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-1</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>2</index> + <config> + <index>2</index> + <description>Logical channel 2</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>2</index> + <description>Logical channel 2</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-2</transceiver> + </config> + <state> + <transceiver>transceiver-2</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-2</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-2</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>3</index> + <config> + <index>3</index> + <description>Logical channel 3</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>3</index> + <description>Logical channel 3</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-3</transceiver> + </config> + <state> + <transceiver>transceiver-3</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-3</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-3</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>4</index> + <config> + <index>4</index> + <description>Logical channel 4</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>4</index> + <description>Logical channel 4</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-4</transceiver> + </config> + <state> + <transceiver>transceiver-4</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-4</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-4</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + </logical-channels> + <operational-modes> + <mode> + <mode-id>1</mode-id> + <state> + <mode-id>1</mode-id> + <description>FEC1</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + <mode> + <mode-id>2</mode-id> + <state> + <mode-id>2</mode-id> + <description>FEC2</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + </operational-modes> + </terminal-device> +</config> + diff --git a/src/tests/ofc24/node-agents-config/transponders_x4_2.xml b/src/tests/ofc24/node-agents-config/transponders_x4_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..3231dd95f7f7eb2cd0c3c93d6f13e5dfc9f57059 --- /dev/null +++ b/src/tests/ofc24/node-agents-config/transponders_x4_2.xml @@ -0,0 +1,1055 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component> + <name>device</name> + <config> + <name>device</name> + </config> + <state> + <name>MellanoxSwitch</name> + <mfg-name>SSSA-CNIT</mfg-name> + <hardware-version>1.0.0</hardware-version> + <firmware-version>1.0.0</firmware-version> + <software-version>1.0.0</software-version> + <serial-no>610610</serial-no> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:OPERATING_SYSTEM</type> + </state> + </component> + <component> + <name>channel-5</name> + <config> + <name>channel-5</name> + </config> + <state> + <name>channel-5</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-5</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-5</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-6</name> + <config> + <name>channel-6</name> + </config> + <state> + <name>channel-6</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-6</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-6</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-7</name> + <config> + <name>channel-7</name> + </config> + <state> + <name>channel-7</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-7</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-7</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-8</name> + <config> + <name>channel-8</name> + </config> + <state> + <name>channel-8</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-8</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-8</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>transceiver-5</name> + <config> + <name>transceiver-5</name> + </config> + <state> + <name>transceiver-5</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-5</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-6</name> + <config> + <name>transceiver-6</name> + </config> + <state> + <name>transceiver-6</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-6</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-7</name> + <config> + <name>transceiver-7</name> + </config> + <state> + <name>transceiver-7</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-7</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + + <component> + <name>transceiver-8</name> + <config> + <name>transceiver-8</name> + </config> + <state> + <name>transceiver-8</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-8</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>port-5</name> + <config> + <name>port-5</name> + </config> + <state> + <name>port-5</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-5</name> + <config> + <name>channel-5</name> + </config> + <state> + <name>channel-5</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>5</value> + </config> + <state> + <name>onos-index</name> + <value>5</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-6</name> + <config> + <name>port-6</name> + </config> + <state> + <name>port-6</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-6</name> + <config> + <name>channel-6</name> + </config> + <state> + <name>channel-6</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>6</value> + </config> + <state> + <name>onos-index</name> + <value>6</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-7</name> + <config> + <name>port-7</name> + </config> + <state> + <name>port-7</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-7</name> + <config> + <name>channel-7</name> + </config> + <state> + <name>channel-7</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>7</value> + </config> + <state> + <name>onos-index</name> + <value>7</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-8</name> + <config> + <name>port-8</name> + </config> + <state> + <name>port-8</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-8</name> + <config> + <name>channel-8</name> + </config> + <state> + <name>channel-8</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>8</value> + </config> + <state> + <name>onos-index</name> + <value>8</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + </components> + <terminal-device xmlns="http://openconfig.net/yang/terminal-device"> + <logical-channels> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>5</index> + <config> + <index>5</index> + <description>Logical channel 5</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>5</index> + <description>Logical channel 5</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-5</transceiver> + </config> + <state> + <transceiver>transceiver-5</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-5</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-5</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>6</index> + <config> + <index>6</index> + <description>Logical channel 6</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>6</index> + <description>Logical channel 6</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-6</transceiver> + </config> + <state> + <transceiver>transceiver-6</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-6</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-6</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>7</index> + <config> + <index>7</index> + <description>Logical channel 7</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>7</index> + <description>Logical channel 7</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-7</transceiver> + </config> + <state> + <transceiver>transceiver-7</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-7</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-7</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>8</index> + <config> + <index>8</index> + <description>Logical channel 8</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>8</index> + <description>Logical channel 8</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-8</transceiver> + </config> + <state> + <transceiver>transceiver-8</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-8</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-8</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + </logical-channels> + <operational-modes> + <mode> + <mode-id>1</mode-id> + <state> + <mode-id>1</mode-id> + <description>FEC1</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + <mode> + <mode-id>2</mode-id> + <state> + <mode-id>2</mode-id> + <description>FEC2</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + </operational-modes> + </terminal-device> +</config> + diff --git a/src/tests/ofc24/r_t.sh b/src/tests/ofc24/r_t.sh new file mode 100755 index 0000000000000000000000000000000000000000..f4ce3d22a83fe62a78534f445f587483ddd64bce --- /dev/null +++ b/src/tests/ofc24/r_t.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 -t 1 t1 +docker stop -t 1 na3 +docker stop -t 1 t2 +docker stop -t 1 na2 + +docker rm t1 +docker rm na3 + +docker rm t2 +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'" diff --git a/src/tests/ofc24/requirements.in b/src/tests/ofc24/requirements.in index 468af1a17931d6e545647e3e7a057433d74826b3..d733b0adb03957eb23b685c8a901cdc4b3a6d8d6 100644 --- a/src/tests/ofc24/requirements.in +++ b/src/tests/ofc24/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/roadms.sh b/src/tests/ofc24/roadms.sh new file mode 100644 index 0000000000000000000000000000000000000000..afa4f1c463b4ae179ebaed5eeec19b0afc09cfac --- /dev/null +++ b/src/tests/ofc24/roadms.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 -t 1 na3 +docker stop -t 1 na4 + +docker rm na3 +docker rm na4 + + + +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 demoECOC21.xml ; ./startNetconfAgent.sh'" +screen -dmS t4 -T xterm sh -c "docker run --name na4 -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 demoECOC21.xml ; ./startNetconfAgent.sh'" \ No newline at end of file diff --git a/src/tests/ofc24/run-tests-locally.sh b/src/tests/ofc24/run-tests-locally.sh index 3a273e70674e76f77067851c78fe6b05507611d1..ca442a4a244763952df50469fe0ab4a85dd85584 100755 --- a/src/tests/ofc24/run-tests-locally.sh +++ b/src/tests/ofc24/run-tests-locally.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/run_test.sh b/src/tests/ofc24/run_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..7f146cf7992e450d743e825dcf82b2b2ccc7e233 --- /dev/null +++ b/src/tests/ofc24/run_test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 diff --git a/src/tests/ofc24/tempOC/files/platform_r1.xml b/src/tests/ofc24/tempOC/files/platform_r1.xml new file mode 100644 index 0000000000000000000000000000000000000000..92442a3a0f592dbc69f1e927421d2ec494da0493 --- /dev/null +++ b/src/tests/ofc24/tempOC/files/platform_r1.xml @@ -0,0 +1,253 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns="http://tail-f.com/ns/config/1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>2</name> + <config> + <name>2</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D1</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>12</name> + <config> + <name>12</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D1</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>3</name> + <config> + <name>3</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>13</name> + <config> + <name>13</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>4</name> + <config> + <name>4</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>14</name> + <config> + <name>14</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>101</name> + <config> + <name>101</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>111</name> + <config> + <name>111</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + </components> +</config> \ No newline at end of file diff --git a/src/tests/ofc24/tempOC/files/platform_r2.xml b/src/tests/ofc24/tempOC/files/platform_r2.xml new file mode 100644 index 0000000000000000000000000000000000000000..66f9ecd85fa11a762febd2c99547cd3ecd44a7ca --- /dev/null +++ b/src/tests/ofc24/tempOC/files/platform_r2.xml @@ -0,0 +1,253 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns="http://tail-f.com/ns/config/1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>2</name> + <config> + <name>2</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D1</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>12</name> + <config> + <name>12</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D1</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>3</name> + <config> + <name>3</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>13</name> + <config> + <name>13</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>4</name> + <config> + <name>4</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>14</name> + <config> + <name>14</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>101</name> + <config> + <name>101</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>OUTPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + <component xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:operation="create"> + <name>111</name> + <config> + <name>111</name> + </config> + <properties> + <property> + <name>MG_ON_PORT_TYPE</name> + <config> + <name>MG_ON_PORT_TYPE</name> + <value>MG_ON_OPTICAL_PORT_WAVEBAND</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DIRECTION</name> + <config> + <name>MG_ON_PORT_DIRECTION</name> + <value>INPUT</value> + </config> + </property> + <property> + <name>MG_ON_PORT_DEGREE</name> + <config> + <name>MG_ON_PORT_DEGREE</name> + <value>D2</value> + </config> + </property> + </properties> + </component> + </components> +</config> \ No newline at end of file diff --git a/src/tests/ofc24/tempOC/files/platform_t1.xml b/src/tests/ofc24/tempOC/files/platform_t1.xml new file mode 100644 index 0000000000000000000000000000000000000000..0fed3a0711da8a50235e3989565685eb88a957ac --- /dev/null +++ b/src/tests/ofc24/tempOC/files/platform_t1.xml @@ -0,0 +1,311 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component> + <name>device</name> + <config> + <name>device</name> + </config> + <state> + <name>MellanoxSwitch</name> + <mfg-name>SSSA-CNIT</mfg-name> + <hardware-version>1.0.0</hardware-version> + <firmware-version>1.0.0</firmware-version> + <software-version>1.0.0</software-version> + <serial-no>610610</serial-no> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:OPERATING_SYSTEM</type> + </state> + </component> + <component> + <name>channel-1</name> + <config> + <name>channel-1</name> + </config> + <state> + <name>channel-1</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-1</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-1</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>transceiver-1</name> + <config> + <name>transceiver-1</name> + </config> + <state> + <name>transceiver-1</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-1</associated-optical-channel> + </config> + <!--state> + <index>1</index> + <associated-optical-channel>channel-4</associated-optical-channel> + </state--> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>port-1</name> + <config> + <name>port-1</name> + </config> + <state> + <name>port-1</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-1</name> + <config> + <name>channel-1</name> + </config> + <state> + <name>channel-1</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>4</value> + </config> + <state> + <name>onos-index</name> + <value>4</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + </components> + <terminal-device xmlns="http://openconfig.net/yang/terminal-device"> + <logical-channels> + <!--Description: Optical logical link--> + <channel> + + <!--Description: Line (OTN) Port--> + <index>1</index> + <config> + <index>1</index> + <description>Logical channel 1</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>1</index> + <description>Logical channel 1</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-1</transceiver> + </config> + <state> + <transceiver>transceiver-1</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-1</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-1</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + </logical-channels> + <operational-modes> + <mode> + <mode-id>1</mode-id> + <state> + <mode-id>1</mode-id> + <description>FEC1</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + <mode> + <mode-id>2</mode-id> + <state> + <mode-id>2</mode-id> + <description>FEC2</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + </operational-modes> + </terminal-device> +</config> diff --git a/src/tests/ofc24/tempOC/files/platform_t2.xml b/src/tests/ofc24/tempOC/files/platform_t2.xml new file mode 100644 index 0000000000000000000000000000000000000000..55b7b047ec718660359966918beac6d0f584e469 --- /dev/null +++ b/src/tests/ofc24/tempOC/files/platform_t2.xml @@ -0,0 +1,311 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component> + <name>device</name> + <config> + <name>device</name> + </config> + <state> + <name>MellanoxSwitch</name> + <mfg-name>SSSA-CNIT</mfg-name> + <hardware-version>1.0.0</hardware-version> + <firmware-version>1.0.0</firmware-version> + <software-version>1.0.0</software-version> + <serial-no>610610</serial-no> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:OPERATING_SYSTEM</type> + </state> + </component> + <component> + <name>channel-6</name> + <config> + <name>channel-6</name> + </config> + <state> + <name>channel-6</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-6</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-6</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>transceiver-6</name> + <config> + <name>transceiver-6</name> + </config> + <state> + <name>transceiver-6</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-6</associated-optical-channel> + </config> + <!--state> + <index>1</index> + <associated-optical-channel>channel-4</associated-optical-channel> + </state--> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>port-6</name> + <config> + <name>port-6</name> + </config> + <state> + <name>port-6</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-6</name> + <config> + <name>channel-6</name> + </config> + <state> + <name>channel-6</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>4</value> + </config> + <state> + <name>onos-index</name> + <value>4</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + </components> + <terminal-device xmlns="http://openconfig.net/yang/terminal-device"> + <logical-channels> + <!--Description: Optical logical link--> + <channel> + + <!--Description: Line (OTN) Port--> + <index>4</index> + <config> + <index>4</index> + <description>Logical channel 4</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>4</index> + <description>Logical channel 4</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-6</transceiver> + </config> + <state> + <transceiver>transceiver-6</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-6</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-6</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + </logical-channels> + <operational-modes> + <mode> + <mode-id>1</mode-id> + <state> + <mode-id>1</mode-id> + <description>FEC1</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + <mode> + <mode-id>2</mode-id> + <state> + <mode-id>2</mode-id> + <description>FEC2</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + </operational-modes> + </terminal-device> +</config> diff --git a/src/tests/ofc24/tempOC/files/startNetconfAgent.sh b/src/tests/ofc24/tempOC/files/startNetconfAgent.sh new file mode 100644 index 0000000000000000000000000000000000000000..1a03290d097db6f09ad5e1efc7fa92f6d7bbcedf --- /dev/null +++ b/src/tests/ofc24/tempOC/files/startNetconfAgent.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 +cp init_openconfig-platform.xml confd-cdb/ +#cp init_flex-scale-mg-on.xml confd-cdb/ +make start2 diff --git a/src/tests/ofc24/tempOC/files/transponders_x4.xml b/src/tests/ofc24/tempOC/files/transponders_x4.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7fa5868e182b11195caff5601feaa54104fcb7f --- /dev/null +++ b/src/tests/ofc24/tempOC/files/transponders_x4.xml @@ -0,0 +1,1055 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component> + <name>device</name> + <config> + <name>device</name> + </config> + <state> + <name>MellanoxSwitch</name> + <mfg-name>SSSA-CNIT</mfg-name> + <hardware-version>1.0.0</hardware-version> + <firmware-version>1.0.0</firmware-version> + <software-version>1.0.0</software-version> + <serial-no>610610</serial-no> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:OPERATING_SYSTEM</type> + </state> + </component> + <component> + <name>channel-1</name> + <config> + <name>channel-1</name> + </config> + <state> + <name>channel-1</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-1</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-1</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-2</name> + <config> + <name>channel-2</name> + </config> + <state> + <name>channel-2</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-2</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-2</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-3</name> + <config> + <name>channel-3</name> + </config> + <state> + <name>channel-3</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-3</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-3</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-4</name> + <config> + <name>channel-4</name> + </config> + <state> + <name>channel-4</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-4</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-4</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>transceiver-1</name> + <config> + <name>transceiver-1</name> + </config> + <state> + <name>transceiver-1</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-1</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-2</name> + <config> + <name>transceiver-2</name> + </config> + <state> + <name>transceiver-2</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-2</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-3</name> + <config> + <name>transceiver-3</name> + </config> + <state> + <name>transceiver-3</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-3</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + + <component> + <name>transceiver-4</name> + <config> + <name>transceiver-4</name> + </config> + <state> + <name>transceiver-4</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-4</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>port-1</name> + <config> + <name>port-1</name> + </config> + <state> + <name>port-1</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-1</name> + <config> + <name>channel-1</name> + </config> + <state> + <name>channel-1</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>1</value> + </config> + <state> + <name>onos-index</name> + <value>1</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-2</name> + <config> + <name>port-2</name> + </config> + <state> + <name>port-2</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-2</name> + <config> + <name>channel-2</name> + </config> + <state> + <name>channel-2</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>2</value> + </config> + <state> + <name>onos-index</name> + <value>2</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-3</name> + <config> + <name>port-3</name> + </config> + <state> + <name>port-3</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-3</name> + <config> + <name>channel-3</name> + </config> + <state> + <name>channel-3</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>3</value> + </config> + <state> + <name>onos-index</name> + <value>3</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-4</name> + <config> + <name>port-4</name> + </config> + <state> + <name>port-4</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-4</name> + <config> + <name>channel-4</name> + </config> + <state> + <name>channel-4</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>4</value> + </config> + <state> + <name>onos-index</name> + <value>4</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + </components> + <terminal-device xmlns="http://openconfig.net/yang/terminal-device"> + <logical-channels> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>1</index> + <config> + <index>1</index> + <description>Logical channel 1</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>1</index> + <description>Logical channel 1</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-1</transceiver> + </config> + <state> + <transceiver>transceiver-1</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-1</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-1</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>2</index> + <config> + <index>2</index> + <description>Logical channel 2</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>2</index> + <description>Logical channel 2</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-2</transceiver> + </config> + <state> + <transceiver>transceiver-2</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-2</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-2</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>3</index> + <config> + <index>3</index> + <description>Logical channel 3</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>3</index> + <description>Logical channel 3</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-3</transceiver> + </config> + <state> + <transceiver>transceiver-3</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-3</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-3</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>4</index> + <config> + <index>4</index> + <description>Logical channel 4</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>4</index> + <description>Logical channel 4</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-4</transceiver> + </config> + <state> + <transceiver>transceiver-4</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-4</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-4</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + </logical-channels> + <operational-modes> + <mode> + <mode-id>1</mode-id> + <state> + <mode-id>1</mode-id> + <description>FEC1</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + <mode> + <mode-id>2</mode-id> + <state> + <mode-id>2</mode-id> + <description>FEC2</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + </operational-modes> + </terminal-device> +</config> + diff --git a/src/tests/ofc24/tempOC/files/transponders_x4_2.xml b/src/tests/ofc24/tempOC/files/transponders_x4_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..3231dd95f7f7eb2cd0c3c93d6f13e5dfc9f57059 --- /dev/null +++ b/src/tests/ofc24/tempOC/files/transponders_x4_2.xml @@ -0,0 +1,1055 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> + <components xmlns="http://openconfig.net/yang/platform"> + <component> + <name>device</name> + <config> + <name>device</name> + </config> + <state> + <name>MellanoxSwitch</name> + <mfg-name>SSSA-CNIT</mfg-name> + <hardware-version>1.0.0</hardware-version> + <firmware-version>1.0.0</firmware-version> + <software-version>1.0.0</software-version> + <serial-no>610610</serial-no> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:OPERATING_SYSTEM</type> + </state> + </component> + <component> + <name>channel-5</name> + <config> + <name>channel-5</name> + </config> + <state> + <name>channel-5</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-5</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-5</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-6</name> + <config> + <name>channel-6</name> + </config> + <state> + <name>channel-6</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-6</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-6</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-7</name> + <config> + <name>channel-7</name> + </config> + <state> + <name>channel-7</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-7</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-7</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>channel-8</name> + <config> + <name>channel-8</name> + </config> + <state> + <name>channel-8</name> + <type xmlns:typex="http://openconfig.net/yang/transport-types">typex:OPTICAL_CHANNEL</type> + </state> + <optical-channel xmlns="http://openconfig.net/yang/terminal-device"> + <config> + <frequency>191600000</frequency> + <target-output-power>100</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-8</line-port> + </config> + <state> + <frequency>191600000</frequency> + <target-output-power>0</target-output-power> + <operational-mode>0</operational-mode> + <line-port>transceiver-8</line-port> + <group-id>1</group-id> + <output-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </output-power> + <input-power> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </input-power> + <laser-bias-current> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </laser-bias-current> + <chromatic-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </chromatic-dispersion> + <polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </polarization-mode-dispersion> + <second-order-polarization-mode-dispersion> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + </second-order-polarization-mode-dispersion> + <polarization-dependent-loss> + <instant>0</instant> + <avg>0</avg> + <min>0</min> + <max>0</max> + <interval>0</interval> + </polarization-dependent-loss> + </state> + </optical-channel> + </component> + <component> + <name>transceiver-5</name> + <config> + <name>transceiver-5</name> + </config> + <state> + <name>transceiver-5</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-5</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-6</name> + <config> + <name>transceiver-6</name> + </config> + <state> + <name>transceiver-6</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-6</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>transceiver-7</name> + <config> + <name>transceiver-7</name> + </config> + <state> + <name>transceiver-7</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-7</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + + <component> + <name>transceiver-8</name> + <config> + <name>transceiver-8</name> + </config> + <state> + <name>transceiver-8</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:TRANSCEIVER</type> + </state> + <transceiver xmlns="http://openconfig.net/yang/platform/transceiver"> + <config> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + </config> + <state> + <enabled>true</enabled> + <form-factor-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:QSFP56_DD_TYPE1</form-factor-preconf> + <ethernet-pmd-preconf xmlns:typex="http://openconfig.net/yang/transport-types">typex:ETH_400GBASE_ZR</ethernet-pmd-preconf> + <fec-mode xmlns:typex="http://openconfig.net/yang/platform-types">typex:FEC_AUTO</fec-mode> + <module-functional-type xmlns:typex="http://openconfig.net/yang/transport-types">typex:TYPE_DIGITAL_COHERENT_OPTIC</module-functional-type> + <vendor>Cisco</vendor> + <vendor-part>400zr-QSFP-DD</vendor-part> + <vendor-rev>01</vendor-rev> + <serial-no>1567321</serial-no> + </state> + <physical-channels> + <channel> + <index>1</index> + <config> + <index>1</index> + <associated-optical-channel>channel-8</associated-optical-channel> + </config> + </channel> + </physical-channels> + </transceiver> + </component> + <component> + <name>port-5</name> + <config> + <name>port-5</name> + </config> + <state> + <name>port-5</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-5</name> + <config> + <name>channel-5</name> + </config> + <state> + <name>channel-5</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>5</value> + </config> + <state> + <name>onos-index</name> + <value>5</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-6</name> + <config> + <name>port-6</name> + </config> + <state> + <name>port-6</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-6</name> + <config> + <name>channel-6</name> + </config> + <state> + <name>channel-6</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>6</value> + </config> + <state> + <name>onos-index</name> + <value>6</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-7</name> + <config> + <name>port-7</name> + </config> + <state> + <name>port-7</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-7</name> + <config> + <name>channel-7</name> + </config> + <state> + <name>channel-7</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>7</value> + </config> + <state> + <name>onos-index</name> + <value>7</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + <component> + <name>port-8</name> + <config> + <name>port-8</name> + </config> + <state> + <name>port-8</name> + <type xmlns:typex="http://openconfig.net/yang/platform-types">typex:PORT</type> + </state> + <subcomponents> + <subcomponent> + <name>channel-8</name> + <config> + <name>channel-8</name> + </config> + <state> + <name>channel-8</name> + </state> + </subcomponent> + </subcomponents> + <properties> + <property> + <name>onos-index</name> + <config> + <name>onos-index</name> + <value>8</value> + </config> + <state> + <name>onos-index</name> + <value>8</value> + </state> + </property> + <property> + <name>odtn-port-type</name> + <config> + <name>odtn-port-type</name> + <value>line</value> + </config> + <state> + <name>odtn-port-type</name> + <value>line</value> + </state> + </property> + </properties> + </component> + </components> + <terminal-device xmlns="http://openconfig.net/yang/terminal-device"> + <logical-channels> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>5</index> + <config> + <index>5</index> + <description>Logical channel 5</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>5</index> + <description>Logical channel 5</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-5</transceiver> + </config> + <state> + <transceiver>transceiver-5</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-5</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-5</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>6</index> + <config> + <index>6</index> + <description>Logical channel 6</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>6</index> + <description>Logical channel 6</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-6</transceiver> + </config> + <state> + <transceiver>transceiver-6</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-6</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-6</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>7</index> + <config> + <index>7</index> + <description>Logical channel 7</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>7</index> + <description>Logical channel 7</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-7</transceiver> + </config> + <state> + <transceiver>transceiver-7</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-7</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-7</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + <!--Description: Optical logical link--> + <channel> + <!--Description: Line (OTN) Port--> + <index>8</index> + <config> + <index>8</index> + <description>Logical channel 8</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + </config> + <state> + <index>8</index> + <description>Logical channel 8</description> + <admin-state>DISABLED</admin-state> + <logical-channel-type xmlns:type="http://openconfig.net/yang/transport-types">type:PROT_OTN</logical-channel-type> + <loopback-mode>NONE</loopback-mode> + <link-state>UP</link-state> + </state> + <ingress> + <config> + <transceiver>transceiver-8</transceiver> + </config> + <state> + <transceiver>transceiver-8</transceiver> + </state> + </ingress> + <otn> + <config> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + </config> + <state> + <tti-msg-expected>test1</tti-msg-expected> + <tti-msg-transmit>test1</tti-msg-transmit> + <tti-msg-auto>0</tti-msg-auto> + <tti-msg-recv>0</tti-msg-recv> + <rdi-msg>0</rdi-msg> + <errored-seconds>0</errored-seconds> + <severely-errored-seconds>0</severely-errored-seconds> + <unavailable-seconds>0</unavailable-seconds> + <code-violations>0</code-violations> + <fec-uncorrectable-words>0</fec-uncorrectable-words> + <fec-corrected-bytes>0</fec-corrected-bytes> + <fec-corrected-bits>0</fec-corrected-bits> + <background-block-errors>0</background-block-errors> + <pre-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </pre-fec-ber> + <post-fec-ber> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + </post-fec-ber> + <q-value> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </q-value> + <esnr> + <instant>0.0</instant> + <avg>0.0</avg> + <min>0.0</min> + <max>0.0</max> + <interval>0</interval> + </esnr> + </state> + </otn> + <logical-channel-assignments> + <assignment> + <index>1</index> + <config> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-8</optical-channel> + </config> + <state> + <index>1</index> + <description>Optical channel assigned 100</description> + <allocation>100</allocation> + <assignment-type>OPTICAL_CHANNEL</assignment-type> + <optical-channel>channel-8</optical-channel> + </state> + </assignment> + </logical-channel-assignments> + </channel> + </logical-channels> + <operational-modes> + <mode> + <mode-id>1</mode-id> + <state> + <mode-id>1</mode-id> + <description>FEC1</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + <mode> + <mode-id>2</mode-id> + <state> + <mode-id>2</mode-id> + <description>FEC2</description> + <vendor-id>Ericsson</vendor-id> + </state> + </mode> + </operational-modes> + </terminal-device> +</config> + diff --git a/src/tests/ofc24/tests/__init__.py b/src/tests/ofc24/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/ofc24/tests/__init__.py +++ b/src/tests/ofc24/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/tests/test_functional_bootstrap.py b/src/tests/ofc24/tests/test_functional_bootstrap.py index c82e751f9a956f92ff5892aaa4d7bb2deff7d8f3..274ab1c3fc9d1548a12366562a864c505784b0ba 100644 --- a/src/tests/ofc24/tests/test_functional_bootstrap.py +++ b/src/tests/ofc24/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -16,6 +16,7 @@ import logging, os, time from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum, Empty from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_string from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient @@ -59,9 +60,15 @@ def test_scenario_devices_enabled( response = context_client.ListDevices(Empty()) num_devices = len(response.devices) num_devices_enabled = 0 + disabled_devices = list() for device in response.devices: - if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue - num_devices_enabled += 1 + if device.device_operational_status == DEVICE_OP_STATUS_ENABLED: + num_devices_enabled += 1 + else: + disabled_devices.append(grpc_message_to_json(device)) LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) num_retry += 1 + if num_devices_enabled != num_devices: + LOGGER.info('Disabled Devices: {:s}'.format(str(disabled_devices))) + LOGGER.info('Devices: {:s}'.format(grpc_message_to_json_string(response))) assert num_devices_enabled == num_devices diff --git a/src/tests/ofc24/tests/test_functional_cleanup.py b/src/tests/ofc24/tests/test_functional_cleanup.py index 3d08409b4e43b2de1f1265b4f78356fef5766aa0..a482c6e46559a97e3d194c6eb9dbc0a092cc39d4 100644 --- a/src/tests/ofc24/tests/test_functional_cleanup.py +++ b/src/tests/ofc24/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/tests/test_functional_create_service_bidir.py b/src/tests/ofc24/tests/test_functional_create_service_bidir.py index c81f423d45a356b76ac2aff1b7e80c576a58760e..83b20b7f7dc5de56813f4fc780264ebb9faf7430 100644 --- a/src/tests/ofc24/tests/test_functional_create_service_bidir.py +++ b/src/tests/ofc24/tests/test_functional_create_service_bidir.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/tests/test_functional_create_service_unidir.py b/src/tests/ofc24/tests/test_functional_create_service_unidir.py index a52af6d1f94d42600fa6e6ac0d6dfa9314292f91..4982b5a328a6b0c157d890fabbdc4e2f34fc713c 100644 --- a/src/tests/ofc24/tests/test_functional_create_service_unidir.py +++ b/src/tests/ofc24/tests/test_functional_create_service_unidir.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/tests/test_functional_delete_service_bidir.py b/src/tests/ofc24/tests/test_functional_delete_service_bidir.py index 3aa1926c08d654c17dc980bd99fc47df965211be..20848a00013e570854fefc242fcae240fcf342db 100644 --- a/src/tests/ofc24/tests/test_functional_delete_service_bidir.py +++ b/src/tests/ofc24/tests/test_functional_delete_service_bidir.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/ofc24/tests/test_functional_delete_service_unidir.py b/src/tests/ofc24/tests/test_functional_delete_service_unidir.py index fdfcdec29498b6c7ca92dff3505afec2c9089ec2..3d375201f22a533f44c4b1a03d98075b385633f0 100644 --- a/src/tests/ofc24/tests/test_functional_delete_service_unidir.py +++ b/src/tests/ofc24/tests/test_functional_delete_service_unidir.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -69,9 +69,30 @@ def test_service_removal_unidir( assert len(context_service_uuids) == 1 context_uuid, service_uuid = set(context_service_uuids).pop() - # Delete Service + # NOTE: For optical bands, the service needs to be removed twice, + # first time for the lightpath, second for the optical band. + + # Check there is exactly 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + # Delete Service (lightpath) + service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + + # Check there is exactly 1 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 1 + + # Delete Service (optical band) service_client.DeleteService(ServiceId(**json_service_id(service_uuid, json_context_id(context_uuid)))) + # Check there are no services + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 0 + # Verify the scenario has no services/slices response = context_client.GetContext(ADMIN_CONTEXT_ID) assert len(response.service_ids) == 0 diff --git a/src/tests/ofc24/transponders.sh b/src/tests/ofc24/transponders.sh new file mode 100644 index 0000000000000000000000000000000000000000..6af230b58cba5ed9db11494f9121e33a3d6a41a6 --- /dev/null +++ b/src/tests/ofc24/transponders.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 -t 1 tna1 +docker stop -t 1 tna2 + +docker rm tna1 +docker rm tna2 + + + +screen -dmS tt1 -T xterm sh -c "docker run --name tna1 -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/platform_t1.xml demoECOC21.xml ; ./startNetconfAgent.sh'" +screen -dmS tt2 -T xterm sh -c "docker run --name tna2 -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/platform_t2.xml demoECOC21.xml ; ./startNetconfAgent.sh'" diff --git a/src/tests/p4-fwd-l1/README.md b/src/tests/p4-fwd-l1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b7da0fd88c6b54e4210d5f0d6664ae1ce219fafb --- /dev/null +++ b/src/tests/p4-fwd-l1/README.md @@ -0,0 +1,47 @@ +# Tests for P4 functionality of TeraFlowSDN + +This directory contains the necessary scripts and configurations to run tests for a simple port forwarding TFS program atop software-based P4 switches (using Mininet). + +## Prerequisites + +This test requires some custom monitoring services (latency monitoring and probe). +These services are implemented in Rust and can be found in the `./probe` directory. +To build these services on your target platform, follow the instructions in `./probe/probe-tfs/README.md`. + +## Basic scripts + +To run the experiments you should use the five scripts in the following order: + +```shell +setup.sh +run_test_01_bootstrap.sh +run_test_02_create_service.sh +run_test_03_delete_service.sh +run_test_04_cleanup.sh +``` + +The `setup` script copies the necessary artefacts to the SBI service pod. It should be run just once, after a fresh install of TFS. +The `bootstrap` script registers the context, topology, links, and devices to TFS. +The `create` service script establishes a service between two endpoints. +The `delete` service script deletes the aforementioned service. +The `cleanup` script deletes all the objects (context, topology, links, and devices) from TFS. + +## Objects file + +The above bash scripts make use of the corresponding python scripts found under `./tests/` directory. +More important is the `./tests/Objects.py` file, which contains the definition of the Context, Topology, Devices, Links, Services. **This is the file that needs changes in case of a new topology.** + +Check the `./tests/Objects.py` file before running the experiment to make sure that the switches' details are correct (ip address, port, etc.) + +## Mininet topologies + +In the `./mininet/` directory there are different mininet topology examples. The current `./tests/Objects.py` file corresponds to the `./mininet/8switch3path.py` topology. Additionally there is a backup file `./tests/topologies/6switchObjects.py` which corresponds to the `./mininet/6switch2path.py`. + +## P4 artefacts + +In the `./p4/` directory there are compiled p4 artefacts of the pipeline that will be pushed to the p4 switch, along with the p4-runtime definitions. +The `./setup.sh` script copies from this directory. So if you need to change p4 program, make sure to put the compiled artefacts there. + +## Latency probe + +In the `./probe/` directory there is a little program which calculates latency between two hosts in mininet and sends these measurements to the Monitoring component. For specific instructions, refer to the corresponding `./probe/README.md` file. diff --git a/src/tests/p4-fwd-l1/__init__.py b/src/tests/p4-fwd-l1/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/tests/p4-fwd-l1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/tests/p4/deploy_specs.sh b/src/tests/p4-fwd-l1/deploy_specs.sh similarity index 94% rename from src/tests/p4/deploy_specs.sh rename to src/tests/p4-fwd-l1/deploy_specs.sh index 5a3097610d2ac386f80541b8628c841479c44226..8004973e6210c4cec00792d7d605a276443712ca 100755 --- a/src/tests/p4/deploy_specs.sh +++ b/src/tests/p4-fwd-l1/deploy_specs.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/mininet/1switch1path.py b/src/tests/p4-fwd-l1/mininet/1switch1path.py similarity index 100% rename from src/tests/p4/mininet/1switch1path.py rename to src/tests/p4-fwd-l1/mininet/1switch1path.py diff --git a/src/tests/p4/mininet/2switch1path.py b/src/tests/p4-fwd-l1/mininet/2switch1path.py similarity index 99% rename from src/tests/p4/mininet/2switch1path.py rename to src/tests/p4-fwd-l1/mininet/2switch1path.py index 91db70052a95dea9b53d24dabb25b0feaa9935cf..d782d1085babd2f47b2b23f538950d5e7189f45a 100644 --- a/src/tests/p4/mininet/2switch1path.py +++ b/src/tests/p4-fwd-l1/mininet/2switch1path.py @@ -73,12 +73,12 @@ class TutorialTopo(Topo): def main(): net = Mininet(topo=TutorialTopo(), controller=None) net.start() - + client = net.hosts[0] client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') server = net.hosts[1] server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') - + CLI(net) net.stop() print '#' * 80 diff --git a/src/tests/p4/mininet/4switch2path.py b/src/tests/p4-fwd-l1/mininet/4switch2path.py similarity index 99% rename from src/tests/p4/mininet/4switch2path.py rename to src/tests/p4-fwd-l1/mininet/4switch2path.py index d8ad04b0193a2b9b610a4d5f828891e575d8efe8..0c0fa578b470a059cb896c22429379fc59982a2a 100644 --- a/src/tests/p4/mininet/4switch2path.py +++ b/src/tests/p4-fwd-l1/mininet/4switch2path.py @@ -70,13 +70,13 @@ class TutorialTopo(Topo): ip='10.0.0.1/24', gw='10.0.0.100') server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22", ip='10.0.0.2/24', gw='10.0.0.100') - + # Switch links self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1 self.addLink(switch1, switch3) # Switch1:port 2, Switch3:port 1 self.addLink(switch2, switch4) # Switch2:port 2, Switch4:port 1 self.addLink(switch3, switch4) # Switch3:port 2, Switch4:port 2 - + # Host links self.addLink(client, switch1) # Switch 1: port 3 self.addLink(server, switch4) # Switch 4: port 3 @@ -84,12 +84,12 @@ class TutorialTopo(Topo): def main(): net = Mininet(topo=TutorialTopo(), controller=None) net.start() - + client = net.hosts[0] client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') server = net.hosts[1] server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') - + CLI(net) net.stop() print '#' * 80 diff --git a/src/tests/p4/mininet/6switch2path.py b/src/tests/p4-fwd-l1/mininet/6switch2path.py similarity index 99% rename from src/tests/p4/mininet/6switch2path.py rename to src/tests/p4-fwd-l1/mininet/6switch2path.py index 8efb4b017f8c71e55884db8dd5f805820bb65fd6..b98c0e9608b7ebd346a264d5b2153e9ef099f4e1 100644 --- a/src/tests/p4/mininet/6switch2path.py +++ b/src/tests/p4-fwd-l1/mininet/6switch2path.py @@ -74,7 +74,7 @@ class TutorialTopo(Topo): ip='10.0.0.1/24', gw='10.0.0.100') server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22", ip='10.0.0.2/24', gw='10.0.0.100') - + # Switch links self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1 self.addLink(switch1, switch3) # Switch1:port 2, Switch3:port 1 @@ -84,7 +84,7 @@ class TutorialTopo(Topo): self.addLink(switch4, switch6) # Switch4:port 2, Switch6:port 1 self.addLink(switch5, switch6) # Switch5:port 2, Switch6:port 2 - + # Host links self.addLink(client, switch1) # Switch1: port 3 self.addLink(server, switch6) # Switch6: port 3 @@ -92,12 +92,12 @@ class TutorialTopo(Topo): def main(): net = Mininet(topo=TutorialTopo(), controller=None) net.start() - + client = net.hosts[0] client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') server = net.hosts[1] server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') - + CLI(net) net.stop() print '#' * 80 diff --git a/src/tests/p4/mininet/8switch3path.py b/src/tests/p4-fwd-l1/mininet/8switch3path.py similarity index 97% rename from src/tests/p4/mininet/8switch3path.py rename to src/tests/p4-fwd-l1/mininet/8switch3path.py index 20322fac9ce364cd21ea6a8eb1d68ee736dcd524..d1ae15490de15abc43972140d7591791050819cf 100755 --- a/src/tests/p4/mininet/8switch3path.py +++ b/src/tests/p4-fwd-l1/mininet/8switch3path.py @@ -1,6 +1,6 @@ #!/usr/bin/python -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) # Copyright 2019-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -79,7 +79,7 @@ class TutorialTopo(Topo): ip='10.0.0.1/24', gw='10.0.0.100') server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22", ip='10.0.0.2/24', gw='10.0.0.100') - + # Switch links self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1 self.addLink(switch1, switch4) # Switch1:port 2, Switch4:port 1 @@ -92,7 +92,7 @@ class TutorialTopo(Topo): self.addLink(switch3, switch8) # Switch3:port 2, Switch8:port 1 self.addLink(switch5, switch8) # Switch5:port 2, Switch8:port 2 self.addLink(switch7, switch8) # Switch7:port 2, Switch8:port 3 - + # Host links self.addLink(client, switch1) # Switch1: port 4 self.addLink(server, switch8) # Switch8: port 4 @@ -100,13 +100,13 @@ class TutorialTopo(Topo): def main(): net = Mininet(topo=TutorialTopo(), controller=None) net.start() - + #get hosts client = net.hosts[0] client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') server = net.hosts[1] server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') - + CLI(net) net.stop() print '#' * 80 diff --git a/src/tests/p4/p4/bmv2.json b/src/tests/p4-fwd-l1/p4/bmv2.json similarity index 100% rename from src/tests/p4/p4/bmv2.json rename to src/tests/p4-fwd-l1/p4/bmv2.json diff --git a/src/tests/p4/p4/main.p4 b/src/tests/p4-fwd-l1/p4/main.p4 similarity index 100% rename from src/tests/p4/p4/main.p4 rename to src/tests/p4-fwd-l1/p4/main.p4 diff --git a/src/tests/p4/p4/p4info.txt b/src/tests/p4-fwd-l1/p4/p4info.txt similarity index 100% rename from src/tests/p4/p4/p4info.txt rename to src/tests/p4-fwd-l1/p4/p4info.txt diff --git a/src/tests/p4/probe/README.md b/src/tests/p4-fwd-l1/probe/README.md similarity index 100% rename from src/tests/p4/probe/README.md rename to src/tests/p4-fwd-l1/probe/README.md diff --git a/src/tests/p4/probe/monitoring_kpis.ipynb b/src/tests/p4-fwd-l1/probe/monitoring_kpis.ipynb similarity index 100% rename from src/tests/p4/probe/monitoring_kpis.ipynb rename to src/tests/p4-fwd-l1/probe/monitoring_kpis.ipynb diff --git a/src/tests/p4/probe/monitoring_kpis.py b/src/tests/p4-fwd-l1/probe/monitoring_kpis.py similarity index 97% rename from src/tests/p4/probe/monitoring_kpis.py rename to src/tests/p4-fwd-l1/probe/monitoring_kpis.py index 25a1eab66bc4bc2b9567879a395d33ae3eea6689..dc3757718d5a973e1629de63f7e61a09998842c1 100644 --- a/src/tests/p4/probe/monitoring_kpis.py +++ b/src/tests/p4-fwd-l1/probe/monitoring_kpis.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/probe/probe-tfs/.gitignore b/src/tests/p4-fwd-l1/probe/probe-tfs/.gitignore similarity index 100% rename from src/tests/p4/probe/probe-tfs/.gitignore rename to src/tests/p4-fwd-l1/probe/probe-tfs/.gitignore diff --git a/src/tests/p4/probe/probe-tfs/Cargo.toml b/src/tests/p4-fwd-l1/probe/probe-tfs/Cargo.toml similarity index 93% rename from src/tests/p4/probe/probe-tfs/Cargo.toml rename to src/tests/p4-fwd-l1/probe/probe-tfs/Cargo.toml index 5ee07d7844ea4a2b42970f9ff09c6dc5db22207c..da64d7a325d690666ca285fc9621ce3edaa52425 100644 --- a/src/tests/p4/probe/probe-tfs/Cargo.toml +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/Cargo.toml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/probe/probe-tfs/LICENSE b/src/tests/p4-fwd-l1/probe/probe-tfs/LICENSE similarity index 100% rename from src/tests/p4/probe/probe-tfs/LICENSE rename to src/tests/p4-fwd-l1/probe/probe-tfs/LICENSE diff --git a/src/tests/p4-fwd-l1/probe/probe-tfs/README.md b/src/tests/p4-fwd-l1/probe/probe-tfs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..3cff11314ee92db79d7b56c03e38a8a7f2acadec --- /dev/null +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/README.md @@ -0,0 +1,21 @@ +# Rust-tfs + +Client for TFS functionalities written in Rust. + +## Dependencies + +This project requires the cargo Rust compiler: + +```sh +sudo apt-get install protobuf-compiler cargo +``` + +## Build + +Build sources as follows: + +```sh +cargo build +``` + +After a successfuly build, two new executables will be generated in `target/`. diff --git a/src/tests/p4/probe/probe-tfs/build.rs b/src/tests/p4-fwd-l1/probe/probe-tfs/build.rs similarity index 93% rename from src/tests/p4/probe/probe-tfs/build.rs rename to src/tests/p4-fwd-l1/probe/probe-tfs/build.rs index 0d9af6c48a1017e99976948f4824041a2d54f25d..4da300f68f40ac7d6cb4eacfeab90d9003675cd4 100644 --- a/src/tests/p4/probe/probe-tfs/build.rs +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/build.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/probe/probe-tfs/connect_to_mininet.sh b/src/tests/p4-fwd-l1/probe/probe-tfs/connect_to_mininet.sh similarity index 89% rename from src/tests/p4/probe/probe-tfs/connect_to_mininet.sh rename to src/tests/p4-fwd-l1/probe/probe-tfs/connect_to_mininet.sh index 2a71cbb151d4f4c2249d801773341289aedc32dc..86a823ed964482e08deba3aaa6f71c753f4ebb98 100755 --- a/src/tests/p4/probe/probe-tfs/connect_to_mininet.sh +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/connect_to_mininet.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/probe/probe-tfs/deploy.sh b/src/tests/p4-fwd-l1/probe/probe-tfs/deploy.sh similarity index 95% rename from src/tests/p4/probe/probe-tfs/deploy.sh rename to src/tests/p4-fwd-l1/probe/probe-tfs/deploy.sh index c18e96559d8d90f9328fe7c77fa66c2ca374665f..d88549a12c1cad339455d161871245849c5f57a1 100755 --- a/src/tests/p4/probe/probe-tfs/deploy.sh +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/deploy.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/probe/probe-tfs/proto b/src/tests/p4-fwd-l1/probe/probe-tfs/proto similarity index 100% rename from src/tests/p4/probe/probe-tfs/proto rename to src/tests/p4-fwd-l1/probe/probe-tfs/proto diff --git a/src/tests/p4/probe/probe-tfs/src/agent.rs b/src/tests/p4-fwd-l1/probe/probe-tfs/src/agent.rs similarity index 98% rename from src/tests/p4/probe/probe-tfs/src/agent.rs rename to src/tests/p4-fwd-l1/probe/probe-tfs/src/agent.rs index 749e42a6c81ce0523ae2cf52a29e9c90c43f48e7..a9b8e5a609f08622d45ef72e05421508807b505b 100644 --- a/src/tests/p4/probe/probe-tfs/src/agent.rs +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/src/agent.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. @@ -195,6 +195,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { endpoint_id: None, slice_id: None, connection_id: None, + link_id: None, kpi_description: format!( "Latency value for service {}", event_service.service_uuid.unwrap().uuid diff --git a/src/tests/p4/probe/probe-tfs/src/ping.rs b/src/tests/p4-fwd-l1/probe/probe-tfs/src/ping.rs similarity index 96% rename from src/tests/p4/probe/probe-tfs/src/ping.rs rename to src/tests/p4-fwd-l1/probe/probe-tfs/src/ping.rs index bec984b66cb24ee6e6f3dc707fe9cd392b5ebb28..cb192586bcb1555f6bda47f201346a8ee679cb7c 100644 --- a/src/tests/p4/probe/probe-tfs/src/ping.rs +++ b/src/tests/p4-fwd-l1/probe/probe-tfs/src/ping.rs @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/run_test_01_bootstrap.sh b/src/tests/p4-fwd-l1/run_test_01_bootstrap.sh similarity index 81% rename from src/tests/p4/run_test_01_bootstrap.sh rename to src/tests/p4-fwd-l1/run_test_01_bootstrap.sh index 60bb20d0d64a41936b58df4e6726d051497216d6..e4b61937e9ab243d4309777b335e232933fae24a 100755 --- a/src/tests/p4/run_test_01_bootstrap.sh +++ b/src/tests/p4-fwd-l1/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -18,5 +18,4 @@ # - tfs_runtime_env_vars.sh source tfs_runtime_env_vars.sh -python -m pytest --verbose src/tests/p4/tests/test_functional_bootstrap.py - +python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py diff --git a/src/tests/p4/run_test_02_create_service.sh b/src/tests/p4-fwd-l1/run_test_02_create_service.sh similarity index 78% rename from src/tests/p4/run_test_02_create_service.sh rename to src/tests/p4-fwd-l1/run_test_02_create_service.sh index 8246262340f3d2029d8e0a0f41ec9821518cd5bf..52335c299035f6dcd0b0951ecbc71ed69a1fec69 100755 --- a/src/tests/p4/run_test_02_create_service.sh +++ b/src/tests/p4-fwd-l1/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python -m pytest --verbose src/tests/p4/tests/test_functional_create_service.py +python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_create_service.py diff --git a/src/tests/p4/run_test_03_delete_service.sh b/src/tests/p4-fwd-l1/run_test_03_delete_service.sh similarity index 78% rename from src/tests/p4/run_test_03_delete_service.sh rename to src/tests/p4-fwd-l1/run_test_03_delete_service.sh index c4337daea207269586c5f1f698683c37ae98406e..5e11b04856401b9a734321141d59c3d1094e1384 100755 --- a/src/tests/p4/run_test_03_delete_service.sh +++ b/src/tests/p4-fwd-l1/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python -m pytest --verbose src/tests/p4/tests/test_functional_delete_service.py +python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_delete_service.py diff --git a/src/tests/p4/run_test_04_cleanup.sh b/src/tests/p4-fwd-l1/run_test_04_cleanup.sh similarity index 79% rename from src/tests/p4/run_test_04_cleanup.sh rename to src/tests/p4-fwd-l1/run_test_04_cleanup.sh index f2ebec08b2dbead7fb27522456fb853845578ed8..894446c80cf1aff5c7b9fc45c6ff9aa2c94fc518 100755 --- a/src/tests/p4/run_test_04_cleanup.sh +++ b/src/tests/p4-fwd-l1/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,4 +14,4 @@ # limitations under the License. source tfs_runtime_env_vars.sh -python -m pytest --verbose src/tests/p4/tests/test_functional_cleanup.py +python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_cleanup.py diff --git a/src/tests/p4/setup.sh b/src/tests/p4-fwd-l1/setup.sh similarity index 75% rename from src/tests/p4/setup.sh rename to src/tests/p4-fwd-l1/setup.sh index 1e6b63c544c5029613f8d9084b61e5fab9e83043..1370c01692a5d872f0334c0fc2986b53cafa8abd 100755 --- a/src/tests/p4/setup.sh +++ b/src/tests/p4-fwd-l1/setup.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -18,5 +18,5 @@ export POD_NAME=$(kubectl get pods -n=tfs | grep device | awk '{print $1}') kubectl exec ${POD_NAME} -n=tfs -c=server -- mkdir /root/p4 -kubectl cp src/tests/p4/p4/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server -kubectl cp src/tests/p4/p4/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server +kubectl cp src/tests/p4-fwd-l1/p4/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server +kubectl cp src/tests/p4-fwd-l1/p4/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server diff --git a/src/tests/p4/tests/.gitignore b/src/tests/p4-fwd-l1/tests/.gitignore similarity index 100% rename from src/tests/p4/tests/.gitignore rename to src/tests/p4-fwd-l1/tests/.gitignore diff --git a/src/tests/p4/tests/BuildDescriptors.py b/src/tests/p4-fwd-l1/tests/BuildDescriptors.py similarity index 93% rename from src/tests/p4/tests/BuildDescriptors.py rename to src/tests/p4-fwd-l1/tests/BuildDescriptors.py index cfd29eea0cb80306f402ef71530016599b570eb1..c0f01ee7537e88883704e3af36f6c51b672a607e 100644 --- a/src/tests/p4/tests/BuildDescriptors.py +++ b/src/tests/p4-fwd-l1/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/tests/LoadDescriptors.py b/src/tests/p4-fwd-l1/tests/LoadDescriptors.py similarity index 95% rename from src/tests/p4/tests/LoadDescriptors.py rename to src/tests/p4-fwd-l1/tests/LoadDescriptors.py index 407d5b6dc6b46ba7dd920cb1f60be391f839bda7..c47bea18d43c3a71656169cbb3855bd1602240fd 100644 --- a/src/tests/p4/tests/LoadDescriptors.py +++ b/src/tests/p4-fwd-l1/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4/tests/Objects.py b/src/tests/p4-fwd-l1/tests/Objects.py similarity index 96% rename from src/tests/p4/tests/Objects.py rename to src/tests/p4-fwd-l1/tests/Objects.py index d8f08c271d1f1c2ca36f6ac87b38dd0a47bc1cf8..83d1e23b438693f3dbe6b657d0332a4f0a9d1680 100644 --- a/src/tests/p4/tests/Objects.py +++ b/src/tests/p4-fwd-l1/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,18 +13,12 @@ # limitations under the License. import os -from typing import Dict, List, Tuple from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Device import ( - json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled, - json_device_connect_rules, json_device_id, json_device_p4_disabled, - json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled) -from common.tools.object_factory.Service import ( - get_service_uuid, json_service_l3nm_planned,json_service_p4_planned) -from common.tools.object_factory.ConfigRule import ( - json_config_rule_set, json_config_rule_delete) -from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_ids, json_endpoints, json_endpoint_id + json_device_connect_rules, json_device_id, json_device_p4_disabled) +from common.tools.object_factory.Service import get_service_uuid, json_service_p4_planned +from common.tools.object_factory.EndPoint import json_endpoint_ids, json_endpoints from common.tools.object_factory.EndPoint import json_endpoint_descriptor from common.tools.object_factory.Link import get_link_uuid, json_link, json_link_id from common.tools.object_factory.Topology import json_topology, json_topology_id @@ -506,7 +500,7 @@ LINKS = [ LINK_SW8_SW3, LINK_SW8_SW5, LINK_SW8_SW7, -] +] SERVICES = [ (SERVICE_SW1_SW8, SERVICE_SW1_SW8_ENDPOINT_IDS), diff --git a/src/tests/p4-fwd-l1/tests/__init__.py b/src/tests/p4-fwd-l1/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/tests/p4-fwd-l1/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/tests/p4/tests/test_functional_bootstrap.py b/src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py similarity index 90% rename from src/tests/p4/tests/test_functional_bootstrap.py rename to src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py index 0f4ea07a370593bf38c8c602311296bc5fb4f2c6..341799c0224794bd32e0a81a02c593bd1173eca1 100644 --- a/src/tests/p4/tests/test_functional_bootstrap.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,14 +14,9 @@ import copy, logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_CREATE, EVENT_UPDATE, check_events from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import ConfigActionEnum, Context, ContextId, Device, Empty, Link, Topology, DeviceOperationalStatusEnum +from common.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology, DeviceOperationalStatusEnum from device.client.DeviceClient import DeviceClient from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES diff --git a/src/tests/p4/tests/test_functional_cleanup.py b/src/tests/p4-fwd-l1/tests/test_functional_cleanup.py similarity index 82% rename from src/tests/p4/tests/test_functional_cleanup.py rename to src/tests/p4-fwd-l1/tests/test_functional_cleanup.py index df279cc2a2736cbb47c5eeb330eccf4ada382c1b..0b44f794d7201f49034c536c8988798ac9b44bc7 100644 --- a/src/tests/p4/tests/test_functional_cleanup.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,18 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, logging, pytest +import logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_REMOVE, check_events from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import ConfigActionEnum, ContextId, Device, DeviceId, Empty, Link, LinkId, TopologyId, DeviceOperationalStatusEnum +from common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId from device.client.DeviceClient import DeviceClient -from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES +from .Objects import CONTEXTS, DEVICES, LINKS, TOPOLOGIES LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4/tests/test_functional_create_service.py b/src/tests/p4-fwd-l1/tests/test_functional_create_service.py similarity index 72% rename from src/tests/p4/tests/test_functional_create_service.py rename to src/tests/p4-fwd-l1/tests/test_functional_create_service.py index 516ed8b1c8b9cfb138353167841e0dd80503ca30..ee714c4774e417a9afb84554d4dc99fe57d96863 100644 --- a/src/tests/p4/tests/test_functional_create_service.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,24 +14,16 @@ import copy, logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_CREATE, EVENT_UPDATE, check_events -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id -from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import Context, ContextId, Device, Empty, Link, Topology, Service, ServiceId +from common.proto.context_pb2 import Service from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient -from tests.p4.tests.Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES, SERVICES -from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceId,\ - DeviceOperationalStatusEnum +from tests.p4.tests.Objects import SERVICES LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) + @pytest.fixture(scope='session') def context_client(): _client = ContextClient(get_setting('CONTEXTSERVICE_SERVICE_HOST'), get_setting('CONTEXTSERVICE_SERVICE_PORT_GRPC')) diff --git a/src/tests/p4/tests/test_functional_delete_service.py b/src/tests/p4-fwd-l1/tests/test_functional_delete_service.py similarity index 75% rename from src/tests/p4/tests/test_functional_delete_service.py rename to src/tests/p4-fwd-l1/tests/test_functional_delete_service.py index 8542e671a85511821835a79574d8431c2a3c109e..439a88efd3f72dbd1389d9d47494fa891ff2b2d2 100644 --- a/src/tests/p4/tests/test_functional_delete_service.py +++ b/src/tests/p4-fwd-l1/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,18 +14,12 @@ import copy, logging, pytest from common.Settings import get_setting -from common.tests.EventTools import EVENT_REMOVE, check_events -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Link import json_link_id -from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from context.client.EventsCollector import EventsCollector -from common.proto.context_pb2 import ConfigActionEnum, ContextId, Device, DeviceId, Empty, LinkId, TopologyId, Service, ServiceId, DeviceOperationalStatusEnum +from common.proto.context_pb2 import ServiceId from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient -from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES, SERVICES +from .Objects import CONTEXT_ID, SERVICES LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) diff --git a/src/tests/p4/tests/topologies/6switchObjects.py b/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py similarity index 99% rename from src/tests/p4/tests/topologies/6switchObjects.py rename to src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py index 395fe58030e29a28029be241f87afa93f5c506cd..522066bb0c4c77fa4e949f68226ebea27d262bcb 100644 --- a/src/tests/p4/tests/topologies/6switchObjects.py +++ b/src/tests/p4-fwd-l1/tests/topologies/6switchObjects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4-int-routing-acl/README.md b/src/tests/p4-int-routing-acl/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fa935e1b2eae2decb0e852ebd72b752c3d67ca28 --- /dev/null +++ b/src/tests/p4-int-routing-acl/README.md @@ -0,0 +1,129 @@ +# Tests for P4 routing, ACL, and In-Band Network Telemetry functions + +This directory contains the necessary scripts and configurations to run tests atop a Stratum-based P4 whitebox that performs a set of network functions, including routing, access control list (ACL), and In-Band Network Telemetry (INT). + +## Prerequisites + +You need Python3, which should already be installed while preparing for a TFS build. +Additionally, `pytest` is also mandatory as it is used by our tests below. +Aliasing python with python3 will also help bridging issues between older and newer python versions. + +```shell +alias python='python3' +pip3 install pytest +pip3 install grpclib protobuf +pip3 install grpcio-tools +``` + +The versions used for this test are: +- `protobuf` 3.20.3 +- `grpclib` 0.4.4 +- `grpcio` 1.47.5 +- `grpcio-tools` 1.47.5 + +After the installation of `grpclib`, protoc-gen-grpclib_python binary is in /home/$USER/.local/bin/ +First we copy it to /usr/local/bin/: + +```shell + sudo cp /home/$USER/.local/bin/protoc-gen-grpclib_python /usr/local/bin/ +``` + +Then, we include this path to the PYTHONPATH: +```shell +export PYTHONPATH="${PYTHONPATH}:/usr/local/bin/protoc-gen-grpclib_python" +``` + + +You need to build and deploy a software-based Stratum switch, before being able to use TFS to control it. +To do so, follow the instructions in the `./topology` folder. + +## Steps to setup and run a TFS program atop Stratum + +To conduct this test, follow the steps below. + +### TFS re-deploy + +```shell +cd ~/tfs-ctrl/ +source my_deploy.sh && source tfs_runtime_env_vars.sh +./deploy/all.sh +``` + +### Path setup + +Ensure that `PATH` variable contains the parent project directory, e.g., "home/$USER/tfs-ctrl". + +Ensure that `PYTHONPATH` variable contains the source code directory of TFS, e.g., "home/$USER/tfs-ctrl/src" + +## Topology setup + +In the `./topology/` directory there are scripts that allow to build Stratum on a target machine (e.g., a VM) and then deploy a P4 switch atop this machine. +This test assumes a Stratum P4 switch with 2 network interfaces used as a data plane (routing traffic from one to another) as well as another network interface used to send telemetry information to an external telemetry collector. + +## P4 artifacts + +In the `./p4src/` directory there are compiled P4 artifacts of the pipeline that will be pushed to the P4 switch, along with the P4-runtime definitions. +The `./setup.sh` script copies from this directory. If you need to change the P4 program, make sure to put the compiled artifacts there. + +## Tests + +The following tests are implemented. +For each of these tests, an auxiliary bash script allows to run it with less typing. + +| Test | Bash Runner | Purpose | +| ------------------------------------ | ---------------------------------- | ---------------------------------- | +| - | setup.sh | Copy P4 artifacts into the SBI pod | +| test_functional_bootstrap.py | run_test_01_bootstrap.sh | Connect TFS to the P4 switch | +| test_functional_rules_provision.py | run_test_02_rules_provision.sh | Install rules on the P4 switch | +| test_functional_rules_deprovision.py | run_test_03_rules_deprovision.sh | Uninstall rules from the P4 switch | +| test_functional_cleanup.py | run_test_04_cleanup.sh | Disconnect TFS from the P4 switch | + +Each of the tests above is described in detail below. + +### Step 1: Copy the necessary P4 artifacts into the TFS SBI service pod + +The setup script copies the necessary artifacts to the SBI service pod. +It should be run just once, after a fresh install of TFS. +If you `deploy/all.sh` again, you need to repeat this step. + +```shell +cd ~/tfs-ctrl/ +source my_deploy.sh && source tfs_runtime_env_vars.sh +bash src/tests/p4-int-routing-acl/setup.sh +``` + +### Step 2: Bootstrap topology + +The bootstrap script registers the context, topology, links, and devices to TFS. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh +``` + +### Step 3: Provision rules via the SBI API + +Implement routing, ACL, and INT functions by installing P4 rules to the Stratum switch via the TFS SBI API. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh +``` + +### Step 4: Deprovision rules via the SBI API + +Deprovision the routing, ACL, and INT network functions by removing the previously installed P4 rules (via the TFS SBI API) from the Stratum switch. + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh +``` + +### Step 4: Deprovision topology + +Delete all the objects (context, topology, links, devices) from TFS: + +```shell +cd ~/tfs-ctrl/ +bash src/tests/p4-int-routing-acl/run_test_04_cleanup.sh +``` diff --git a/src/tests/p4-int-routing-acl/__init__.py b/src/tests/p4-int-routing-acl/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..023830645e0fcb60e3f8583674a954810af222f2 --- /dev/null +++ b/src/tests/p4-int-routing-acl/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json new file mode 100644 index 0000000000000000000000000000000000000000..97a548983f29c7af8c1da21fda5ab09b45a940aa --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-acl.json @@ -0,0 +1,39 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.acl.acl[1]", + "resource_value": { + "table-name": "FabricIngress.acl.acl", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "l4_dport", + "match-value": "8080" + } + ], + "action-name": "FabricIngress.acl.drop", + "action-params": [], + "priority": 1 + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json new file mode 100644 index 0000000000000000000000000000000000000000..3fc9a71732aef424b85c9b91b255083b3e1badbb --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b1.json @@ -0,0 +1,136 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[1]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + } + ], + "action-name": "FabricIngress.int_watchlist.mark_to_report", + "action-params": [], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "3" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[1]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "510" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[2]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + }, + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41&&&0xFFFFFFFF" + } + ], + "action-name": "FabricIngress.int_watchlist.no_report_collector", + "action-params": [], + "priority": 10 + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json new file mode 100644 index 0000000000000000000000000000000000000000..e6b5a8ea8590586b2aeee46eb9b736b1e27ba35e --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b2.json @@ -0,0 +1,269 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[1]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "4" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[2]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[3]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "1" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[4]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "5" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[5]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "2" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[6]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "3" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json new file mode 100644 index 0000000000000000000000000000000000000000..f8d2c71830d3ef55ea8ffd97e3557fc9d8cc6315 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-int-b3.json @@ -0,0 +1,212 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[2]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "3" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:fb:cf:96" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[1]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[2]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:93:8c:c0" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:fb:cf:96" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/clone_sessions/clone_session[1]", + "resource_value": { + "session-id": 506, + "replicas": [ + { + "egress-port": 510, + "instance": 0 + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json new file mode 100644 index 0000000000000000000000000000000000000000..0fe8b5036f8446f65e8fca85ddeea97cd6ed8cd0 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-corp.json @@ -0,0 +1,197 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[4]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "2" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:e2:af:28" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[5]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "172.16.10.9/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[6]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:9b:cb:a1" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:e2:af:28" + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json new file mode 100644 index 0000000000000000000000000000000000000000..c48d9d31e2b36dd1710ab53d51280759e82cca1c --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-insert-routing-edge.json @@ -0,0 +1,197 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[3]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "1" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:58:92:ba" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[3]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.158.72.25/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[4]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:e2:af:28" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:58:92:ba" + } + ] + } + } + } + ] + } + } + ] +} diff --git a/src/tests/p4-int-routing-acl/descriptors/rules-remove.json b/src/tests/p4-int-routing-acl/descriptors/rules-remove.json new file mode 100644 index 0000000000000000000000000000000000000000..68132e9e6ec09435cfcbaae16a9c2287e9c649b5 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/rules-remove.json @@ -0,0 +1,965 @@ +{ + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "name": "p4-sw1", + "device_operational_status": "DEVICEOPERATIONALSTATUS_ENABLED", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[1]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + } + ], + "action-name": "FabricIngress.int_watchlist.mark_to_report", + "action-params": [], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "3" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[1]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "510" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[1]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "510" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[1]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "4" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[2]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[3]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "1" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[4]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "5" + }, + { + "match-field": "mirror_type", + "match-value": "0" + }, + { + "match-field": "int_report_type", + "match-value": "4" + } + ], + "action-name": "FabricEgress.int_egress.do_drop_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[5]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "2" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.int_egress.report[6]", + "resource_value": { + "table-name": "FabricEgress.int_egress.report", + "match-fields": [ + { + "match-field": "bmd_type", + "match-value": "2" + }, + { + "match-field": "mirror_type", + "match-value": "1" + }, + { + "match-field": "int_report_type", + "match-value": "3" + } + ], + "action-name": "FabricEgress.int_egress.do_local_report_encap", + "action-params": [ + { + "action-param": "src_ip", + "action-value": "10.10.10.120" + }, + { + "action-param": "mon_ip", + "action-value": "10.10.10.41" + }, + { + "action-param": "mon_port", + "action-value": "32766" + }, + { + "action-param": "switch_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.int_watchlist.watchlist[2]", + "resource_value": { + "table-name": "FabricIngress.int_watchlist.watchlist", + "match-fields": [ + { + "match-field": "ipv4_valid", + "match-value": "1" + }, + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41&&&0xFFFFFFFF" + } + ], + "action-name": "FabricIngress.int_watchlist.no_report_collector", + "action-params": [], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[2]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "3" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[2]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "3" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:fb:cf:96" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[1]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[1]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.10.10.41/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "3" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[2]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "3" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "3" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:93:8c:c0" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:fb:cf:96" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/clone_sessions/clone_session[1]", + "resource_value": { + "session-id": 506, + "replicas": [ + { + "egress-port": 510, + "instance": 0 + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[3]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[3]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "1" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:58:92:ba" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[3]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[2]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "10.158.72.25/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "1" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[4]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "1" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "1" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:e2:af:28" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:58:92:ba" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.ingress_port_vlan[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.ingress_port_vlan", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "vlan_is_valid", + "match-value": "0" + } + ], + "action-name": "FabricIngress.filtering.permit_with_internal_vlan", + "action-params": [ + { + "action-param": "vlan_id", + "action-value": "4094" + }, + { + "action-param": "port_type", + "action-value": "1" + } + ], + "priority": 10 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.filtering.fwd_classifier[4]", + "resource_value": { + "table-name": "FabricIngress.filtering.fwd_classifier", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "2" + }, + { + "match-field": "ip_eth_type", + "match-value": "0x0800" + } + ], + "action-name": "FabricIngress.filtering.set_forwarding_type", + "action-params": [ + { + "action-param": "fwd_type", + "action-value": "0" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricEgress.egress_next.egress_vlan[4]", + "resource_value": { + "table-name": "FabricEgress.egress_next.egress_vlan", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eg_port", + "match-value": "2" + } + ], + "action-name": "FabricEgress.egress_next.pop_vlan", + "action-params": [] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.bridging[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.bridging", + "match-fields": [ + { + "match-field": "vlan_id", + "match-value": "4094" + }, + { + "match-field": "eth_dst", + "match-value": "fa:16:3e:e2:af:28" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_bridging", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ], + "priority": 1 + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[5]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.output_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.forwarding.routing_v4[3]", + "resource_value": { + "table-name": "FabricIngress.forwarding.routing_v4", + "match-fields": [ + { + "match-field": "ipv4_dst", + "match-value": "172.16.10.9/32" + } + ], + "action-name": "FabricIngress.forwarding.set_next_id_routing_v4", + "action-params": [ + { + "action-param": "next_id", + "action-value": "2" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.next.simple[6]", + "resource_value": { + "table-name": "FabricIngress.next.simple", + "match-fields": [ + { + "match-field": "next_id", + "match-value": "2" + } + ], + "action-name": "FabricIngress.next.routing_simple", + "action-params": [ + { + "action-param": "port_num", + "action-value": "2" + }, + { + "action-param": "smac", + "action-value": "fa:16:3e:9b:cb:a1" + }, + { + "action-param": "dmac", + "action-value": "fa:16:3e:e2:af:28" + } + ] + } + } + }, + { + "action": "CONFIGACTION_DELETE", + "custom": { + "resource_key": "/tables/table/FabricIngress.acl.acl[1]", + "resource_value": { + "table-name": "FabricIngress.acl.acl", + "match-fields": [ + { + "match-field": "ig_port", + "match-value": "1" + }, + { + "match-field": "l4_dport", + "match-value": "8080" + } + ], + "action-name": "FabricIngress.acl.drop", + "action-params": [], + "priority": 1 + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/src/tests/p4-int-routing-acl/descriptors/topology.json b/src/tests/p4-int-routing-acl/descriptors/topology.json new file mode 100644 index 0000000000000000000000000000000000000000..3b1f6e410cc5a2adc1c99b6208523fd9a9971fe7 --- /dev/null +++ b/src/tests/p4-int-routing-acl/descriptors/topology.json @@ -0,0 +1,288 @@ +{ + "contexts": [ + { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + } + } + ], + "topologies": [ + { + "topology_id": { + "context_id": { + "context_uuid": { + "uuid": "admin" + } + }, + "topology_uuid": { + "uuid": "admin" + } + } + } + ], + "devices": [ + { + "device_id": { + "device_uuid": { + "uuid": "edge-net" + } + }, + "device_type": "network", + "device_drivers": [ + "DEVICEDRIVER_UNDEFINED" + ], + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/port", + "resource_value": "0" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "eth1", + "type": "copper" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "corporate-net" + } + }, + "device_type": "network", + "device_drivers": [ + "DEVICEDRIVER_UNDEFINED" + ], + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/address", + "resource_value": "127.0.0.1" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/port", + "resource_value": "0" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "endpoints": [ + { + "uuid": "eth1", + "type": "copper" + } + ] + } + } + } + ] + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "device_type": "p4-switch", + "device_drivers": [ + "DEVICEDRIVER_P4" + ], + "device_operational_status": "DEVICEOPERATIONALSTATUS_DISABLED", + "name": "p4-sw1", + "device_config": { + "config_rules": [ + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/address", + "resource_value": "10.10.10.120" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/port", + "resource_value": "50001" + } + }, + { + "action": "CONFIGACTION_SET", + "custom": { + "resource_key": "_connect/settings", + "resource_value": { + "id": 1, + "name": "p4-sw1", + "vendor": "Open Networking Foundation", + "hw_ver": "BMv2 simple_switch", + "sw_ver": "Stratum", + "p4bin": "/root/p4/bmv2.json", + "p4info": "/root/p4/p4info.txt", + "timeout": 60, + "endpoints": [ + { + "uuid": "1", + "type": "port" + }, + { + "uuid": "2", + "type": "port" + } + ] + } + } + } + ] + } + } + ], + "links": [ + { + "link_id": { + "link_uuid": { + "uuid": "p4-sw1/1==edge-net/eth1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "edge-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "edge-net/eth1==p4-sw1/1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "edge-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "1" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "p4-sw1/2==corporate-net/eth1" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "corporate-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + } + ] + }, + { + "link_id": { + "link_uuid": { + "uuid": "corporate-net/eth1==p4-sw1/2" + } + }, + "link_endpoint_ids": [ + { + "device_id": { + "device_uuid": { + "uuid": "corporate-net" + } + }, + "endpoint_uuid": { + "uuid": "eth1" + } + }, + { + "device_id": { + "device_uuid": { + "uuid": "p4-sw1" + } + }, + "endpoint_uuid": { + "uuid": "2" + } + } + ] + } + ] +} diff --git a/src/tests/p4-int-routing-acl/p4src/README.md b/src/tests/p4-int-routing-acl/p4src/README.md new file mode 100644 index 0000000000000000000000000000000000000000..07e34066fbc19fb3f1778a64c65723513b8081df --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/README.md @@ -0,0 +1,24 @@ +# P4 Sources + +We employ the P4 sources from the [fabric-tna](https://github.com/stratum/fabric-tna/tree/main) project. + +To compile a relevant P4 target binary and P4 info file, do: + +```shell +git clone https://github.com/stratum/fabric-tna.git + +cd ./fabric-tna + +make fabric-int-v1model +``` + +At this point, a relevant `build.sh` script is being run and a P4 program is being compiled. + +After a successful compilation, some artifacts (p4info.txt, bmv2.json) will be generated and placed into `build` sub-folder. + +```shell +ls build/fabric-int/bmv2 +_pp.p4 bmv2.json p4info.txt +``` + +These artefacts are now moved into this repository. diff --git a/src/tests/p4-int-routing-acl/p4src/_pp.p4 b/src/tests/p4-int-routing-acl/p4src/_pp.p4 new file mode 100644 index 0000000000000000000000000000000000000000..1b2b718a1e96f807e1da6139ababf9e71a881cd0 --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/_pp.p4 @@ -0,0 +1,2037 @@ +error { + PacketRejectedByParser +} +#include <core.p4> +#define V1MODEL_VERSION 20180101 +#include <v1model.p4> + +typedef bit<9> PortId_t; +typedef bit<16> MulticastGroupId_t; +typedef bit<5> QueueId_t; +typedef bit<10> MirrorId_t; +typedef bit<16> ReplicationId_t; +enum bit<2> MeterColor_t { + GREEN = 0, + YELLOW = 1, + RED = 2 +} + +typedef bit<1> BOOL; +typedef bit<8> FieldListIndex_t; +const PortId_t BMV2_DROP_PORT = 511; +const PortId_t FAKE_V1MODEL_RECIRC_PORT = 510; +const FieldListIndex_t PRESERVE_INT_MD = 241; +const FieldListIndex_t PRESERVE_INGRESS_PORT = 231; +const FieldListIndex_t NO_PRESERVATION = 0; +typedef bit<3> fwd_type_t; +typedef bit<32> next_id_t; +typedef bit<20> mpls_label_t; +typedef bit<48> mac_addr_t; +typedef bit<12> vlan_id_t; +typedef bit<32> ipv4_addr_t; +typedef bit<16> l4_port_t; +typedef bit<32> flow_hash_t; +typedef bit<4> slice_id_t; +typedef bit<2> tc_t; +typedef bit<(4 + 2)> slice_tc_t; +type bit<9> FabricPortId_t; +const bit<8> DEFAULT_APP_ID = 0; +const slice_id_t DEFAULT_SLICE_ID = 0; +const tc_t DEFAULT_TC = 0; +const QueueId_t QUEUE_ID_BEST_EFFORT = 0; +typedef bit<32> teid_t; +typedef bit<12> upf_ctr_idx_t; +typedef bit<8> tun_peer_id_t; +typedef bit<32> ue_session_id_t; +typedef bit<15> session_meter_idx_t; +typedef bit<15> app_meter_idx_t; +const session_meter_idx_t DEFAULT_SESSION_METER_IDX = 0; +const app_meter_idx_t DEFAULT_APP_METER_IDX = 0; +enum bit<2> EncapPresence { + NONE = 0x0, + GTPU_ONLY = 0x1, + GTPU_WITH_PSC = 0x2, + VXLAN = 0x3 +} + +const bit<16> GTPU_UDP_PORT = 2152; +const bit<3> GTP_V1 = 3w1; +const bit<8> GTPU_GPDU = 0xff; +const bit<1> GTP_PROTOCOL_TYPE_GTP = 1w1; +const bit<8> GTPU_NEXT_EXT_NONE = 0x0; +const bit<8> GTPU_NEXT_EXT_PSC = 0x85; +const bit<4> GTPU_EXT_PSC_TYPE_DL = 4w0; +const bit<4> GTPU_EXT_PSC_TYPE_UL = 4w1; +const bit<8> GTPU_EXT_PSC_LEN = 8w1; +enum bit<2> PortType_t { + UNKNOWN = 0x0, + EDGE = 0x1, + INFRA = 0x2, + INTERNAL = 0x3 +} + +const bit<16> ETHERTYPE_QINQ = 0x88a8; +const bit<16> ETHERTYPE_QINQ_NON_STD = 0x9100; +const bit<16> ETHERTYPE_VLAN = 0x8100; +const bit<16> ETHERTYPE_MPLS = 0x8847; +const bit<16> ETHERTYPE_MPLS_MULTICAST = 0x8848; +const bit<16> ETHERTYPE_IPV4 = 0x800; +const bit<16> ETHERTYPE_IPV6 = 0x86dd; +const bit<16> ETHERTYPE_ARP = 0x806; +const bit<16> ETHERTYPE_PPPOED = 0x8863; +const bit<16> ETHERTYPE_PPPOES = 0x8864; +const bit<16> ETHERTYPE_PACKET_OUT = 0xbf01; +const bit<16> ETHERTYPE_CPU_LOOPBACK_INGRESS = 0xbf02; +const bit<16> ETHERTYPE_CPU_LOOPBACK_EGRESS = 0xbf03; +const bit<16> ETHERTYPE_INT_WIP_IPV4 = 0xbf04; +const bit<16> ETHERTYPE_INT_WIP_MPLS = 0xbf05; +const bit<16> PPPOE_PROTOCOL_IP4 = 0x21; +const bit<16> PPPOE_PROTOCOL_IP6 = 0x57; +const bit<16> PPPOE_PROTOCOL_MPLS = 0x281; +const bit<8> PROTO_ICMP = 1; +const bit<8> PROTO_TCP = 6; +const bit<8> PROTO_UDP = 17; +const bit<8> PROTO_ICMPV6 = 58; +const bit<4> IPV4_MIN_IHL = 5; +const fwd_type_t FWD_BRIDGING = 0; +const fwd_type_t FWD_MPLS = 1; +const fwd_type_t FWD_IPV4_UNICAST = 2; +const fwd_type_t FWD_IPV4_MULTICAST = 3; +const fwd_type_t FWD_IPV6_UNICAST = 4; +const fwd_type_t FWD_IPV6_MULTICAST = 5; +const fwd_type_t FWD_UNKNOWN = 7; +const vlan_id_t DEFAULT_VLAN_ID = 12w4094; +const bit<8> DEFAULT_MPLS_TTL = 64; +const bit<8> DEFAULT_IPV4_TTL = 64; +const bit<16> VXLAN_UDP_PORT = 4789; +const bit<7> RECIRC_PORT_NUMBER = 7w68; +action nop() { + NoAction(); +} +enum bit<8> BridgedMdType_t { + INVALID = 0, + INGRESS_TO_EGRESS = 1, + EGRESS_MIRROR = 2, + INGRESS_MIRROR = 3, + INT_INGRESS_DROP = 4, + DEFLECTED = 5 +} + +enum bit<3> FabricMirrorType_t { + INVALID = 0, + INT_REPORT = 1, + PACKET_IN = 2 +} + +const MirrorId_t PACKET_IN_MIRROR_SESSION_ID = 0x1ff; +enum bit<2> CpuLoopbackMode_t { + DISABLED = 0, + DIRECT = 1, + INGRESS = 2 +} + +const bit<4> NPROTO_ETHERNET = 0; +const bit<4> NPROTO_TELEMETRY_DROP_HEADER = 1; +const bit<4> NPROTO_TELEMETRY_SWITCH_LOCAL_HEADER = 2; +const bit<16> REPORT_FIXED_HEADER_BYTES = 12; +const bit<16> DROP_REPORT_HEADER_BYTES = 12; +const bit<16> LOCAL_REPORT_HEADER_BYTES = 16; +const bit<8> INT_MIRROR_SESSION_BASE = 0x80; +const bit<10> V1MODEL_INT_MIRROR_SESSION = 0x1fa; +typedef bit<16> flow_report_filter_index_t; +typedef bit<16> drop_report_filter_index_t; +typedef bit<12> queue_report_filter_index_t; +typedef bit<16> queue_report_quota_t; +typedef bit<3> IntReportType_t; +const IntReportType_t INT_REPORT_TYPE_NO_REPORT = 0; +const IntReportType_t INT_REPORT_TYPE_DROP = 4; +const IntReportType_t INT_REPORT_TYPE_QUEUE = 2; +const IntReportType_t INT_REPORT_TYPE_FLOW = 1; +typedef bit<8> IntWipType_t; +const IntWipType_t INT_IS_NOT_WIP = 0; +const IntWipType_t INT_IS_WIP = 1; +const IntWipType_t INT_IS_WIP_WITH_MPLS = 2; +const bit<16> INT_WIP_ADJUST_IP_BYTES = 14 - 1 ^ 0xffff; +const bit<16> INT_WIP_ADJUST_UDP_BYTES = INT_WIP_ADJUST_IP_BYTES - 20; +const bit<16> INT_WIP_ADJUST_IP_MPLS_BYTES = INT_WIP_ADJUST_IP_BYTES - 4; +const bit<16> INT_WIP_ADJUST_UDP_MPLS_BYTES = INT_WIP_ADJUST_UDP_BYTES - 4; +enum bit<8> IntDropReason_t { + DROP_REASON_UNKNOWN = 0, + DROP_REASON_IP_TTL_ZERO = 26, + DROP_REASON_ROUTING_V4_MISS = 29, + DROP_REASON_ROUTING_V6_MISS = 29, + DROP_REASON_PORT_VLAN_MAPPING_MISS = 55, + DROP_REASON_TRAFFIC_MANAGER = 71, + DROP_REASON_ACL_DENY = 80, + DROP_REASON_BRIDGING_MISS = 89, + DROP_REASON_NEXT_ID_MISS = 128, + DROP_REASON_MPLS_MISS = 129, + DROP_REASON_EGRESS_NEXT_MISS = 130, + DROP_REASON_MPLS_TTL_ZERO = 131, + DROP_REASON_UPF_DL_SESSION_MISS = 132, + DROP_REASON_UPF_DL_SESSION_DROP = 133, + DROP_REASON_UPF_UL_SESSION_MISS = 134, + DROP_REASON_UPF_UL_SESSION_DROP = 135, + DROP_REASON_UPF_DL_SESSION_DROP_BUFF = 136, + DROP_REASON_UPF_DL_TERMINATION_MISS = 137, + DROP_REASON_UPF_DL_TERMINATION_DROP = 138, + DROP_REASON_UPF_UL_TERMINATION_MISS = 139, + DROP_REASON_UPF_UL_TERMINATION_DROP = 140, + DROP_REASON_UPF_UPLINK_RECIRC_DENY = 150, + DROP_REASON_INGRESS_QOS_METER = 160, + DROP_REASON_ROUTING_V4_DROP = 170, + DROP_REASON_ROUTING_V6_DROP = 171 +} + +@controller_header("packet_in") header packet_in_header_t { + FabricPortId_t ingress_port; + bit<7> _pad0; +} + +@controller_header("packet_out") header packet_out_header_t { + @padding + bit<7> pad0; + FabricPortId_t egress_port; + @padding + bit<3> pad1; + QueueId_t queue_id; + @padding + bit<5> pad2; + CpuLoopbackMode_t cpu_loopback_mode; + bit<1> do_forwarding; + @padding + bit<16> pad3; + @padding + bit<48> pad4; + bit<16> ether_type; +} + +header ethernet_t { + mac_addr_t dst_addr; + mac_addr_t src_addr; +} + +header eth_type_t { + bit<16> value; +} + +header vlan_tag_t { + bit<16> eth_type; + bit<3> pri; + bit<1> cfi; + vlan_id_t vlan_id; +} + +header mpls_t { + mpls_label_t label; + bit<3> tc; + bit<1> bos; + bit<8> ttl; +} + +header pppoe_t { + bit<4> version; + bit<4> type_id; + bit<8> code; + bit<16> session_id; + bit<16> length; + bit<16> protocol; +} + +header ipv4_t { + bit<4> version; + bit<4> ihl; + bit<6> dscp; + bit<2> ecn; + bit<16> total_len; + bit<16> identification; + bit<3> flags; + bit<13> frag_offset; + bit<8> ttl; + bit<8> protocol; + bit<16> hdr_checksum; + bit<32> src_addr; + bit<32> dst_addr; +} + +header ipv6_t { + bit<4> version; + bit<8> traffic_class; + bit<20> flow_label; + bit<16> payload_len; + bit<8> next_hdr; + bit<8> hop_limit; + bit<128> src_addr; + bit<128> dst_addr; +} + +header tcp_t { + bit<16> sport; + bit<16> dport; +} + +header udp_t { + bit<16> sport; + bit<16> dport; + bit<16> len; + bit<16> checksum; +} + +header icmp_t { + bit<8> icmp_type; + bit<8> icmp_code; +} + +header vxlan_t { + bit<8> flags; + bit<24> reserved; + bit<24> vni; + bit<8> reserved_2; +} + +header gtpu_t { + bit<3> version; + bit<1> pt; + bit<1> spare; + bit<1> ex_flag; + bit<1> seq_flag; + bit<1> npdu_flag; + bit<8> msgtype; + bit<16> msglen; + teid_t teid; +} + +header gtpu_options_t { + bit<16> seq_num; + bit<8> n_pdu_num; + bit<8> next_ext; +} + +header gtpu_ext_psc_t { + bit<8> len; + bit<4> type; + bit<4> spare0; + bit<1> ppp; + bit<1> rqi; + bit<6> qfi; + bit<8> next_ext; +} + +@flexible struct upf_bridged_metadata_t { + tun_peer_id_t tun_peer_id; + upf_ctr_idx_t upf_ctr_id; + bit<6> qfi; + bool needs_gtpu_encap; + bool skip_upf; + bool skip_egress_upf_ctr; + teid_t teid; + bit<4> _pad; +} + +@pa_no_overlay("egress" , "hdr.report_fixed_header.rsvd") header report_fixed_header_t { + bit<4> ver; + bit<4> nproto; + bit<3> dqf; + bit<15> rsvd; + bit<6> hw_id; + bit<32> seq_no; + bit<32> ig_tstamp; +} + +@pa_container_size("egress" , "hdr.common_report_header.queue_id" , 8) @pa_container_size("egress" , "hdr.common_report_header.ig_port" , 16) @pa_container_size("egress" , "hdr.common_report_header.eg_port" , 16) @pa_no_overlay("egress" , "hdr.common_report_header.queue_id") @pa_no_overlay("egress" , "hdr.common_report_header.eg_port") header common_report_header_t { + bit<32> switch_id; + bit<7> pad1; + bit<9> ig_port; + bit<7> pad2; + bit<9> eg_port; + bit<3> pad3; + bit<5> queue_id; +} + +header drop_report_header_t { + bit<8> drop_reason; + @padding + bit<16> pad; +} + +header local_report_header_t { + bit<5> pad1; + bit<19> queue_occupancy; + bit<32> eg_tstamp; +} + +@pa_no_overlay("egress" , "fabric_md.int_report_md.bmd_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.mirror_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.ig_port") @pa_no_overlay("egress" , "fabric_md.int_report_md.eg_port") @pa_no_overlay("egress" , "fabric_md.int_report_md.queue_id") @pa_no_overlay("egress" , "fabric_md.int_report_md.queue_occupancy") @pa_no_overlay("egress" , "fabric_md.int_report_md.ig_tstamp") @pa_no_overlay("egress" , "fabric_md.int_report_md.eg_tstamp") @pa_no_overlay("egress" , "fabric_md.int_report_md.drop_reason") @pa_no_overlay("egress" , "fabric_md.int_report_md.ip_eth_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.report_type") @pa_no_overlay("egress" , "fabric_md.int_report_md.flow_hash") @pa_no_overlay("egress" , "fabric_md.int_report_md.encap_presence") header int_report_metadata_t { + BridgedMdType_t bmd_type; + @padding + bit<5> _pad0; + FabricMirrorType_t mirror_type; + @padding + bit<7> _pad1; + bit<9> ig_port; + @padding + bit<7> _pad2; + bit<9> eg_port; + @padding + bit<3> _pad3; + bit<5> queue_id; + @padding + bit<5> _pad4; + bit<19> queue_occupancy; + bit<32> ig_tstamp; + bit<32> eg_tstamp; + bit<8> drop_reason; + bit<16> ip_eth_type; + @padding + bit<6> _pad5; + EncapPresence encap_presence; + bit<3> report_type; + @padding + bit<5> _pad6; + flow_hash_t flow_hash; +} + +@flexible struct int_bridged_metadata_t { + bit<3> report_type; + MirrorId_t mirror_session_id; + IntDropReason_t drop_reason; + QueueId_t queue_id; + PortId_t egress_port; + IntWipType_t wip_type; +} + +struct int_metadata_t { + bit<32> hop_latency; + bit<48> timestamp; + bool vlan_stripped; + bool queue_report; +} + +@flexible struct bridged_metadata_base_t { + flow_hash_t inner_hash; + mpls_label_t mpls_label; + PortId_t ig_port; + bool is_multicast; + fwd_type_t fwd_type; + vlan_id_t vlan_id; + EncapPresence encap_presence; + bit<8> mpls_ttl; + bit<48> ig_tstamp; + bit<16> ip_eth_type; + bit<10> stats_flow_id; + slice_tc_t slice_tc; +} + +header bridged_metadata_t { + BridgedMdType_t bmd_type; + bridged_metadata_base_t base; + int_bridged_metadata_t int_bmd; + bit<1> _pad0; + bit<5> _pad2; +} + +struct lookup_metadata_t { + mac_addr_t eth_dst; + mac_addr_t eth_src; + bit<16> eth_type; + vlan_id_t vlan_id; + bool is_ipv4; + bit<32> ipv4_src; + bit<32> ipv4_dst; + bit<8> ip_proto; + l4_port_t l4_sport; + l4_port_t l4_dport; + bit<8> icmp_type; + bit<8> icmp_code; +} + +struct common_mirror_metadata_t { + MirrorId_t mirror_session_id; + BridgedMdType_t bmd_type; +} + +@pa_auto_init_metadata struct fabric_ingress_metadata_t { + bridged_metadata_t bridged; + flow_hash_t ecmp_hash; + lookup_metadata_t lkp; + bit<32> routing_ipv4_dst; + bool skip_forwarding; + bool skip_next; + next_id_t next_id; + bool egress_port_set; + bool punt_to_cpu; + bool ipv4_checksum_err; + bool inner_ipv4_checksum_err; + slice_id_t slice_id; + tc_t tc; + bool tc_unknown; + bool is_upf_hit; + slice_id_t upf_slice_id; + tc_t upf_tc; + MeterColor_t upf_meter_color; + PortType_t ig_port_type; + common_mirror_metadata_t mirror; +} + +header common_egress_metadata_t { + BridgedMdType_t bmd_type; + @padding + bit<5> _pad; + FabricMirrorType_t mirror_type; +} + +header packet_in_mirror_metadata_t { + BridgedMdType_t bmd_type; + @padding + bit<5> _pad0; + FabricMirrorType_t mirror_type; + @padding + bit<7> _pad1; + PortId_t ingress_port; +} + +@pa_auto_init_metadata struct fabric_egress_metadata_t { + bridged_metadata_t bridged; + PortId_t cpu_port; + int_report_metadata_t int_report_md; + int_metadata_t int_md; + bit<16> int_ipv4_len; + bool is_int_recirc; + bit<16> pkt_length; +} + +header fake_ethernet_t { + @padding + bit<48> _pad0; + @padding + bit<48> _pad1; + bit<16> ether_type; +} + +struct ingress_headers_t { + packet_out_header_t packet_out; + packet_in_header_t packet_in; + fake_ethernet_t fake_ethernet; + ethernet_t ethernet; + vlan_tag_t vlan_tag; + eth_type_t eth_type; + mpls_t mpls; + ipv4_t ipv4; + ipv6_t ipv6; + tcp_t tcp; + udp_t udp; + icmp_t icmp; + gtpu_t gtpu; + gtpu_options_t gtpu_options; + gtpu_ext_psc_t gtpu_ext_psc; + vxlan_t vxlan; + ethernet_t inner_ethernet; + eth_type_t inner_eth_type; + ipv4_t inner_ipv4; + tcp_t inner_tcp; + udp_t inner_udp; + icmp_t inner_icmp; +} + +struct egress_headers_t { + packet_in_header_t packet_in; + fake_ethernet_t fake_ethernet; + ethernet_t report_ethernet; + eth_type_t report_eth_type; + mpls_t report_mpls; + ipv4_t report_ipv4; + udp_t report_udp; + report_fixed_header_t report_fixed_header; + common_report_header_t common_report_header; + local_report_header_t local_report_header; + drop_report_header_t drop_report_header; + ethernet_t ethernet; + vlan_tag_t vlan_tag; + eth_type_t eth_type; + mpls_t mpls; + ipv4_t ipv4; + ipv6_t ipv6; + udp_t udp; +} + +struct fabric_v1model_metadata_t { + bool skip_egress; + bool do_upf_uplink_recirc; + bit<1> drop_ctl; + IntReportType_t int_mirror_type; + fabric_ingress_metadata_t ingress; + fabric_egress_metadata_t egress; + @field_list(PRESERVE_INT_MD) + IntReportType_t recirc_preserved_report_type; + @field_list(PRESERVE_INT_MD) + FabricPortId_t recirc_preserved_egress_port; + @field_list(PRESERVE_INT_MD) + IntDropReason_t recirc_preserved_drop_reason; + @field_list(PRESERVE_INGRESS_PORT) + FabricPortId_t recirc_preserved_ingress_port; +} + +struct v1model_header_t { + ingress_headers_t ingress; + egress_headers_t egress; +} + +parser FabricParser(packet_in packet, out v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md, inout standard_metadata_t standard_md) { + state start { + fabric_md.egress.pkt_length = (bit<16>)standard_md.packet_length; + fabric_md.ingress.bridged.setValid(); + fabric_md.ingress.bridged.bmd_type = BridgedMdType_t.INGRESS_TO_EGRESS; + fabric_md.ingress.bridged.base.ig_port = standard_md.ingress_port; + fabric_md.recirc_preserved_ingress_port = (FabricPortId_t)standard_md.ingress_port; + fabric_md.ingress.bridged.base.ig_tstamp = standard_md.ingress_global_timestamp; + fabric_md.ingress.egress_port_set = false; + fabric_md.ingress.punt_to_cpu = false; + fabric_md.ingress.bridged.base.ip_eth_type = 0; + fabric_md.ingress.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_UNKNOWN; + fabric_md.ingress.bridged.int_bmd.wip_type = INT_IS_NOT_WIP; + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.NONE; + fabric_md.ingress.upf_meter_color = MeterColor_t.GREEN; + transition check_ethernet; + } + state check_ethernet { + fake_ethernet_t tmp = packet.lookahead<fake_ethernet_t>(); + transition select(tmp.ether_type) { + ETHERTYPE_CPU_LOOPBACK_INGRESS: parse_fake_ethernet; + ETHERTYPE_CPU_LOOPBACK_EGRESS: parse_fake_ethernet_and_accept; + ETHERTYPE_PACKET_OUT: check_packet_out; + ETHERTYPE_INT_WIP_IPV4: parse_int_wip_ipv4; + ETHERTYPE_INT_WIP_MPLS: parse_int_wip_mpls; + default: parse_ethernet; + } + } + state check_packet_out { + packet_out_header_t tmp = packet.lookahead<packet_out_header_t>(); + transition select(tmp.do_forwarding) { + 0: parse_packet_out_and_accept; + default: strip_packet_out; + } + } + state parse_int_wip_ipv4 { + hdr.ingress.ethernet.setValid(); + hdr.ingress.eth_type.setValid(); + hdr.ingress.eth_type.value = ETHERTYPE_IPV4; + fabric_md.ingress.bridged.int_bmd.wip_type = INT_IS_WIP; + fabric_md.ingress.bridged.base.mpls_label = 0; + fabric_md.ingress.bridged.base.mpls_ttl = DEFAULT_MPLS_TTL + 1; + packet.advance(14 * 8); + transition parse_ipv4; + } + state parse_int_wip_mpls { + hdr.ingress.ethernet.setValid(); + hdr.ingress.eth_type.setValid(); + hdr.ingress.eth_type.value = ETHERTYPE_MPLS; + fabric_md.ingress.bridged.int_bmd.wip_type = INT_IS_WIP_WITH_MPLS; + packet.advance(14 * 8); + transition parse_mpls; + } + state parse_packet_out_and_accept { + packet.extract(hdr.ingress.packet_out); + transition accept; + } + state strip_packet_out { + packet.advance(14 * 8); + transition parse_ethernet; + } + state parse_fake_ethernet { + packet.extract(hdr.ingress.fake_ethernet); + fake_ethernet_t tmp = packet.lookahead<fake_ethernet_t>(); + transition select(tmp.ether_type) { + ETHERTYPE_INT_WIP_IPV4: parse_int_wip_ipv4; + ETHERTYPE_INT_WIP_MPLS: parse_int_wip_mpls; + default: parse_ethernet; + } + } + state parse_fake_ethernet_and_accept { + packet.extract(hdr.ingress.fake_ethernet); + transition accept; + } + state parse_ethernet { + packet.extract(hdr.ingress.ethernet); + transition select(packet.lookahead<bit<16>>()) { + ETHERTYPE_QINQ: parse_vlan_tag; + ETHERTYPE_VLAN &&& 0xefff: parse_vlan_tag; + default: parse_untagged; + } + } + state parse_vlan_tag { + packet.extract(hdr.ingress.vlan_tag); + fabric_md.ingress.bridged.base.vlan_id = hdr.ingress.vlan_tag.vlan_id; + transition select(packet.lookahead<bit<16>>()) { + default: parse_eth_type; + } + } + state parse_untagged { + fabric_md.ingress.bridged.base.vlan_id = DEFAULT_VLAN_ID; + transition parse_eth_type; + } + state parse_eth_type { + packet.extract(hdr.ingress.eth_type); + transition select(hdr.ingress.eth_type.value) { + ETHERTYPE_MPLS: parse_mpls; + ETHERTYPE_IPV4: parse_non_mpls; + ETHERTYPE_IPV6: parse_non_mpls; + default: accept; + } + } + state parse_mpls { + packet.extract(hdr.ingress.mpls); + fabric_md.ingress.bridged.base.mpls_label = hdr.ingress.mpls.label; + fabric_md.ingress.bridged.base.mpls_ttl = hdr.ingress.mpls.ttl; + transition select(packet.lookahead<bit<4>>()) { + 4: parse_ipv4; + 6: parse_ipv6; + default: reject_packet; + } + } + state reject_packet { + verify(false, error.PacketRejectedByParser); + transition accept; + } + state parse_non_mpls { + fabric_md.ingress.bridged.base.mpls_label = 0; + fabric_md.ingress.bridged.base.mpls_ttl = DEFAULT_MPLS_TTL + 1; + transition select(hdr.ingress.eth_type.value) { + ETHERTYPE_IPV4: parse_ipv4; + ETHERTYPE_IPV6: parse_ipv6; + default: accept; + } + } + state parse_ipv4 { + packet.extract(hdr.ingress.ipv4); + fabric_md.ingress.routing_ipv4_dst = hdr.ingress.ipv4.dst_addr; + fabric_md.ingress.bridged.base.ip_eth_type = ETHERTYPE_IPV4; + transition select(hdr.ingress.ipv4.protocol) { + PROTO_TCP: parse_tcp; + PROTO_UDP: parse_udp; + PROTO_ICMP: parse_icmp; + default: accept; + } + } + state parse_ipv6 { + packet.extract(hdr.ingress.ipv6); + fabric_md.ingress.bridged.base.ip_eth_type = ETHERTYPE_IPV6; + transition select(hdr.ingress.ipv6.next_hdr) { + PROTO_TCP: parse_tcp; + PROTO_UDP: parse_udp; + PROTO_ICMPV6: parse_icmp; + default: accept; + } + } + state parse_icmp { + packet.extract(hdr.ingress.icmp); + transition accept; + } + state parse_tcp { + packet.extract(hdr.ingress.tcp); + transition accept; + } + state parse_udp { + packet.extract(hdr.ingress.udp); + gtpu_t gtpu = packet.lookahead<gtpu_t>(); + transition select(hdr.ingress.udp.dport, gtpu.version, gtpu.msgtype) { + (GTPU_UDP_PORT, GTP_V1, GTPU_GPDU): parse_gtpu; + (VXLAN_UDP_PORT, default, default): parse_vxlan; + default: accept; + } + } + state parse_gtpu { + packet.extract(hdr.ingress.gtpu); + transition select(hdr.ingress.gtpu.ex_flag, hdr.ingress.gtpu.seq_flag, hdr.ingress.gtpu.npdu_flag) { + (0, 0, 0): set_gtpu_only; + default: parse_gtpu_options; + } + } + state set_gtpu_only { + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.GTPU_ONLY; + transition parse_inner_ipv4; + } + state parse_gtpu_options { + packet.extract(hdr.ingress.gtpu_options); + bit<8> gtpu_ext_len = packet.lookahead<bit<8>>(); + transition select(hdr.ingress.gtpu_options.next_ext, gtpu_ext_len) { + (GTPU_NEXT_EXT_PSC, GTPU_EXT_PSC_LEN): parse_gtpu_ext_psc; + default: accept; + } + } + state parse_gtpu_ext_psc { + packet.extract(hdr.ingress.gtpu_ext_psc); + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.GTPU_WITH_PSC; + transition select(hdr.ingress.gtpu_ext_psc.next_ext) { + GTPU_NEXT_EXT_NONE: parse_inner_ipv4; + default: accept; + } + } + state parse_vxlan { + packet.extract(hdr.ingress.vxlan); + fabric_md.ingress.bridged.base.encap_presence = EncapPresence.VXLAN; + transition parse_inner_ethernet; + } + state parse_inner_ethernet { + packet.extract(hdr.ingress.inner_ethernet); + packet.extract(hdr.ingress.inner_eth_type); + transition select(hdr.ingress.inner_eth_type.value) { + ETHERTYPE_IPV4: parse_inner_ipv4; + default: accept; + } + } + state parse_inner_ipv4 { + packet.extract(hdr.ingress.inner_ipv4); + transition select(hdr.ingress.inner_ipv4.protocol) { + PROTO_TCP: parse_inner_tcp; + PROTO_UDP: parse_inner_udp; + PROTO_ICMP: parse_inner_icmp; + default: accept; + } + } + state parse_inner_tcp { + packet.extract(hdr.ingress.inner_tcp); + transition accept; + } + state parse_inner_udp { + packet.extract(hdr.ingress.inner_udp); + transition accept; + } + state parse_inner_icmp { + packet.extract(hdr.ingress.inner_icmp); + transition accept; + } +} + +control FabricDeparser(packet_out packet, in v1model_header_t hdr) { + apply { + packet.emit(hdr.ingress.fake_ethernet); + packet.emit(hdr.ingress.packet_in); + packet.emit(hdr.egress.report_ethernet); + packet.emit(hdr.egress.report_eth_type); + packet.emit(hdr.egress.report_mpls); + packet.emit(hdr.egress.report_ipv4); + packet.emit(hdr.egress.report_udp); + packet.emit(hdr.egress.report_fixed_header); + packet.emit(hdr.egress.common_report_header); + packet.emit(hdr.egress.local_report_header); + packet.emit(hdr.egress.drop_report_header); + packet.emit(hdr.ingress.ethernet); + packet.emit(hdr.ingress.vlan_tag); + packet.emit(hdr.ingress.eth_type); + packet.emit(hdr.ingress.mpls); + packet.emit(hdr.ingress.ipv4); + packet.emit(hdr.ingress.ipv6); + packet.emit(hdr.ingress.tcp); + packet.emit(hdr.ingress.udp); + packet.emit(hdr.ingress.icmp); + packet.emit(hdr.ingress.gtpu); + packet.emit(hdr.ingress.gtpu_options); + packet.emit(hdr.ingress.gtpu_ext_psc); + packet.emit(hdr.ingress.vxlan); + packet.emit(hdr.ingress.inner_ethernet); + packet.emit(hdr.ingress.inner_eth_type); + packet.emit(hdr.ingress.inner_ipv4); + packet.emit(hdr.ingress.inner_tcp); + packet.emit(hdr.ingress.inner_udp); + packet.emit(hdr.ingress.inner_icmp); + } +} + +control Acl(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout FabricPortId_t recirc_preserved_egress_port, inout bit<1> drop_ctl) { + direct_counter(CounterType.packets_and_bytes) acl_counter; + action set_next_id_acl(next_id_t next_id) { + fabric_md.next_id = next_id; + acl_counter.count(); + fabric_md.skip_next = false; + drop_ctl = 0; + } + action copy_to_cpu() { + clone_preserving_field_list(CloneType.I2E, (bit<32>)PACKET_IN_MIRROR_SESSION_ID, PRESERVE_INGRESS_PORT); + acl_counter.count(); + } + action punt_to_cpu() { + copy_to_cpu(); + fabric_md.skip_next = true; + fabric_md.punt_to_cpu = true; + drop_ctl = 1; + } + action drop() { + drop_ctl = 1; + fabric_md.skip_next = true; + fabric_md.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_ACL_DENY; + acl_counter.count(); + } + action set_output_port(FabricPortId_t port_num) { + standard_md.egress_spec = (PortId_t)port_num; + recirc_preserved_egress_port = port_num; + fabric_md.egress_port_set = true; + fabric_md.skip_next = true; + drop_ctl = 0; + acl_counter.count(); + } + action nop_acl() { + acl_counter.count(); + } + table acl { + key = { + fabric_md.bridged.base.ig_port: ternary @name("ig_port") ; + fabric_md.lkp.eth_dst : ternary @name("eth_dst") ; + fabric_md.lkp.eth_src : ternary @name("eth_src") ; + fabric_md.lkp.vlan_id : ternary @name("vlan_id") ; + fabric_md.lkp.eth_type : ternary @name("eth_type") ; + fabric_md.lkp.ipv4_src : ternary @name("ipv4_src") ; + fabric_md.lkp.ipv4_dst : ternary @name("ipv4_dst") ; + fabric_md.lkp.ip_proto : ternary @name("ip_proto") ; + fabric_md.lkp.icmp_type : ternary @name("icmp_type") ; + fabric_md.lkp.icmp_code : ternary @name("icmp_code") ; + fabric_md.lkp.l4_sport : ternary @name("l4_sport") ; + fabric_md.lkp.l4_dport : ternary @name("l4_dport") ; + fabric_md.ig_port_type : ternary @name("ig_port_type") ; + } + actions = { + set_next_id_acl; + punt_to_cpu; + copy_to_cpu; + drop; + set_output_port; + nop_acl; + } + const default_action = nop_acl(); + size = 1024; + counters = acl_counter; + } + apply { + acl.apply(); + } +} + +control Next(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout FabricPortId_t recirc_preserved_egress_port) { + @hidden action output(FabricPortId_t port_num) { + standard_md.egress_spec = (PortId_t)port_num; + recirc_preserved_egress_port = port_num; + fabric_md.egress_port_set = true; + } + @hidden action rewrite_smac(mac_addr_t smac) { + hdr.ethernet.src_addr = smac; + } + @hidden action rewrite_dmac(mac_addr_t dmac) { + hdr.ethernet.dst_addr = dmac; + } + @hidden action routing(FabricPortId_t port_num, mac_addr_t smac, mac_addr_t dmac) { + rewrite_smac(smac); + rewrite_dmac(dmac); + output(port_num); + } + direct_counter(CounterType.packets_and_bytes) simple_counter; + action output_simple(FabricPortId_t port_num) { + output(port_num); + simple_counter.count(); + } + action routing_simple(FabricPortId_t port_num, mac_addr_t smac, mac_addr_t dmac) { + routing(port_num, smac, dmac); + simple_counter.count(); + } + table simple { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + output_simple; + routing_simple; + @defaultonly nop; + } + const default_action = nop(); + counters = simple_counter; + size = 1024; + } + @max_group_size(32w16) action_selector(HashAlgorithm.crc16, 32w16, 32w16) hashed_profile; + direct_counter(CounterType.packets_and_bytes) hashed_counter; + action output_hashed(FabricPortId_t port_num) { + output(port_num); + hashed_counter.count(); + } + action routing_hashed(FabricPortId_t port_num, mac_addr_t smac, mac_addr_t dmac) { + routing(port_num, smac, dmac); + hashed_counter.count(); + } + table hashed { + key = { + fabric_md.next_id : exact @name("next_id") ; + fabric_md.ecmp_hash: selector; + } + actions = { + output_hashed; + routing_hashed; + @defaultonly nop; + } + implementation = hashed_profile; + counters = hashed_counter; + const default_action = nop(); + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) multicast_counter; + action set_mcast_group_id(MulticastGroupId_t group_id) { + standard_md.mcast_grp = group_id; + fabric_md.bridged.base.is_multicast = true; + multicast_counter.count(); + } + action reset_mcast_group_id() { + standard_md.mcast_grp = 0; + fabric_md.bridged.base.is_multicast = false; + } + table multicast { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + set_mcast_group_id; + @defaultonly reset_mcast_group_id; + } + counters = multicast_counter; + const default_action = reset_mcast_group_id(); + size = 1024; + } + apply { + simple.apply(); + hashed.apply(); + multicast.apply(); + } +} + +control EgressNextControl(inout ingress_headers_t hdr, inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout IntDropReason_t recirc_preserved_drop_reason, inout bit<1> drop_ctl) { + @hidden action pop_mpls_if_present() { + hdr.mpls.setInvalid(); + hdr.eth_type.value = fabric_md.bridged.base.ip_eth_type; + } + @hidden action set_mpls() { + hdr.mpls.setValid(); + hdr.mpls.label = fabric_md.bridged.base.mpls_label; + hdr.mpls.tc = 3w0; + hdr.mpls.bos = 1w1; + hdr.mpls.ttl = fabric_md.bridged.base.mpls_ttl; + hdr.eth_type.value = ETHERTYPE_MPLS; + } + @hidden action push_outer_vlan() { + hdr.vlan_tag.setValid(); + hdr.vlan_tag.eth_type = ETHERTYPE_VLAN; + hdr.vlan_tag.vlan_id = fabric_md.bridged.base.vlan_id; + } + direct_counter(CounterType.packets_and_bytes) egress_vlan_counter; + action push_vlan() { + push_outer_vlan(); + egress_vlan_counter.count(); + } + action pop_vlan() { + hdr.vlan_tag.setInvalid(); + egress_vlan_counter.count(); + } + action drop() { + drop_ctl = 1; + egress_vlan_counter.count(); + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_EGRESS_NEXT_MISS; + } + table egress_vlan { + key = { + fabric_md.bridged.base.vlan_id: exact @name("vlan_id") ; + standard_md.egress_port : exact @name("eg_port") ; + } + actions = { + push_vlan; + pop_vlan; + @defaultonly drop; + } + const default_action = drop(); + counters = egress_vlan_counter; + size = 1024; + } + apply { + if (fabric_md.bridged.base.is_multicast && fabric_md.bridged.base.ig_port == standard_md.egress_port) { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_NO_REPORT; + drop_ctl = 1; + } + if (fabric_md.bridged.base.mpls_label == 0) { + if (hdr.mpls.isValid()) { + pop_mpls_if_present(); + } + } else { + set_mpls(); + } + if (!fabric_md.is_int_recirc) { + egress_vlan.apply(); + } + bool regular_packet = true; + regular_packet = !(fabric_md.bridged.bmd_type == BridgedMdType_t.INT_INGRESS_DROP || fabric_md.bridged.bmd_type == BridgedMdType_t.EGRESS_MIRROR); + if (hdr.mpls.isValid()) { + hdr.mpls.ttl = hdr.mpls.ttl - 1; + if (hdr.mpls.ttl == 0) { + drop_ctl = 1; + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_MPLS_TTL_ZERO; + } + } else { + if (hdr.ipv4.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING) { + if (regular_packet) { + hdr.ipv4.ttl = hdr.ipv4.ttl - 1; + } + if (hdr.ipv4.ttl == 0) { + drop_ctl = 1; + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_IP_TTL_ZERO; + } + } else if (hdr.ipv6.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING) { + if (regular_packet) { + hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1; + } + if (hdr.ipv6.hop_limit == 0) { + drop_ctl = 1; + recirc_preserved_drop_reason = IntDropReason_t.DROP_REASON_IP_TTL_ZERO; + } + } + } + } +} + +const bit<10> UNSET_FLOW_ID = 0; +control StatsIngress(in lookup_metadata_t lkp, in PortId_t ig_port, out bit<10> stats_flow_id) { + direct_counter(CounterType.packets_and_bytes) flow_counter; + action count(bit<10> flow_id) { + stats_flow_id = flow_id; + flow_counter.count(); + } + table flows { + key = { + lkp.ipv4_src: ternary @name("ipv4_src") ; + lkp.ipv4_dst: ternary @name("ipv4_dst") ; + lkp.ip_proto: ternary @name("ip_proto") ; + lkp.l4_sport: ternary @name("l4_sport") ; + lkp.l4_dport: ternary @name("l4_dport") ; + ig_port : exact @name("ig_port") ; + } + actions = { + count; + } + const default_action = count(UNSET_FLOW_ID); + const size = 1 << 10; + counters = flow_counter; + } + apply { + flows.apply(); + } +} + +control StatsEgress(in bit<10> stats_flow_id, in PortId_t eg_port, in BridgedMdType_t bmd_type) { + direct_counter(CounterType.packets_and_bytes) flow_counter; + action count() { + flow_counter.count(); + } + table flows { + key = { + stats_flow_id: exact @name("stats_flow_id") ; + eg_port : exact @name("eg_port") ; + } + actions = { + count; + } + const default_action = count; + const size = 1 << 10; + counters = flow_counter; + } + apply { + if (bmd_type == BridgedMdType_t.INGRESS_TO_EGRESS) { + flows.apply(); + } + } +} + +control Hasher(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md) { + flow_hash_t max = 0xffffffff; + flow_hash_t base = 0; + apply { + hash(fabric_md.bridged.base.inner_hash, HashAlgorithm.crc32, base, { fabric_md.lkp.ipv4_src, fabric_md.lkp.ipv4_dst, fabric_md.lkp.ip_proto, fabric_md.lkp.l4_sport, fabric_md.lkp.l4_dport }, max); + if (hdr.gtpu.isValid()) { + hash(fabric_md.ecmp_hash, HashAlgorithm.crc32, base, { hdr.ipv4.src_addr, hdr.ipv4.dst_addr, hdr.gtpu.teid }, max); + } else if (fabric_md.lkp.is_ipv4) { + fabric_md.ecmp_hash = fabric_md.bridged.base.inner_hash; + } else { + fabric_md.bridged.base.inner_hash = 0; + hash(fabric_md.ecmp_hash, HashAlgorithm.crc32, base, { hdr.ethernet.dst_addr, hdr.ethernet.src_addr, hdr.eth_type.value }, max); + } + } +} + +control IngressSliceTcClassifier(inout ingress_headers_t hdr, inout standard_metadata_t standard_md, inout fabric_ingress_metadata_t fabric_md) { + direct_counter(CounterType.packets) classifier_stats; + action set_slice_id_tc(slice_id_t slice_id, tc_t tc) { + fabric_md.slice_id = slice_id; + fabric_md.tc = tc; + fabric_md.tc_unknown = false; + classifier_stats.count(); + } + action no_classification() { + set_slice_id_tc(DEFAULT_SLICE_ID, DEFAULT_TC); + fabric_md.tc_unknown = true; + } + action trust_dscp() { + fabric_md.slice_id = hdr.ipv4.dscp[4 + 2 - 1:2]; + fabric_md.tc = hdr.ipv4.dscp[2 - 1:0]; + fabric_md.tc_unknown = false; + classifier_stats.count(); + } + table classifier { + key = { + fabric_md.bridged.base.ig_port: ternary @name("ig_port") ; + fabric_md.lkp.ipv4_src : ternary @name("ipv4_src") ; + fabric_md.lkp.ipv4_dst : ternary @name("ipv4_dst") ; + fabric_md.lkp.ip_proto : ternary @name("ip_proto") ; + fabric_md.lkp.l4_sport : ternary @name("l4_sport") ; + fabric_md.lkp.l4_dport : ternary @name("l4_dport") ; + } + actions = { + set_slice_id_tc; + trust_dscp; + @defaultonly no_classification; + } + const default_action = no_classification(); + counters = classifier_stats; + size = 512; + } + apply { + classifier.apply(); + } +} + +control IngressQos(inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout bit<1> drop_ctl) { + bit<2> packet_color = 2w0; + @hidden action use_upf() { + fabric_md.bridged.base.slice_tc = fabric_md.upf_slice_id ++ fabric_md.upf_tc; + } + @hidden action use_default() { + fabric_md.bridged.base.slice_tc = fabric_md.slice_id ++ fabric_md.tc; + } + @hidden table set_slice_tc { + key = { + fabric_md.is_upf_hit: exact; + } + actions = { + use_upf; + use_default; + } + const size = 2; + const entries = { + true : use_upf; + false : use_default; + } + } + meter(1 << 4 + 2, MeterType.bytes) slice_tc_meter; + direct_counter(CounterType.packets) queues_stats; + action set_queue(QueueId_t qid) { + queues_stats.count(); + } + action meter_drop() { + drop_ctl = 1; + fabric_md.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_INGRESS_QOS_METER; + queues_stats.count(); + } + table queues { + key = { + fabric_md.bridged.base.slice_tc: exact @name("slice_tc") ; + packet_color : ternary @name("color") ; + } + actions = { + set_queue; + meter_drop; + } + const default_action = set_queue(QUEUE_ID_BEST_EFFORT); + counters = queues_stats; + size = 1 << 4 + 2 + 1; + } + action set_default_tc(tc_t tc) { + fabric_md.bridged.base.slice_tc = fabric_md.bridged.base.slice_tc[4 + 2 - 1:2] ++ tc; + } + table default_tc { + key = { + fabric_md.bridged.base.slice_tc: ternary @name("slice_tc") ; + fabric_md.tc_unknown : exact @name("tc_unknown") ; + } + actions = { + set_default_tc; + @defaultonly nop; + } + const default_action = nop; + size = 1 << 4; + } + apply { + set_slice_tc.apply(); + default_tc.apply(); + if (fabric_md.upf_meter_color != MeterColor_t.RED) { + slice_tc_meter.execute_meter((bit<32>)fabric_md.bridged.base.slice_tc, packet_color); + } else { + packet_color = MeterColor_t.RED; + } + queues.apply(); + } +} + +control EgressDscpRewriter(inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout ingress_headers_t hdr) { + bit<6> tmp_dscp = fabric_md.bridged.base.slice_tc; + action rewrite() { + } + action clear() { + tmp_dscp = 0; + } + table rewriter { + key = { + standard_md.egress_port: exact @name("eg_port") ; + } + actions = { + rewrite; + clear; + @defaultonly nop; + } + const default_action = nop; + size = 512; + } + apply { + if (rewriter.apply().hit) { + if (hdr.ipv4.isValid()) { + hdr.ipv4.dscp = tmp_dscp; + } + } + } +} + +control FabricVerifyChecksum(inout v1model_header_t hdr, inout fabric_v1model_metadata_t meta) { + apply { + verify_checksum(hdr.ingress.ipv4.isValid(), { hdr.ingress.ipv4.version, hdr.ingress.ipv4.ihl, hdr.ingress.ipv4.dscp, hdr.ingress.ipv4.ecn, hdr.ingress.ipv4.total_len, hdr.ingress.ipv4.identification, hdr.ingress.ipv4.flags, hdr.ingress.ipv4.frag_offset, hdr.ingress.ipv4.ttl, hdr.ingress.ipv4.protocol, hdr.ingress.ipv4.src_addr, hdr.ingress.ipv4.dst_addr }, hdr.ingress.ipv4.hdr_checksum, HashAlgorithm.csum16); + verify_checksum(hdr.ingress.inner_ipv4.isValid(), { hdr.ingress.inner_ipv4.version, hdr.ingress.inner_ipv4.ihl, hdr.ingress.inner_ipv4.dscp, hdr.ingress.inner_ipv4.ecn, hdr.ingress.inner_ipv4.total_len, hdr.ingress.inner_ipv4.identification, hdr.ingress.inner_ipv4.flags, hdr.ingress.inner_ipv4.frag_offset, hdr.ingress.inner_ipv4.ttl, hdr.ingress.inner_ipv4.protocol, hdr.ingress.inner_ipv4.src_addr, hdr.ingress.inner_ipv4.dst_addr }, hdr.ingress.inner_ipv4.hdr_checksum, HashAlgorithm.csum16); + } +} + +control FabricComputeChecksum(inout v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md) { + apply { + update_checksum(hdr.ingress.ipv4.isValid(), { hdr.ingress.ipv4.version, hdr.ingress.ipv4.ihl, hdr.ingress.ipv4.dscp, hdr.ingress.ipv4.ecn, hdr.ingress.ipv4.total_len, hdr.ingress.ipv4.identification, hdr.ingress.ipv4.flags, hdr.ingress.ipv4.frag_offset, hdr.ingress.ipv4.ttl, hdr.ingress.ipv4.protocol, hdr.ingress.ipv4.src_addr, hdr.ingress.ipv4.dst_addr }, hdr.ingress.ipv4.hdr_checksum, HashAlgorithm.csum16); + update_checksum(hdr.ingress.inner_ipv4.isValid(), { hdr.ingress.inner_ipv4.version, hdr.ingress.inner_ipv4.ihl, hdr.ingress.inner_ipv4.dscp, hdr.ingress.inner_ipv4.ecn, hdr.ingress.inner_ipv4.total_len, hdr.ingress.inner_ipv4.identification, hdr.ingress.inner_ipv4.flags, hdr.ingress.inner_ipv4.frag_offset, hdr.ingress.inner_ipv4.ttl, hdr.ingress.inner_ipv4.protocol, hdr.ingress.inner_ipv4.src_addr, hdr.ingress.inner_ipv4.dst_addr }, hdr.ingress.inner_ipv4.hdr_checksum, HashAlgorithm.csum16); + update_checksum(hdr.egress.report_ipv4.isValid(), { hdr.egress.report_ipv4.version, hdr.egress.report_ipv4.ihl, hdr.egress.report_ipv4.dscp, hdr.egress.report_ipv4.ecn, hdr.egress.report_ipv4.total_len, hdr.egress.report_ipv4.identification, hdr.egress.report_ipv4.flags, hdr.egress.report_ipv4.frag_offset, hdr.egress.report_ipv4.ttl, hdr.egress.report_ipv4.protocol, hdr.egress.report_ipv4.src_addr, hdr.egress.report_ipv4.dst_addr }, hdr.egress.report_ipv4.hdr_checksum, HashAlgorithm.csum16); + } +} + +control PacketIoIngress(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout bool skip_egress, inout standard_metadata_t standard_md, inout FabricPortId_t recirc_preserved_egress_port) { + @hidden action do_packet_out() { + standard_md.egress_spec = (PortId_t)hdr.packet_out.egress_port; + recirc_preserved_egress_port = hdr.packet_out.egress_port; + fabric_md.egress_port_set = true; + hdr.packet_out.setInvalid(); + skip_egress = true; + fabric_md.bridged.setInvalid(); + exit; + } + apply { + if (hdr.packet_out.isValid()) { + do_packet_out(); + } + } +} + +control PacketIoEgress(inout ingress_headers_t hdr, inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md, in FabricPortId_t preserved_ig_port) { + action set_switch_info(FabricPortId_t cpu_port) { + fabric_md.cpu_port = (PortId_t)cpu_port; + } + table switch_info { + actions = { + set_switch_info; + @defaultonly nop; + } + default_action = nop; + const size = 1; + } + apply { + switch_info.apply(); + if (standard_md.egress_port == fabric_md.cpu_port) { + hdr.packet_in.setValid(); + hdr.packet_in.ingress_port = preserved_ig_port; + hdr.fake_ethernet.setInvalid(); + exit; + } + if (hdr.fake_ethernet.isValid() && hdr.fake_ethernet.ether_type == ETHERTYPE_CPU_LOOPBACK_EGRESS) { + fabric_md.pkt_length = (bit<16>)standard_md.packet_length - 14; + } + } +} + +control PreNext(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md) { + direct_counter(CounterType.packets_and_bytes) next_mpls_counter; + action set_mpls_label(mpls_label_t label) { + fabric_md.bridged.base.mpls_label = label; + next_mpls_counter.count(); + } + table next_mpls { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + set_mpls_label; + @defaultonly nop; + } + const default_action = nop(); + counters = next_mpls_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) next_vlan_counter; + action set_vlan(vlan_id_t vlan_id) { + fabric_md.bridged.base.vlan_id = vlan_id; + next_vlan_counter.count(); + } + table next_vlan { + key = { + fabric_md.next_id: exact @name("next_id") ; + } + actions = { + set_vlan; + @defaultonly nop; + } + const default_action = nop(); + counters = next_vlan_counter; + size = 1024; + } + apply { + next_mpls.apply(); + next_vlan.apply(); + } +} + +control Filtering(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md) { + direct_counter(CounterType.packets_and_bytes) ingress_port_vlan_counter; + action deny() { + fabric_md.skip_forwarding = true; + fabric_md.skip_next = true; + fabric_md.ig_port_type = PortType_t.UNKNOWN; + fabric_md.bridged.int_bmd.drop_reason = IntDropReason_t.DROP_REASON_PORT_VLAN_MAPPING_MISS; + ingress_port_vlan_counter.count(); + } + action permit(PortType_t port_type) { + fabric_md.ig_port_type = port_type; + ingress_port_vlan_counter.count(); + } + action permit_with_internal_vlan(vlan_id_t vlan_id, PortType_t port_type) { + fabric_md.bridged.base.vlan_id = vlan_id; + permit(port_type); + } + table ingress_port_vlan { + key = { + fabric_md.bridged.base.ig_port: exact @name("ig_port") ; + hdr.vlan_tag.isValid() : exact @name("vlan_is_valid") ; + hdr.vlan_tag.vlan_id : ternary @name("vlan_id") ; + } + actions = { + deny(); + permit(); + permit_with_internal_vlan(); + } + const default_action = deny(); + counters = ingress_port_vlan_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) fwd_classifier_counter; + action set_forwarding_type(fwd_type_t fwd_type) { + fabric_md.bridged.base.fwd_type = fwd_type; + fwd_classifier_counter.count(); + } + counter(8, CounterType.packets_and_bytes) fwd_type_counter; + table fwd_classifier { + key = { + fabric_md.bridged.base.ig_port : exact @name("ig_port") ; + fabric_md.lkp.eth_dst : ternary @name("eth_dst") ; + fabric_md.lkp.eth_type : ternary @name("eth_type") ; + fabric_md.bridged.base.ip_eth_type: exact @name("ip_eth_type") ; + } + actions = { + set_forwarding_type; + } + const default_action = set_forwarding_type(FWD_BRIDGING); + counters = fwd_classifier_counter; + size = 1024; + } + apply { + ingress_port_vlan.apply(); + fwd_classifier.apply(); + fwd_type_counter.count((bit<32>)fabric_md.bridged.base.fwd_type); + } +} + +control Forwarding(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout bit<1> drop_ctl) { + action set_int_drop_reason(bit<8> drop_reason) { + fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason; + } + @hidden action set_next_id(next_id_t next_id) { + fabric_md.next_id = next_id; + } + direct_counter(CounterType.packets_and_bytes) bridging_counter; + action set_next_id_bridging(next_id_t next_id) { + set_next_id(next_id); + bridging_counter.count(); + } + table bridging { + key = { + fabric_md.bridged.base.vlan_id: exact @name("vlan_id") ; + hdr.ethernet.dst_addr : ternary @name("eth_dst") ; + } + actions = { + set_next_id_bridging; + @defaultonly set_int_drop_reason; + } + const default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_BRIDGING_MISS); + counters = bridging_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) mpls_counter; + action pop_mpls_and_next(next_id_t next_id) { + hdr.mpls.setInvalid(); + hdr.eth_type.value = fabric_md.bridged.base.ip_eth_type; + fabric_md.bridged.base.mpls_label = 0; + set_next_id(next_id); + mpls_counter.count(); + } + table mpls { + key = { + fabric_md.bridged.base.mpls_label: exact @name("mpls_label") ; + } + actions = { + pop_mpls_and_next; + @defaultonly set_int_drop_reason; + } + const default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_MPLS_MISS); + counters = mpls_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) routing_v4_counter; + action set_next_id_routing_v4(next_id_t next_id) { + set_next_id(next_id); + routing_v4_counter.count(); + } + action nop_routing_v4() { + routing_v4_counter.count(); + } + action drop_routing_v4() { + fabric_md.skip_next = true; + routing_v4_counter.count(); + drop_ctl = 1; + } + table routing_v4 { + key = { + fabric_md.routing_ipv4_dst: lpm @name("ipv4_dst") ; + } + actions = { + set_next_id_routing_v4; + nop_routing_v4; + drop_routing_v4; + @defaultonly set_int_drop_reason; + } + default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_ROUTING_V4_MISS); + counters = routing_v4_counter; + size = 1024; + } + direct_counter(CounterType.packets_and_bytes) routing_v6_counter; + action set_next_id_routing_v6(next_id_t next_id) { + set_next_id(next_id); + routing_v6_counter.count(); + } + action drop_routing_v6() { + fabric_md.skip_next = true; + routing_v6_counter.count(); + drop_ctl = 1; + } + table routing_v6 { + key = { + hdr.ipv6.dst_addr: lpm @name("ipv6_dst") ; + } + actions = { + set_next_id_routing_v6; + drop_routing_v6; + @defaultonly set_int_drop_reason; + } + default_action = set_int_drop_reason(IntDropReason_t.DROP_REASON_ROUTING_V6_MISS); + counters = routing_v6_counter; + size = 1024; + } + apply { + if (hdr.ethernet.isValid() && fabric_md.bridged.base.fwd_type == FWD_BRIDGING) { + bridging.apply(); + } else if (hdr.mpls.isValid() && fabric_md.bridged.base.fwd_type == FWD_MPLS) { + mpls.apply(); + } else if (fabric_md.lkp.is_ipv4 && (fabric_md.bridged.base.fwd_type == FWD_IPV4_UNICAST || fabric_md.bridged.base.fwd_type == FWD_IPV4_MULTICAST)) { + routing_v4.apply(); + } else if (hdr.ipv6.isValid() && fabric_md.bridged.base.fwd_type == FWD_IPV6_UNICAST) { + routing_v6.apply(); + } + } +} + +control LookupMdInit(in ingress_headers_t hdr, out lookup_metadata_t lkp_md) { + apply { + lkp_md.eth_dst = hdr.ethernet.dst_addr; + lkp_md.eth_src = hdr.ethernet.src_addr; + lkp_md.eth_type = hdr.eth_type.value; + lkp_md.vlan_id = 0; + if (hdr.vlan_tag.isValid()) { + lkp_md.vlan_id = hdr.vlan_tag.vlan_id; + } + lkp_md.is_ipv4 = false; + lkp_md.ipv4_src = 0; + lkp_md.ipv4_dst = 0; + lkp_md.ip_proto = 0; + lkp_md.l4_sport = 0; + lkp_md.l4_dport = 0; + lkp_md.icmp_type = 0; + lkp_md.icmp_code = 0; + if (hdr.inner_ipv4.isValid()) { + lkp_md.is_ipv4 = true; + lkp_md.ipv4_src = hdr.inner_ipv4.src_addr; + lkp_md.ipv4_dst = hdr.inner_ipv4.dst_addr; + lkp_md.ip_proto = hdr.inner_ipv4.protocol; + if (hdr.inner_tcp.isValid()) { + lkp_md.l4_sport = hdr.inner_tcp.sport; + lkp_md.l4_dport = hdr.inner_tcp.dport; + } else if (hdr.inner_udp.isValid()) { + lkp_md.l4_sport = hdr.inner_udp.sport; + lkp_md.l4_dport = hdr.inner_udp.dport; + } else if (hdr.inner_icmp.isValid()) { + lkp_md.icmp_type = hdr.inner_icmp.icmp_type; + lkp_md.icmp_code = hdr.inner_icmp.icmp_code; + } + } else if (hdr.ipv4.isValid()) { + lkp_md.is_ipv4 = true; + lkp_md.ipv4_src = hdr.ipv4.src_addr; + lkp_md.ipv4_dst = hdr.ipv4.dst_addr; + lkp_md.ip_proto = hdr.ipv4.protocol; + if (hdr.tcp.isValid()) { + lkp_md.l4_sport = hdr.tcp.sport; + lkp_md.l4_dport = hdr.tcp.dport; + } else if (hdr.udp.isValid()) { + lkp_md.l4_sport = hdr.udp.sport; + lkp_md.l4_dport = hdr.udp.dport; + } else if (hdr.icmp.isValid()) { + lkp_md.icmp_type = hdr.icmp.icmp_type; + lkp_md.icmp_code = hdr.icmp.icmp_code; + } + } + } +} + +control IntWatchlist(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout IntReportType_t recirc_preserved_report_type) { + direct_counter(CounterType.packets_and_bytes) watchlist_counter; + action mark_to_report() { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_FLOW; + recirc_preserved_report_type = INT_REPORT_TYPE_FLOW; + watchlist_counter.count(); + } + action no_report() { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_NO_REPORT; + recirc_preserved_report_type = INT_REPORT_TYPE_NO_REPORT; + } + action no_report_collector() { + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_NO_REPORT; + } + table watchlist { + key = { + fabric_md.lkp.is_ipv4 : exact @name("ipv4_valid") ; + fabric_md.lkp.ipv4_src: ternary @name("ipv4_src") ; + fabric_md.lkp.ipv4_dst: ternary @name("ipv4_dst") ; + fabric_md.lkp.ip_proto: ternary @name("ip_proto") ; + fabric_md.lkp.l4_sport: range @name("l4_sport") ; + fabric_md.lkp.l4_dport: range @name("l4_dport") ; + } + actions = { + mark_to_report; + no_report_collector; + @defaultonly no_report(); + } + const default_action = no_report(); + const size = 64; + counters = watchlist_counter; + } + apply { + watchlist.apply(); + } +} + +control IntIngress(inout ingress_headers_t hdr, inout fabric_ingress_metadata_t fabric_md, inout standard_metadata_t standard_md, inout bit<1> drop_ctl) { + direct_counter(CounterType.packets_and_bytes) drop_report_counter; + @hidden action report_drop() { + fabric_md.bridged.bmd_type = BridgedMdType_t.INT_INGRESS_DROP; + fabric_md.bridged.int_bmd.report_type = INT_REPORT_TYPE_DROP; + fabric_md.bridged.base.vlan_id = DEFAULT_VLAN_ID; + fabric_md.bridged.base.mpls_label = 0; + drop_ctl = 0; + standard_md.egress_spec = FAKE_V1MODEL_RECIRC_PORT; + drop_report_counter.count(); + } + @hidden table drop_report { + key = { + fabric_md.bridged.int_bmd.report_type: exact @name("int_report_type") ; + drop_ctl : exact @name("drop_ctl") ; + fabric_md.punt_to_cpu : exact @name("punt_to_cpu") ; + fabric_md.egress_port_set : exact @name("egress_port_set") ; + standard_md.mcast_grp : ternary @name("mcast_group_id") ; + } + actions = { + report_drop; + @defaultonly nop; + } + const entries = { + (INT_REPORT_TYPE_FLOW, 1, false, false, default) : report_drop(); + (INT_REPORT_TYPE_FLOW, 1, false, true, default) : report_drop(); + (INT_REPORT_TYPE_FLOW, 0, false, false, 0) : report_drop(); + } + const default_action = nop(); + counters = drop_report_counter; + } + apply { + fabric_md.bridged.int_bmd.egress_port = standard_md.egress_spec; + fabric_md.bridged.int_bmd.queue_id = 0; + drop_report.apply(); + } +} + +control IntEgress(inout v1model_header_t hdr_v1model, inout fabric_v1model_metadata_t fabric_v1model, inout standard_metadata_t standard_md) { + const bit<48> DEFAULT_TIMESTAMP_MASK = 0xffffc0000000; + const bit<32> DEFAULT_HOP_LATENCY_MASK = 0xffffff00; + egress_headers_t hdr = hdr_v1model.egress; + fabric_egress_metadata_t fabric_md = fabric_v1model.egress; + direct_counter(CounterType.packets_and_bytes) report_counter; + direct_counter(CounterType.packets_and_bytes) int_metadata_counter; + QueueId_t egress_qid = 0; + @hidden register<bit<32>>(1024) seq_number; + @hidden action get_seq_number(in bit<32> seq_number_idx, out bit<32> result) { + bit<32> reg = 0; + seq_number.read(reg, seq_number_idx); + reg = reg + 1; + result = reg; + seq_number.write(seq_number_idx, reg); + } + action check_quota() { + } + action reset_quota() { + } + table queue_latency_thresholds { + key = { + egress_qid : exact @name("egress_qid") ; + fabric_md.int_md.hop_latency[31:16]: range @name("hop_latency_upper") ; + fabric_md.int_md.hop_latency[15:0] : range @name("hop_latency_lower") ; + } + actions = { + check_quota; + reset_quota; + @defaultonly nop; + } + default_action = nop(); + const size = 32 * 4; + } + action set_config(bit<32> hop_latency_mask, bit<48> timestamp_mask) { + fabric_md.int_md.hop_latency = fabric_md.int_md.hop_latency & hop_latency_mask; + fabric_md.int_md.timestamp = fabric_md.int_md.timestamp & timestamp_mask; + } + table config { + actions = { + @defaultonly set_config; + } + default_action = set_config(DEFAULT_HOP_LATENCY_MASK, DEFAULT_TIMESTAMP_MASK); + const size = 1; + } + @hidden action _report_encap_common(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, bit<32> switch_id) { + random(hdr.report_ipv4.identification, 0, 0xffff); + hdr.report_ipv4.src_addr = src_ip; + hdr.report_ipv4.dst_addr = mon_ip; + hdr.report_udp.dport = mon_port; + get_seq_number((bit<32>)hdr.report_fixed_header.hw_id, hdr.report_fixed_header.seq_no); + hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type; + hdr.common_report_header.switch_id = switch_id; + hdr.common_report_header.pad1 = 0; + hdr.common_report_header.pad2 = 0; + hdr.common_report_header.pad3 = 0; + hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type; + fabric_v1model.int_mirror_type = (bit<3>)FabricMirrorType_t.INVALID; + report_counter.count(); + } + action do_local_report_encap(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, bit<32> switch_id) { + _report_encap_common(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_IPV4; + hdr.report_fixed_header.nproto = NPROTO_TELEMETRY_SWITCH_LOCAL_HEADER; + hdr.local_report_header.setValid(); + } + action do_local_report_encap_mpls(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, mpls_label_t mon_label, bit<32> switch_id) { + do_local_report_encap(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_MPLS; + hdr.report_mpls.setValid(); + hdr.report_mpls.tc = 0; + hdr.report_mpls.bos = 0; + hdr.report_mpls.ttl = DEFAULT_MPLS_TTL; + hdr.report_mpls.label = mon_label; + } + action do_drop_report_encap(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, bit<32> switch_id) { + _report_encap_common(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_IPV4; + hdr.report_fixed_header.nproto = NPROTO_TELEMETRY_DROP_HEADER; + hdr.drop_report_header.setValid(); + hdr.local_report_header.setInvalid(); + hdr.drop_report_header.drop_reason = fabric_md.bridged.int_bmd.drop_reason; + } + action do_drop_report_encap_mpls(ipv4_addr_t src_ip, ipv4_addr_t mon_ip, l4_port_t mon_port, mpls_label_t mon_label, bit<32> switch_id) { + do_drop_report_encap(src_ip, mon_ip, mon_port, switch_id); + hdr.report_eth_type.value = ETHERTYPE_INT_WIP_MPLS; + hdr.report_mpls.setValid(); + hdr.report_mpls.tc = 0; + hdr.report_mpls.bos = 0; + hdr.report_mpls.ttl = DEFAULT_MPLS_TTL; + hdr.report_mpls.label = mon_label; + hdr.report_mpls.label = mon_label; + } + table report { + key = { + fabric_md.int_report_md.bmd_type : exact @name("bmd_type") ; + fabric_md.int_report_md.mirror_type: exact @name("mirror_type") ; + fabric_md.int_report_md.report_type: exact @name("int_report_type") ; + } + actions = { + do_local_report_encap; + do_local_report_encap_mpls; + do_drop_report_encap; + do_drop_report_encap_mpls; + @defaultonly nop(); + } + default_action = nop; + const size = 6; + counters = report_counter; + } + @hidden action init_int_metadata(bit<3> report_type) { + fabric_md.bridged.int_bmd.mirror_session_id = V1MODEL_INT_MIRROR_SESSION; + fabric_md.int_report_md.setValid(); + fabric_v1model.int_mirror_type = (bit<3>)FabricMirrorType_t.INT_REPORT; + fabric_md.int_report_md.bmd_type = BridgedMdType_t.EGRESS_MIRROR; + fabric_md.int_report_md.mirror_type = FabricMirrorType_t.INT_REPORT; + fabric_md.int_report_md.report_type = fabric_md.bridged.int_bmd.report_type; + fabric_md.int_report_md.ig_port = fabric_md.bridged.base.ig_port; + fabric_md.int_report_md.eg_port = (PortId_t)standard_md.egress_port; + fabric_md.int_report_md.queue_id = egress_qid; + fabric_md.int_report_md.queue_occupancy = standard_md.deq_qdepth; + fabric_md.int_report_md.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]; + fabric_md.int_report_md.eg_tstamp = standard_md.egress_global_timestamp[31:0]; + fabric_md.int_report_md.ip_eth_type = fabric_md.bridged.base.ip_eth_type; + fabric_md.int_report_md.flow_hash = fabric_md.bridged.base.inner_hash; + fabric_md.int_report_md.report_type = report_type; + int_metadata_counter.count(); + } + @hidden table int_metadata { + key = { + fabric_md.bridged.int_bmd.report_type: exact @name("int_report_type") ; + fabric_v1model.drop_ctl : exact @name("drop_ctl") ; + fabric_md.int_md.queue_report : exact @name("queue_report") ; + } + actions = { + init_int_metadata; + @defaultonly nop(); + } + const default_action = nop(); + const entries = { + (INT_REPORT_TYPE_FLOW, 0, false) : init_int_metadata(INT_REPORT_TYPE_FLOW); + (INT_REPORT_TYPE_FLOW, 1, false) : init_int_metadata(INT_REPORT_TYPE_DROP); + } + counters = int_metadata_counter; + } + @hidden action adjust_ip_udp_len(bit<16> adjust_ip, bit<16> adjust_udp) { + hdr_v1model.ingress.ipv4.total_len = fabric_md.pkt_length + adjust_ip; + hdr_v1model.ingress.udp.len = fabric_md.pkt_length + adjust_udp; + } + @hidden table adjust_int_report_hdr_length { + key = { + fabric_md.bridged.int_bmd.wip_type: exact @name("is_int_wip") ; + } + actions = { + @defaultonly nop(); + adjust_ip_udp_len; + } + const default_action = nop(); + const entries = { + INT_IS_WIP : adjust_ip_udp_len(INT_WIP_ADJUST_IP_BYTES, INT_WIP_ADJUST_UDP_BYTES); + INT_IS_WIP_WITH_MPLS : adjust_ip_udp_len(INT_WIP_ADJUST_IP_MPLS_BYTES, INT_WIP_ADJUST_UDP_MPLS_BYTES); + } + } + apply { + fabric_md.int_md.hop_latency = standard_md.egress_global_timestamp[31:0] - fabric_md.bridged.base.ig_tstamp[31:0]; + fabric_md.int_md.timestamp = standard_md.egress_global_timestamp; + queue_latency_thresholds.apply(); + config.apply(); + hdr.report_fixed_header.hw_id = 4w0 ++ standard_md.egress_spec[8:7]; + if (fabric_md.int_report_md.isValid()) { + report.apply(); + } else { + if (int_metadata.apply().hit) { + clone_preserving_field_list(CloneType.E2E, (bit<32>)fabric_md.bridged.int_bmd.mirror_session_id, PRESERVE_INT_MD); + } + } + adjust_int_report_hdr_length.apply(); + fabric_v1model.egress = fabric_md; + hdr_v1model.egress = hdr; + } +} + +control IntTnaEgressParserEmulator(inout v1model_header_t hdr_v1model, inout fabric_egress_metadata_t fabric_md, inout standard_metadata_t standard_md) { + egress_headers_t hdr = hdr_v1model.egress; + @hidden action set_common_int_headers() { + hdr.report_ethernet.setValid(); + hdr.report_eth_type.setValid(); + hdr.report_ipv4.setValid(); + hdr.report_ipv4.version = 4w4; + hdr.report_ipv4.ihl = 4w5; + hdr.report_ipv4.dscp = 0; + hdr.report_ipv4.ecn = 2w0; + hdr.report_ipv4.flags = 0; + hdr.report_ipv4.frag_offset = 0; + hdr.report_ipv4.ttl = DEFAULT_IPV4_TTL; + hdr.report_ipv4.protocol = PROTO_UDP; + hdr.report_udp.setValid(); + hdr.report_udp.sport = 0; + hdr.report_fixed_header.setValid(); + hdr.report_fixed_header.ver = 0; + hdr.report_fixed_header.nproto = NPROTO_TELEMETRY_SWITCH_LOCAL_HEADER; + hdr.report_fixed_header.rsvd = 0; + hdr.common_report_header.setValid(); + } + @hidden action set_common_int_drop_headers() { + set_common_int_headers(); + fabric_md.int_report_md.setValid(); + fabric_md.int_report_md.ip_eth_type = ETHERTYPE_IPV4; + fabric_md.int_report_md.report_type = INT_REPORT_TYPE_DROP; + fabric_md.int_report_md.mirror_type = FabricMirrorType_t.INVALID; + hdr.drop_report_header.setValid(); + } + @hidden action parse_int_ingress_drop() { + set_common_int_drop_headers(); + fabric_md.int_report_md.bmd_type = BridgedMdType_t.INT_INGRESS_DROP; + fabric_md.int_report_md.encap_presence = fabric_md.bridged.base.encap_presence; + fabric_md.int_report_md.flow_hash = fabric_md.bridged.base.inner_hash; + hdr.drop_report_header.drop_reason = fabric_md.bridged.int_bmd.drop_reason; + hdr.report_fixed_header.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]; + hdr.common_report_header.ig_port = fabric_md.bridged.base.ig_port; + hdr.common_report_header.eg_port = 0; + hdr.common_report_header.queue_id = 0; + } + @hidden action parse_int_report_mirror() { + set_common_int_headers(); + fabric_md.bridged.bmd_type = fabric_md.int_report_md.bmd_type; + fabric_md.bridged.base.vlan_id = DEFAULT_VLAN_ID; + fabric_md.bridged.base.mpls_label = 0; + hdr.report_fixed_header.ig_tstamp = fabric_md.int_report_md.ig_tstamp; + hdr.common_report_header.ig_port = fabric_md.int_report_md.ig_port; + hdr.common_report_header.eg_port = fabric_md.int_report_md.eg_port; + hdr.common_report_header.queue_id = fabric_md.int_report_md.queue_id; + hdr.local_report_header.setValid(); + hdr.local_report_header.queue_occupancy = fabric_md.int_report_md.queue_occupancy; + hdr.local_report_header.eg_tstamp = fabric_md.int_report_md.eg_tstamp; + } + apply { + fabric_md.is_int_recirc = true; + hdr_v1model.ingress.vlan_tag.setInvalid(); + if (hdr_v1model.ingress.gtpu.isValid() || hdr_v1model.ingress.vxlan.isValid()) { + hdr_v1model.ingress.ipv4.setInvalid(); + hdr_v1model.ingress.tcp.setInvalid(); + hdr_v1model.ingress.udp.setInvalid(); + hdr_v1model.ingress.icmp.setInvalid(); + hdr_v1model.ingress.vxlan.setInvalid(); + hdr_v1model.ingress.inner_ethernet.setInvalid(); + hdr_v1model.ingress.inner_eth_type.setInvalid(); + hdr_v1model.ingress.gtpu.setInvalid(); + hdr_v1model.ingress.gtpu_options.setInvalid(); + hdr_v1model.ingress.gtpu_ext_psc.setInvalid(); + } + if ((bit<8>)fabric_md.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP) { + parse_int_ingress_drop(); + recirculate_preserving_field_list(NO_PRESERVATION); + } else { + parse_int_report_mirror(); + recirculate_preserving_field_list(PRESERVE_INT_MD); + } + hdr_v1model.egress = hdr; + } +} + +control FabricIngress(inout v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md, inout standard_metadata_t standard_md) { + LookupMdInit() lkp_md_init; + StatsIngress() stats; + PacketIoIngress() pkt_io; + Filtering() filtering; + Forwarding() forwarding; + PreNext() pre_next; + Acl() acl; + Next() next; + Hasher() hasher; + IngressSliceTcClassifier() slice_tc_classifier; + IngressQos() qos; + IntWatchlist() int_watchlist; + IntIngress() int_ingress; + apply { + mark_to_drop(standard_md); + if (standard_md.parser_error == error.PacketRejectedByParser) { + exit; + } + if (standard_md.instance_type == 4) { + fabric_md.ingress.bridged.base.ig_port = FAKE_V1MODEL_RECIRC_PORT; + } + lkp_md_init.apply(hdr.ingress, fabric_md.ingress.lkp); + pkt_io.apply(hdr.ingress, fabric_md.ingress, fabric_md.skip_egress, standard_md, fabric_md.recirc_preserved_egress_port); + int_watchlist.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.recirc_preserved_report_type); + stats.apply(fabric_md.ingress.lkp, fabric_md.ingress.bridged.base.ig_port, fabric_md.ingress.bridged.base.stats_flow_id); + slice_tc_classifier.apply(hdr.ingress, standard_md, fabric_md.ingress); + filtering.apply(hdr.ingress, fabric_md.ingress, standard_md); + if (!fabric_md.ingress.skip_forwarding) { + forwarding.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.drop_ctl); + } + hasher.apply(hdr.ingress, fabric_md.ingress); + if (!fabric_md.ingress.skip_next) { + pre_next.apply(hdr.ingress, fabric_md.ingress); + } + acl.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.recirc_preserved_egress_port, fabric_md.drop_ctl); + if (!fabric_md.ingress.skip_next) { + next.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.recirc_preserved_egress_port); + } + qos.apply(fabric_md.ingress, standard_md, fabric_md.drop_ctl); + int_ingress.apply(hdr.ingress, fabric_md.ingress, standard_md, fabric_md.drop_ctl); + fabric_md.egress.bridged = fabric_md.ingress.bridged; + if (fabric_md.drop_ctl == 1) { + mark_to_drop(standard_md); + } + } +} + +control FabricEgress(inout v1model_header_t hdr, inout fabric_v1model_metadata_t fabric_md, inout standard_metadata_t standard_md) { + StatsEgress() stats; + PacketIoEgress() pkt_io_egress; + EgressNextControl() egress_next; + EgressDscpRewriter() dscp_rewriter; + IntTnaEgressParserEmulator() parser_emulator; + IntEgress() int_egress; + apply { + fabric_md.egress.cpu_port = 0; + if (fabric_md.skip_egress) { + exit; + } + if (standard_md.instance_type == 2) { + fabric_md.egress.bridged.int_bmd.drop_reason = fabric_md.recirc_preserved_drop_reason; + fabric_md.egress.bridged.int_bmd.report_type = fabric_md.recirc_preserved_report_type; + parser_emulator.apply(hdr, fabric_md.egress, standard_md); + } + if ((bit<8>)fabric_md.egress.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP) { + parser_emulator.apply(hdr, fabric_md.egress, standard_md); + } + pkt_io_egress.apply(hdr.ingress, fabric_md.egress, standard_md, fabric_md.recirc_preserved_ingress_port); + stats.apply(fabric_md.egress.bridged.base.stats_flow_id, standard_md.egress_port, fabric_md.egress.bridged.bmd_type); + egress_next.apply(hdr.ingress, fabric_md.egress, standard_md, fabric_md.recirc_preserved_drop_reason, fabric_md.drop_ctl); + int_egress.apply(hdr, fabric_md, standard_md); + dscp_rewriter.apply(fabric_md.egress, standard_md, hdr.ingress); + if (fabric_md.do_upf_uplink_recirc) { + recirculate_preserving_field_list(NO_PRESERVATION); + } + if (fabric_md.drop_ctl == 1) { + mark_to_drop(standard_md); + } + } +} + +V1Switch(FabricParser(), FabricVerifyChecksum(), FabricIngress(), FabricEgress(), FabricComputeChecksum(), FabricDeparser()) main; + diff --git a/src/tests/p4-int-routing-acl/p4src/bmv2.json b/src/tests/p4-int-routing-acl/p4src/bmv2.json new file mode 100644 index 0000000000000000000000000000000000000000..80136b953ec822618243c8d325fbfbca201ab7cc --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/bmv2.json @@ -0,0 +1,21728 @@ +{ + "header_types" : [ + { + "name" : "scalars_0", + "id" : 0, + "fields" : [ + ["tmp_2", 16, false], + ["tmp_4", 1, false], + ["tmp_6", 16, false], + ["tmp_12", 3, false], + ["tmp_13", 8, false], + ["gtpu_ext_len_0", 8, false], + ["tmp_3", 16, false], + ["tmp_5", 16, false], + ["tmp_7", 4, false], + ["tmp_8", 112, false], + ["tmp_9", 112, false], + ["tmp_10", 112, false], + ["tmp_11", 64, false], + ["tmp_14", 32, false], + ["tmp_15", 32, false], + ["tmp_16", 32, false], + ["tmp_17", 32, false], + ["tmp_18", 48, false], + ["tmp_19", 48, false], + ["tmp_20", 16, false], + ["tmp_21", 32, false], + ["tmp_22", 32, false], + ["tmp_23", 8, false], + ["tmp_24", 16, false], + ["tmp_25", 16, false], + ["tmp_26", 32, false], + ["qos_packet_color", 2, false], + ["tmp_27", 32, false], + ["tmp_28", 32, false], + ["tmp_29", 32, false], + ["tmp_30", 32, false], + ["tmp_31", 32, false], + ["tmp_32", 32, false], + ["tmp_33", 32, false], + ["tmp_34", 32, false], + ["tmp_35", 32, false], + ["dscp_rewriter_tmp_dscp", 6, false], + ["int_egress_fabric_md_pkt_length", 16, false], + ["int_egress_egress_qid", 5, false], + ["int_egress_reg", 32, false], + ["key_0", 16, false], + ["key_1", 16, false], + ["userMetadata._skip_egress0", 1, false], + ["userMetadata._do_upf_uplink_recirc1", 1, false], + ["userMetadata._drop_ctl2", 1, false], + ["userMetadata._int_mirror_type3", 3, false], + ["userMetadata._ingress_ecmp_hash5", 32, false], + ["userMetadata._ingress_lkp_eth_dst6", 48, false], + ["userMetadata._ingress_lkp_eth_src7", 48, false], + ["userMetadata._ingress_lkp_eth_type8", 16, false], + ["userMetadata._ingress_lkp_vlan_id9", 12, false], + ["userMetadata._ingress_lkp_is_ipv410", 1, false], + ["userMetadata._ingress_lkp_ipv4_src11", 32, false], + ["userMetadata._ingress_lkp_ipv4_dst12", 32, false], + ["userMetadata._ingress_lkp_ip_proto13", 8, false], + ["userMetadata._ingress_lkp_l4_sport14", 16, false], + ["userMetadata._ingress_lkp_l4_dport15", 16, false], + ["userMetadata._ingress_lkp_icmp_type16", 8, false], + ["userMetadata._ingress_lkp_icmp_code17", 8, false], + ["userMetadata._ingress_routing_ipv4_dst18", 32, false], + ["userMetadata._ingress_skip_forwarding19", 1, false], + ["userMetadata._ingress_skip_next20", 1, false], + ["userMetadata._ingress_next_id21", 32, false], + ["userMetadata._ingress_egress_port_set22", 1, false], + ["userMetadata._ingress_punt_to_cpu23", 1, false], + ["userMetadata._ingress_ipv4_checksum_err24", 1, false], + ["userMetadata._ingress_inner_ipv4_checksum_err25", 1, false], + ["userMetadata._ingress_slice_id26", 4, false], + ["userMetadata._ingress_tc27", 2, false], + ["userMetadata._ingress_tc_unknown28", 1, false], + ["userMetadata._ingress_is_upf_hit29", 1, false], + ["userMetadata._ingress_upf_slice_id30", 4, false], + ["userMetadata._ingress_upf_tc31", 2, false], + ["userMetadata._ingress_upf_meter_color32", 2, false], + ["userMetadata._ingress_ig_port_type33", 2, false], + ["userMetadata._ingress_mirror_mirror_session_id34", 10, false], + ["userMetadata._ingress_mirror_bmd_type35", 8, false], + ["userMetadata._egress_cpu_port37", 9, false], + ["userMetadata._egress_int_md_hop_latency39", 32, false], + ["userMetadata._egress_int_md_timestamp40", 48, false], + ["userMetadata._egress_int_md_vlan_stripped41", 1, false], + ["userMetadata._egress_int_md_queue_report42", 1, false], + ["userMetadata._egress_int_ipv4_len43", 16, false], + ["userMetadata._egress_is_int_recirc44", 1, false], + ["userMetadata._egress_pkt_length45", 16, false], + ["userMetadata._recirc_preserved_report_type46", 3, false], + ["userMetadata._recirc_preserved_egress_port47", 9, false], + ["userMetadata._recirc_preserved_drop_reason48", 8, false], + ["userMetadata._recirc_preserved_ingress_port49", 9, false], + ["_padding_1", 5, false] + ] + }, + { + "name" : "fake_ethernet_t", + "id" : 1, + "fields" : [ + ["_pad0", 48, false], + ["_pad1", 48, false], + ["ether_type", 16, false] + ] + }, + { + "name" : "packet_out_header_t", + "id" : 2, + "fields" : [ + ["pad0", 7, false], + ["egress_port", 9, false], + ["pad1", 3, false], + ["queue_id", 5, false], + ["pad2", 5, false], + ["cpu_loopback_mode", 2, false], + ["do_forwarding", 1, false], + ["pad3", 16, false], + ["pad4", 48, false], + ["ether_type", 16, false] + ] + }, + { + "name" : "gtpu_t", + "id" : 3, + "fields" : [ + ["version", 3, false], + ["pt", 1, false], + ["spare", 1, false], + ["ex_flag", 1, false], + ["seq_flag", 1, false], + ["npdu_flag", 1, false], + ["msgtype", 8, false], + ["msglen", 16, false], + ["teid", 32, false] + ] + }, + { + "name" : "ethernet_t", + "id" : 4, + "fields" : [ + ["dst_addr", 48, false], + ["src_addr", 48, false] + ] + }, + { + "name" : "eth_type_t", + "id" : 5, + "fields" : [ + ["value", 16, false] + ] + }, + { + "name" : "ipv4_t", + "id" : 6, + "fields" : [ + ["version", 4, false], + ["ihl", 4, false], + ["dscp", 6, false], + ["ecn", 2, false], + ["total_len", 16, false], + ["identification", 16, false], + ["flags", 3, false], + ["frag_offset", 13, false], + ["ttl", 8, false], + ["protocol", 8, false], + ["hdr_checksum", 16, false], + ["src_addr", 32, false], + ["dst_addr", 32, false] + ] + }, + { + "name" : "udp_t", + "id" : 7, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false], + ["len", 16, false], + ["checksum", 16, false] + ] + }, + { + "name" : "report_fixed_header_t", + "id" : 8, + "fields" : [ + ["ver", 4, false], + ["nproto", 4, false], + ["dqf", 3, false], + ["rsvd", 15, false], + ["hw_id", 6, false], + ["seq_no", 32, false], + ["ig_tstamp", 32, false] + ] + }, + { + "name" : "common_report_header_t", + "id" : 9, + "fields" : [ + ["switch_id", 32, false], + ["pad1", 7, false], + ["ig_port", 9, false], + ["pad2", 7, false], + ["eg_port", 9, false], + ["pad3", 3, false], + ["queue_id", 5, false] + ] + }, + { + "name" : "local_report_header_t", + "id" : 10, + "fields" : [ + ["pad1", 5, false], + ["queue_occupancy", 19, false], + ["eg_tstamp", 32, false] + ] + }, + { + "name" : "drop_report_header_t", + "id" : 11, + "fields" : [ + ["drop_reason", 8, false], + ["pad", 16, false] + ] + }, + { + "name" : "mpls_t", + "id" : 12, + "fields" : [ + ["label", 20, false], + ["tc", 3, false], + ["bos", 1, false], + ["ttl", 8, false] + ] + }, + { + "name" : "bridged_metadata_t", + "id" : 13, + "fields" : [ + ["_bmd_type0", 8, false], + ["_base_inner_hash1", 32, false], + ["_base_mpls_label2", 20, false], + ["_base_ig_port3", 9, false], + ["_base_is_multicast4", 1, 0], + ["_base_fwd_type5", 3, false], + ["_base_vlan_id6", 12, false], + ["_base_encap_presence7", 2, false], + ["_base_mpls_ttl8", 8, false], + ["_base_ig_tstamp9", 48, false], + ["_base_ip_eth_type10", 16, false], + ["_base_stats_flow_id11", 10, false], + ["_base_slice_tc12", 6, false], + ["_int_bmd_report_type13", 3, false], + ["_int_bmd_mirror_session_id14", 10, false], + ["_int_bmd_drop_reason15", 8, false], + ["_int_bmd_queue_id16", 5, false], + ["_int_bmd_egress_port17", 9, false], + ["_int_bmd_wip_type18", 8, false], + ["__pad019", 1, false], + ["__pad220", 5, false] + ] + }, + { + "name" : "int_report_metadata_t", + "id" : 14, + "fields" : [ + ["bmd_type", 8, false], + ["_pad0", 5, false], + ["mirror_type", 3, false], + ["_pad1", 7, false], + ["ig_port", 9, false], + ["_pad2", 7, false], + ["eg_port", 9, false], + ["_pad3", 3, false], + ["queue_id", 5, false], + ["_pad4", 5, false], + ["queue_occupancy", 19, false], + ["ig_tstamp", 32, false], + ["eg_tstamp", 32, false], + ["drop_reason", 8, false], + ["ip_eth_type", 16, false], + ["_pad5", 6, false], + ["encap_presence", 2, false], + ["report_type", 3, false], + ["_pad6", 5, false], + ["flow_hash", 32, false] + ] + }, + { + "name" : "int_metadata_t", + "id" : 15, + "fields" : [ + ["hop_latency", 32, false], + ["timestamp", 48, false], + ["vlan_stripped", 1, 0], + ["queue_report", 1, 0], + ["_padding", 6, false] + ] + }, + { + "name" : "standard_metadata", + "id" : 16, + "fields" : [ + ["ingress_port", 9, false], + ["egress_spec", 9, false], + ["egress_port", 9, false], + ["instance_type", 32, false], + ["packet_length", 32, false], + ["enq_timestamp", 32, false], + ["enq_qdepth", 19, false], + ["deq_timedelta", 32, false], + ["deq_qdepth", 19, false], + ["ingress_global_timestamp", 48, false], + ["egress_global_timestamp", 48, false], + ["mcast_grp", 16, false], + ["egress_rid", 16, false], + ["checksum_error", 1, false], + ["parser_error", 32, false], + ["priority", 3, false], + ["_padding_0", 3, false] + ] + }, + { + "name" : "packet_in_header_t", + "id" : 17, + "fields" : [ + ["ingress_port", 9, false], + ["_pad0", 7, false] + ] + }, + { + "name" : "vlan_tag_t", + "id" : 18, + "fields" : [ + ["eth_type", 16, false], + ["pri", 3, false], + ["cfi", 1, false], + ["vlan_id", 12, false] + ] + }, + { + "name" : "ipv6_t", + "id" : 19, + "fields" : [ + ["version", 4, false], + ["traffic_class", 8, false], + ["flow_label", 20, false], + ["payload_len", 16, false], + ["next_hdr", 8, false], + ["hop_limit", 8, false], + ["src_addr", 128, false], + ["dst_addr", 128, false] + ] + }, + { + "name" : "tcp_t", + "id" : 20, + "fields" : [ + ["sport", 16, false], + ["dport", 16, false] + ] + }, + { + "name" : "icmp_t", + "id" : 21, + "fields" : [ + ["icmp_type", 8, false], + ["icmp_code", 8, false] + ] + }, + { + "name" : "gtpu_options_t", + "id" : 22, + "fields" : [ + ["seq_num", 16, false], + ["n_pdu_num", 8, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "gtpu_ext_psc_t", + "id" : 23, + "fields" : [ + ["len", 8, false], + ["type", 4, false], + ["spare0", 4, false], + ["ppp", 1, false], + ["rqi", 1, false], + ["qfi", 6, false], + ["next_ext", 8, false] + ] + }, + { + "name" : "vxlan_t", + "id" : 24, + "fields" : [ + ["flags", 8, false], + ["reserved", 24, false], + ["vni", 24, false], + ["reserved_2", 8, false] + ] + } + ], + "headers" : [ + { + "name" : "tmp", + "id" : 0, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "tmp_0", + "id" : 1, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "tmp_1", + "id" : 2, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "gtpu_0", + "id" : 3, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_ethernet", + "id" : 4, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_eth_type", + "id" : 5, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_ipv4", + "id" : 6, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_udp", + "id" : 7, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_report_fixed_header", + "id" : 8, + "header_type" : "report_fixed_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_common_report_header", + "id" : 9, + "header_type" : "common_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_local_report_header", + "id" : 10, + "header_type" : "local_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "parser_emulator_hdr_drop_report_header", + "id" : 11, + "header_type" : "drop_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_eth_type", + "id" : 12, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_mpls", + "id" : 13, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_ipv4", + "id" : 14, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_udp", + "id" : 15, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_report_fixed_header", + "id" : 16, + "header_type" : "report_fixed_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_common_report_header", + "id" : 17, + "header_type" : "common_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_local_report_header", + "id" : 18, + "header_type" : "local_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_drop_report_header", + "id" : 19, + "header_type" : "drop_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_hdr_eth_type", + "id" : 20, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_fabric_md_bridged", + "id" : 21, + "header_type" : "bridged_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_fabric_md_int_report_md", + "id" : 22, + "header_type" : "int_report_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "int_egress_fabric_md_int_md", + "id" : 23, + "header_type" : "int_metadata_t", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "scalars", + "id" : 24, + "header_type" : "scalars_0", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "standard_metadata", + "id" : 25, + "header_type" : "standard_metadata", + "metadata" : true, + "pi_omit" : true + }, + { + "name" : "_ingress_packet_out0", + "id" : 26, + "header_type" : "packet_out_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_packet_in1", + "id" : 27, + "header_type" : "packet_in_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_fake_ethernet2", + "id" : 28, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_ethernet3", + "id" : 29, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_vlan_tag4", + "id" : 30, + "header_type" : "vlan_tag_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_eth_type5", + "id" : 31, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_mpls6", + "id" : 32, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_ipv47", + "id" : 33, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_ipv68", + "id" : 34, + "header_type" : "ipv6_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_tcp9", + "id" : 35, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_udp10", + "id" : 36, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_icmp11", + "id" : 37, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_gtpu12", + "id" : 38, + "header_type" : "gtpu_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_gtpu_options13", + "id" : 39, + "header_type" : "gtpu_options_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_gtpu_ext_psc14", + "id" : 40, + "header_type" : "gtpu_ext_psc_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_vxlan15", + "id" : 41, + "header_type" : "vxlan_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_ethernet16", + "id" : 42, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_eth_type17", + "id" : 43, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_ipv418", + "id" : 44, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_tcp19", + "id" : 45, + "header_type" : "tcp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_udp20", + "id" : 46, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_inner_icmp21", + "id" : 47, + "header_type" : "icmp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_packet_in22", + "id" : 48, + "header_type" : "packet_in_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_fake_ethernet23", + "id" : 49, + "header_type" : "fake_ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_ethernet24", + "id" : 50, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_eth_type25", + "id" : 51, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_mpls26", + "id" : 52, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_ipv427", + "id" : 53, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_udp28", + "id" : 54, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_report_fixed_header29", + "id" : 55, + "header_type" : "report_fixed_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_common_report_header30", + "id" : 56, + "header_type" : "common_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_local_report_header31", + "id" : 57, + "header_type" : "local_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_drop_report_header32", + "id" : 58, + "header_type" : "drop_report_header_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_ethernet33", + "id" : 59, + "header_type" : "ethernet_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_vlan_tag34", + "id" : 60, + "header_type" : "vlan_tag_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_eth_type35", + "id" : 61, + "header_type" : "eth_type_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_mpls36", + "id" : 62, + "header_type" : "mpls_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_ipv437", + "id" : 63, + "header_type" : "ipv4_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_ipv638", + "id" : 64, + "header_type" : "ipv6_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_udp39", + "id" : 65, + "header_type" : "udp_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_ingress_bridged4", + "id" : 66, + "header_type" : "bridged_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_bridged36", + "id" : 67, + "header_type" : "bridged_metadata_t", + "metadata" : false, + "pi_omit" : true + }, + { + "name" : "_egress_int_report_md38", + "id" : 68, + "header_type" : "int_report_metadata_t", + "metadata" : false, + "pi_omit" : true + } + ], + "header_stacks" : [], + "header_union_types" : [], + "header_unions" : [], + "header_union_stacks" : [], + "field_lists" : [ + { + "id" : 1, + "name" : "field_list241", + "elements" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + } + ] + }, + { + "id" : 2, + "name" : "field_list231", + "elements" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_ingress_port49"] + } + ] + }, + { + "id" : 3, + "name" : "empty", + "elements" : [] + }, + { + "id" : 4, + "name" : "empty_0", + "elements" : [] + }, + { + "id" : 5, + "name" : "empty_1", + "elements" : [] + } + ], + "errors" : [ + ["NoError", 1], + ["PacketTooShort", 2], + ["NoMatch", 3], + ["StackOutOfBounds", 4], + ["HeaderTooShort", 5], + ["ParserTimeout", 6], + ["ParserInvalidArgument", 7], + ["PacketRejectedByParser", 8] + ], + "enums" : [], + "parsers" : [ + { + "name" : "parser", + "id" : 0, + "init_state" : "start", + "parse_states" : [ + { + "name" : "start", + "id" : 0, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_pkt_length45"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "packet_length"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0000ffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_bridged4" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_bmd_type0"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ig_port3"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_ingress_port49"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_port"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ig_tstamp9"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "ingress_global_timestamp"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_punt_to_cpu23"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_wip_type18"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_meter_color32"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + { + "type" : "lookahead", + "value" : [0, 112] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x40" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "_pad1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp", "ether_type"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_8"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0xbf02", + "mask" : null, + "next_state" : "parse_fake_ethernet" + }, + { + "type" : "hexstr", + "value" : "0xbf03", + "mask" : null, + "next_state" : "parse_fake_ethernet_and_accept" + }, + { + "type" : "hexstr", + "value" : "0xbf01", + "mask" : null, + "next_state" : "check_packet_out" + }, + { + "type" : "hexstr", + "value" : "0xbf04", + "mask" : null, + "next_state" : "parse_int_wip_ipv4" + }, + { + "type" : "hexstr", + "value" : "0xbf05", + "mask" : null, + "next_state" : "parse_int_wip_mpls" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_2"] + } + ] + }, + { + "name" : "check_packet_out", + "id" : 1, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + { + "type" : "lookahead", + "value" : [0, 112] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp_0" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x69" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x7f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "egress_port"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x60" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x5d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "queue_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x58" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x1f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad2"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x53" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x1f" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "cpu_loopback_mode"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x51" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "do_forwarding"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x50" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad3"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x40" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "pad4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_0", "ether_type"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x50" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_packet_out_and_accept" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "strip_packet_out" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_4"] + } + ] + }, + { + "name" : "parse_int_wip_ipv4", + "id" : 2, + "parser_ops" : [ + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ethernet3" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_eth_type5" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_wip_type18"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_ttl8"] + }, + { + "type" : "hexstr", + "value" : "0x41" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000070" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ipv4" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_int_wip_mpls", + "id" : 3, + "parser_ops" : [ + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ethernet3" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_eth_type5" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "hexstr", + "value" : "0x8847" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_wip_type18"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000070" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_mpls" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_packet_out_and_accept", + "id" : 4, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_packet_out0" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "strip_packet_out", + "id" : 5, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x00000070" + } + ], + "op" : "advance" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_fake_ethernet", + "id" : 6, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_fake_ethernet2" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + { + "type" : "lookahead", + "value" : [0, 112] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "tmp_1" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_1", "_pad0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x40" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_1", "_pad1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["tmp_1", "ether_type"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_6"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_10"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0xbf04", + "mask" : null, + "next_state" : "parse_int_wip_ipv4" + }, + { + "type" : "hexstr", + "value" : "0xbf05", + "mask" : null, + "next_state" : "parse_int_wip_mpls" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_ethernet" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_6"] + } + ] + }, + { + "name" : "parse_fake_ethernet_and_accept", + "id" : 7, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_fake_ethernet2" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_ethernet", + "id" : 8, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_ethernet3" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x88a8", + "mask" : null, + "next_state" : "parse_vlan_tag" + }, + { + "type" : "hexstr", + "value" : "0x8100", + "mask" : "0xefff", + "next_state" : "parse_vlan_tag" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_untagged" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_3"] + } + ] + }, + { + "name" : "parse_vlan_tag", + "id" : 9, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_vlan_tag4" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "vlan_id"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_5"] + }, + { + "type" : "lookahead", + "value" : [0, 16] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_5"] + } + ] + }, + { + "name" : "parse_untagged", + "id" : 10, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_eth_type" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_eth_type", + "id" : 11, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_eth_type5" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8847", + "mask" : null, + "next_state" : "parse_mpls" + }, + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_non_mpls" + }, + { + "type" : "hexstr", + "value" : "0x86dd", + "mask" : null, + "next_state" : "parse_non_mpls" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ] + }, + { + "name" : "parse_mpls", + "id" : 12, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_mpls6" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "field", + "value" : ["_ingress_mpls6", "label"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_ttl8"] + }, + { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_7"] + }, + { + "type" : "lookahead", + "value" : [0, 4] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x04", + "mask" : null, + "next_state" : "parse_ipv4" + }, + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_ipv6" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "reject_packet" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_7"] + } + ] + }, + { + "name" : "reject_packet", + "id" : 13, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "bool", + "value" : false + }, + { + "type" : "hexstr", + "value" : "0x8" + } + ], + "op" : "verify" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_non_mpls", + "id" : 14, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_ttl8"] + }, + { + "type" : "hexstr", + "value" : "0x41" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_ipv4" + }, + { + "type" : "hexstr", + "value" : "0x86dd", + "mask" : null, + "next_state" : "parse_ipv6" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ] + }, + { + "name" : "parse_ipv4", + "id" : 15, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_ipv47" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_routing_ipv4_dst18"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + } + ] + }, + { + "name" : "parse_ipv6", + "id" : 16, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_ipv68" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + }, + { + "type" : "hexstr", + "value" : "0x86dd" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_udp" + }, + { + "type" : "hexstr", + "value" : "0x3a", + "mask" : null, + "next_state" : "parse_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_ipv68", "next_hdr"] + } + ] + }, + { + "name" : "parse_icmp", + "id" : 17, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_icmp11" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_tcp", + "id" : 18, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_tcp9" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_udp", + "id" : 19, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_udp10" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + { + "type" : "lookahead", + "value" : [0, 64] + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "parameters" : [ + { + "type" : "header", + "value" : "gtpu_0" + } + ], + "op" : "add_header" + } + ], + "op" : "primitive" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "version"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "pt"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3c" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "spare"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3b" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "ex_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3a" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "seq_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x39" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "npdu_flag"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x38" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msgtype"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "msglen"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x20" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["gtpu_0", "teid"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3d" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_13"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["scalars", "tmp_11"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x30" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffffffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x086801ff", + "mask" : null, + "next_state" : "parse_gtpu" + }, + { + "type" : "hexstr", + "value" : "0x12b50000", + "mask" : "0xffff0000", + "next_state" : "parse_vxlan" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_udp10", "dport"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_12"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_13"] + } + ] + }, + { + "name" : "parse_gtpu", + "id" : 20, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_gtpu12" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x000000", + "mask" : null, + "next_state" : "set_gtpu_only" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_gtpu_options" + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_gtpu12", "ex_flag"] + }, + { + "type" : "field", + "value" : ["_ingress_gtpu12", "seq_flag"] + }, + { + "type" : "field", + "value" : ["_ingress_gtpu12", "npdu_flag"] + } + ] + }, + { + "name" : "set_gtpu_only", + "id" : 21, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : "parse_inner_ipv4" + } + ], + "transition_key" : [] + }, + { + "name" : "parse_gtpu_options", + "id" : 22, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_gtpu_options13" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + }, + { + "type" : "lookahead", + "value" : [0, 8] + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x8501", + "mask" : null, + "next_state" : "parse_gtpu_ext_psc" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_gtpu_options13", "next_ext"] + }, + { + "type" : "field", + "value" : ["scalars", "gtpu_ext_len_0"] + } + ] + }, + { + "name" : "parse_gtpu_ext_psc", + "id" : 23, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_gtpu_ext_psc14" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "op" : "set" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x00", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_gtpu_ext_psc14", "next_ext"] + } + ] + }, + { + "name" : "parse_vxlan", + "id" : 24, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_vxlan15" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_encap_presence7"] + }, + { + "type" : "hexstr", + "value" : "0x03" + } + ], + "op" : "set" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_ethernet16" + } + ], + "op" : "extract" + }, + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_eth_type17" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x0800", + "mask" : null, + "next_state" : "parse_inner_ipv4" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_inner_eth_type17", "value"] + } + ] + }, + { + "name" : "parse_inner_ipv4", + "id" : 25, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_ipv418" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "hexstr", + "value" : "0x06", + "mask" : null, + "next_state" : "parse_inner_tcp" + }, + { + "type" : "hexstr", + "value" : "0x11", + "mask" : null, + "next_state" : "parse_inner_udp" + }, + { + "type" : "hexstr", + "value" : "0x01", + "mask" : null, + "next_state" : "parse_inner_icmp" + }, + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [ + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + } + ] + }, + { + "name" : "parse_inner_tcp", + "id" : 26, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_tcp19" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_udp", + "id" : 27, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_udp20" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + }, + { + "name" : "parse_inner_icmp", + "id" : 28, + "parser_ops" : [ + { + "parameters" : [ + { + "type" : "regular", + "value" : "_ingress_inner_icmp21" + } + ], + "op" : "extract" + } + ], + "transitions" : [ + { + "type" : "default", + "value" : null, + "mask" : null, + "next_state" : null + } + ], + "transition_key" : [] + } + ] + } + ], + "parse_vsets" : [], + "deparsers" : [ + { + "name" : "deparser", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/parser.p4", + "line" : 321, + "column" : 8, + "source_fragment" : "FabricDeparser" + }, + "order" : ["_ingress_fake_ethernet2", "_ingress_packet_in1", "_egress_report_ethernet24", "_egress_report_eth_type25", "_egress_report_mpls26", "_egress_report_ipv427", "_egress_report_udp28", "_egress_report_fixed_header29", "_egress_common_report_header30", "_egress_local_report_header31", "_egress_drop_report_header32", "_ingress_ethernet3", "_ingress_vlan_tag4", "_ingress_eth_type5", "_ingress_mpls6", "_ingress_ipv47", "_ingress_ipv68", "_ingress_tcp9", "_ingress_udp10", "_ingress_icmp11", "_ingress_gtpu12", "_ingress_gtpu_options13", "_ingress_gtpu_ext_psc14", "_ingress_vxlan15", "_ingress_inner_ethernet16", "_ingress_inner_eth_type17", "_ingress_inner_ipv418", "_ingress_inner_tcp19", "_ingress_inner_udp20", "_ingress_inner_icmp21"], + "primitives" : [] + } + ], + "meter_arrays" : [ + { + "name" : "FabricIngress.qos.slice_tc_meter", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 104, + "column" : 41, + "source_fragment" : "slice_tc_meter" + }, + "is_direct" : false, + "size" : 64, + "rate_count" : 2, + "type" : "bytes" + } + ], + "counter_arrays" : [ + { + "name" : "FabricIngress.stats.flow_counter", + "id" : 0, + "is_direct" : true, + "binding" : "FabricIngress.stats.flows", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 14, + "column" : 50, + "source_fragment" : "flow_counter" + } + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan_counter", + "id" : 1, + "is_direct" : true, + "binding" : "FabricIngress.filtering.ingress_port_vlan", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 17, + "column" : 50, + "source_fragment" : "ingress_port_vlan_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier_counter", + "id" : 2, + "is_direct" : true, + "binding" : "FabricIngress.filtering.fwd_classifier", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 71, + "column" : 50, + "source_fragment" : "fwd_classifier_counter" + } + }, + { + "name" : "FabricIngress.filtering.fwd_type_counter", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 78, + "column" : 46, + "source_fragment" : "fwd_type_counter" + }, + "size" : 8, + "is_direct" : false + }, + { + "name" : "FabricIngress.forwarding.bridging_counter", + "id" : 4, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.bridging", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 29, + "column" : 50, + "source_fragment" : "bridging_counter" + } + }, + { + "name" : "FabricIngress.forwarding.mpls_counter", + "id" : 5, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.mpls", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 64, + "column" : 50, + "source_fragment" : "mpls_counter" + } + }, + { + "name" : "FabricIngress.forwarding.routing_v4_counter", + "id" : 6, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.routing_v4", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 98, + "column" : 50, + "source_fragment" : "routing_v4_counter" + } + }, + { + "name" : "FabricIngress.forwarding.routing_v6_counter", + "id" : 7, + "is_direct" : true, + "binding" : "FabricIngress.forwarding.routing_v6", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 142, + "column" : 50, + "source_fragment" : "routing_v6_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls_counter", + "id" : 8, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_mpls", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 15, + "column" : 50, + "source_fragment" : "next_mpls_counter" + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan_counter", + "id" : 9, + "is_direct" : true, + "binding" : "FabricIngress.pre_next.next_vlan", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 39, + "column" : 50, + "source_fragment" : "next_vlan_counter" + } + }, + { + "name" : "FabricIngress.acl.acl_counter", + "id" : 10, + "is_direct" : true, + "binding" : "FabricIngress.acl.acl", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 19, + "column" : 50, + "source_fragment" : "acl_counter" + } + }, + { + "name" : "FabricIngress.next.simple_counter", + "id" : 11, + "is_direct" : true, + "binding" : "FabricIngress.next.simple", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 76, + "column" : 50, + "source_fragment" : "simple_counter" + } + }, + { + "name" : "FabricIngress.next.hashed_counter", + "id" : 12, + "is_direct" : true, + "binding" : "FabricIngress.next.hashed", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 115, + "column" : 50, + "source_fragment" : "hashed_counter" + } + }, + { + "name" : "FabricIngress.next.multicast_counter", + "id" : 13, + "is_direct" : true, + "binding" : "FabricIngress.next.multicast", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 148, + "column" : 50, + "source_fragment" : "multicast_counter" + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier_stats", + "id" : 14, + "is_direct" : true, + "binding" : "FabricIngress.slice_tc_classifier.classifier", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 20, + "column" : 40, + "source_fragment" : "classifier_stats" + } + }, + { + "name" : "FabricIngress.qos.queues_stats", + "id" : 15, + "is_direct" : true, + "binding" : "FabricIngress.qos.queues", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 106, + "column" : 40, + "source_fragment" : "queues_stats" + } + }, + { + "name" : "FabricIngress.int_watchlist.watchlist_counter", + "id" : 16, + "is_direct" : true, + "binding" : "FabricIngress.int_watchlist.watchlist", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 15, + "column" : 50, + "source_fragment" : "watchlist_counter" + } + }, + { + "name" : "FabricIngress.int_ingress.drop_report_counter", + "id" : 17, + "is_direct" : true, + "binding" : "FabricIngress.int_ingress.drop_report", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 64, + "column" : 50, + "source_fragment" : "drop_report_counter" + } + }, + { + "name" : "FabricEgress.stats.flow_counter", + "id" : 18, + "is_direct" : true, + "binding" : "FabricEgress.stats.flows", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 47, + "column" : 50, + "source_fragment" : "flow_counter" + } + }, + { + "name" : "FabricEgress.egress_next.egress_vlan_counter", + "id" : 19, + "is_direct" : true, + "binding" : "FabricEgress.egress_next.egress_vlan", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 241, + "column" : 50, + "source_fragment" : "egress_vlan_counter" + } + }, + { + "name" : "FabricEgress.int_egress.report_counter", + "id" : 20, + "is_direct" : true, + "binding" : "FabricEgress.int_egress.report", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 131, + "column" : 50, + "source_fragment" : "report_counter" + } + }, + { + "name" : "FabricEgress.int_egress.int_metadata_counter", + "id" : 21, + "is_direct" : true, + "binding" : "FabricEgress.int_egress.int_metadata", + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 132, + "column" : 50, + "source_fragment" : "int_metadata_counter" + } + } + ], + "register_arrays" : [ + { + "name" : "FabricEgress.int_egress.seq_number", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 138, + "column" : 28, + "source_fragment" : "seq_number" + }, + "size" : 1024, + "bitwidth" : 32 + } + ], + "calculations" : [ + { + "name" : "calc", + "id" : 0, + "algo" : "crc32", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_15"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_16"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_17"] + } + ] + }, + { + "name" : "calc_0", + "id" : 1, + "algo" : "crc32", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_18"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_19"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_20"] + } + ] + }, + { + "name" : "calc_1", + "id" : 2, + "algo" : "crc32", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_21"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_22"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_23"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_24"] + }, + { + "type" : "field", + "value" : ["scalars", "tmp_25"] + } + ] + }, + { + "name" : "calc_2", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ] + }, + { + "name" : "calc_3", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 73, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dst_addr"] + } + ] + }, + { + "name" : "calc_4", + "id" : 5, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 92, + "column" : 8, + "source_fragment" : "update_checksum(hdr.egress.report_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_egress_report_ipv427", "version"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "ihl"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "dscp"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "ecn"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "total_len"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "identification"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "flags"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "ttl"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "protocol"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "src_addr"] + }, + { + "type" : "field", + "value" : ["_egress_report_ipv427", "dst_addr"] + } + ] + }, + { + "name" : "calc_5", + "id" : 6, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 13, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ] + }, + { + "name" : "calc_6", + "id" : 7, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "algo" : "csum16", + "input" : [ + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "version"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ihl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dscp"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ecn"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "total_len"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "identification"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "flags"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "frag_offset"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "ttl"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "src_addr"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dst_addr"] + } + ] + } + ], + "learn_lists" : [], + "actions" : [ + { + "name" : "nop", + "id" : 0, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 1, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 2, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 3, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 4, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 5, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "NoAction", + "id" : 6, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.stats.count", + "id" : 7, + "runtime_data" : [ + { + "name" : "flow_id", + "bitwidth" : 10 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_stats_flow_id11"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 17, + "column" : 22, + "source_fragment" : "= flow_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pkt_io.do_packet_out", + "id" : 8, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_packet_out0", "egress_port"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 13, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)hdr.packet_out.egress_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "field", + "value" : ["_ingress_packet_out0", "egress_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 14, + "column" : 37, + "source_fragment" : "= hdr.packet_out.egress_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 15, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_packet_out0" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "hdr.packet_out.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_egress0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 17, + "column" : 20, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_bridged4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 19, + "column" : 8, + "source_fragment" : "fabric_md.bridged.setInvalid()" + } + }, + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "FabricIngress.filtering.deny", + "id" : 9, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_forwarding19"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 22, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 23, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ig_port_type33"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 100, + "column" : 14, + "source_fragment" : "0x0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0x37" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 250, + "column" : 41, + "source_fragment" : "55, ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit", + "id" : 10, + "runtime_data" : [ + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ig_port_type33"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 33, + "column" : 31, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.permit_with_internal_vlan", + "id" : 11, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + }, + { + "name" : "port_type", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.vlan_id = vlan_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ig_port_type33"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 33, + "column" : 31, + "source_fragment" : "= port_type; ..." + } + } + ] + }, + { + "name" : "FabricIngress.filtering.set_forwarding_type", + "id" : 12, + "runtime_data" : [ + { + "name" : "fwd_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 74, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.fwd_type = fwd_type" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 13, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 14, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 15, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_int_drop_reason", + "id" : 16, + "runtime_data" : [ + { + "name" : "drop_reason", + "bitwidth" : 8 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.drop_reason = (IntDropReason_t)drop_reason" + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_bridging", + "id" : 17, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.pop_mpls_and_next", + "id" : 18, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_mpls6" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 67, + "column" : 8, + "source_fragment" : "hdr.mpls.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ip_eth_type10"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 68, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 69, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v4", + "id" : 19, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.nop_routing_v4", + "id" : 20, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.forwarding.drop_routing_v4", + "id" : 21, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 111, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 113, + "column" : 17, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.set_next_id_routing_v6", + "id" : 22, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 23, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + } + ] + }, + { + "name" : "FabricIngress.forwarding.drop_routing_v6", + "id" : 23, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 150, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 152, + "column" : 17, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_mpls_label", + "id" : 24, + "runtime_data" : [ + { + "name" : "label", + "bitwidth" : 20 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 18, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = label" + } + } + ] + }, + { + "name" : "FabricIngress.pre_next.set_vlan", + "id" : 25, + "runtime_data" : [ + { + "name" : "vlan_id", + "bitwidth" : 12 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 42, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.vlan_id = vlan_id" + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_next_id_acl", + "id" : 26, + "runtime_data" : [ + { + "name" : "next_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_next_id21"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 22, + "column" : 26, + "source_fragment" : "= next_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 26, + "column" : 28, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 27, + "column" : 17, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.copy_to_cpu", + "id" : 27, + "runtime_data" : [], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x000001ff" + }, + { + "type" : "hexstr", + "value" : "0x2" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "clone_preserving_field_list(CloneType.I2E, ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.punt_to_cpu", + "id" : 28, + "runtime_data" : [], + "primitives" : [ + { + "op" : "clone_ingress_pkt_to_egress", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x000001ff" + }, + { + "type" : "hexstr", + "value" : "0x2" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "clone_preserving_field_list(CloneType.I2E, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 40, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_punt_to_cpu23"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 41, + "column" : 30, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 42, + "column" : 17, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.drop", + "id" : 29, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 46, + "column" : 17, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 47, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0x50" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 252, + "column" : 27, + "source_fragment" : "80, ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.set_output_port", + "id" : 30, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 62, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t) port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 63, + "column" : 37, + "source_fragment" : "= port_num; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 64, + "column" : 34, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 65, + "column" : 28, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 66, + "column" : 17, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.acl.nop_acl", + "id" : 31, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricIngress.next.output_simple", + "id" : 32, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.routing_simple", + "id" : 33, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 23, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.output_hashed", + "id" : 34, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.routing_hashed", + "id" : 35, + "runtime_data" : [ + { + "name" : "port_num", + "bitwidth" : 9 + }, + { + "name" : "smac", + "bitwidth" : 48 + }, + { + "name" : "dmac", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 23, + "column" : 8, + "source_fragment" : "hdr.ethernet.src_addr = smac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 28, + "column" : 8, + "source_fragment" : "hdr.ethernet.dst_addr = dmac; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 16, + "column" : 8, + "source_fragment" : "standard_md.egress_spec = (PortId_t)port_num" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_egress_port47"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 17, + "column" : 37, + "source_fragment" : "= port_num; // Needed by INT. ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_egress_port_set22"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 18, + "column" : 34, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.next.set_mcast_group_id", + "id" : 36, + "runtime_data" : [ + { + "name" : "group_id", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 151, + "column" : 8, + "source_fragment" : "standard_md.mcast_grp = group_id" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_is_multicast4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 152, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.is_multicast = true" + } + } + ] + }, + { + "name" : "FabricIngress.next.reset_mcast_group_id", + "id" : 37, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "mcast_grp"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 157, + "column" : 8, + "source_fragment" : "standard_md.mcast_grp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_is_multicast4"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 158, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.is_multicast = false" + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.set_slice_id_tc", + "id" : 38, + "runtime_data" : [ + { + "name" : "slice_id", + "bitwidth" : 4 + }, + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 23, + "column" : 27, + "source_fragment" : "= slice_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 24, + "column" : 21, + "source_fragment" : "= tc; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 25, + "column" : 29, + "source_fragment" : "= false; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.no_classification", + "id" : 39, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 57, + "column" : 36, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 58, + "column" : 24, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 25, + "column" : 29, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 31, + "column" : 29, + "source_fragment" : "= true; ..." + } + } + ] + }, + { + "name" : "FabricIngress.slice_tc_classifier.trust_dscp", + "id" : 40, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 38, + "column" : 27, + "source_fragment" : "= hdr.ipv4.dscp[4 +2 -1:2]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 39, + "column" : 21, + "source_fragment" : "= hdr.ipv4.dscp[2 -1:0]; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc_unknown28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 40, + "column" : 29, + "source_fragment" : "= false; ..." + } + } + ] + }, + { + "name" : "FabricIngress.qos.use_upf", + "id" : 41, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_slice_id30"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_tc31"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 81, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.slice_tc = fabric_md.upf_slice_id++fabric_md.upf_tc" + } + } + ] + }, + { + "name" : "FabricIngress.qos.use_default", + "id" : 42, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_slice_id26"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_tc27"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 86, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.slice_tc = fabric_md.slice_id++fabric_md.tc" + } + } + ] + }, + { + "name" : "FabricIngress.qos.set_queue", + "id" : 43, + "runtime_data" : [ + { + "name" : "qid", + "bitwidth" : 5 + } + ], + "primitives" : [] + }, + { + "name" : "FabricIngress.qos.meter_drop", + "id" : 44, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 115, + "column" : 17, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_drop_reason15"] + }, + { + "type" : "hexstr", + "value" : "0xa0" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 269, + "column" : 36, + "source_fragment" : "160, ..." + } + } + ] + }, + { + "name" : "FabricIngress.qos.set_default_tc", + "id" : 45, + "runtime_data" : [ + { + "name" : "tc", + "bitwidth" : 2 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "<<", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x0f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.slice_tc = fabric_md.bridged.base.slice_tc[4 +2 -1:2]++tc" + } + } + ] + }, + { + "name" : "FabricIngress.int_watchlist.mark_to_report", + "id" : 46, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 223, + "column" : 45, + "source_fragment" : "1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 223, + "column" : 45, + "source_fragment" : "1; ..." + } + } + ] + }, + { + "name" : "FabricIngress.int_watchlist.no_report", + "id" : 47, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.int_watchlist.no_report_collector", + "id" : 48, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + } + ] + }, + { + "name" : "FabricIngress.int_ingress.report_drop", + "id" : 49, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_bmd_type0"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 169, + "column" : 23, + "source_fragment" : "4, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 221, + "column" : 45, + "source_fragment" : "4; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 147, + "column" : 34, + "source_fragment" : "12w4094; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 79, + "column" : 17, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + { + "type" : "hexstr", + "value" : "0x01fe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/define_v1model.p4", + "line" : 36, + "column" : 42, + "source_fragment" : "510; ..." + } + } + ] + }, + { + "name" : "fabric_v1model64", + "id" : 50, + "runtime_data" : [], + "primitives" : [ + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 64, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "fabric_v1model61", + "id" : 51, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_md)" + } + } + ] + }, + { + "name" : "fabric_v1model70", + "id" : 52, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_ig_port3"] + }, + { + "type" : "hexstr", + "value" : "0x01fe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/define_v1model.p4", + "line" : 36, + "column" : 42, + "source_fragment" : "510; ..." + } + } + ] + }, + { + "name" : "lookup_md_init21", + "id" : 53, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_vlan_id9"] + }, + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "vlan_id"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 21, + "column" : 27, + "source_fragment" : "= hdr.vlan_tag.vlan_id; ..." + } + } + ] + }, + { + "name" : "lookup_md_init15", + "id" : 54, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_eth_dst6"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 15, + "column" : 23, + "source_fragment" : "= hdr.ethernet.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_eth_src7"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 16, + "column" : 23, + "source_fragment" : "= hdr.ethernet.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_eth_type8"] + }, + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 17, + "column" : 24, + "source_fragment" : "= hdr.eth_type.value; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_vlan_id9"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 19, + "column" : 23, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "lookup_md_init38", + "id" : 55, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_tcp19", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_tcp19", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 39, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init41", + "id" : 56, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_udp20", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_udp20", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 42, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init44", + "id" : 57, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_icmp21", "icmp_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_icmp21", "icmp_code"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 45, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_code; ..." + } + } + ] + }, + { + "name" : "lookup_md_init33", + "id" : 58, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 33, + "column" : 27, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 34, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 35, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + }, + { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "protocol"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 36, + "column" : 28, + "source_fragment" : "= hdr.inner_ipv4.protocol; ..." + } + } + ] + }, + { + "name" : "lookup_md_init53", + "id" : 59, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_tcp9", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_tcp9", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 54, + "column" : 32, + "source_fragment" : "= hdr.tcp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init56", + "id" : 60, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "field", + "value" : ["_ingress_udp10", "sport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "field", + "value" : ["_ingress_udp10", "dport"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 57, + "column" : 32, + "source_fragment" : "= hdr.udp.dport; ..." + } + } + ] + }, + { + "name" : "lookup_md_init59", + "id" : 61, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"] + }, + { + "type" : "field", + "value" : ["_ingress_icmp11", "icmp_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"] + }, + { + "type" : "field", + "value" : ["_ingress_icmp11", "icmp_code"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 60, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_code; ..." + } + } + ] + }, + { + "name" : "lookup_md_init48", + "id" : 62, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 48, + "column" : 27, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 49, + "column" : 28, + "source_fragment" : "= hdr.ipv4.src_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 50, + "column" : 28, + "source_fragment" : "= hdr.ipv4.dst_addr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "protocol"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 51, + "column" : 28, + "source_fragment" : "= hdr.ipv4.protocol; ..." + } + } + ] + }, + { + "name" : "lookup_md_init24", + "id" : 63, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : false + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 24, + "column" : 23, + "source_fragment" : "= false; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 25, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 26, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 27, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 28, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 29, + "column" : 24, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 30, + "column" : 25, + "source_fragment" : "= 0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 31, + "column" : 25, + "source_fragment" : "= 0; ..." + } + } + ] + }, + { + "name" : "filtering100", + "id" : 64, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_14"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 100, + "column" : 31, + "source_fragment" : "(bit<32>)fabric_md.bridged.base.fwd_type" + } + }, + { + "op" : "count", + "parameters" : [ + { + "type" : "counter_array", + "value" : "FabricIngress.filtering.fwd_type_counter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_14"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 100, + "column" : 8, + "source_fragment" : "fwd_type_counter.count((bit<32>)fabric_md.bridged.base.fwd_type)" + } + } + ] + }, + { + "name" : "hasher39", + "id" : 65, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_15"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 43, + "column" : 17, + "source_fragment" : "hdr.ipv4.src_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_16"] + }, + { + "type" : "field", + "value" : ["_ingress_ipv47", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 43, + "column" : 36, + "source_fragment" : "hdr.ipv4.dst_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_17"] + }, + { + "type" : "field", + "value" : ["_ingress_gtpu12", "teid"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 43, + "column" : 55, + "source_fragment" : "hdr.gtpu.teid" + } + }, + { + "op" : "modify_field_with_hash_based_offset", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + }, + { + "type" : "calculation", + "value" : "calc" + }, + { + "type" : "hexstr", + "value" : "0xffffffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 39, + "column" : 12, + "source_fragment" : "hash( ..." + } + } + ] + }, + { + "name" : "hasher50", + "id" : 66, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + }, + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 50, + "column" : 32, + "source_fragment" : "= fabric_md.bridged.base.inner_hash; ..." + } + } + ] + }, + { + "name" : "hasher66", + "id" : 67, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_inner_hash1"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 66, + "column" : 12, + "source_fragment" : "fabric_md.bridged.base.inner_hash = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_18"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "dst_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 71, + "column" : 17, + "source_fragment" : "hdr.ethernet.dst_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_19"] + }, + { + "type" : "field", + "value" : ["_ingress_ethernet3", "src_addr"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 71, + "column" : 40, + "source_fragment" : "hdr.ethernet.src_addr" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_20"] + }, + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 71, + "column" : 63, + "source_fragment" : "hdr.eth_type.value" + } + }, + { + "op" : "modify_field_with_hash_based_offset", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + }, + { + "type" : "calculation", + "value" : "calc_0" + }, + { + "type" : "hexstr", + "value" : "0xffffffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 67, + "column" : 12, + "source_fragment" : "hash( ..." + } + } + ] + }, + { + "name" : "hasher17", + "id" : 68, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_21"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_22"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_23"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_24"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_25"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + } + }, + { + "op" : "modify_field_with_hash_based_offset", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_inner_hash1"] + }, + { + "type" : "hexstr", + "value" : "0x00000000" + }, + { + "type" : "calculation", + "value" : "calc_1" + }, + { + "type" : "hexstr", + "value" : "0xffffffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "hash( ..." + } + } + ] + }, + { + "name" : "slicing174", + "id" : 69, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_26"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_slice_tc12"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 174, + "column" : 41, + "source_fragment" : "(bit<32>) fabric_md.bridged.base.slice_tc" + } + }, + { + "op" : "execute_meter", + "parameters" : [ + { + "type" : "meter_array", + "value" : "FabricIngress.qos.slice_tc_meter" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_26"] + }, + { + "type" : "field", + "value" : ["scalars", "qos_packet_color"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) fabric_md.bridged.base.slice_tc, packet_color)" + } + } + ] + }, + { + "name" : "slicing177", + "id" : 70, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "qos_packet_color"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/define_v1model.p4", + "line" : 25, + "column" : 10, + "source_fragment" : "2 ..." + } + } + ] + }, + { + "name" : "int112", + "id" : 71, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_egress_port17"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 112, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.egress_port = standard_md.egress_spec" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_bridged4", "_int_bmd_queue_id16"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 113, + "column" : 8, + "source_fragment" : "fabric_md.bridged.int_bmd.queue_id = 0" + } + } + ] + }, + { + "name" : "fabric_v1model110", + "id" : 72, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 110, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + } + } + ] + }, + { + "name" : "fabric_v1model106", + "id" : 73, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_bridged36" + }, + { + "type" : "header", + "value" : "_ingress_bridged4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 106, + "column" : 8, + "source_fragment" : "fabric_md.egress.bridged = fabric_md" + } + } + ] + }, + { + "name" : "nop", + "id" : 74, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 75, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 76, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 77, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 78, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "nop", + "id" : 79, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.stats.count", + "id" : 80, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.pkt_io_egress.set_switch_info", + "id" : 81, + "runtime_data" : [ + { + "name" : "cpu_port", + "bitwidth" : 9 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_cpu_port37"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "local", + "value" : 0 + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 36, + "column" : 27, + "source_fragment" : "= (PortId_t)cpu_port; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_mpls_if_present", + "id" : 82, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_mpls6" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.mpls.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ip_eth_type10"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 200, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.bridged" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.set_mpls", + "id" : 83, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_mpls6" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.mpls.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "label"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 206, + "column" : 8, + "source_fragment" : "hdr.mpls.label = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "tc"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.mpls.tc = 3w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 208, + "column" : 8, + "source_fragment" : "hdr.mpls.bos = 1w1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_ttl8"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 209, + "column" : 8, + "source_fragment" : "hdr.mpls.ttl = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_eth_type5", "value"] + }, + { + "type" : "hexstr", + "value" : "0x8847" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 112, + "column" : 31, + "source_fragment" : "0x8847; ..." + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.push_vlan", + "id" : 84, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 217, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x8100" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 111, + "column" : 31, + "source_fragment" : "0x8100; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "vlan_id"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_vlan_id6"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 221, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.vlan_id = fabric_md.bridged" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.pop_vlan", + "id" : 85, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 249, + "column" : 8, + "source_fragment" : "hdr.vlan_tag.setInvalid()" + } + } + ] + }, + { + "name" : "FabricEgress.egress_next.drop", + "id" : 86, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 254, + "column" : 17, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x82" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 257, + "column" : 35, + "source_fragment" : "130, ..." + } + } + ] + }, + { + "name" : "FabricEgress.dscp_rewriter.rewrite", + "id" : 87, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.dscp_rewriter.clear", + "id" : 88, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "tmp_dscp = 0" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_ingress_drop", + "id" : 89, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_int_report_md38" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 79, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ip_eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 114, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "report_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 221, + "column" : 45, + "source_fragment" : "4; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "mirror_type"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 85, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 169, + "column" : 23, + "source_fragment" : "4, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "encap_presence"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_encap_presence7"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 93, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.encap_presence = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "flow_hash"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 94, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.flow_hash = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 97, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 99, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_port3"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 101, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 102, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 103, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = 0" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_ingress_drop", + "id" : 90, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_int_report_md38" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 79, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ip_eth_type"] + }, + { + "type" : "hexstr", + "value" : "0x0800" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 114, + "column" : 31, + "source_fragment" : "0x0800; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "report_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 221, + "column" : 45, + "source_fragment" : "4; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "mirror_type"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 85, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 169, + "column" : 23, + "source_fragment" : "4, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "encap_presence"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_encap_presence7"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 93, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.encap_presence = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_int_report_md38", "flow_hash"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 94, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.flow_hash = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 97, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 99, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_port3"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 101, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.bridged" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 102, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 103, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = 0" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_report_mirror", + "id" : 91, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 110, + "column" : 8, + "source_fragment" : "fabric_md.bridged.bmd_type = fabric_md.int_report_md.bmd_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 147, + "column" : 34, + "source_fragment" : "12w4094; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 112, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 118, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.int_report_md.ig_tstamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 121, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.int_report_md.ig_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 122, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = fabric_md.int_report_md.eg_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_id"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 123, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = fabric_md.int_report_md.queue_id" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 126, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "queue_occupancy"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_occupancy"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 127, + "column" : 8, + "source_fragment" : "hdr.local_report_header.queue_occupancy = fabric_md.int_report_md.queue_occupancy" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "eg_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 128, + "column" : 8, + "source_fragment" : "hdr.local_report_header.eg_tstamp = fabric_md.int_report_md.eg_tstamp" + } + } + ] + }, + { + "name" : "FabricEgress.parser_emulator.parse_int_report_mirror", + "id" : 92, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 20, + "column" : 8, + "source_fragment" : "hdr.report_ethernet.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 25, + "column" : 8, + "source_fragment" : "hdr.report_eth_type.setValid()" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 37, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "version"] + }, + { + "type" : "hexstr", + "value" : "0x04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 38, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.version = 4w4" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ihl"] + }, + { + "type" : "hexstr", + "value" : "0x05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 39, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ihl = 4w5" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "dscp"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 40, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dscp = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ecn"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 41, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.ecn = 2w0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "flags"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 44, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.flags = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "frag_offset"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 45, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.frag_offset = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 150, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_ipv4", "protocol"] + }, + { + "type" : "hexstr", + "value" : "0x11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 134, + "column" : 25, + "source_fragment" : "17; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 53, + "column" : 8, + "source_fragment" : "hdr.report_udp.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_udp", "sport"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 54, + "column" : 8, + "source_fragment" : "hdr.report_udp.sport = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 60, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ver"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ver = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "rsvd"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 66, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.rsvd = 0" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 71, + "column" : 8, + "source_fragment" : "hdr.common_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "bmd_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 110, + "column" : 8, + "source_fragment" : "fabric_md.bridged.bmd_type = fabric_md.int_report_md.bmd_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_vlan_id6"] + }, + { + "type" : "hexstr", + "value" : "0x0ffe" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 147, + "column" : 34, + "source_fragment" : "12w4094; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + }, + { + "type" : "hexstr", + "value" : "0x000000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 112, + "column" : 8, + "source_fragment" : "fabric_md.bridged.base.mpls_label = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_report_fixed_header", "ig_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 118, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.ig_tstamp = fabric_md.int_report_md.ig_tstamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "ig_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "ig_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 121, + "column" : 8, + "source_fragment" : "hdr.common_report_header.ig_port = fabric_md.int_report_md.ig_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "eg_port"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 122, + "column" : 8, + "source_fragment" : "hdr.common_report_header.eg_port = fabric_md.int_report_md.eg_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_common_report_header", "queue_id"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_id"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 123, + "column" : 8, + "source_fragment" : "hdr.common_report_header.queue_id = fabric_md.int_report_md.queue_id" + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 126, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "queue_occupancy"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "queue_occupancy"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 127, + "column" : 8, + "source_fragment" : "hdr.local_report_header.queue_occupancy = fabric_md.int_report_md.queue_occupancy" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["parser_emulator_hdr_local_report_header", "eg_tstamp"] + }, + { + "type" : "field", + "value" : ["_egress_int_report_md38", "eg_tstamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 128, + "column" : 8, + "source_fragment" : "hdr.local_report_header.eg_tstamp = fabric_md.int_report_md.eg_tstamp" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.check_quota", + "id" : 93, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.int_egress.reset_quota", + "id" : 94, + "runtime_data" : [], + "primitives" : [] + }, + { + "name" : "FabricEgress.int_egress.set_config", + "id" : 95, + "runtime_data" : [ + { + "name" : "hop_latency_mask", + "bitwidth" : 32 + }, + { + "name" : "timestamp_mask", + "bitwidth" : 48 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + "right" : { + "type" : "local", + "value" : 0 + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 179, + "column" : 8, + "source_fragment" : "fabric_md.int_md.hop_latency = fabric_md.int_md.hop_latency & hop_latency_mask" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + "right" : { + "type" : "local", + "value" : 1 + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 180, + "column" : 8, + "source_fragment" : "fabric_md.int_md.timestamp = fabric_md.int_md.timestamp & timestamp_mask" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_local_report_encap", + "id" : 96, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_27"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_27"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_28"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_28"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 218, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_local_report_encap_mpls", + "id" : 97, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "mon_label", + "bitwidth" : 20 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_29"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_29"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_30"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_30"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 4 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 203, + "column" : 52, + "source_fragment" : "2; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 218, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 126, + "column" : 39, + "source_fragment" : "0xBF05; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 226, + "column" : 8, + "source_fragment" : "hdr.report_mpls.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "tc"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 227, + "column" : 8, + "source_fragment" : "hdr.report_mpls.tc = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 228, + "column" : 8, + "source_fragment" : "hdr.report_mpls.bos = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 149, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "label"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 230, + "column" : 8, + "source_fragment" : "hdr.report_mpls.label = mon_label" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_drop_report_encap", + "id" : 98, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_31"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_31"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_32"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_32"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 202, + "column" : 44, + "source_fragment" : "1; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 238, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 241, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 243, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason =" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.do_drop_report_encap_mpls", + "id" : 99, + "runtime_data" : [ + { + "name" : "src_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_ip", + "bitwidth" : 32 + }, + { + "name" : "mon_port", + "bitwidth" : 16 + }, + { + "name" : "mon_label", + "bitwidth" : 20 + }, + { + "name" : "switch_id", + "bitwidth" : 32 + } + ], + "primitives" : [ + { + "op" : "modify_field_rng_uniform", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "identification"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + }, + { + "type" : "hexstr", + "value" : "0xffff" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 195, + "column" : 8, + "source_fragment" : "random(hdr.report_ipv4.identification, 0, 0xffff)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "src_addr"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 197, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.src_addr = src_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_ipv4", "dst_addr"] + }, + { + "type" : "runtime_data", + "value" : 1 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 198, + "column" : 8, + "source_fragment" : "hdr.report_ipv4.dst_addr = mon_ip; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_udp", "dport"] + }, + { + "type" : "runtime_data", + "value" : 2 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 199, + "column" : 8, + "source_fragment" : "hdr.report_udp.dport = mon_port; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_33"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_read", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_33"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 143, + "column" : 8, + "source_fragment" : "seq_number.read(reg, seq_number_idx)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000001" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 144, + "column" : 8, + "source_fragment" : "reg = reg + 1" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_34"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 200, + "column" : 23, + "source_fragment" : "(bit<32>)hdr.report_fixed_header.hw_id" + } + }, + { + "op" : "register_write", + "parameters" : [ + { + "type" : "register_array", + "value" : "FabricEgress.int_egress.seq_number" + }, + { + "type" : "field", + "value" : ["scalars", "tmp_34"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 146, + "column" : 8, + "source_fragment" : "seq_number.write(seq_number_idx, reg)" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "seq_no"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_reg"] + } + ] + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "dqf"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 201, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.dqf = fabric_md.int_report_md.report_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "switch_id"] + }, + { + "type" : "runtime_data", + "value" : 4 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 202, + "column" : 8, + "source_fragment" : "hdr.common_report_header.switch_id = switch_id; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad1"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 203, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad1 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad2"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 204, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad2 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_common_report_header", "pad3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 205, + "column" : 8, + "source_fragment" : "hdr.common_report_header.pad3 = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_eth_type", "value"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 207, + "column" : 8, + "source_fragment" : "hdr.eth_type.value = fabric_md.int_report_md.ip_eth_type" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 178, + "column" : 14, + "source_fragment" : "0, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf04" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 125, + "column" : 39, + "source_fragment" : "0xBF04; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "nproto"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 202, + "column" : 44, + "source_fragment" : "1; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 238, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.setValid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 241, + "column" : 8, + "source_fragment" : "hdr.local_report_header.setInvalid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_drop_report_header", "drop_reason"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_drop_reason15"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 243, + "column" : 8, + "source_fragment" : "hdr.drop_report_header.drop_reason =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_eth_type", "value"] + }, + { + "type" : "hexstr", + "value" : "0xbf05" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 126, + "column" : 39, + "source_fragment" : "0xBF05; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 251, + "column" : 8, + "source_fragment" : "hdr.report_mpls.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "tc"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 252, + "column" : 8, + "source_fragment" : "hdr.report_mpls.tc = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "bos"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 253, + "column" : 8, + "source_fragment" : "hdr.report_mpls.bos = 0" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "ttl"] + }, + { + "type" : "hexstr", + "value" : "0x40" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 149, + "column" : 32, + "source_fragment" : "64; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_mpls", "label"] + }, + { + "type" : "runtime_data", + "value" : 3 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 256, + "column" : 8, + "source_fragment" : "hdr.report_mpls.label = mon_label" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.init_int_metadata", + "id" : 100, + "runtime_data" : [ + { + "name" : "report_type", + "bitwidth" : 3 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_mirror_session_id14"] + }, + { + "type" : "hexstr", + "value" : "0x01fa" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 208, + "column" : 43, + "source_fragment" : "0x1FA; ..." + } + }, + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_fabric_md_int_report_md" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 293, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._int_mirror_type3"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 179, + "column" : 17, + "source_fragment" : "1, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "bmd_type"] + }, + { + "type" : "hexstr", + "value" : "0x02" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 167, + "column" : 20, + "source_fragment" : "2, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "mirror_type"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 179, + "column" : 17, + "source_fragment" : "1, ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ig_port"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_port3"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 299, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.ig_port =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "eg_port"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 300, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.eg_port = (PortId_t)standard_md.egress_port" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "queue_id"] + }, + { + "type" : "field", + "value" : ["scalars", "int_egress_egress_qid"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 301, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.queue_id = egress_qid" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "queue_occupancy"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "deq_qdepth"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 302, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.queue_occupancy = standard_md.deq_qdepth" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ig_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 303, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.ig_tstamp = fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "eg_tstamp"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 304, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.eg_tstamp = standard_md.egress_global_timestamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "ip_eth_type"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ip_eth_type10"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 305, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.ip_eth_type =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "flow_hash"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_inner_hash1"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 306, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.flow_hash =" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "report_type"] + }, + { + "type" : "runtime_data", + "value" : 0 + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 309, + "column" : 8, + "source_fragment" : "fabric_md.int_report_md.report_type = report_type" + } + } + ] + }, + { + "name" : "FabricEgress.int_egress.adjust_ip_udp_len", + "id" : 101, + "runtime_data" : [ + { + "name" : "adjust_ip", + "bitwidth" : 16 + }, + { + "name" : "adjust_udp", + "bitwidth" : 16 + } + ], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "total_len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_fabric_md_pkt_length"] + }, + "right" : { + "type" : "local", + "value" : 0 + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 342, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.ipv4.total_len = fabric_md.pkt_length + adjust_ip" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_udp10", "len"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["scalars", "int_egress_fabric_md_pkt_length"] + }, + "right" : { + "type" : "local", + "value" : 1 + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 343, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.udp.len = fabric_md.pkt_length + adjust_udp" + } + } + ] + }, + { + "name" : "fabric_v1model136", + "id" : 102, + "runtime_data" : [], + "primitives" : [ + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 136, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "fabric_v1model133", + "id" : 103, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_cpu_port37"] + }, + { + "type" : "hexstr", + "value" : "0x0000" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 133, + "column" : 8, + "source_fragment" : "fabric_md.egress.cpu_port = 0" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator148", + "id" : 104, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ipv47" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_tcp9" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 149, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.tcp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_udp10" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 150, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.udp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_icmp11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 151, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.icmp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vxlan15" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 153, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.vxlan.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_ethernet16" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 154, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_ethernet.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_eth_type17" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 155, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_eth_type.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu12" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 157, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_options13" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 158, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_ext_psc14" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 159, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_ext_psc.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator14", + "id" : 105, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_drop_reason15"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 144, + "column" : 12, + "source_fragment" : "fabric_md.egress.bridged.int_bmd.drop_reason = fabric_md" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 145, + "column" : 12, + "source_fragment" : "fabric_md.egress.bridged.int_bmd.report_type = fabric_md" + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + }, + { + "type" : "header", + "value" : "_egress_report_ethernet24" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + }, + { + "type" : "header", + "value" : "_egress_report_eth_type25" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + }, + { + "type" : "header", + "value" : "_egress_report_ipv427" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + }, + { + "type" : "header", + "value" : "_egress_report_udp28" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + }, + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + }, + { + "type" : "header", + "value" : "_egress_common_report_header30" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + }, + { + "type" : "header", + "value" : "_egress_local_report_header31" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + }, + { + "type" : "header", + "value" : "_egress_drop_report_header32" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_is_int_recirc44"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 134, + "column" : 32, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 140, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.vlan_tag.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator166", + "id" : 106, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x3" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator169", + "id" : 107, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator173", + "id" : 108, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ethernet24" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_eth_type25" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ipv427" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_udp28" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_common_report_header30" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_local_report_header31" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_drop_report_header32" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + } + ] + }, + { + "name" : "int_tna_parser_emulator148_0", + "id" : 109, + "runtime_data" : [], + "primitives" : [ + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_ipv47" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_tcp9" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 149, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.tcp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_udp10" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 150, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.udp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_icmp11" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 151, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.icmp.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vxlan15" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 153, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.vxlan.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_ethernet16" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 154, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_ethernet.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_inner_eth_type17" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 155, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.inner_eth_type.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu12" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 157, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_options13" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 158, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_options.setInvalid()" + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_gtpu_ext_psc14" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 159, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.gtpu_ext_psc.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator14_0", + "id" : 110, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + }, + { + "type" : "header", + "value" : "_egress_report_ethernet24" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + }, + { + "type" : "header", + "value" : "_egress_report_eth_type25" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + }, + { + "type" : "header", + "value" : "_egress_report_ipv427" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + }, + { + "type" : "header", + "value" : "_egress_report_udp28" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + }, + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + }, + { + "type" : "header", + "value" : "_egress_common_report_header30" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + }, + { + "type" : "header", + "value" : "_egress_local_report_header31" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + }, + { + "type" : "header", + "value" : "_egress_drop_report_header32" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_is_int_recirc44"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "bool", + "value" : true + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 134, + "column" : 32, + "source_fragment" : "= true; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_vlan_tag4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 140, + "column" : 8, + "source_fragment" : "hdr_v1model.ingress.vlan_tag.setInvalid()" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator166_0", + "id" : 111, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator169_0", + "id" : 112, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + } + } + ] + }, + { + "name" : "int_tna_parser_emulator173_0", + "id" : 113, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ethernet24" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ethernet" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_eth_type25" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ipv427" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_udp28" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_common_report_header30" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_local_report_header31" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_drop_report_header32" + }, + { + "type" : "header", + "value" : "parser_emulator_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + } + ] + }, + { + "name" : "packetio51", + "id" : 114, + "runtime_data" : [], + "primitives" : [ + { + "op" : "add_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_packet_in1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 51, + "column" : 12, + "source_fragment" : "hdr.packet_in.setValid()" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_packet_in1", "ingress_port"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_ingress_port49"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 52, + "column" : 12, + "source_fragment" : "hdr.packet_in.ingress_port = preserved_ig_port; ..." + } + }, + { + "op" : "remove_header", + "parameters" : [ + { + "type" : "header", + "value" : "_ingress_fake_ethernet2" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 53, + "column" : 12, + "source_fragment" : "hdr.fake_ethernet.setInvalid()" + } + }, + { + "op" : "exit", + "parameters" : [], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 54, + "column" : 12, + "source_fragment" : "exit" + } + } + ] + }, + { + "name" : "packetio60", + "id" : 115, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_pkt_length45"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "packet_length"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x0000ffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xfff2" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 60, + "column" : 37, + "source_fragment" : "= (bit<16>)standard_md.packet_length - 14; ..." + } + } + ] + }, + { + "name" : "next283", + "id" : 116, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 219, + "column" : 50, + "source_fragment" : "0; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 285, + "column" : 21, + "source_fragment" : "= 1; ..." + } + } + ] + }, + { + "name" : "next325", + "id" : 117, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 325, + "column" : 25, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x83" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 258, + "column" : 32, + "source_fragment" : "131, ..." + } + } + ] + }, + { + "name" : "next323", + "id" : 118, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 323, + "column" : 12, + "source_fragment" : "hdr.mpls.ttl = hdr.mpls.ttl - 1" + } + } + ] + }, + { + "name" : "next333", + "id" : 119, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 333, + "column" : 20, + "source_fragment" : "hdr.ipv4.ttl = hdr.ipv4.ttl - 1" + } + } + ] + }, + { + "name" : "next336", + "id" : 120, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 336, + "column" : 29, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x1a" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 247, + "column" : 30, + "source_fragment" : "26, ..." + } + } + ] + }, + { + "name" : "next343", + "id" : 121, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv68", "hop_limit"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "+", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv68", "hop_limit"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 343, + "column" : 20, + "source_fragment" : "hdr.ipv6.hop_limit = hdr.ipv6.hop_limit - 1" + } + } + ] + }, + { + "name" : "next346", + "id" : 122, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + { + "type" : "hexstr", + "value" : "0x01" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 346, + "column" : 29, + "source_fragment" : "= 1; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_drop_reason48"] + }, + { + "type" : "hexstr", + "value" : "0x1a" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../shared/define.p4", + "line" : 247, + "column" : 30, + "source_fragment" : "26, ..." + } + } + ] + }, + { + "name" : "int128", + "id" : 123, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_eth_type" + }, + { + "type" : "header", + "value" : "_egress_report_eth_type25" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + }, + { + "type" : "header", + "value" : "_egress_report_mpls26" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_ipv4" + }, + { + "type" : "header", + "value" : "_egress_report_ipv427" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_udp" + }, + { + "type" : "header", + "value" : "_egress_report_udp28" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_report_fixed_header" + }, + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_common_report_header" + }, + { + "type" : "header", + "value" : "_egress_common_report_header30" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + }, + { + "type" : "header", + "value" : "_egress_local_report_header31" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + }, + { + "type" : "header", + "value" : "_egress_drop_report_header32" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_hdr_eth_type" + }, + { + "type" : "header", + "value" : "_egress_eth_type35" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_fabric_md_bridged" + }, + { + "type" : "header", + "value" : "_egress_bridged36" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "int_egress_fabric_md_int_report_md" + }, + { + "type" : "header", + "value" : "_egress_int_report_md38" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_hop_latency39"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_timestamp40"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "vlan_stripped"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_vlan_stripped41"] + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "queue_report"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "b2d", + "left" : null, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_queue_report42"] + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_fabric_md_pkt_length"] + }, + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_pkt_length45"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 129, + "column" : 4, + "source_fragment" : "fabric_egress_metadata_t fabric_md = fabric_v1model.egress; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "int_egress_egress_qid"] + }, + { + "type" : "hexstr", + "value" : "0x00" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 135, + "column" : 4, + "source_fragment" : "QueueId_t egress_qid = 0;" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "-", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 365, + "column" : 8, + "source_fragment" : "fabric_md.int_md.hop_latency = standard_md.egress_global_timestamp[31:0] - fabric_md.bridged.base.ig_tstamp[31:0]" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + }, + { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 366, + "column" : 8, + "source_fragment" : "fabric_md.int_md.timestamp = standard_md.egress_global_timestamp" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "key_0"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "-", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x10" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 166, + "column" : 12, + "source_fragment" : " fabric_md.int_md.hop_latency[31:16]: range @name(\\\"hop_latency_upper\\\");" + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "key_1"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "-", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_global_timestamp"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_base_ig_tstamp9"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0xffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 167, + "column" : 12, + "source_fragment" : " fabric_md.int_md.hop_latency[15:0]: range @name(\\\"hop_latency_lower\\\");" + } + } + ] + }, + { + "name" : "int383", + "id" : 124, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_35"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["int_egress_fabric_md_bridged", "_int_bmd_mirror_session_id14"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xffffffff" + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 384, + "column" : 20, + "source_fragment" : "(bit<32>)fabric_md.bridged.int_bmd.mirror_session_id" + } + }, + { + "op" : "clone_egress_pkt_to_egress", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "tmp_35"] + }, + { + "type" : "hexstr", + "value" : "0x1" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 383, + "column" : 16, + "source_fragment" : "clone_preserving_field_list(CloneType.E2E, ..." + } + } + ] + }, + { + "name" : "int373", + "id" : 125, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["int_egress_hdr_report_fixed_header", "hw_id"] + }, + { + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "op" : "|", + "left" : { + "type" : "hexstr", + "value" : "0x00" + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "expression", + "value" : { + "op" : ">>", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_spec"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x7" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x01ff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x3f" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x07" + } + } + } + } + } + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 373, + "column" : 8, + "source_fragment" : "hdr.report_fixed_header.hw_id = 4w0 ++ standard_md.egress_spec[8:7]" + } + } + ] + }, + { + "name" : "slicing217", + "id" : 126, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["_ingress_ipv47", "dscp"] + }, + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 217, + "column" : 16, + "source_fragment" : "hdr.ipv4.dscp = tmp_dscp" + } + } + ] + }, + { + "name" : "slicing189", + "id" : 127, + "runtime_data" : [], + "primitives" : [ + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_bridged36" + }, + { + "type" : "header", + "value" : "int_egress_fabric_md_bridged" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_int_report_md38" + }, + { + "type" : "header", + "value" : "int_egress_fabric_md_int_report_md" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_hop_latency39"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "hop_latency"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_int_md_timestamp40"] + }, + { + "type" : "field", + "value" : ["int_egress_fabric_md_int_md", "timestamp"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 391, + "column" : 30, + "source_fragment" : "= fabric_md; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_eth_type25" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_mpls26" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_mpls" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_ipv427" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_ipv4" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_udp28" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_udp" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_report_fixed_header29" + }, + { + "type" : "header", + "value" : "int_egress_hdr_report_fixed_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_common_report_header30" + }, + { + "type" : "header", + "value" : "int_egress_hdr_common_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_local_report_header31" + }, + { + "type" : "header", + "value" : "int_egress_hdr_local_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_drop_report_header32" + }, + { + "type" : "header", + "value" : "int_egress_hdr_drop_report_header" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign_header", + "parameters" : [ + { + "type" : "header", + "value" : "_egress_eth_type35" + }, + { + "type" : "header", + "value" : "int_egress_hdr_eth_type" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 392, + "column" : 27, + "source_fragment" : "= hdr; ..." + } + }, + { + "op" : "assign", + "parameters" : [ + { + "type" : "field", + "value" : ["scalars", "dscp_rewriter_tmp_dscp"] + }, + { + "type" : "field", + "value" : ["_egress_bridged36", "_base_slice_tc12"] + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 189, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.bridged.base.slice_tc;" + } + } + ] + }, + { + "name" : "fabric_v1model170", + "id" : 128, + "runtime_data" : [], + "primitives" : [ + { + "op" : "recirculate", + "parameters" : [ + { + "type" : "hexstr", + "value" : "0x5" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 170, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + } + } + ] + }, + { + "name" : "fabric_v1model174", + "id" : 129, + "runtime_data" : [], + "primitives" : [ + { + "op" : "mark_to_drop", + "parameters" : [ + { + "type" : "header", + "value" : "standard_metadata" + } + ], + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + } + } + ] + } + ], + "pipelines" : [ + { + "name" : "ingress", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 35, + "column" : 8, + "source_fragment" : "FabricIngress" + }, + "init_table" : "tbl_fabric_v1model61", + "tables" : [ + { + "name" : "tbl_fabric_v1model61", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 61, + "column" : 8, + "source_fragment" : "mark_to_drop(standard_md)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [51], + "actions" : ["fabric_v1model61"], + "base_default_next" : "node_3", + "next_tables" : { + "fabric_v1model61" : "node_3" + }, + "default_entry" : { + "action_id" : 51, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model64", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 64, + "column" : 12, + "source_fragment" : "exit" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [50], + "actions" : ["fabric_v1model64"], + "base_default_next" : "node_5", + "next_tables" : { + "fabric_v1model64" : "node_5" + }, + "default_entry" : { + "action_id" : 50, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model70", + "id" : 2, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 70, + "column" : 51, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [52], + "actions" : ["fabric_v1model70"], + "base_default_next" : "tbl_lookup_md_init15", + "next_tables" : { + "fabric_v1model70" : "tbl_lookup_md_init15" + }, + "default_entry" : { + "action_id" : 52, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init15", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 15, + "column" : 23, + "source_fragment" : "= hdr.ethernet.dst_addr; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [54], + "actions" : ["lookup_md_init15"], + "base_default_next" : "node_8", + "next_tables" : { + "lookup_md_init15" : "node_8" + }, + "default_entry" : { + "action_id" : 54, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init21", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 21, + "column" : 27, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [53], + "actions" : ["lookup_md_init21"], + "base_default_next" : "tbl_lookup_md_init24", + "next_tables" : { + "lookup_md_init21" : "tbl_lookup_md_init24" + }, + "default_entry" : { + "action_id" : 53, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init24", + "id" : 5, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 24, + "column" : 23, + "source_fragment" : "= false; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [63], + "actions" : ["lookup_md_init24"], + "base_default_next" : "node_11", + "next_tables" : { + "lookup_md_init24" : "node_11" + }, + "default_entry" : { + "action_id" : 63, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init33", + "id" : 6, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 33, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [58], + "actions" : ["lookup_md_init33"], + "base_default_next" : "node_13", + "next_tables" : { + "lookup_md_init33" : "node_13" + }, + "default_entry" : { + "action_id" : 58, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init38", + "id" : 7, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 38, + "column" : 32, + "source_fragment" : "= hdr.inner_tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [55], + "actions" : ["lookup_md_init38"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init38" : "node_27" + }, + "default_entry" : { + "action_id" : 55, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init41", + "id" : 8, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 41, + "column" : 32, + "source_fragment" : "= hdr.inner_udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [56], + "actions" : ["lookup_md_init41"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init41" : "node_27" + }, + "default_entry" : { + "action_id" : 56, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init44", + "id" : 9, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 44, + "column" : 33, + "source_fragment" : "= hdr.inner_icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [57], + "actions" : ["lookup_md_init44"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init44" : "node_27" + }, + "default_entry" : { + "action_id" : 57, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init48", + "id" : 10, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 48, + "column" : 27, + "source_fragment" : "= true; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [62], + "actions" : ["lookup_md_init48"], + "base_default_next" : "node_21", + "next_tables" : { + "lookup_md_init48" : "node_21" + }, + "default_entry" : { + "action_id" : 62, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init53", + "id" : 11, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 53, + "column" : 32, + "source_fragment" : "= hdr.tcp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [59], + "actions" : ["lookup_md_init53"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init53" : "node_27" + }, + "default_entry" : { + "action_id" : 59, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init56", + "id" : 12, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 56, + "column" : 32, + "source_fragment" : "= hdr.udp.sport; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [60], + "actions" : ["lookup_md_init56"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init56" : "node_27" + }, + "default_entry" : { + "action_id" : 60, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_lookup_md_init59", + "id" : 13, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 59, + "column" : 33, + "source_fragment" : "= hdr.icmp.icmp_type; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [61], + "actions" : ["lookup_md_init59"], + "base_default_next" : "node_27", + "next_tables" : { + "lookup_md_init59" : "node_27" + }, + "default_entry" : { + "action_id" : 61, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_pkt_io_do_packet_out", + "id" : 14, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 25, + "column" : 12, + "source_fragment" : "do_packet_out()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [8], + "actions" : ["FabricIngress.pkt_io.do_packet_out"], + "base_default_next" : "FabricIngress.int_watchlist.watchlist", + "next_tables" : { + "FabricIngress.pkt_io.do_packet_out" : "FabricIngress.int_watchlist.watchlist" + }, + "default_entry" : { + "action_id" : 8, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.int_watchlist.watchlist", + "id" : 15, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 34, + "column" : 10, + "source_fragment" : "watchlist" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ipv4_valid", + "target" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + } + ], + "match_type" : "range", + "type" : "simple", + "max_size" : 64, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [46, 48, 47], + "actions" : ["FabricIngress.int_watchlist.mark_to_report", "FabricIngress.int_watchlist.no_report_collector", "FabricIngress.int_watchlist.no_report"], + "base_default_next" : "FabricIngress.stats.flows", + "next_tables" : { + "FabricIngress.int_watchlist.mark_to_report" : "FabricIngress.stats.flows", + "FabricIngress.int_watchlist.no_report_collector" : "FabricIngress.stats.flows", + "FabricIngress.int_watchlist.no_report" : "FabricIngress.stats.flows" + }, + "default_entry" : { + "action_id" : 47, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.stats.flows", + "id" : 16, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 21, + "column" : 10, + "source_fragment" : "flows" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [7], + "actions" : ["FabricIngress.stats.count"], + "base_default_next" : "FabricIngress.slice_tc_classifier.classifier", + "next_tables" : { + "FabricIngress.stats.count" : "FabricIngress.slice_tc_classifier.classifier" + }, + "default_entry" : { + "action_id" : 7, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.slice_tc_classifier.classifier", + "id" : 17, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 44, + "column" : 10, + "source_fragment" : "classifier" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 512, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [38, 40, 39], + "actions" : ["FabricIngress.slice_tc_classifier.set_slice_id_tc", "FabricIngress.slice_tc_classifier.trust_dscp", "FabricIngress.slice_tc_classifier.no_classification"], + "base_default_next" : "FabricIngress.filtering.ingress_port_vlan", + "next_tables" : { + "FabricIngress.slice_tc_classifier.set_slice_id_tc" : "FabricIngress.filtering.ingress_port_vlan", + "FabricIngress.slice_tc_classifier.trust_dscp" : "FabricIngress.filtering.ingress_port_vlan", + "FabricIngress.slice_tc_classifier.no_classification" : "FabricIngress.filtering.ingress_port_vlan" + }, + "default_entry" : { + "action_id" : 39, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.ingress_port_vlan", + "id" : 18, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 42, + "column" : 10, + "source_fragment" : "ingress_port_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "vlan_is_valid", + "target" : ["_ingress_vlan_tag4", "$valid$"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["_ingress_vlan_tag4", "vlan_id"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [9, 10, 11], + "actions" : ["FabricIngress.filtering.deny", "FabricIngress.filtering.permit", "FabricIngress.filtering.permit_with_internal_vlan"], + "base_default_next" : "FabricIngress.filtering.fwd_classifier", + "next_tables" : { + "FabricIngress.filtering.deny" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit" : "FabricIngress.filtering.fwd_classifier", + "FabricIngress.filtering.permit_with_internal_vlan" : "FabricIngress.filtering.fwd_classifier" + }, + "default_entry" : { + "action_id" : 9, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.filtering.fwd_classifier", + "id" : 19, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 80, + "column" : 10, + "source_fragment" : "fwd_classifier" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["_ingress_ethernet3", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["_ingress_eth_type5", "value"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "ip_eth_type", + "target" : ["_ingress_bridged4", "_base_ip_eth_type10"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [12], + "actions" : ["FabricIngress.filtering.set_forwarding_type"], + "base_default_next" : "tbl_filtering100", + "next_tables" : { + "FabricIngress.filtering.set_forwarding_type" : "tbl_filtering100" + }, + "default_entry" : { + "action_id" : 12, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_filtering100", + "id" : 20, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/filtering.p4", + "line" : 100, + "column" : 8, + "source_fragment" : "fwd_type_counter.count((bit<32>)fabric_md.bridged.base.fwd_type)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [64], + "actions" : ["filtering100"], + "base_default_next" : "node_35", + "next_tables" : { + "filtering100" : "node_35" + }, + "default_entry" : { + "action_id" : 64, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.forwarding.bridging", + "id" : 21, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 39, + "column" : 10, + "source_fragment" : "bridging" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "vlan_id", + "target" : ["_ingress_bridged4", "_base_vlan_id6"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["_ingress_ethernet3", "dst_addr"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [17, 13], + "actions" : ["FabricIngress.forwarding.set_next_id_bridging", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_bridging" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 13, + "action_const" : true, + "action_data" : ["0x59"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.forwarding.mpls", + "id" : 22, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 74, + "column" : 10, + "source_fragment" : "mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "mpls_label", + "target" : ["_ingress_bridged4", "_base_mpls_label2"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [18, 14], + "actions" : ["FabricIngress.forwarding.pop_mpls_and_next", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.pop_mpls_and_next" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 14, + "action_const" : true, + "action_data" : ["0x81"], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.forwarding.routing_v4", + "id" : 23, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 116, + "column" : 10, + "source_fragment" : "routing_v4" + }, + "key" : [ + { + "match_type" : "lpm", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_routing_ipv4_dst18"], + "mask" : null + } + ], + "match_type" : "lpm", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [19, 20, 21, 15], + "actions" : ["FabricIngress.forwarding.set_next_id_routing_v4", "FabricIngress.forwarding.nop_routing_v4", "FabricIngress.forwarding.drop_routing_v4", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_routing_v4" : "tbl_hasher17", + "FabricIngress.forwarding.nop_routing_v4" : "tbl_hasher17", + "FabricIngress.forwarding.drop_routing_v4" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 15, + "action_const" : false, + "action_data" : ["0x1d"], + "action_entry_const" : false + } + }, + { + "name" : "FabricIngress.forwarding.routing_v6", + "id" : 24, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 155, + "column" : 10, + "source_fragment" : "routing_v6" + }, + "key" : [ + { + "match_type" : "lpm", + "name" : "ipv6_dst", + "target" : ["_ingress_ipv68", "dst_addr"], + "mask" : null + } + ], + "match_type" : "lpm", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [22, 23, 16], + "actions" : ["FabricIngress.forwarding.set_next_id_routing_v6", "FabricIngress.forwarding.drop_routing_v6", "FabricIngress.forwarding.set_int_drop_reason"], + "base_default_next" : "tbl_hasher17", + "next_tables" : { + "FabricIngress.forwarding.set_next_id_routing_v6" : "tbl_hasher17", + "FabricIngress.forwarding.drop_routing_v6" : "tbl_hasher17", + "FabricIngress.forwarding.set_int_drop_reason" : "tbl_hasher17" + }, + "default_entry" : { + "action_id" : 16, + "action_const" : false, + "action_data" : ["0x1d"], + "action_entry_const" : false + } + }, + { + "name" : "tbl_hasher17", + "id" : 25, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 17, + "column" : 8, + "source_fragment" : "hash( ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [68], + "actions" : ["hasher17"], + "base_default_next" : "node_45", + "next_tables" : { + "hasher17" : "node_45" + }, + "default_entry" : { + "action_id" : 68, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_hasher39", + "id" : 26, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 39, + "column" : 12, + "source_fragment" : "hash( ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [65], + "actions" : ["hasher39"], + "base_default_next" : "node_50", + "next_tables" : { + "hasher39" : "node_50" + }, + "default_entry" : { + "action_id" : 65, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_hasher50", + "id" : 27, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 50, + "column" : 32, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [66], + "actions" : ["hasher50"], + "base_default_next" : "node_50", + "next_tables" : { + "hasher50" : "node_50" + }, + "default_entry" : { + "action_id" : 66, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_hasher66", + "id" : 28, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 66, + "column" : 46, + "source_fragment" : "= 0; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [67], + "actions" : ["hasher66"], + "base_default_next" : "node_50", + "next_tables" : { + "hasher66" : "node_50" + }, + "default_entry" : { + "action_id" : 67, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_mpls", + "id" : 29, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 22, + "column" : 10, + "source_fragment" : "next_mpls" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [24, 0], + "actions" : ["FabricIngress.pre_next.set_mpls_label", "nop"], + "base_default_next" : "FabricIngress.pre_next.next_vlan", + "next_tables" : { + "FabricIngress.pre_next.set_mpls_label" : "FabricIngress.pre_next.next_vlan", + "nop" : "FabricIngress.pre_next.next_vlan" + }, + "default_entry" : { + "action_id" : 0, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.pre_next.next_vlan", + "id" : 30, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/pre_next.p4", + "line" : 54, + "column" : 10, + "source_fragment" : "next_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [25, 1], + "actions" : ["FabricIngress.pre_next.set_vlan", "nop"], + "base_default_next" : "FabricIngress.acl.acl", + "next_tables" : { + "FabricIngress.pre_next.set_vlan" : "FabricIngress.acl.acl", + "nop" : "FabricIngress.acl.acl" + }, + "default_entry" : { + "action_id" : 1, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.acl.acl", + "id" : 31, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/acl.p4", + "line" : 74, + "column" : 10, + "source_fragment" : "acl" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "ig_port", + "target" : ["_ingress_bridged4", "_base_ig_port3"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_dst", + "target" : ["_ingress_ethernet3", "dst_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_src", + "target" : ["_ingress_ethernet3", "src_addr"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "vlan_id", + "target" : ["scalars", "userMetadata._ingress_lkp_vlan_id9"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "eth_type", + "target" : ["scalars", "userMetadata._ingress_lkp_eth_type8"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_src", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_src11"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ipv4_dst", + "target" : ["scalars", "userMetadata._ingress_lkp_ipv4_dst12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ip_proto", + "target" : ["scalars", "userMetadata._ingress_lkp_ip_proto13"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "icmp_type", + "target" : ["scalars", "userMetadata._ingress_lkp_icmp_type16"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "icmp_code", + "target" : ["scalars", "userMetadata._ingress_lkp_icmp_code17"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_sport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_sport14"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "l4_dport", + "target" : ["scalars", "userMetadata._ingress_lkp_l4_dport15"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "ig_port_type", + "target" : ["scalars", "userMetadata._ingress_ig_port_type33"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [26, 28, 27, 29, 30, 31], + "actions" : ["FabricIngress.acl.set_next_id_acl", "FabricIngress.acl.punt_to_cpu", "FabricIngress.acl.copy_to_cpu", "FabricIngress.acl.drop", "FabricIngress.acl.set_output_port", "FabricIngress.acl.nop_acl"], + "base_default_next" : "node_54", + "next_tables" : { + "FabricIngress.acl.set_next_id_acl" : "node_54", + "FabricIngress.acl.punt_to_cpu" : "node_54", + "FabricIngress.acl.copy_to_cpu" : "node_54", + "FabricIngress.acl.drop" : "node_54", + "FabricIngress.acl.set_output_port" : "node_54", + "FabricIngress.acl.nop_acl" : "node_54" + }, + "default_entry" : { + "action_id" : 31, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.next.simple", + "id" : 32, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 88, + "column" : 10, + "source_fragment" : "simple" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [32, 33, 2], + "actions" : ["FabricIngress.next.output_simple", "FabricIngress.next.routing_simple", "nop"], + "base_default_next" : "FabricIngress.next.hashed", + "next_tables" : { + "FabricIngress.next.output_simple" : "FabricIngress.next.hashed", + "FabricIngress.next.routing_simple" : "FabricIngress.next.hashed", + "nop" : "FabricIngress.next.hashed" + }, + "default_entry" : { + "action_id" : 2, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.next.hashed", + "id" : 33, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 127, + "column" : 10, + "source_fragment" : "hashed" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "indirect_ws", + "action_profile" : "FabricIngress.next.hashed_profile", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [34, 35, 3], + "actions" : ["FabricIngress.next.output_hashed", "FabricIngress.next.routing_hashed", "nop"], + "base_default_next" : "FabricIngress.next.multicast", + "next_tables" : { + "FabricIngress.next.output_hashed" : "FabricIngress.next.multicast", + "FabricIngress.next.routing_hashed" : "FabricIngress.next.multicast", + "nop" : "FabricIngress.next.multicast" + } + }, + { + "name" : "FabricIngress.next.multicast", + "id" : 34, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 161, + "column" : 10, + "source_fragment" : "multicast" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "next_id", + "target" : ["scalars", "userMetadata._ingress_next_id21"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [36, 37], + "actions" : ["FabricIngress.next.set_mcast_group_id", "FabricIngress.next.reset_mcast_group_id"], + "base_default_next" : "FabricIngress.qos.set_slice_tc", + "next_tables" : { + "FabricIngress.next.set_mcast_group_id" : "FabricIngress.qos.set_slice_tc", + "FabricIngress.next.reset_mcast_group_id" : "FabricIngress.qos.set_slice_tc" + }, + "default_entry" : { + "action_id" : 37, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.set_slice_tc", + "id" : 35, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 91, + "column" : 10, + "source_fragment" : "set_slice_tc" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "fabric_md.is_upf_hit", + "target" : ["scalars", "userMetadata._ingress_is_upf_hit29"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 2, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [41, 42, 6], + "actions" : ["FabricIngress.qos.use_upf", "FabricIngress.qos.use_default", "NoAction"], + "base_default_next" : "FabricIngress.qos.default_tc", + "next_tables" : { + "FabricIngress.qos.use_upf" : "FabricIngress.qos.default_tc", + "FabricIngress.qos.use_default" : "FabricIngress.qos.default_tc", + "NoAction" : "FabricIngress.qos.default_tc" + }, + "default_entry" : { + "action_id" : 6, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 96, + "column" : 12, + "source_fragment" : "true: use_upf" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 41, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 97, + "column" : 12, + "source_fragment" : "false: use_default" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 42, + "action_data" : [] + }, + "priority" : 2 + } + ] + }, + { + "name" : "FabricIngress.qos.default_tc", + "id" : 36, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 150, + "column" : 10, + "source_fragment" : "default_tc" + }, + "key" : [ + { + "match_type" : "ternary", + "name" : "slice_tc", + "target" : ["_ingress_bridged4", "_base_slice_tc12"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "tc_unknown", + "target" : ["scalars", "userMetadata._ingress_tc_unknown28"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 16, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [45, 4], + "actions" : ["FabricIngress.qos.set_default_tc", "nop"], + "base_default_next" : "node_60", + "next_tables" : { + "FabricIngress.qos.set_default_tc" : "node_60", + "nop" : "node_60" + }, + "default_entry" : { + "action_id" : 4, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing174", + "id" : 37, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "slice_tc_meter.execute_meter((bit<32>) fabric_md.bridged.base.slice_tc, packet_color)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [69], + "actions" : ["slicing174"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing174" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 69, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing177", + "id" : 38, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 177, + "column" : 25, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [70], + "actions" : ["slicing177"], + "base_default_next" : "FabricIngress.qos.queues", + "next_tables" : { + "slicing177" : "FabricIngress.qos.queues" + }, + "default_entry" : { + "action_id" : 70, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.qos.queues", + "id" : 39, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 122, + "column" : 10, + "source_fragment" : "queues" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "slice_tc", + "target" : ["_ingress_bridged4", "_base_slice_tc12"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "color", + "target" : ["scalars", "qos_packet_color"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 128, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [43, 44], + "actions" : ["FabricIngress.qos.set_queue", "FabricIngress.qos.meter_drop"], + "base_default_next" : "tbl_int112", + "next_tables" : { + "FabricIngress.qos.set_queue" : "tbl_int112", + "FabricIngress.qos.meter_drop" : "tbl_int112" + }, + "default_entry" : { + "action_id" : 43, + "action_const" : true, + "action_data" : ["0x0"], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int112", + "id" : 40, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 112, + "column" : 46, + "source_fragment" : "= standard_md.egress_spec; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [71], + "actions" : ["int112"], + "base_default_next" : "FabricIngress.int_ingress.drop_report", + "next_tables" : { + "int112" : "FabricIngress.int_ingress.drop_report" + }, + "default_entry" : { + "action_id" : 71, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricIngress.int_ingress.drop_report", + "id" : 41, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 86, + "column" : 10, + "source_fragment" : "drop_report" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "int_report_type", + "target" : ["_ingress_bridged4", "_int_bmd_report_type13"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "drop_ctl", + "target" : ["scalars", "userMetadata._drop_ctl2"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "punt_to_cpu", + "target" : ["scalars", "userMetadata._ingress_punt_to_cpu23"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "egress_port_set", + "target" : ["scalars", "userMetadata._ingress_egress_port_set22"], + "mask" : null + }, + { + "match_type" : "ternary", + "name" : "mcast_group_id", + "target" : ["standard_metadata", "mcast_grp"], + "mask" : null + } + ], + "match_type" : "ternary", + "type" : "simple", + "max_size" : 3, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [49, 5], + "actions" : ["FabricIngress.int_ingress.report_drop", "nop"], + "base_default_next" : "tbl_fabric_v1model106", + "next_tables" : { + "FabricIngress.int_ingress.report_drop" : "tbl_fabric_v1model106", + "nop" : "tbl_fabric_v1model106" + }, + "default_entry" : { + "action_id" : 5, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 101, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 1, false, false, _): report_drop()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "ternary", + "key" : "0x0000", + "mask" : "0x0000" + } + ], + "action_entry" : { + "action_id" : 49, + "action_data" : [] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 102, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 1, false, true, _): report_drop()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "ternary", + "key" : "0x0000", + "mask" : "0x0000" + } + ], + "action_entry" : { + "action_id" : 49, + "action_data" : [] + }, + "priority" : 2 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 104, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 0, false, false, 0): report_drop()" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "ternary", + "key" : "0x0000", + "mask" : "0xffff" + } + ], + "action_entry" : { + "action_id" : 49, + "action_data" : [] + }, + "priority" : 3 + } + ] + }, + { + "name" : "tbl_fabric_v1model106", + "id" : 42, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 106, + "column" : 33, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [73], + "actions" : ["fabric_v1model106"], + "base_default_next" : "node_67", + "next_tables" : { + "fabric_v1model106" : "node_67" + }, + "default_entry" : { + "action_id" : 73, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model110", + "id" : 43, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 110, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [72], + "actions" : ["fabric_v1model110"], + "base_default_next" : null, + "next_tables" : { + "fabric_v1model110" : null + }, + "default_entry" : { + "action_id" : 72, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + } + ], + "action_profiles" : [ + { + "name" : "FabricIngress.next.hashed_profile", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 112, + "column" : 15, + "source_fragment" : "hashed_profile" + }, + "max_size" : 16, + "selector" : { + "algo" : "crc16", + "input" : [ + { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_ecmp_hash5"] + } + ] + } + } + ], + "conditionals" : [ + { + "name" : "node_3", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 62, + "column" : 12, + "source_fragment" : "standard_md.parser_error == error.PacketRejectedByParser" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "parser_error"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x8" + } + } + }, + "true_next" : "tbl_fabric_v1model64", + "false_next" : "node_5" + }, + { + "name" : "node_5", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 67, + "column" : 13, + "source_fragment" : "standard_md.instance_type == 4" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "instance_type"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000004" + } + } + }, + "true_next" : "tbl_fabric_v1model70", + "false_next" : "tbl_lookup_md_init15" + }, + { + "name" : "node_8", + "id" : 2, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 20, + "column" : 12, + "source_fragment" : "hdr.vlan_tag.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_vlan_tag4", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init21", + "false_next" : "tbl_lookup_md_init24" + }, + { + "name" : "node_11", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 32, + "column" : 12, + "source_fragment" : "hdr.inner_ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init33", + "false_next" : "node_19" + }, + { + "name" : "node_13", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 37, + "column" : 16, + "source_fragment" : "hdr.inner_tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_tcp19", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init38", + "false_next" : "node_15" + }, + { + "name" : "node_15", + "id" : 5, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 40, + "column" : 23, + "source_fragment" : "hdr.inner_udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_udp20", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init41", + "false_next" : "node_17" + }, + { + "name" : "node_17", + "id" : 6, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 43, + "column" : 23, + "source_fragment" : "hdr.inner_icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_icmp21", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init44", + "false_next" : "node_27" + }, + { + "name" : "node_19", + "id" : 7, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 47, + "column" : 19, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init48", + "false_next" : "node_27" + }, + { + "name" : "node_21", + "id" : 8, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 52, + "column" : 16, + "source_fragment" : "hdr.tcp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_tcp9", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init53", + "false_next" : "node_23" + }, + { + "name" : "node_23", + "id" : 9, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 55, + "column" : 23, + "source_fragment" : "hdr.udp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_udp10", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init56", + "false_next" : "node_25" + }, + { + "name" : "node_25", + "id" : 10, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/lookup_md_init.p4", + "line" : 58, + "column" : 23, + "source_fragment" : "hdr.icmp.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_icmp11", "$valid$"] + } + } + }, + "true_next" : "tbl_lookup_md_init59", + "false_next" : "node_27" + }, + { + "name" : "node_27", + "id" : 11, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 24, + "column" : 12, + "source_fragment" : "hdr.packet_out.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_packet_out0", "$valid$"] + } + } + }, + "true_next" : "tbl_pkt_io_do_packet_out", + "false_next" : "FabricIngress.int_watchlist.watchlist" + }, + { + "name" : "node_35", + "id" : 12, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 88, + "column" : 13, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_forwarding19"] + } + } + }, + "false_next" : "node_36", + "true_next" : "tbl_hasher17" + }, + { + "name" : "node_36", + "id" : 13, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 178, + "column" : 12, + "source_fragment" : "hdr.ethernet.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ethernet3", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.bridging", + "false_next" : "node_38" + }, + { + "name" : "node_38", + "id" : 14, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 181, + "column" : 19, + "source_fragment" : "hdr.mpls.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_mpls6", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.mpls", + "false_next" : "node_40" + }, + { + "name" : "node_40", + "id" : 15, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 184, + "column" : 19, + "source_fragment" : "fabric_md.lkp.is_ipv4 && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x03" + } + } + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.routing_v4", + "false_next" : "node_42" + }, + { + "name" : "node_42", + "id" : 16, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/forwarding.p4", + "line" : 188, + "column" : 19, + "source_fragment" : "hdr.ipv6.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv68", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_bridged4", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + } + } + }, + "true_next" : "FabricIngress.forwarding.routing_v6", + "false_next" : "tbl_hasher17" + }, + { + "name" : "node_45", + "id" : 17, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/hasher.p4", + "line" : 38, + "column" : 12, + "source_fragment" : "hdr.gtpu.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_gtpu12", "$valid$"] + } + } + }, + "true_next" : "tbl_hasher39", + "false_next" : "node_47" + }, + { + "name" : "node_47", + "id" : 18, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 91, + "column" : 34, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_lkp_is_ipv410"] + } + } + }, + "true_next" : "tbl_hasher50", + "false_next" : "tbl_hasher66" + }, + { + "name" : "node_50", + "id" : 19, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 92, + "column" : 13, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + } + } + }, + "false_next" : "FabricIngress.pre_next.next_mpls", + "true_next" : "FabricIngress.acl.acl" + }, + { + "name" : "node_54", + "id" : 20, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 96, + "column" : 13, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_skip_next20"] + } + } + }, + "false_next" : "FabricIngress.next.simple", + "true_next" : "FabricIngress.qos.set_slice_tc" + }, + { + "name" : "node_60", + "id" : 21, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 173, + "column" : 12, + "source_fragment" : "fabric_md.upf_meter_color != MeterColor_t.RED" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._ingress_upf_meter_color32"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + }, + "true_next" : "tbl_slicing174", + "false_next" : "tbl_slicing177" + }, + { + "name" : "node_67", + "id" : 22, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 109, + "column" : 12, + "source_fragment" : "fabric_md.drop_ctl == 1" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "false_next" : null, + "true_next" : "tbl_fabric_v1model110" + } + ] + }, + { + "name" : "egress", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 115, + "column" : 8, + "source_fragment" : "FabricEgress" + }, + "init_table" : "tbl_fabric_v1model133", + "tables" : [ + { + "name" : "tbl_fabric_v1model133", + "id" : 44, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 133, + "column" : 34, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [103], + "actions" : ["fabric_v1model133"], + "base_default_next" : "node_72", + "next_tables" : { + "fabric_v1model133" : "node_72" + }, + "default_entry" : { + "action_id" : 103, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model136", + "id" : 45, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 136, + "column" : 12, + "source_fragment" : "exit" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [102], + "actions" : ["fabric_v1model136"], + "base_default_next" : "node_74", + "next_tables" : { + "fabric_v1model136" : "node_74" + }, + "default_entry" : { + "action_id" : 102, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator14", + "id" : 46, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [105], + "actions" : ["int_tna_parser_emulator14"], + "base_default_next" : "node_76", + "next_tables" : { + "int_tna_parser_emulator14" : "node_76" + }, + "default_entry" : { + "action_id" : 105, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator148", + "id" : 47, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid(); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [104], + "actions" : ["int_tna_parser_emulator148"], + "base_default_next" : "node_78", + "next_tables" : { + "int_tna_parser_emulator148" : "node_78" + }, + "default_entry" : { + "action_id" : 104, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_ingress_drop", + "id" : 48, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 165, + "column" : 12, + "source_fragment" : "parse_int_ingress_drop()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [89], + "actions" : ["FabricEgress.parser_emulator.parse_int_ingress_drop"], + "base_default_next" : "tbl_int_tna_parser_emulator166", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_ingress_drop" : "tbl_int_tna_parser_emulator166" + }, + "default_entry" : { + "action_id" : 89, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator166", + "id" : 49, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [106], + "actions" : ["int_tna_parser_emulator166"], + "base_default_next" : "tbl_int_tna_parser_emulator173", + "next_tables" : { + "int_tna_parser_emulator166" : "tbl_int_tna_parser_emulator173" + }, + "default_entry" : { + "action_id" : 106, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_report_mirror", + "id" : 50, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 168, + "column" : 12, + "source_fragment" : "parse_int_report_mirror()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [91], + "actions" : ["FabricEgress.parser_emulator.parse_int_report_mirror"], + "base_default_next" : "tbl_int_tna_parser_emulator169", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_report_mirror" : "tbl_int_tna_parser_emulator169" + }, + "default_entry" : { + "action_id" : 91, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator169", + "id" : 51, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [107], + "actions" : ["int_tna_parser_emulator169"], + "base_default_next" : "tbl_int_tna_parser_emulator173", + "next_tables" : { + "int_tna_parser_emulator169" : "tbl_int_tna_parser_emulator173" + }, + "default_entry" : { + "action_id" : 107, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator173", + "id" : 52, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [108], + "actions" : ["int_tna_parser_emulator173"], + "base_default_next" : "node_84", + "next_tables" : { + "int_tna_parser_emulator173" : "node_84" + }, + "default_entry" : { + "action_id" : 108, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator14_0", + "id" : 53, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 14, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [110], + "actions" : ["int_tna_parser_emulator14_0"], + "base_default_next" : "node_86", + "next_tables" : { + "int_tna_parser_emulator14_0" : "node_86" + }, + "default_entry" : { + "action_id" : 110, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator148_0", + "id" : 54, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 148, + "column" : 12, + "source_fragment" : "hdr_v1model.ingress.ipv4.setInvalid(); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [109], + "actions" : ["int_tna_parser_emulator148_0"], + "base_default_next" : "node_88", + "next_tables" : { + "int_tna_parser_emulator148_0" : "node_88" + }, + "default_entry" : { + "action_id" : 109, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_ingress_drop_0", + "id" : 55, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 165, + "column" : 12, + "source_fragment" : "parse_int_ingress_drop()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [90], + "actions" : ["FabricEgress.parser_emulator.parse_int_ingress_drop"], + "base_default_next" : "tbl_int_tna_parser_emulator166_0", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_ingress_drop" : "tbl_int_tna_parser_emulator166_0" + }, + "default_entry" : { + "action_id" : 90, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator166_0", + "id" : 56, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 166, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [111], + "actions" : ["int_tna_parser_emulator166_0"], + "base_default_next" : "tbl_int_tna_parser_emulator173_0", + "next_tables" : { + "int_tna_parser_emulator166_0" : "tbl_int_tna_parser_emulator173_0" + }, + "default_entry" : { + "action_id" : 111, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_parser_emulator_parse_int_report_mirror_0", + "id" : 57, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 168, + "column" : 12, + "source_fragment" : "parse_int_report_mirror()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [92], + "actions" : ["FabricEgress.parser_emulator.parse_int_report_mirror"], + "base_default_next" : "tbl_int_tna_parser_emulator169_0", + "next_tables" : { + "FabricEgress.parser_emulator.parse_int_report_mirror" : "tbl_int_tna_parser_emulator169_0" + }, + "default_entry" : { + "action_id" : 92, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator169_0", + "id" : 58, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 169, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(PRESERVE_INT_MD)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [112], + "actions" : ["int_tna_parser_emulator169_0"], + "base_default_next" : "tbl_int_tna_parser_emulator173_0", + "next_tables" : { + "int_tna_parser_emulator169_0" : "tbl_int_tna_parser_emulator173_0" + }, + "default_entry" : { + "action_id" : 112, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int_tna_parser_emulator173_0", + "id" : 59, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 173, + "column" : 27, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [113], + "actions" : ["int_tna_parser_emulator173_0"], + "base_default_next" : "FabricEgress.pkt_io_egress.switch_info", + "next_tables" : { + "int_tna_parser_emulator173_0" : "FabricEgress.pkt_io_egress.switch_info" + }, + "default_entry" : { + "action_id" : 113, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.pkt_io_egress.switch_info", + "id" : 60, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 39, + "column" : 10, + "source_fragment" : "switch_info" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [81, 74], + "actions" : ["FabricEgress.pkt_io_egress.set_switch_info", "nop"], + "base_default_next" : "node_95", + "next_tables" : { + "FabricEgress.pkt_io_egress.set_switch_info" : "node_95", + "nop" : "node_95" + }, + "default_entry" : { + "action_id" : 74, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "tbl_packetio51", + "id" : 61, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 51, + "column" : 12, + "source_fragment" : "hdr.packet_in.setValid(); ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [114], + "actions" : ["packetio51"], + "base_default_next" : "node_97", + "next_tables" : { + "packetio51" : "node_97" + }, + "default_entry" : { + "action_id" : 114, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_packetio60", + "id" : 62, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 60, + "column" : 37, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [115], + "actions" : ["packetio60"], + "base_default_next" : "node_99", + "next_tables" : { + "packetio60" : "node_99" + }, + "default_entry" : { + "action_id" : 115, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.stats.flows", + "id" : 63, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 53, + "column" : 10, + "source_fragment" : "flows" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "stats_flow_id", + "target" : ["_egress_bridged36", "_base_stats_flow_id11"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [80], + "actions" : ["FabricEgress.stats.count"], + "base_default_next" : "node_101", + "next_tables" : { + "FabricEgress.stats.count" : "node_101" + }, + "default_entry" : { + "action_id" : 80, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next283", + "id" : 64, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 283, + "column" : 50, + "source_fragment" : "= INT_REPORT_TYPE_NO_REPORT; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [116], + "actions" : ["next283"], + "base_default_next" : "node_103", + "next_tables" : { + "next283" : "node_103" + }, + "default_entry" : { + "action_id" : 116, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_egress_next_pop_mpls_if_present", + "id" : 65, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 289, + "column" : 36, + "source_fragment" : "pop_mpls_if_present()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [82], + "actions" : ["FabricEgress.egress_next.pop_mpls_if_present"], + "base_default_next" : "node_107", + "next_tables" : { + "FabricEgress.egress_next.pop_mpls_if_present" : "node_107" + }, + "default_entry" : { + "action_id" : 82, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_egress_next_set_mpls", + "id" : 66, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 291, + "column" : 12, + "source_fragment" : "set_mpls()" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [83], + "actions" : ["FabricEgress.egress_next.set_mpls"], + "base_default_next" : "node_107", + "next_tables" : { + "FabricEgress.egress_next.set_mpls" : "node_107" + }, + "default_entry" : { + "action_id" : 83, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.egress_next.egress_vlan", + "id" : 67, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 264, + "column" : 10, + "source_fragment" : "egress_vlan" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "vlan_id", + "target" : ["_egress_bridged36", "_base_vlan_id6"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [84, 85, 86], + "actions" : ["FabricEgress.egress_next.push_vlan", "FabricEgress.egress_next.pop_vlan", "FabricEgress.egress_next.drop"], + "base_default_next" : "node_109", + "next_tables" : { + "FabricEgress.egress_next.push_vlan" : "node_109", + "FabricEgress.egress_next.pop_vlan" : "node_109", + "FabricEgress.egress_next.drop" : "node_109" + }, + "default_entry" : { + "action_id" : 86, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next323", + "id" : 68, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 323, + "column" : 25, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [118], + "actions" : ["next323"], + "base_default_next" : "node_111", + "next_tables" : { + "next323" : "node_111" + }, + "default_entry" : { + "action_id" : 118, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next325", + "id" : 69, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 325, + "column" : 25, + "source_fragment" : "= 1; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [117], + "actions" : ["next325"], + "base_default_next" : "tbl_int128", + "next_tables" : { + "next325" : "tbl_int128" + }, + "default_entry" : { + "action_id" : 117, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next333", + "id" : 70, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 333, + "column" : 33, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [119], + "actions" : ["next333"], + "base_default_next" : "node_116", + "next_tables" : { + "next333" : "node_116" + }, + "default_entry" : { + "action_id" : 119, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next336", + "id" : 71, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 336, + "column" : 29, + "source_fragment" : "= 1; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [120], + "actions" : ["next336"], + "base_default_next" : "tbl_int128", + "next_tables" : { + "next336" : "tbl_int128" + }, + "default_entry" : { + "action_id" : 120, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next343", + "id" : 72, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 343, + "column" : 39, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [121], + "actions" : ["next343"], + "base_default_next" : "node_121", + "next_tables" : { + "next343" : "node_121" + }, + "default_entry" : { + "action_id" : 121, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_next346", + "id" : 73, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 346, + "column" : 29, + "source_fragment" : "= 1; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [122], + "actions" : ["next346"], + "base_default_next" : "tbl_int128", + "next_tables" : { + "next346" : "tbl_int128" + }, + "default_entry" : { + "action_id" : 122, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_int128", + "id" : 74, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 128, + "column" : 4, + "source_fragment" : "egress_headers_t hdr = hdr_v1model.egress; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [123], + "actions" : ["int128"], + "base_default_next" : "FabricEgress.int_egress.queue_latency_thresholds", + "next_tables" : { + "int128" : "FabricEgress.int_egress.queue_latency_thresholds" + }, + "default_entry" : { + "action_id" : 123, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.int_egress.queue_latency_thresholds", + "id" : 75, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 159, + "column" : 10, + "source_fragment" : "queue_latency_thresholds" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "egress_qid", + "target" : ["scalars", "int_egress_egress_qid"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "hop_latency_upper", + "target" : ["scalars", "key_0"], + "mask" : null + }, + { + "match_type" : "range", + "name" : "hop_latency_lower", + "target" : ["scalars", "key_1"], + "mask" : null + } + ], + "match_type" : "range", + "type" : "simple", + "max_size" : 128, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [93, 94, 76], + "actions" : ["FabricEgress.int_egress.check_quota", "FabricEgress.int_egress.reset_quota", "nop"], + "base_default_next" : "FabricEgress.int_egress.config", + "next_tables" : { + "FabricEgress.int_egress.check_quota" : "FabricEgress.int_egress.config", + "FabricEgress.int_egress.reset_quota" : "FabricEgress.int_egress.config", + "nop" : "FabricEgress.int_egress.config" + }, + "default_entry" : { + "action_id" : 76, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "FabricEgress.int_egress.config", + "id" : 76, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 183, + "column" : 10, + "source_fragment" : "config" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [95], + "actions" : ["FabricEgress.int_egress.set_config"], + "base_default_next" : "tbl_int373", + "next_tables" : { + "FabricEgress.int_egress.set_config" : "tbl_int373" + }, + "default_entry" : { + "action_id" : 95, + "action_const" : false, + "action_data" : ["0xffffff00", "0xffffc0000000"], + "action_entry_const" : false + } + }, + { + "name" : "tbl_int373", + "id" : 77, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 373, + "column" : 38, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [125], + "actions" : ["int373"], + "base_default_next" : "node_127", + "next_tables" : { + "int373" : "node_127" + }, + "default_entry" : { + "action_id" : 125, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.int_egress.report", + "id" : 78, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 260, + "column" : 10, + "source_fragment" : "report" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "bmd_type", + "target" : ["int_egress_fabric_md_int_report_md", "bmd_type"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "mirror_type", + "target" : ["int_egress_fabric_md_int_report_md", "mirror_type"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "int_report_type", + "target" : ["int_egress_fabric_md_int_report_md", "report_type"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 6, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [96, 97, 98, 99, 77], + "actions" : ["FabricEgress.int_egress.do_local_report_encap", "FabricEgress.int_egress.do_local_report_encap_mpls", "FabricEgress.int_egress.do_drop_report_encap", "FabricEgress.int_egress.do_drop_report_encap_mpls", "nop"], + "base_default_next" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "next_tables" : { + "FabricEgress.int_egress.do_local_report_encap" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "FabricEgress.int_egress.do_local_report_encap_mpls" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "FabricEgress.int_egress.do_drop_report_encap" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "FabricEgress.int_egress.do_drop_report_encap_mpls" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "nop" : "FabricEgress.int_egress.adjust_int_report_hdr_length" + }, + "default_entry" : { + "action_id" : 77, + "action_const" : false, + "action_data" : [], + "action_entry_const" : false + } + }, + { + "name" : "FabricEgress.int_egress.int_metadata", + "id" : 79, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 315, + "column" : 10, + "source_fragment" : "int_metadata" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "int_report_type", + "target" : ["_egress_bridged36", "_int_bmd_report_type13"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "drop_ctl", + "target" : ["scalars", "userMetadata._drop_ctl2"], + "mask" : null + }, + { + "match_type" : "exact", + "name" : "queue_report", + "target" : ["scalars", "userMetadata._egress_int_md_queue_report42"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 2, + "with_counters" : true, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [100, 78], + "actions" : ["FabricEgress.int_egress.init_int_metadata", "nop"], + "base_default_next" : null, + "next_tables" : { + "__HIT__" : "tbl_int383", + "__MISS__" : "FabricEgress.int_egress.adjust_int_report_hdr_length" + }, + "default_entry" : { + "action_id" : 78, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 327, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 0, false): init_int_metadata(INT_REPORT_TYPE_FLOW)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 100, + "action_data" : ["0x1"] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 329, + "column" : 12, + "source_fragment" : "(INT_REPORT_TYPE_FLOW, 1, false): init_int_metadata(INT_REPORT_TYPE_DROP)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x01" + }, + { + "match_type" : "exact", + "key" : "0x00" + } + ], + "action_entry" : { + "action_id" : 100, + "action_data" : ["0x4"] + }, + "priority" : 2 + } + ] + }, + { + "name" : "tbl_int383", + "id" : 80, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 383, + "column" : 16, + "source_fragment" : "clone_preserving_field_list(CloneType.E2E, ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [124], + "actions" : ["int383"], + "base_default_next" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "next_tables" : { + "int383" : "FabricEgress.int_egress.adjust_int_report_hdr_length" + }, + "default_entry" : { + "action_id" : 124, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.int_egress.adjust_int_report_hdr_length", + "id" : 81, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 347, + "column" : 10, + "source_fragment" : "adjust_int_report_hdr_length" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "is_int_wip", + "target" : ["int_egress_fabric_md_bridged", "_int_bmd_wip_type18"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 2, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [79, 101], + "actions" : ["nop", "FabricEgress.int_egress.adjust_ip_udp_len"], + "base_default_next" : "tbl_slicing189", + "next_tables" : { + "nop" : "tbl_slicing189", + "FabricEgress.int_egress.adjust_ip_udp_len" : "tbl_slicing189" + }, + "default_entry" : { + "action_id" : 79, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + }, + "entries" : [ + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 358, + "column" : 12, + "source_fragment" : "INT_IS_WIP: adjust_ip_udp_len(INT_WIP_ADJUST_IP_BYTES, INT_WIP_ADJUST_UDP_BYTES)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x01" + } + ], + "action_entry" : { + "action_id" : 101, + "action_data" : ["0xfff2", "0xffde"] + }, + "priority" : 1 + }, + { + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 359, + "column" : 12, + "source_fragment" : "INT_IS_WIP_WITH_MPLS: adjust_ip_udp_len(INT_WIP_ADJUST_IP_MPLS_BYTES, INT_WIP_ADJUST_UDP_MPLS_BYTES)" + }, + "match_key" : [ + { + "match_type" : "exact", + "key" : "0x02" + } + ], + "action_entry" : { + "action_id" : 101, + "action_data" : ["0xffee", "0xffda"] + }, + "priority" : 2 + } + ] + }, + { + "name" : "tbl_slicing189", + "id" : 82, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 189, + "column" : 4, + "source_fragment" : "bit<6> tmp_dscp = fabric_md.bridged.base.slice_tc; ..." + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [127], + "actions" : ["slicing189"], + "base_default_next" : "FabricEgress.dscp_rewriter.rewriter", + "next_tables" : { + "slicing189" : "FabricEgress.dscp_rewriter.rewriter" + }, + "default_entry" : { + "action_id" : 127, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "FabricEgress.dscp_rewriter.rewriter", + "id" : 83, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 201, + "column" : 10, + "source_fragment" : "rewriter" + }, + "key" : [ + { + "match_type" : "exact", + "name" : "eg_port", + "target" : ["standard_metadata", "egress_port"], + "mask" : null + } + ], + "match_type" : "exact", + "type" : "simple", + "max_size" : 512, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [87, 88, 75], + "actions" : ["FabricEgress.dscp_rewriter.rewrite", "FabricEgress.dscp_rewriter.clear", "nop"], + "base_default_next" : null, + "next_tables" : { + "__HIT__" : "node_134", + "__MISS__" : "node_136" + }, + "default_entry" : { + "action_id" : 75, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_slicing217", + "id" : 84, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 217, + "column" : 30, + "source_fragment" : "=" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [126], + "actions" : ["slicing217"], + "base_default_next" : "node_136", + "next_tables" : { + "slicing217" : "node_136" + }, + "default_entry" : { + "action_id" : 126, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model170", + "id" : 85, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 170, + "column" : 12, + "source_fragment" : "recirculate_preserving_field_list(NO_PRESERVATION)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [128], + "actions" : ["fabric_v1model170"], + "base_default_next" : "node_138", + "next_tables" : { + "fabric_v1model170" : "node_138" + }, + "default_entry" : { + "action_id" : 128, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + }, + { + "name" : "tbl_fabric_v1model174", + "id" : 86, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 174, + "column" : 12, + "source_fragment" : "mark_to_drop(standard_md)" + }, + "key" : [], + "match_type" : "exact", + "type" : "simple", + "max_size" : 1024, + "with_counters" : false, + "support_timeout" : false, + "direct_meters" : null, + "action_ids" : [129], + "actions" : ["fabric_v1model174"], + "base_default_next" : null, + "next_tables" : { + "fabric_v1model174" : null + }, + "default_entry" : { + "action_id" : 129, + "action_const" : true, + "action_data" : [], + "action_entry_const" : true + } + } + ], + "action_profiles" : [], + "conditionals" : [ + { + "name" : "node_72", + "id" : 23, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 135, + "column" : 12, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._skip_egress0"] + } + } + }, + "true_next" : "tbl_fabric_v1model136", + "false_next" : "node_74" + }, + { + "name" : "node_74", + "id" : 24, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 140, + "column" : 13, + "source_fragment" : "standard_md.instance_type == 2" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "instance_type"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00000002" + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator14", + "false_next" : "node_84" + }, + { + "name" : "node_76", + "id" : 25, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 145, + "column" : 11, + "source_fragment" : "hdr_v1model.ingress.gtpu.isValid() || hdr_v1model.ingress.vxlan.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_gtpu12", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_vxlan15", "$valid$"] + } + } + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator148", + "false_next" : "node_78" + }, + { + "name" : "node_78", + "id" : 26, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 164, + "column" : 12, + "source_fragment" : "(bit<8>)fabric_md.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._recirc_preserved_report_type46"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "true_next" : "tbl_parser_emulator_parse_int_ingress_drop", + "false_next" : "tbl_parser_emulator_parse_int_report_mirror" + }, + { + "name" : "node_84", + "id" : 27, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 150, + "column" : 11, + "source_fragment" : "(bit<8>)fabric_md.egress.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator14_0", + "false_next" : "FabricEgress.pkt_io_egress.switch_info" + }, + { + "name" : "node_86", + "id" : 28, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 145, + "column" : 11, + "source_fragment" : "hdr_v1model.ingress.gtpu.isValid() || hdr_v1model.ingress.vxlan.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_gtpu12", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_vxlan15", "$valid$"] + } + } + } + } + }, + "true_next" : "tbl_int_tna_parser_emulator148_0", + "false_next" : "node_88" + }, + { + "name" : "node_88", + "id" : 29, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int_tna_parser_emulator.p4", + "line" : 164, + "column" : 12, + "source_fragment" : "(bit<8>)fabric_md.bridged.int_bmd.report_type == BridgedMdType_t.INT_INGRESS_DROP" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "expression", + "value" : { + "op" : "&", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_int_bmd_report_type13"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xff" + } + } + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "true_next" : "tbl_parser_emulator_parse_int_ingress_drop_0", + "false_next" : "tbl_parser_emulator_parse_int_report_mirror_0" + }, + { + "name" : "node_95", + "id" : 30, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 50, + "column" : 12, + "source_fragment" : "standard_md.egress_port == fabric_md.cpu_port" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + }, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_cpu_port37"] + } + } + }, + "true_next" : "tbl_packetio51", + "false_next" : "node_97" + }, + { + "name" : "node_97", + "id" : 31, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/packetio.p4", + "line" : 58, + "column" : 12, + "source_fragment" : "hdr.fake_ethernet.isValid() && ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_fake_ethernet2", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_fake_ethernet2", "ether_type"] + }, + "right" : { + "type" : "hexstr", + "value" : "0xbf03" + } + } + } + } + }, + "true_next" : "tbl_packetio60", + "false_next" : "node_99" + }, + { + "name" : "node_99", + "id" : 32, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/stats.p4", + "line" : 67, + "column" : 12, + "source_fragment" : "bmd_type == BridgedMdType_t.INGRESS_TO_EGRESS" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "true_next" : "FabricEgress.stats.flows", + "false_next" : "node_101" + }, + { + "name" : "node_101", + "id" : 33, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 280, + "column" : 12, + "source_fragment" : "fabric_md.bridged.base.is_multicast ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_is_multicast4"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_ig_port3"] + }, + "right" : { + "type" : "field", + "value" : ["standard_metadata", "egress_port"] + } + } + } + } + }, + "true_next" : "tbl_next283", + "false_next" : "node_103" + }, + { + "name" : "node_103", + "id" : 34, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 288, + "column" : 12, + "source_fragment" : "fabric_md.bridged.base.mpls_label == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_mpls_label2"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x000000" + } + } + }, + "true_next" : "node_104", + "false_next" : "tbl_egress_next_set_mpls" + }, + { + "name" : "node_104", + "id" : 35, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 289, + "column" : 16, + "source_fragment" : "hdr.mpls.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_mpls6", "$valid$"] + } + } + }, + "true_next" : "tbl_egress_next_pop_mpls_if_present", + "false_next" : "node_107" + }, + { + "name" : "node_107", + "id" : 36, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 159, + "column" : 39, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._egress_is_int_recirc44"] + } + } + }, + "false_next" : "FabricEgress.egress_next.egress_vlan", + "true_next" : "node_109" + }, + { + "name" : "node_109", + "id" : 37, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 322, + "column" : 12, + "source_fragment" : "hdr.mpls.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_mpls6", "$valid$"] + } + } + }, + "true_next" : "tbl_next323", + "false_next" : "node_113" + }, + { + "name" : "node_111", + "id" : 38, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 324, + "column" : 16, + "source_fragment" : "hdr.mpls.ttl == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_mpls6", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + }, + "true_next" : "tbl_next325", + "false_next" : "tbl_int128" + }, + { + "name" : "node_113", + "id" : 39, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 331, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + }, + "true_next" : "node_114", + "false_next" : "node_118" + }, + { + "name" : "node_114", + "id" : 40, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 319, + "column" : 28, + "source_fragment" : "(fabric_md.bridged.bmd_type == BridgedMdType_t.INT_INGRESS_DROP) || ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + } + } + }, + "false_next" : "tbl_next333", + "true_next" : "node_116" + }, + { + "name" : "node_116", + "id" : 41, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 335, + "column" : 20, + "source_fragment" : "hdr.ipv4.ttl == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv47", "ttl"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + }, + "true_next" : "tbl_next336", + "false_next" : "tbl_int128" + }, + { + "name" : "node_118", + "id" : 42, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 341, + "column" : 23, + "source_fragment" : "hdr.ipv6.isValid() && fabric_md.bridged.base.fwd_type != FWD_BRIDGING" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "and", + "left" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv68", "$valid$"] + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "!=", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_base_fwd_type5"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + } + } + }, + "true_next" : "node_119", + "false_next" : "tbl_int128" + }, + { + "name" : "node_119", + "id" : 43, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 319, + "column" : 28, + "source_fragment" : "(fabric_md.bridged.bmd_type == BridgedMdType_t.INT_INGRESS_DROP) || ..." + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "or", + "left" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x04" + } + } + }, + "right" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_egress_bridged36", "_bmd_type0"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x02" + } + } + } + } + }, + "false_next" : "tbl_next343", + "true_next" : "node_121" + }, + { + "name" : "node_121", + "id" : 44, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/next.p4", + "line" : 345, + "column" : 20, + "source_fragment" : "hdr.ipv6.hop_limit == 0" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["_ingress_ipv68", "hop_limit"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x00" + } + } + }, + "true_next" : "tbl_next346", + "false_next" : "tbl_int128" + }, + { + "name" : "node_127", + "id" : 45, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/int.p4", + "line" : 375, + "column" : 12, + "source_fragment" : "fabric_md.int_report_md.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["int_egress_fabric_md_int_report_md", "$valid$"] + } + } + }, + "true_next" : "FabricEgress.int_egress.report", + "false_next" : "FabricEgress.int_egress.int_metadata" + }, + { + "name" : "node_134", + "id" : 46, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/slicing.p4", + "line" : 216, + "column" : 16, + "source_fragment" : "hdr.ipv4.isValid()" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + }, + "true_next" : "tbl_slicing217", + "false_next" : "node_136" + }, + { + "name" : "node_136", + "id" : 47, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 168, + "column" : 12, + "source_fragment" : "fabric_md" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["scalars", "userMetadata._do_upf_uplink_recirc1"] + } + } + }, + "true_next" : "tbl_fabric_v1model170", + "false_next" : "node_138" + }, + { + "name" : "node_138", + "id" : 48, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "line" : 173, + "column" : 12, + "source_fragment" : "fabric_md.drop_ctl == 1" + }, + "expression" : { + "type" : "expression", + "value" : { + "op" : "==", + "left" : { + "type" : "field", + "value" : ["scalars", "userMetadata._drop_ctl2"] + }, + "right" : { + "type" : "hexstr", + "value" : "0x01" + } + } + }, + "false_next" : null, + "true_next" : "tbl_fabric_v1model174" + } + ] + } + ], + "checksums" : [ + { + "name" : "cksum", + "id" : 0, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 55, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "target" : ["_ingress_ipv47", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_2", + "verify" : false, + "update" : true, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + } + }, + { + "name" : "cksum_0", + "id" : 1, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 73, + "column" : 8, + "source_fragment" : "update_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "target" : ["_ingress_inner_ipv418", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_3", + "verify" : false, + "update" : true, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "$valid$"] + } + } + } + }, + { + "name" : "cksum_1", + "id" : 2, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 92, + "column" : 8, + "source_fragment" : "update_checksum(hdr.egress.report_ipv4.isValid(), ..." + }, + "target" : ["_egress_report_ipv427", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_4", + "verify" : false, + "update" : true, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_egress_report_ipv427", "$valid$"] + } + } + } + }, + { + "name" : "cksum_2", + "id" : 3, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 13, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.ipv4.isValid(), ..." + }, + "target" : ["_ingress_ipv47", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_5", + "verify" : true, + "update" : false, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_ipv47", "$valid$"] + } + } + } + }, + { + "name" : "cksum_3", + "id" : 4, + "source_info" : { + "filename" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/../v1model/include/control/checksum.p4", + "line" : 31, + "column" : 8, + "source_fragment" : "verify_checksum(hdr.ingress.inner_ipv4.isValid(), ..." + }, + "target" : ["_ingress_inner_ipv418", "hdr_checksum"], + "type" : "generic", + "calculation" : "calc_6", + "verify" : true, + "update" : false, + "if_cond" : { + "type" : "expression", + "value" : { + "op" : "d2b", + "left" : null, + "right" : { + "type" : "field", + "value" : ["_ingress_inner_ipv418", "$valid$"] + } + } + } + } + ], + "force_arith" : [], + "extern_instances" : [], + "field_aliases" : [ + [ + "queueing_metadata.enq_timestamp", + ["standard_metadata", "enq_timestamp"] + ], + [ + "queueing_metadata.enq_qdepth", + ["standard_metadata", "enq_qdepth"] + ], + [ + "queueing_metadata.deq_timedelta", + ["standard_metadata", "deq_timedelta"] + ], + [ + "queueing_metadata.deq_qdepth", + ["standard_metadata", "deq_qdepth"] + ], + [ + "intrinsic_metadata.ingress_global_timestamp", + ["standard_metadata", "ingress_global_timestamp"] + ], + [ + "intrinsic_metadata.egress_global_timestamp", + ["standard_metadata", "egress_global_timestamp"] + ], + [ + "intrinsic_metadata.mcast_grp", + ["standard_metadata", "mcast_grp"] + ], + [ + "intrinsic_metadata.egress_rid", + ["standard_metadata", "egress_rid"] + ], + [ + "intrinsic_metadata.priority", + ["standard_metadata", "priority"] + ] + ], + "program" : "/home/ubuntu/tfs-setup/fabric-tna/p4src/v1model/fabric_v1model.p4", + "__meta__" : { + "version" : [2, 23], + "compiler" : "https://github.com/p4lang/p4c" + } +} \ No newline at end of file diff --git a/src/tests/p4-int-routing-acl/p4src/p4info.txt b/src/tests/p4-int-routing-acl/p4src/p4info.txt new file mode 100644 index 0000000000000000000000000000000000000000..4e54f2861496816db734612ad4558cf4d03e69f8 --- /dev/null +++ b/src/tests/p4-int-routing-acl/p4src/p4info.txt @@ -0,0 +1,1911 @@ +pkg_info { + arch: "v1model" +} +tables { + preamble { + id: 41243186 + name: "FabricIngress.stats.flows" + alias: "FabricIngress.stats.flows" + } + match_fields { + id: 1 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 4 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "ig_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 21929788 + } + const_default_action_id: 21929788 + direct_resource_ids: 333776332 + size: 1024 +} +tables { + preamble { + id: 43310977 + name: "FabricIngress.filtering.ingress_port_vlan" + alias: "ingress_port_vlan" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: EXACT + } + match_fields { + id: 2 + name: "vlan_is_valid" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 3 + name: "vlan_id" + bitwidth: 12 + match_type: TERNARY + } + action_refs { + id: 17164167 + } + action_refs { + id: 24158268 + } + action_refs { + id: 24266015 + } + const_default_action_id: 17164167 + direct_resource_ids: 326221069 + size: 1024 +} +tables { + preamble { + id: 49718154 + name: "FabricIngress.filtering.fwd_classifier" + alias: "fwd_classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: EXACT + } + match_fields { + id: 2 + name: "eth_dst" + bitwidth: 48 + match_type: TERNARY + } + match_fields { + id: 3 + name: "eth_type" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_eth_type" + bitwidth: 16 + match_type: EXACT + } + action_refs { + id: 25032921 + } + const_default_action_id: 25032921 + direct_resource_ids: 335473470 + size: 1024 +} +tables { + preamble { + id: 43623757 + name: "FabricIngress.forwarding.bridging" + alias: "bridging" + } + match_fields { + id: 1 + name: "vlan_id" + bitwidth: 12 + match_type: EXACT + } + match_fields { + id: 2 + name: "eth_dst" + bitwidth: 48 + match_type: TERNARY + } + action_refs { + id: 21791748 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 29734112 + direct_resource_ids: 330959985 + size: 1024 +} +tables { + preamble { + id: 37768578 + name: "FabricIngress.forwarding.mpls" + alias: "mpls" + } + match_fields { + id: 1 + name: "mpls_label" + bitwidth: 20 + match_type: EXACT + } + action_refs { + id: 30066030 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 29734112 + direct_resource_ids: 318961579 + size: 1024 +} +tables { + preamble { + id: 41754650 + name: "FabricIngress.forwarding.routing_v4" + alias: "routing_v4" + } + match_fields { + id: 1 + name: "ipv4_dst" + bitwidth: 32 + match_type: LPM + } + action_refs { + id: 19792090 + } + action_refs { + id: 29124955 + } + action_refs { + id: 17639597 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + direct_resource_ids: 333425635 + size: 1024 +} +tables { + preamble { + id: 49342721 + name: "FabricIngress.forwarding.routing_v6" + alias: "routing_v6" + } + match_fields { + id: 1 + name: "ipv6_dst" + bitwidth: 128 + match_type: LPM + } + action_refs { + id: 21856023 + } + action_refs { + id: 24646532 + } + action_refs { + id: 29734112 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + direct_resource_ids: 324042090 + size: 1024 +} +tables { + preamble { + id: 36626242 + name: "FabricIngress.pre_next.next_mpls" + alias: "next_mpls" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 22765924 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 330020245 + size: 1024 +} +tables { + preamble { + id: 48011802 + name: "FabricIngress.pre_next.next_vlan" + alias: "next_vlan" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 33475378 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 333692067 + size: 1024 +} +tables { + preamble { + id: 44104738 + name: "FabricIngress.acl.acl" + alias: "acl" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "eth_dst" + bitwidth: 48 + match_type: TERNARY + } + match_fields { + id: 3 + name: "eth_src" + bitwidth: 48 + match_type: TERNARY + } + match_fields { + id: 4 + name: "vlan_id" + bitwidth: 12 + match_type: TERNARY + } + match_fields { + id: 5 + name: "eth_type" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 7 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 8 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 9 + name: "icmp_type" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 10 + name: "icmp_code" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 11 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 12 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 13 + name: "ig_port_type" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 23623126 + } + action_refs { + id: 23579892 + } + action_refs { + id: 21161133 + } + action_refs { + id: 23570973 + } + action_refs { + id: 24507494 + } + action_refs { + id: 29607214 + } + const_default_action_id: 29607214 + direct_resource_ids: 319194241 + size: 1024 +} +tables { + preamble { + id: 39142283 + name: "FabricIngress.next.simple" + alias: "simple" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 19358572 + } + action_refs { + id: 31887425 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + direct_resource_ids: 326633416 + size: 1024 +} +tables { + preamble { + id: 47960972 + name: "FabricIngress.next.hashed" + alias: "hashed" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 27301117 + } + action_refs { + id: 20985706 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + implementation_id: 289544276 + direct_resource_ids: 322798228 + size: 1024 +} +tables { + preamble { + id: 40619180 + name: "FabricIngress.next.multicast" + alias: "multicast" + } + match_fields { + id: 1 + name: "next_id" + bitwidth: 32 + match_type: EXACT + } + action_refs { + id: 21629581 + } + action_refs { + id: 23637707 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 23637707 + direct_resource_ids: 319194968 + size: 1024 +} +tables { + preamble { + id: 34606298 + name: "FabricIngress.slice_tc_classifier.classifier" + alias: "classifier" + } + match_fields { + id: 1 + name: "ig_port" + bitwidth: 9 + match_type: TERNARY + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: TERNARY + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: TERNARY + } + action_refs { + id: 23786376 + } + action_refs { + id: 25983516 + } + action_refs { + id: 30111108 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 30111108 + direct_resource_ids: 334706097 + size: 512 +} +tables { + preamble { + id: 36435258 + name: "FabricIngress.qos.queues" + alias: "queues" + } + match_fields { + id: 1 + name: "slice_tc" + bitwidth: 6 + match_type: EXACT + } + match_fields { + id: 2 + name: "color" + bitwidth: 2 + match_type: TERNARY + } + action_refs { + id: 32116918 + } + action_refs { + id: 28214351 + } + const_default_action_id: 32116918 + direct_resource_ids: 327743278 + size: 128 +} +tables { + preamble { + id: 43965782 + name: "FabricIngress.qos.default_tc" + alias: "default_tc" + } + match_fields { + id: 1 + name: "slice_tc" + bitwidth: 6 + match_type: TERNARY + } + match_fields { + id: 2 + name: "tc_unknown" + bitwidth: 1 + match_type: EXACT + } + action_refs { + id: 23587909 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 16 +} +tables { + preamble { + id: 40748488 + name: "FabricIngress.int_watchlist.watchlist" + alias: "watchlist" + } + match_fields { + id: 1 + name: "ipv4_valid" + bitwidth: 1 + match_type: EXACT + } + match_fields { + id: 2 + name: "ipv4_src" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 3 + name: "ipv4_dst" + bitwidth: 32 + match_type: TERNARY + } + match_fields { + id: 4 + name: "ip_proto" + bitwidth: 8 + match_type: TERNARY + } + match_fields { + id: 5 + name: "l4_sport" + bitwidth: 16 + match_type: RANGE + } + match_fields { + id: 6 + name: "l4_dport" + bitwidth: 16 + match_type: RANGE + } + action_refs { + id: 25078550 + } + action_refs { + id: 20118842 + } + action_refs { + id: 28396787 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28396787 + direct_resource_ids: 328581521 + size: 64 +} +tables { + preamble { + id: 43851059 + name: "FabricEgress.stats.flows" + alias: "FabricEgress.stats.flows" + } + match_fields { + id: 1 + name: "stats_flow_id" + bitwidth: 10 + match_type: EXACT + } + match_fields { + id: 2 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 26838724 + } + const_default_action_id: 26838724 + direct_resource_ids: 334508337 + size: 1024 +} +tables { + preamble { + id: 35217901 + name: "FabricEgress.pkt_io_egress.switch_info" + alias: "switch_info" + } + action_refs { + id: 32804382 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + size: 1 +} +tables { + preamble { + id: 49262446 + name: "FabricEgress.egress_next.egress_vlan" + alias: "egress_vlan" + } + match_fields { + id: 1 + name: "vlan_id" + bitwidth: 12 + match_type: EXACT + } + match_fields { + id: 2 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 30307755 + } + action_refs { + id: 17183246 + } + action_refs { + id: 30812542 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 30812542 + direct_resource_ids: 318892680 + size: 1024 +} +tables { + preamble { + id: 49970092 + name: "FabricEgress.dscp_rewriter.rewriter" + alias: "rewriter" + } + match_fields { + id: 1 + name: "eg_port" + bitwidth: 9 + match_type: EXACT + } + action_refs { + id: 27951287 + } + action_refs { + id: 24120545 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + const_default_action_id: 28485346 + size: 512 +} +tables { + preamble { + id: 36860953 + name: "FabricEgress.int_egress.queue_latency_thresholds" + alias: "queue_latency_thresholds" + } + match_fields { + id: 1 + name: "egress_qid" + bitwidth: 5 + match_type: EXACT + } + match_fields { + id: 2 + name: "hop_latency_upper" + bitwidth: 16 + match_type: RANGE + } + match_fields { + id: 3 + name: "hop_latency_lower" + bitwidth: 16 + match_type: RANGE + } + action_refs { + id: 22415037 + } + action_refs { + id: 19702294 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + size: 128 +} +tables { + preamble { + id: 40475827 + name: "FabricEgress.int_egress.config" + alias: "config" + } + action_refs { + id: 22425991 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + size: 1 +} +tables { + preamble { + id: 46071383 + name: "FabricEgress.int_egress.report" + alias: "report" + } + match_fields { + id: 1 + name: "bmd_type" + bitwidth: 8 + match_type: EXACT + } + match_fields { + id: 2 + name: "mirror_type" + bitwidth: 3 + match_type: EXACT + } + match_fields { + id: 3 + name: "int_report_type" + bitwidth: 3 + match_type: EXACT + } + action_refs { + id: 30783845 + } + action_refs { + id: 22769901 + } + action_refs { + id: 32486459 + } + action_refs { + id: 25343592 + } + action_refs { + id: 28485346 + annotations: "@defaultonly" + scope: DEFAULT_ONLY + } + direct_resource_ids: 325056546 + size: 6 +} +actions { + preamble { + id: 28485346 + name: "nop" + alias: "nop" + } +} +actions { + preamble { + id: 21257015 + name: "NoAction" + alias: "NoAction" + annotations: "@noWarn(\"unused\")" + } +} +actions { + preamble { + id: 21929788 + name: "FabricIngress.stats.count" + alias: "FabricIngress.stats.count" + } + params { + id: 1 + name: "flow_id" + bitwidth: 10 + } +} +actions { + preamble { + id: 17164167 + name: "FabricIngress.filtering.deny" + alias: "deny" + } +} +actions { + preamble { + id: 24158268 + name: "FabricIngress.filtering.permit" + alias: "permit" + } + params { + id: 1 + name: "port_type" + bitwidth: 2 + } +} +actions { + preamble { + id: 24266015 + name: "FabricIngress.filtering.permit_with_internal_vlan" + alias: "permit_with_internal_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } + params { + id: 2 + name: "port_type" + bitwidth: 2 + } +} +actions { + preamble { + id: 25032921 + name: "FabricIngress.filtering.set_forwarding_type" + alias: "set_forwarding_type" + } + params { + id: 1 + name: "fwd_type" + bitwidth: 3 + } +} +actions { + preamble { + id: 29734112 + name: "FabricIngress.forwarding.set_int_drop_reason" + alias: "set_int_drop_reason" + } + params { + id: 1 + name: "drop_reason" + bitwidth: 8 + } +} +actions { + preamble { + id: 21791748 + name: "FabricIngress.forwarding.set_next_id_bridging" + alias: "set_next_id_bridging" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 30066030 + name: "FabricIngress.forwarding.pop_mpls_and_next" + alias: "pop_mpls_and_next" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 19792090 + name: "FabricIngress.forwarding.set_next_id_routing_v4" + alias: "set_next_id_routing_v4" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 29124955 + name: "FabricIngress.forwarding.nop_routing_v4" + alias: "nop_routing_v4" + } +} +actions { + preamble { + id: 17639597 + name: "FabricIngress.forwarding.drop_routing_v4" + alias: "drop_routing_v4" + } +} +actions { + preamble { + id: 21856023 + name: "FabricIngress.forwarding.set_next_id_routing_v6" + alias: "set_next_id_routing_v6" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 24646532 + name: "FabricIngress.forwarding.drop_routing_v6" + alias: "drop_routing_v6" + } +} +actions { + preamble { + id: 22765924 + name: "FabricIngress.pre_next.set_mpls_label" + alias: "set_mpls_label" + } + params { + id: 1 + name: "label" + bitwidth: 20 + } +} +actions { + preamble { + id: 33475378 + name: "FabricIngress.pre_next.set_vlan" + alias: "set_vlan" + } + params { + id: 1 + name: "vlan_id" + bitwidth: 12 + } +} +actions { + preamble { + id: 23623126 + name: "FabricIngress.acl.set_next_id_acl" + alias: "set_next_id_acl" + } + params { + id: 1 + name: "next_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 21161133 + name: "FabricIngress.acl.copy_to_cpu" + alias: "copy_to_cpu" + } +} +actions { + preamble { + id: 23579892 + name: "FabricIngress.acl.punt_to_cpu" + alias: "punt_to_cpu" + } +} +actions { + preamble { + id: 23570973 + name: "FabricIngress.acl.drop" + alias: "acl.drop" + } +} +actions { + preamble { + id: 24507494 + name: "FabricIngress.acl.set_output_port" + alias: "set_output_port" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 29607214 + name: "FabricIngress.acl.nop_acl" + alias: "nop_acl" + } +} +actions { + preamble { + id: 19358572 + name: "FabricIngress.next.output_simple" + alias: "output_simple" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 31887425 + name: "FabricIngress.next.routing_simple" + alias: "routing_simple" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + params { + id: 2 + name: "smac" + bitwidth: 48 + } + params { + id: 3 + name: "dmac" + bitwidth: 48 + } +} +actions { + preamble { + id: 27301117 + name: "FabricIngress.next.output_hashed" + alias: "output_hashed" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 20985706 + name: "FabricIngress.next.routing_hashed" + alias: "routing_hashed" + } + params { + id: 1 + name: "port_num" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + params { + id: 2 + name: "smac" + bitwidth: 48 + } + params { + id: 3 + name: "dmac" + bitwidth: 48 + } +} +actions { + preamble { + id: 21629581 + name: "FabricIngress.next.set_mcast_group_id" + alias: "set_mcast_group_id" + } + params { + id: 1 + name: "group_id" + bitwidth: 16 + } +} +actions { + preamble { + id: 23637707 + name: "FabricIngress.next.reset_mcast_group_id" + alias: "reset_mcast_group_id" + } +} +actions { + preamble { + id: 23786376 + name: "FabricIngress.slice_tc_classifier.set_slice_id_tc" + alias: "set_slice_id_tc" + } + params { + id: 1 + name: "slice_id" + bitwidth: 4 + } + params { + id: 2 + name: "tc" + bitwidth: 2 + } +} +actions { + preamble { + id: 30111108 + name: "FabricIngress.slice_tc_classifier.no_classification" + alias: "no_classification" + } +} +actions { + preamble { + id: 25983516 + name: "FabricIngress.slice_tc_classifier.trust_dscp" + alias: "trust_dscp" + } +} +actions { + preamble { + id: 32116918 + name: "FabricIngress.qos.set_queue" + alias: "set_queue" + } + params { + id: 1 + name: "qid" + bitwidth: 5 + } +} +actions { + preamble { + id: 28214351 + name: "FabricIngress.qos.meter_drop" + alias: "meter_drop" + } +} +actions { + preamble { + id: 23587909 + name: "FabricIngress.qos.set_default_tc" + alias: "set_default_tc" + } + params { + id: 1 + name: "tc" + bitwidth: 2 + } +} +actions { + preamble { + id: 25078550 + name: "FabricIngress.int_watchlist.mark_to_report" + alias: "mark_to_report" + } +} +actions { + preamble { + id: 28396787 + name: "FabricIngress.int_watchlist.no_report" + alias: "no_report" + } +} +actions { + preamble { + id: 20118842 + name: "FabricIngress.int_watchlist.no_report_collector" + alias: "no_report_collector" + } +} +actions { + preamble { + id: 26838724 + name: "FabricEgress.stats.count" + alias: "FabricEgress.stats.count" + } +} +actions { + preamble { + id: 32804382 + name: "FabricEgress.pkt_io_egress.set_switch_info" + alias: "set_switch_info" + } + params { + id: 1 + name: "cpu_port" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } +} +actions { + preamble { + id: 30307755 + name: "FabricEgress.egress_next.push_vlan" + alias: "push_vlan" + } +} +actions { + preamble { + id: 17183246 + name: "FabricEgress.egress_next.pop_vlan" + alias: "pop_vlan" + } +} +actions { + preamble { + id: 30812542 + name: "FabricEgress.egress_next.drop" + alias: "egress_next.drop" + } +} +actions { + preamble { + id: 27951287 + name: "FabricEgress.dscp_rewriter.rewrite" + alias: "rewrite" + } +} +actions { + preamble { + id: 24120545 + name: "FabricEgress.dscp_rewriter.clear" + alias: "clear" + } +} +actions { + preamble { + id: 22415037 + name: "FabricEgress.int_egress.check_quota" + alias: "check_quota" + } +} +actions { + preamble { + id: 19702294 + name: "FabricEgress.int_egress.reset_quota" + alias: "reset_quota" + } +} +actions { + preamble { + id: 22425991 + name: "FabricEgress.int_egress.set_config" + alias: "set_config" + } + params { + id: 1 + name: "hop_latency_mask" + bitwidth: 32 + } + params { + id: 2 + name: "timestamp_mask" + bitwidth: 48 + } +} +actions { + preamble { + id: 30783845 + name: "FabricEgress.int_egress.do_local_report_encap" + alias: "do_local_report_encap" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "switch_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 22769901 + name: "FabricEgress.int_egress.do_local_report_encap_mpls" + alias: "do_local_report_encap_mpls" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "mon_label" + bitwidth: 20 + } + params { + id: 5 + name: "switch_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 32486459 + name: "FabricEgress.int_egress.do_drop_report_encap" + alias: "do_drop_report_encap" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "switch_id" + bitwidth: 32 + } +} +actions { + preamble { + id: 25343592 + name: "FabricEgress.int_egress.do_drop_report_encap_mpls" + alias: "do_drop_report_encap_mpls" + } + params { + id: 1 + name: "src_ip" + bitwidth: 32 + } + params { + id: 2 + name: "mon_ip" + bitwidth: 32 + } + params { + id: 3 + name: "mon_port" + bitwidth: 16 + } + params { + id: 4 + name: "mon_label" + bitwidth: 20 + } + params { + id: 5 + name: "switch_id" + bitwidth: 32 + } +} +action_profiles { + preamble { + id: 289544276 + name: "FabricIngress.next.hashed_profile" + alias: "hashed_profile" + } + table_ids: 47960972 + with_selector: true + size: 16 + max_group_size: 16 +} +counters { + preamble { + id: 309010261 + name: "FabricIngress.filtering.fwd_type_counter" + alias: "fwd_type_counter" + } + spec { + unit: BOTH + } + size: 8 +} +direct_counters { + preamble { + id: 333776332 + name: "FabricIngress.stats.flow_counter" + alias: "FabricIngress.stats.flow_counter" + } + spec { + unit: BOTH + } + direct_table_id: 41243186 +} +direct_counters { + preamble { + id: 326221069 + name: "FabricIngress.filtering.ingress_port_vlan_counter" + alias: "ingress_port_vlan_counter" + } + spec { + unit: BOTH + } + direct_table_id: 43310977 +} +direct_counters { + preamble { + id: 335473470 + name: "FabricIngress.filtering.fwd_classifier_counter" + alias: "fwd_classifier_counter" + } + spec { + unit: BOTH + } + direct_table_id: 49718154 +} +direct_counters { + preamble { + id: 330959985 + name: "FabricIngress.forwarding.bridging_counter" + alias: "bridging_counter" + } + spec { + unit: BOTH + } + direct_table_id: 43623757 +} +direct_counters { + preamble { + id: 318961579 + name: "FabricIngress.forwarding.mpls_counter" + alias: "mpls_counter" + } + spec { + unit: BOTH + } + direct_table_id: 37768578 +} +direct_counters { + preamble { + id: 333425635 + name: "FabricIngress.forwarding.routing_v4_counter" + alias: "routing_v4_counter" + } + spec { + unit: BOTH + } + direct_table_id: 41754650 +} +direct_counters { + preamble { + id: 324042090 + name: "FabricIngress.forwarding.routing_v6_counter" + alias: "routing_v6_counter" + } + spec { + unit: BOTH + } + direct_table_id: 49342721 +} +direct_counters { + preamble { + id: 330020245 + name: "FabricIngress.pre_next.next_mpls_counter" + alias: "next_mpls_counter" + } + spec { + unit: BOTH + } + direct_table_id: 36626242 +} +direct_counters { + preamble { + id: 333692067 + name: "FabricIngress.pre_next.next_vlan_counter" + alias: "next_vlan_counter" + } + spec { + unit: BOTH + } + direct_table_id: 48011802 +} +direct_counters { + preamble { + id: 319194241 + name: "FabricIngress.acl.acl_counter" + alias: "acl_counter" + } + spec { + unit: BOTH + } + direct_table_id: 44104738 +} +direct_counters { + preamble { + id: 326633416 + name: "FabricIngress.next.simple_counter" + alias: "simple_counter" + } + spec { + unit: BOTH + } + direct_table_id: 39142283 +} +direct_counters { + preamble { + id: 322798228 + name: "FabricIngress.next.hashed_counter" + alias: "hashed_counter" + } + spec { + unit: BOTH + } + direct_table_id: 47960972 +} +direct_counters { + preamble { + id: 319194968 + name: "FabricIngress.next.multicast_counter" + alias: "multicast_counter" + } + spec { + unit: BOTH + } + direct_table_id: 40619180 +} +direct_counters { + preamble { + id: 334706097 + name: "FabricIngress.slice_tc_classifier.classifier_stats" + alias: "classifier_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 34606298 +} +direct_counters { + preamble { + id: 327743278 + name: "FabricIngress.qos.queues_stats" + alias: "queues_stats" + } + spec { + unit: PACKETS + } + direct_table_id: 36435258 +} +direct_counters { + preamble { + id: 328581521 + name: "FabricIngress.int_watchlist.watchlist_counter" + alias: "watchlist_counter" + } + spec { + unit: BOTH + } + direct_table_id: 40748488 +} +direct_counters { + preamble { + id: 334508337 + name: "FabricEgress.stats.flow_counter" + alias: "FabricEgress.stats.flow_counter" + } + spec { + unit: BOTH + } + direct_table_id: 43851059 +} +direct_counters { + preamble { + id: 318892680 + name: "FabricEgress.egress_next.egress_vlan_counter" + alias: "egress_vlan_counter" + } + spec { + unit: BOTH + } + direct_table_id: 49262446 +} +direct_counters { + preamble { + id: 325056546 + name: "FabricEgress.int_egress.report_counter" + alias: "report_counter" + } + spec { + unit: BOTH + } + direct_table_id: 46071383 +} +meters { + preamble { + id: 348573637 + name: "FabricIngress.qos.slice_tc_meter" + alias: "slice_tc_meter" + } + spec { + unit: BYTES + } + size: 64 +} +controller_packet_metadata { + preamble { + id: 81826293 + name: "packet_in" + alias: "packet_in" + annotations: "@controller_header(\"packet_in\")" + } + metadata { + id: 1 + name: "ingress_port" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + metadata { + id: 2 + name: "_pad0" + bitwidth: 7 + } +} +controller_packet_metadata { + preamble { + id: 76689799 + name: "packet_out" + alias: "packet_out" + annotations: "@controller_header(\"packet_out\")" + } + metadata { + id: 1 + name: "pad0" + annotations: "@padding" + bitwidth: 7 + } + metadata { + id: 2 + name: "egress_port" + bitwidth: 9 + type_name { + name: "FabricPortId_t" + } + } + metadata { + id: 3 + name: "pad1" + annotations: "@padding" + bitwidth: 3 + } + metadata { + id: 4 + name: "queue_id" + bitwidth: 5 + } + metadata { + id: 5 + name: "pad2" + annotations: "@padding" + bitwidth: 5 + } + metadata { + id: 6 + name: "cpu_loopback_mode" + bitwidth: 2 + } + metadata { + id: 7 + name: "do_forwarding" + bitwidth: 1 + } + metadata { + id: 8 + name: "pad3" + annotations: "@padding" + bitwidth: 16 + } + metadata { + id: 9 + name: "pad4" + annotations: "@padding" + bitwidth: 48 + } + metadata { + id: 10 + name: "ether_type" + bitwidth: 16 + } +} +registers { + preamble { + id: 376533241 + name: "FabricEgress.int_egress.seq_number" + alias: "seq_number" + annotations: "@hidden" + } + type_spec { + bitstring { + bit { + bitwidth: 32 + } + } + } + size: 1024 +} +type_info { + serializable_enums { + key: "BridgedMdType_t" + value { + underlying_type { + bitwidth: 8 + } + members { + name: "INVALID" + value: "\000" + } + members { + name: "INGRESS_TO_EGRESS" + value: "\001" + } + members { + name: "EGRESS_MIRROR" + value: "\002" + } + members { + name: "INGRESS_MIRROR" + value: "\003" + } + members { + name: "INT_INGRESS_DROP" + value: "\004" + } + members { + name: "DEFLECTED" + value: "\005" + } + } + } + serializable_enums { + key: "CpuLoopbackMode_t" + value { + underlying_type { + bitwidth: 2 + } + members { + name: "DISABLED" + value: "\000" + } + members { + name: "DIRECT" + value: "\001" + } + members { + name: "INGRESS" + value: "\002" + } + } + } + serializable_enums { + key: "FabricMirrorType_t" + value { + underlying_type { + bitwidth: 3 + } + members { + name: "INVALID" + value: "\000" + } + members { + name: "INT_REPORT" + value: "\001" + } + members { + name: "PACKET_IN" + value: "\002" + } + } + } + serializable_enums { + key: "PortType_t" + value { + underlying_type { + bitwidth: 2 + } + members { + name: "UNKNOWN" + value: "\000" + } + members { + name: "EDGE" + value: "\001" + } + members { + name: "INFRA" + value: "\002" + } + members { + name: "INTERNAL" + value: "\003" + } + } + } + new_types { + key: "FabricPortId_t" + value { + original_type { + bitstring { + bit { + bitwidth: 9 + } + } + } + } + } +} diff --git a/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh b/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh new file mode 100755 index 0000000000000000000000000000000000000000..76469ca55455aec65569a7c104f87e8d6673dec9 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_01_bootstrap.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 sure to source the following scripts: +# - my_deploy.sh +# - tfs_runtime_env_vars.sh + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_bootstrap.py diff --git a/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh b/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh new file mode 100755 index 0000000000000000000000000000000000000000..6709d66c62cae11ecc1e555bae81c680dfeaafc8 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_02_rules_provision.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_rules_provision.py diff --git a/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh b/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh new file mode 100755 index 0000000000000000000000000000000000000000..3a67fad8a04520bc48c666b48d684b5ad7fe3d13 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_03_rules_deprovision.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py diff --git a/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh b/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh new file mode 100755 index 0000000000000000000000000000000000000000..917a2af2dab0ab1b9d0d05ad272c6494486d9580 --- /dev/null +++ b/src/tests/p4-int-routing-acl/run_test_04_cleanup.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +source tfs_runtime_env_vars.sh +python3 -m pytest --verbose src/tests/p4-int-routing-acl/test_functional_cleanup.py diff --git a/src/tests/p4-int-routing-acl/setup.sh b/src/tests/p4-int-routing-acl/setup.sh new file mode 100755 index 0000000000000000000000000000000000000000..c771642769fe528fe1179909ab0b8edb768f7264 --- /dev/null +++ b/src/tests/p4-int-routing-acl/setup.sh @@ -0,0 +1,22 @@ +#! /bin/bash +# Copyright 2022-2024 ETSI 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. + + +export POD_NAME=$(kubectl get pods -n=tfs | grep device | awk '{print $1}') + +kubectl exec ${POD_NAME} -n=tfs -c=server -- mkdir -p /root/p4 + +kubectl cp src/tests/p4-int-routing-acl/p4src/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server +kubectl cp src/tests/p4-int-routing-acl/p4src/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server diff --git a/src/tests/p4-int-routing-acl/test_common.py b/src/tests/p4-int-routing-acl/test_common.py new file mode 100644 index 0000000000000000000000000000000000000000..8254eddc5bb5f2f2bbf4c0866a9409552872b2c8 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_common.py @@ -0,0 +1,111 @@ +# Copyright 2022-2024 ETSI 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. + +import os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, DeviceOperationalStatusEnum +from common.tools.object_factory.Context import json_context_id + +# Context info +CONTEXT_NAME_P4 = DEFAULT_CONTEXT_NAME +ADMIN_CONTEXT_ID = ContextId(**json_context_id(CONTEXT_NAME_P4)) + +# Device and rule cardinality variables +DEV_NB = 3 +CONNECTION_RULES = 3 +ENDPOINT_RULES = 2 +DATAPLANE_RULES_NB_INT_B1 = 5 +DATAPLANE_RULES_NB_INT_B2 = 6 +DATAPLANE_RULES_NB_INT_B3 = 8 +DATAPLANE_RULES_NB_RT_EDGE = 7 +DATAPLANE_RULES_NB_RT_CORP = 7 +DATAPLANE_RULES_NB_ACL = 1 +DATAPLANE_RULES_NB_TOT = \ + DATAPLANE_RULES_NB_INT_B1 +\ + DATAPLANE_RULES_NB_INT_B2 +\ + DATAPLANE_RULES_NB_INT_B3 +\ + DATAPLANE_RULES_NB_RT_EDGE +\ + DATAPLANE_RULES_NB_RT_CORP +\ + DATAPLANE_RULES_NB_ACL + +# Topology descriptor +DESC_TOPO = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'topology.json' +) + +# Rule insertion descriptors +# The switch cannot digest all rules at once, hence we insert in batches +DESC_FILE_RULES_INSERT_INT_B1 = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-int-b1.json' +) +DESC_FILE_RULES_INSERT_INT_B2 = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-int-b2.json' +) +DESC_FILE_RULES_INSERT_INT_B3 = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-int-b3.json' +) +DESC_FILE_RULES_INSERT_ROUTING_EDGE = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-routing-edge.json' +) +DESC_FILE_RULES_INSERT_ROUTING_CORP = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-routing-corp.json' +) +DESC_FILE_RULES_INSERT_ACL = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-insert-acl.json' +) + +# Rule deletion descriptor +DESC_FILE_RULES_DELETE_ALL = os.path.join( + os.path.dirname( + os.path.abspath(__file__) + ), + 'descriptors', 'rules-remove.json' +) + +def verify_number_of_rules(devices, desired_rules_nb): + # Iterate all devices + for device in devices: + # Skip non-P4 devices + if device.device_type != "p4-switch": continue + + # We want the device to be active + assert \ + device.device_operational_status == DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + # Get the configuration rules of this device + config_rules = device.device_config.config_rules + + # Expected rule cardinality + assert len(config_rules) == desired_rules_nb diff --git a/src/tests/p4-int-routing-acl/test_functional_bootstrap.py b/src/tests/p4-int-routing-acl/test_functional_bootstrap.py new file mode 100644 index 0000000000000000000000000000000000000000..b5b72cc331ea1c7bf6e57aefc484532d66cb8504 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_bootstrap.py @@ -0,0 +1,70 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, time +from common.proto.context_pb2 import DeviceOperationalStatusEnum, Empty +from common.tools.descriptor.Loader import DescriptorLoader, \ + check_descriptor_load_results, validate_empty_scenario +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_scenario_bootstrap( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + """ + This test assumes that the environment is in a clean state (empty) + before bootstrapping the P4 topology. + It loads the topology descriptor and verifies that no other services + or slices are created. + """ + validate_empty_scenario(context_client) + + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_TOPO, context_client=context_client, device_client=device_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() + + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + +def test_scenario_devices_enabled( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + """ + This test validates that the devices are enabled. + """ + DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED + + num_devices = -1 + num_devices_enabled, num_retry = 0, 0 + while (num_devices != num_devices_enabled) and (num_retry < 10): + time.sleep(1.0) + response = context_client.ListDevices(Empty()) + num_devices = len(response.devices) + num_devices_enabled = 0 + for device in response.devices: + if device.device_operational_status != DEVICE_OP_STATUS_ENABLED: continue + num_devices_enabled += 1 + LOGGER.info('Num Devices enabled: {:d}/{:d}'.format(num_devices_enabled, num_devices)) + num_retry += 1 + assert num_devices_enabled == num_devices diff --git a/src/tests/p4-int-routing-acl/test_functional_cleanup.py b/src/tests/p4-int-routing-acl/test_functional_cleanup.py new file mode 100644 index 0000000000000000000000000000000000000000..60c8684b098aa886fdd62db28a07a2d5c8adc125 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_cleanup.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI 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. + +import logging, os +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader, validate_empty_scenario +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_scenario_cleanup( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has no services/slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Unload topology and validate empty scenario + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_TOPO, context_client=context_client, device_client=device_client) + descriptor_loader.validate() + descriptor_loader.unload() + validate_empty_scenario(context_client) diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py b/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py new file mode 100644 index 0000000000000000000000000000000000000000..2d54ae9088600381a000722608bd39eb49483a03 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_rules_deprovision.py @@ -0,0 +1,93 @@ +# Copyright 2022-2024 ETSI 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. + +import logging +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_initial_context( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has 0 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 0 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 0 + + # Check there are 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + +def test_rules_before_removal( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + \ + DATAPLANE_RULES_NB_RT_CORP + \ + DATAPLANE_RULES_NB_ACL + assert desired_rules_nb == CONNECTION_RULES + ENDPOINT_RULES + DATAPLANE_RULES_NB_TOT + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_removal( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load dataplane rules for removal + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_DELETE_ALL, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_removal( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** removing all dataplane rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Only connection and endpoint rules must be in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + verify_number_of_rules(response.devices, desired_rules_nb) diff --git a/src/tests/p4-int-routing-acl/test_functional_rules_provision.py b/src/tests/p4-int-routing-acl/test_functional_rules_provision.py new file mode 100644 index 0000000000000000000000000000000000000000..86a82d2129e495f3c3be9f9ea7b67b24d27a8db7 --- /dev/null +++ b/src/tests/p4-int-routing-acl/test_functional_rules_provision.py @@ -0,0 +1,238 @@ +# Copyright 2022-2024 ETSI 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. + +import logging +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from tests.Fixtures import context_client, device_client # pylint: disable=unused-import +from test_common import * + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +def test_initial_context( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # Verify the scenario has 0 service and 0 slices + response = context_client.GetContext(ADMIN_CONTEXT_ID) + assert len(response.service_ids) == 0 + assert len(response.slice_ids) == 0 + + # Check there are no slices + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.warning('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 0 + + # Check there is 0 service + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.warning('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 0 + + # Check there are 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + +def test_rules_before_insertion( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_int_batch_1( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load INT batch 1 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_INT_B1, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_int_batch_1( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 1 of INT rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_int_batch_2( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load INT batch 2 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_INT_B2, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_int_batch_2( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 2 of INT rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_int_batch_3( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load INT batch 3 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_INT_B3, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_int_batch_3( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 3 of INT rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_routing_edge_batch_4( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load routing edge batch 4 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_EDGE, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_routing_edge_batch_4( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 4 of routing edge rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_routing_corp_batch_5( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load routing corp batch 5 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_ROUTING_CORP, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_routing_corp_batch_5( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 5 of routing corp rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + \ + DATAPLANE_RULES_NB_RT_CORP + verify_number_of_rules(response.devices, desired_rules_nb) + +def test_rules_insertion_acl_batch_6( + context_client : ContextClient, # pylint: disable=redefined-outer-name + device_client : DeviceClient # pylint: disable=redefined-outer-name +) -> None: + # Load ACL batch 6 rules for insertion + descriptor_loader = DescriptorLoader( + descriptors_file=DESC_FILE_RULES_INSERT_ACL, context_client=context_client, device_client=device_client + ) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + +def test_rules_after_insertion_acl_batch_6( + context_client : ContextClient # pylint: disable=redefined-outer-name +) -> None: + # State **after** inserting batch 6 of ACL rules + # Still 3 devices + response = context_client.ListDevices(ADMIN_CONTEXT_ID) + LOGGER.warning('Devices[{:d}] = {:s}'.format(len(response.devices), grpc_message_to_json_string(response))) + assert len(response.devices) == DEV_NB + + # Verify that the following rules are in place + desired_rules_nb = \ + CONNECTION_RULES + \ + ENDPOINT_RULES + \ + DATAPLANE_RULES_NB_INT_B1 + \ + DATAPLANE_RULES_NB_INT_B2 + \ + DATAPLANE_RULES_NB_INT_B3 + \ + DATAPLANE_RULES_NB_RT_EDGE + \ + DATAPLANE_RULES_NB_RT_CORP + \ + DATAPLANE_RULES_NB_ACL + assert desired_rules_nb == CONNECTION_RULES + ENDPOINT_RULES + DATAPLANE_RULES_NB_TOT + verify_number_of_rules(response.devices, desired_rules_nb) diff --git a/src/tests/p4-int-routing-acl/topology/README.md b/src/tests/p4-int-routing-acl/topology/README.md new file mode 100644 index 0000000000000000000000000000000000000000..30d4d84bcf2771bb9732e9686a680de0a643fa79 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/README.md @@ -0,0 +1,166 @@ +# P4 Topology + +This directory contains scripts for deploying a single software-based Stratum switch on a VM or bare metal machine. + +## Prerequisites + +The machine on which Stratum will be deployed must have at least 3 network interfaces as follows: + +- a management interface for the switch to communicate with the control plane (i.e., TFS controller and INT collector) +- a west data plane interface towards a certain subnet (we call it edge subnet in this example) +- an est data plane interface towards another subnet (we call it corporate subnet in this example) + +Also, due to Stratum's restrictions, the desired OS of the machine shall be `Ubuntu server 20.04 LTS`. + +To build Stratum on this machine, follow the steps [here](https://github.com/stratum/stratum/blob/main/stratum/hal/bin/bmv2/README.md). +It is preferred to run Stratum as a binary. + +## Steps to setup the environment and deploy the Stratum switch + +We create a Linux namespace for Stratum to live in an isolated space from the rest of the system. +The two data plane interfaces of the VM need to be enclosed into this namespace, while for this namespace to interact with the outside world (i.e., root namespace and outside the VM), a dedicated virtual interface pair is created. + +Follow the steps below to create the environment, deploy Stratum, and restore the VM to its previous state (cleanup). +Prior to this take a look at the environment configuration file, where one can change the names of the interfaces, according to your network setup. + +```shell +nano p4-switch-conf-common.sh + +HOST_IFACE_EXT="ens3" # Interface towards TFS (management) +SW_IFACE_DATA_EDGE="ens4" # Interface towards the edge subnet (data plane) +SW_IFACE_DATA_CORP="ens5" # Interface towards the corporate subnet (data plane) + +... +``` + +### Step 1: Setup environment + +Edit the `setup` script to modify the subnets' information according to your network setup: + +```shell +nano p4-switch-setup.sh + +# Subnets managed by the switch +DOMAIN_EDGE_IP="10.158.72.0/24" # Left-hand side subnet +DOMAIN_CORP_IP="172.16.10.0/24" # Right-hand side subnet +``` + +Once your network setup is applied, run the `setup` script as follows: + +```shell +sudo bash p4-switch-setup.sh +``` + +To verify that the switch namespace is in place, issue the following command: + +```shell +sudo ip netns exec ns-switch ip a +``` + +The output should show 4 network interfaces, i.e., a `loopback` interface, 2 data planes interfaces (e.g., `ens4`, `ens5` in this example), and a virtual interface for sending telemetry data out of the switch (i.e., `veth-int-sw` in this example). +From this latter interface you can ping towards the other end of the virtual interface pair (i.e., `veth-int-host`): + +```shell +sudo ip netns exec ns-switch ping 10.0.0.254 +``` + +This ensures that telemetry data leaves the switch and ends up on the host VM. +To dispatch this telemetry data towards TFS, the `p4-switch-setup.sh` implements packet mirroring from `veth-int-host` to the VM's management interface (i.e., `ens3` in this example). +We assume that TFS is deployed on a machine that is accessible via the management interface (i.e., `ens3`) of this VM. + +### Step 2: Deploy Stratum in the namespace + +Now the namespace is ready to host the Stratum switch. + +First you need to configure the chassis configuration file with the correct network interfaces names. +To do so, modify the `name` field changing `ens4`, `ens5`, and `ens3` to your desired interfaces. +These interface names must agree with the ones you added in `p4-switch-conf-common.sh`. + +```shell +cat p4-switch-three-port-chassis-config-phy.pb.txt + +# Copyright 2018-present Open Networking Foundation +# SPDX-License-Identifier: Apache-2.0 + +description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" +chassis { + platform: PLT_P4_SOFT_SWITCH + name: "bmv2-switch" +} +nodes { + id: 1 + slot: 1 + index: 1 +} +singleton_ports { + id: 1 + name: "ens4" + slot: 1 + port: 1 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 2 + name: "ens5" + slot: 1 + port: 2 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 3 + name: "veth-int-sw" + slot: 1 + port: 3 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +``` + +To deploy Stratum, do: + +```shell +sudo bash run-stratum.sh +``` + +To run Stratum will verbose logging, open the `run-stratum.sh` and change: + +```shell +LOG_LEVEL="debug" +``` + +Then, re-deploy Stratum as shown above. + +To verify that Stratum has been correctly deployed, you should see the following output: + +``` +<timestamp> config_monitoring_service.cc:94] Pushing the saved chassis config read from p4-switch-three-port-chassis-config-phy.pb.txt... +<timestamp> bmv2_chassis_manager.cc:519] Registered port status callbacks successfully for node 1. +<timestamp> bmv2_chassis_manager.cc:453] State of port 1 in node 1: UP. +<timestamp> bmv2_chassis_manager.cc:453] State of port 2 in node 1: UP. +<timestamp> bmv2_chassis_manager.cc:453] State of port 3 in node 1: UP. +<timestamp> bmv2_switch.cc:74] P4-based forwarding pipeline config pushed successfully to node with ID 1. +<timestamp> hal.cc:220] Stratum external facing services are listening to 0.0.0.0:50000, 0.0.0.0:50001, 0.0.0.0:50101... +``` + +### Step 3: Restore to the original setup + +When your tests with Stratum and TFS are over, you may want to restore your setup. +To do so, execute the following script: + +```shell +sudo bash p4-switch-tear-down.sh +``` diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh new file mode 100644 index 0000000000000000000000000000000000000000..3ba84651e7e9550ef4b47d28f9ce3efa1f8fd2c8 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-conf-common.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +# Switch lives in a namespace +SWITCH_NS="ns-switch" + +# Physical interfaces +HOST_IFACE_EXT="ens3" # Interface towards TFS (management) +SW_IFACE_DATA_EDGE="ens4" # Interface towards the edge subnet (data plane) +SW_IFACE_DATA_CORP="ens5" # Interface towards the corporate subnet (data plane) + +# Virtual interfaces for INT +SW_IFACE_INT="veth-int-sw" +HOST_IFACE_INT="veth-int-host" + +# IP subnet for INT +TOPO_INT_NET="10.0.0.0/24" +TOPO_INT_NET_IP="10.0.0.0" +TOPO_INT_NET_MASK="255.255.255.0" + +# Transport port where the P4Runtime gRPC server is deployed on the switch +SW_P4RT_GRPC_PORT="50001" + +# Transport port where the P4Runtime gNMI server is deployed on the switch +SW_P4RT_GNMI_PORT="50000" + +# Transport port where Stratum listens to local calls +SW_P4RT_LOCAL_PORT="50101" diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh new file mode 100644 index 0000000000000000000000000000000000000000..1a5f37b2fbe2b1acd6c3ef69682d645591093f69 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-setup.sh @@ -0,0 +1,134 @@ +#!bin/bash +# Copyright 2022-2024 ETSI 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. + +# You must run this script as root +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +source "p4-switch-conf-common.sh" + +# MAC addresses of the virtual INT interfaces +SW_INT_MAC="00:11:22:33:44:11" +HOST_INT_MAC="00:11:22:33:44:22" + +# IP addresses of the virtual INT interfaces +SWITCH_INT_IP="10.0.0.1" +HOST_INT_IP="10.0.0.254" + +SWITCH_INT_IP_NET=${SWITCH_INT_IP}"/24" +HOST_INT_IP_NET=${HOST_INT_IP}"/24" + +# Subnets managed by the switch +DOMAIN_EDGE_IP="10.158.72.22/24" # Edge domain side IP address +DOMAIN_CORP_IP="172.16.10.4/24" # Corporate domain side IP address + +# INT subnet MTU +MTU_LEN=9000 + +kill_stratum() { + pkill stratum +} + +create_namespaces() { + ip netns add ${SWITCH_NS} +} + +create_virtual_interfaces() { + ip link add ${HOST_IFACE_INT} type veth peer name ${SW_IFACE_INT} +} + +assign_virtual_interfaces() { + ip link set ${SW_IFACE_DATA_EDGE} netns ${SWITCH_NS} + ip link set ${SW_IFACE_DATA_CORP} netns ${SWITCH_NS} + ip link set ${SW_IFACE_INT} netns ${SWITCH_NS} +} + +set_mac_addresses() { + ip netns exec ${SWITCH_NS} ifconfig ${SW_IFACE_INT} hw ether ${SW_INT_MAC} + ifconfig ${HOST_IFACE_INT} hw ether ${HOST_INT_MAC} +} + +set_mtu() { + ip netns exec ${SWITCH_NS} ip link set dev ${SW_IFACE_INT} mtu ${MTU_LEN} + ip link set dev ${HOST_IFACE_INT} mtu ${MTU_LEN} +} + +set_ip_addresses() { + ip -n ${SWITCH_NS} addr add ${DOMAIN_EDGE_IP} dev ${SW_IFACE_DATA_EDGE} + ip -n ${SWITCH_NS} addr add ${DOMAIN_CORP_IP} dev ${SW_IFACE_DATA_CORP} + ip -n ${SWITCH_NS} addr add ${SWITCH_INT_IP_NET} dev ${SW_IFACE_INT} + ifconfig ${HOST_IFACE_INT} ${HOST_INT_IP_NET} +} + +bring_interfaces_up() { + ip -n ${SWITCH_NS} link set ${SW_IFACE_DATA_EDGE} up + ip -n ${SWITCH_NS} link set ${SW_IFACE_DATA_CORP} up + ip -n ${SWITCH_NS} link set ${SW_IFACE_INT} up + ifconfig ${HOST_IFACE_INT} up +} + +disable_csum_offloading() { + ip netns exec ${SWITCH_NS} ethtool -K ${SW_IFACE_DATA_EDGE} rx off tx off + ip netns exec ${SWITCH_NS} ethtool -K ${SW_IFACE_DATA_CORP} rx off tx off +} + +switch_default_gw() { + ip netns exec ${SWITCH_NS} ip route add default via ${HOST_INT_IP} +} + +enable_ip_fwd() { + sysctl net.ipv4.ip_forward=1 + sysctl net.ipv4.conf.${HOST_IFACE_EXT}.forwarding=1 + sysctl net.ipv4.conf.${HOST_IFACE_INT}.forwarding=1 +} + +switch_access_to_internet() { + iptables -P FORWARD DROP + iptables -t nat -A POSTROUTING -s ${TOPO_INT_NET_IP}/${TOPO_INT_NET_MASK} -o ${HOST_IFACE_EXT} -j MASQUERADE + iptables -A FORWARD -i ${HOST_IFACE_EXT} -o ${HOST_IFACE_INT} -j ACCEPT + iptables -A FORWARD -o ${HOST_IFACE_EXT} -i ${HOST_IFACE_INT} -j ACCEPT +} + +grpc_port_forwarding() { + iptables -t nat -A PREROUTING -p tcp -i ${HOST_IFACE_EXT} --dport ${SW_P4RT_GRPC_PORT} -j DNAT --to-destination ${SWITCH_INT_IP}:${SW_P4RT_GRPC_PORT} + iptables -A FORWARD -p tcp -d ${SWITCH_INT_IP} --dport ${SW_P4RT_GRPC_PORT} -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT +} + +int_packet_mirroring() { + sudo tc qdisc add dev ${HOST_IFACE_INT} ingress + sudo tc filter add dev ${HOST_IFACE_INT} parent ffff: \ + protocol all prio 2 u32 \ + match u32 0 0 flowid 1:1 \ + action mirred egress mirror dev ${HOST_IFACE_EXT} +} + +kill_stratum +create_namespaces +create_virtual_interfaces +assign_virtual_interfaces +set_mac_addresses +set_mtu +set_ip_addresses +bring_interfaces_up +disable_csum_offloading +switch_default_gw +enable_ip_fwd +switch_access_to_internet +grpc_port_forwarding +int_packet_mirroring + +exit 0 diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh b/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh new file mode 100644 index 0000000000000000000000000000000000000000..9d79343a37e8b65167992e53f7c3e54944adfb1a --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-tear-down.sh @@ -0,0 +1,84 @@ +#!bin/bash +# Copyright 2022-2024 ETSI 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. + +# You must run this script as root +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +source "p4-switch-conf-common.sh" + +kill_stratum() { + pkill stratum +} + +delete_virtual_interfaces() { + ip netns exec ${SWITCH_NS} ip link delete ${SW_IFACE_INT} +} + +delete_namespaces() { + ip netns del ${SWITCH_NS} +} + +bring_interfaces_up() { + ifconfig ${SW_IFACE_DATA_EDGE} up + ifconfig ${SW_IFACE_DATA_CORP} up +} + +cleanup_iptables() { + # gRPC entries + entry_no=$(iptables --line-numbers -nvL | grep ${HOST_IFACE_INT} | cut -d " " -f 1 | head -1) + iptables -D FORWARD ${entry_no} + entry_no=$(iptables --line-numbers -nvL | grep ${HOST_IFACE_INT} | cut -d " " -f 1) + iptables -D FORWARD ${entry_no} + entry_no=$(iptables --line-numbers -nvL | grep ${SW_P4RT_GRPC_PORT} | cut -d " " -f 1) + iptables -D FORWARD ${entry_no} + + entry_no=$(iptables -t nat --line-numbers -nvL | grep ${SW_P4RT_GRPC_PORT} | cut -d " " -f 1) + iptables -t nat -D PREROUTING ${entry_no} + + entry_no=$(iptables -t nat --line-numbers -nvL | grep ${TOPO_INT_NET} | cut -d " " -f 1) + iptables -t nat -D POSTROUTING ${entry_no} + + # Check new state + echo "Forwarding tables" + iptables --line-numbers -nvL + echo -e "" + echo "NAT tables" + iptables -t nat --line-numbers -nvL +} + +cleanup_tc() { + sudo tc filter del dev ${HOST_IFACE_INT} parent ffff: \ + protocol all prio 2 u32 \ + match u32 0 0 flowid 1:1 \ + action mirred egress mirror dev ${HOST_IFACE_EXT} + sudo tc qdisc del dev ${HOST_IFACE_INT} ingress + + # Check new state + echo -e "" + echo -e "Linux tc status" + tc qdisc show +} + +kill_stratum +delete_virtual_interfaces +delete_namespaces +# bring_interfaces_up +cleanup_iptables +cleanup_tc + +exit 0 diff --git a/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt b/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt new file mode 100644 index 0000000000000000000000000000000000000000..038d3626960e252a318edd5419ed887e2682a4b5 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/p4-switch-three-port-chassis-config-phy.pb.txt @@ -0,0 +1,63 @@ +# Copyright 2018-present Open Networking Foundation +# SPDX-License-Identifier: Apache-2.0 + +# Copyright 2022-2024 ETSI 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. + +description: "Chassis configuration for a single Stratum bmv2 switch with 3 ports" +chassis { + platform: PLT_P4_SOFT_SWITCH + name: "bmv2-switch" +} +nodes { + id: 1 + slot: 1 + index: 1 +} +singleton_ports { + id: 1 + name: "ens4" + slot: 1 + port: 1 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 2 + name: "ens5" + slot: 1 + port: 2 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} +singleton_ports { + id: 3 + name: "veth-int-sw" + slot: 1 + port: 3 + channel: 1 + speed_bps: 100000000000 + config_params { + admin_state: ADMIN_STATE_ENABLED + } + node: 1 +} diff --git a/src/tests/p4-int-routing-acl/topology/run-stratum.sh b/src/tests/p4-int-routing-acl/topology/run-stratum.sh new file mode 100644 index 0000000000000000000000000000000000000000..29e4647793c79084dbc740d73af454cda16ac9d1 --- /dev/null +++ b/src/tests/p4-int-routing-acl/topology/run-stratum.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +# You must run this script as root +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +source "p4-switch-conf-common.sh" + +LOG_FILE_DIR="/var/log/stratum/" + +sudo mkdir -p "${LOG_FILE_DIR}" + +LOG_LEVEL="info" +READ_LOGS_FILE_PATH=${LOG_FILE_DIR}"p4_reads.pb.txt" +WRITE_LOGS_FILE_PATH=${LOG_FILE_DIR}"p4_writes.pb.txt" +CHASSIS_CONFIG="p4-switch-three-port-chassis-config-phy.pb.txt" + +[ -f ${CHASSIS_CONFIG} ] || { echo "$CHASSIS_CONFIG not found!" ; exit 1 ;} + +touch "${READ_LOGS_FILE_PATH}" +touch "${WRITE_LOGS_FILE_PATH}" + +ip netns exec ns-switch stratum_bmv2 \ + -chassis_config_file=${CHASSIS_CONFIG} \ + -read_req_log_file=${READ_LOGS_FILE_PATH} \ + -write_req_log_file=${WRITE_LOGS_FILE_PATH} \ + -external_stratum_urls="0.0.0.0:"${SW_P4RT_GNMI_PORT}",0.0.0.0:"${SW_P4RT_GRPC_PORT} \ + -local_stratum_url="0.0.0.0:"${SW_P4RT_LOCAL_PORT} \ + -bmv2_log_level=${LOG_LEVEL} + +exit 0 diff --git a/src/tests/p4/README.md b/src/tests/p4/README.md deleted file mode 100644 index 43920d14d5e99214bb2ad8418cc4babcae5be91c..0000000000000000000000000000000000000000 --- a/src/tests/p4/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Tests for P4 functionality of TeraFlowSDN - -This directory contains the necessary scripts and configurations to run tests for the P4 functionality of TFS. - -## Basic scripts - -To run the experiments you should use the five scripts in the following order: -``` -setup.sh -run_test_01_bootstrap.sh -run_test_02_create_service.sh -run_test_03_delete_service.sh -run_test_04_cleanup.sh -``` - -The setup script copies the necessary artifacts to the SBI service pod. It should be run just once, after a fresh install of TFS. -The bootstrap script registers the context, topology, links and, devices to TFS. -The create service scripts establishes a service between two endpoints. -The delete service script delete the aforementioned service. -Cleanup script deletes all the objects (context, topology, links, devices) from TFS. - -## Objects file - -The above bash scripts make use of the corresponding python scripts found under `./tests/` directory. -More important is the `./tests/Objects.py` file, which contains the definition of the Context, Topology, Devices, Links, Services. **This is the file that need changes in case of a new topology.** - -Check the `./tests/Objects.py` file before running the experiment to make sure that the switches details are correct (ip address, port, etc.) - -## Mininet topologies - -In the `./mininet/` directory there are different mininet topology examples. The current `./tests/Objects.py` file corresponds to the `./mininet/8switch3path.py` topology. Additionally there is a backup file `./tests/topologies/6switchObjects.py` which corresponds to the `./mininet/6switch2path.py`. - -## P4 artifacts - -In the `./p4/` directory there are the compiled p4 artifacts that contain the pipeline that will be pushed to the p4 switch, along with the p4-runtime definitions. -The `./setup.sh` script copies from this directory. So if you need to change p4 program, make sure to put the compiled artifacts here. - -## Latency probe - -In the `./probe/` directory there is a little program which calculates latency between two hosts in mininet and sends them to the Monitoring component. For specific instructions, refer to the corresponding `./probe/README.md` file. - diff --git a/src/tests/p4/probe/probe-tfs/README.md b/src/tests/p4/probe/probe-tfs/README.md deleted file mode 100644 index f88d7c542dae22ad623797f43750e0589d2473cf..0000000000000000000000000000000000000000 --- a/src/tests/p4/probe/probe-tfs/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# rust-tfs -Client for TFS functionalities written in Rust. diff --git a/src/tests/p4/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsagent b/src/tests/p4/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsagent deleted file mode 100755 index b7cef11a433c6bf2eeb94638fa90d93f25acd3c8..0000000000000000000000000000000000000000 Binary files a/src/tests/p4/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsagent and /dev/null differ diff --git a/src/tests/p4/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsping b/src/tests/p4/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsping deleted file mode 100755 index 6e943d292dd6653e857bf5eea3258d38ad246026..0000000000000000000000000000000000000000 Binary files a/src/tests/p4/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsping and /dev/null differ diff --git a/src/tests/scenario2/__init__.py b/src/tests/scenario2/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/scenario2/__init__.py +++ b/src/tests/scenario2/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/delete_all.sh b/src/tests/scenario2/delete_all.sh index a11d668c38f9ca8608170e220fa21555d01f20a0..266b92641597d2de4ef3ce59510a6b0ba070fa28 100755 --- a/src/tests/scenario2/delete_all.sh +++ b/src/tests/scenario2/delete_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/deploy_all.sh b/src/tests/scenario2/deploy_all.sh index 1c52068d3fb1aa1afd2cf040734fa381d4fb0207..05553f936e3453de1a0d897003ca7c4be3bc437c 100755 --- a/src/tests/scenario2/deploy_all.sh +++ b/src/tests/scenario2/deploy_all.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/deploy_specs_dom1.sh b/src/tests/scenario2/deploy_specs_dom1.sh index d7557a464608a4741393e6d2d65edaf23a1c0ff2..9eb778cba64d944a5ea2d70a1546c45110fc0200 100755 --- a/src/tests/scenario2/deploy_specs_dom1.sh +++ b/src/tests/scenario2/deploy_specs_dom1.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/deploy_specs_dom2.sh b/src/tests/scenario2/deploy_specs_dom2.sh index d601b2b9bf47274ebd1bc8d1693a67b0693d50b6..88c20171f57a13ba4e3ddd0eef4f8302c2bab382 100755 --- a/src/tests/scenario2/deploy_specs_dom2.sh +++ b/src/tests/scenario2/deploy_specs_dom2.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/deploy_specs_dom3.sh b/src/tests/scenario2/deploy_specs_dom3.sh index 869b4050a62e87315131875f44a947ad036fde03..35209be3b94f6e2574f7435c42e366fd3ad96f33 100755 --- a/src/tests/scenario2/deploy_specs_dom3.sh +++ b/src/tests/scenario2/deploy_specs_dom3.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/deploy_specs_dom4.sh b/src/tests/scenario2/deploy_specs_dom4.sh index 5e119c1a9fc9c632ed2ab74dff80e2f1ddd62d7c..71874b31a814b8401315aca4571f9fe03ec1d5ea 100755 --- a/src/tests/scenario2/deploy_specs_dom4.sh +++ b/src/tests/scenario2/deploy_specs_dom4.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/dump_logs.sh b/src/tests/scenario2/dump_logs.sh index 567617420037a0650b2f5b353a6cb5255a578352..98a4e334c8b64fdb95dd41ad63b7fe93173099f9 100755 --- a/src/tests/scenario2/dump_logs.sh +++ b/src/tests/scenario2/dump_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/fast_redeploy.sh b/src/tests/scenario2/fast_redeploy.sh index 2e1e8a1926bdf8aaec308751d4bf61907210135c..4d57b070918842ccdbbb12dc6688723581ec2a12 100755 --- a/src/tests/scenario2/fast_redeploy.sh +++ b/src/tests/scenario2/fast_redeploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom1.yaml b/src/tests/scenario2/nginx-ingress-controller-dom1.yaml index 70a0f45f4091a4e6ba94fe7e0fb2012bfe63528c..779a5fce8426b71e07a6c4f24e188c74e6df41c0 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom1.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom2.yaml b/src/tests/scenario2/nginx-ingress-controller-dom2.yaml index 11e4ccf254d7cb938cd777ce35e77e05eefd604f..d80804508e578c57138ce7e0661b744afd89c52b 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom2.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom3.yaml b/src/tests/scenario2/nginx-ingress-controller-dom3.yaml index d6ae8b1c287a59cf19ba4336aba1e02aefeb1ded..0f9ff89d5ecc50a2b7c36e2645d28c90edf9d840 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom3.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom3.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/nginx-ingress-controller-dom4.yaml b/src/tests/scenario2/nginx-ingress-controller-dom4.yaml index 6600d83c7c0be9ac58cec2ecf32155b4b804481f..c96c027fb7e2a05c31b82d0213a3d304eb90326b 100644 --- a/src/tests/scenario2/nginx-ingress-controller-dom4.yaml +++ b/src/tests/scenario2/nginx-ingress-controller-dom4.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh b/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh index bdd93ca27b6f61adc131258cc9e52b9d2e10d23d..03bb6505829c678f063cc5263b7df164cee9be0a 100755 --- a/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh +++ b/src/tests/scenario2/old_tests/run_test_01_bootstrap.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/run_test_02_create_service.sh b/src/tests/scenario2/old_tests/run_test_02_create_service.sh index a9c5e7bd8167e27200545acd19397a44d3b6f911..c27004b5494c072b26886920903a5dfa5cd065ee 100755 --- a/src/tests/scenario2/old_tests/run_test_02_create_service.sh +++ b/src/tests/scenario2/old_tests/run_test_02_create_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/run_test_03_delete_service.sh b/src/tests/scenario2/old_tests/run_test_03_delete_service.sh index 776c9050e74275d6a559338279c641901ecb4a6b..63c3fb3ee03244139da14231df7d5c14e2a5061c 100755 --- a/src/tests/scenario2/old_tests/run_test_03_delete_service.sh +++ b/src/tests/scenario2/old_tests/run_test_03_delete_service.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/run_test_04_cleanup.sh b/src/tests/scenario2/old_tests/run_test_04_cleanup.sh index 5ab9f70d49effbe80d6a5df32cf4a703a3c8589a..f857a8adf69d480ec043e595cc7aad3b262351ce 100755 --- a/src/tests/scenario2/old_tests/run_test_04_cleanup.sh +++ b/src/tests/scenario2/old_tests/run_test_04_cleanup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/run_tests_and_coverage.sh b/src/tests/scenario2/old_tests/run_tests_and_coverage.sh index 6d7351bb5f8c6a8af67b9cc9c38a0b926c6a8fa0..2bcfb0b75805e859da0863daeef0ca715986d5ee 100755 --- a/src/tests/scenario2/old_tests/run_tests_and_coverage.sh +++ b/src/tests/scenario2/old_tests/run_tests_and_coverage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/BuildDescriptors.py b/src/tests/scenario2/old_tests/tests/BuildDescriptors.py index cfd29eea0cb80306f402ef71530016599b570eb1..c0f01ee7537e88883704e3af36f6c51b672a607e 100644 --- a/src/tests/scenario2/old_tests/tests/BuildDescriptors.py +++ b/src/tests/scenario2/old_tests/tests/BuildDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/Fixtures.py b/src/tests/scenario2/old_tests/tests/Fixtures.py index dceec235ab6d4fd757e14f2d5dd00c2f38bdc963..d23198d9e242b3fe13c8a4a1be76399fc384866f 100644 --- a/src/tests/scenario2/old_tests/tests/Fixtures.py +++ b/src/tests/scenario2/old_tests/tests/Fixtures.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/LoadDescriptors.py b/src/tests/scenario2/old_tests/tests/LoadDescriptors.py index 407d5b6dc6b46ba7dd920cb1f60be391f839bda7..c47bea18d43c3a71656169cbb3855bd1602240fd 100644 --- a/src/tests/scenario2/old_tests/tests/LoadDescriptors.py +++ b/src/tests/scenario2/old_tests/tests/LoadDescriptors.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/Objects.py b/src/tests/scenario2/old_tests/tests/Objects.py index 1ecb2eca1f0f43c6b9ddbfc949b533662ed37ba5..221a0633f4d73339b669bd3f61049345f0062e1c 100644 --- a/src/tests/scenario2/old_tests/tests/Objects.py +++ b/src/tests/scenario2/old_tests/tests/Objects.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/__init__.py b/src/tests/scenario2/old_tests/tests/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/scenario2/old_tests/tests/__init__.py +++ b/src/tests/scenario2/old_tests/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py b/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py index 2c4743f08eca82c88aaaf901b60f5894059e07f3..f56b511fba1ebc8e1908d548fd36b6360e8f499d 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_bootstrap.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py b/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py index 259ce831498a8b8a566e53fafba72d109299832b..d1d5ccbe7ca3a78c8a1fa864d0bd5eca2e714c3e 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_cleanup.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_create_service.py b/src/tests/scenario2/old_tests/tests/test_functional_create_service.py index a286c1e79056e14d5f397c99b62265ffa3f7b43e..ff97ef46f3e54da7aaaa58aa2eed94417b21ce38 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_create_service.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_create_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py b/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py index b799e467ceba1e43c7dd0a443294168dd18f09a5..4c91291ee22a5e8cb4c885013ee86611a5283d66 100644 --- a/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py +++ b/src/tests/scenario2/old_tests/tests/test_functional_delete_service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/reset.sh b/src/tests/scenario2/reset.sh index 5b1d1ee0cd96edd5ee046b362c4d1541da841582..f84c984979af06f2ecb9432ffb5c6188c797894b 100755 --- a/src/tests/scenario2/reset.sh +++ b/src/tests/scenario2/reset.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/show_deploy.sh b/src/tests/scenario2/show_deploy.sh index dfceb6fee9ef5b819d02c8c1e752c4511c02ec1d..f9b5b9dcb1568e45b9d0d506b8be2c66716bd24e 100755 --- a/src/tests/scenario2/show_deploy.sh +++ b/src/tests/scenario2/show_deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/tfs-ingress-dom1.yaml b/src/tests/scenario2/tfs-ingress-dom1.yaml index 39502bb20df16c4ceadeff0f3fe8fd219d81e640..3027dc21d902aeb3b54017643f3532e4b58d74cb 100644 --- a/src/tests/scenario2/tfs-ingress-dom1.yaml +++ b/src/tests/scenario2/tfs-ingress-dom1.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/tfs-ingress-dom2.yaml b/src/tests/scenario2/tfs-ingress-dom2.yaml index 1c0ff6de94e1cdc208880823e70b7817c36fe97c..ceedd0d17512813eef676d4df47f1f6c8a741154 100644 --- a/src/tests/scenario2/tfs-ingress-dom2.yaml +++ b/src/tests/scenario2/tfs-ingress-dom2.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/tfs-ingress-dom3.yaml b/src/tests/scenario2/tfs-ingress-dom3.yaml index 80957e657b8bdcbe50e2a9e00d8a2769b6f6c591..8847d63a66054490c33a8c7197d0f2c79dd85e1c 100644 --- a/src/tests/scenario2/tfs-ingress-dom3.yaml +++ b/src/tests/scenario2/tfs-ingress-dom3.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario2/tfs-ingress-dom4.yaml b/src/tests/scenario2/tfs-ingress-dom4.yaml index 6b384eed7ddeff0b9f7c9ed94535479e8adb378c..15f1d37b25982b96937b67d5e0427a1b91239b91 100644 --- a/src/tests/scenario2/tfs-ingress-dom4.yaml +++ b/src/tests/scenario2/tfs-ingress-dom4.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario3/l3/deploy.sh b/src/tests/scenario3/l3/deploy.sh index 97224bd2c86b999acaf734adb304af6aa76956cc..b84610f0ff3eb62a23a9e375e2faffd13864b4e0 100755 --- a/src/tests/scenario3/l3/deploy.sh +++ b/src/tests/scenario3/l3/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario3/l3/deploy_specs.sh b/src/tests/scenario3/l3/deploy_specs.sh index b3dd07b7ab025e5f325d0c26e75fff5271980316..802fb0e0962df4b46d097234d57599b2764ab64f 100644 --- a/src/tests/scenario3/l3/deploy_specs.sh +++ b/src/tests/scenario3/l3/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -77,9 +77,6 @@ export CRDB_USERNAME="tfs" # Set the database user's password to be used by Context. export CRDB_PASSWORD="tfs123" -# Set the database name to be used by Context. -export CRDB_DATABASE="tfs" - # Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" diff --git a/src/tests/scenario3/l3/run.sh b/src/tests/scenario3/l3/run.sh index 109350ad07de38a40703ea095a7d47d1636ffea1..53d78751b3bcc41662a173543fc09df40c15416c 100644 --- a/src/tests/scenario3/l3/run.sh +++ b/src/tests/scenario3/l3/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario3/optical/deploy_specs.sh b/src/tests/scenario3/optical/deploy_specs.sh index b02e5f22a42614d0beb2a2c6a97babbf1fabd34a..5532708e89f38f19aa066610cacd11c1c1347bfc 100644 --- a/src/tests/scenario3/optical/deploy_specs.sh +++ b/src/tests/scenario3/optical/deploy_specs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario3/optical/jocn/run_experiment.py b/src/tests/scenario3/optical/jocn/run_experiment.py index 6e7d0c1c1b1b0de42a48ff29d3d75f21fc23e3ff..d3afbbc380878c2e8917114277bce18086293721 100644 --- a/src/tests/scenario3/optical/jocn/run_experiment.py +++ b/src/tests/scenario3/optical/jocn/run_experiment.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/scenario3/optical/ofc23/run_experiment_demo.py b/src/tests/scenario3/optical/ofc23/run_experiment_demo.py index 4af9550db4fc168b47e9a31ebc4016583c8b6a72..f4a021c82431e76b239435e77ac3e15cc8bd1ba6 100644 --- a/src/tests/scenario3/optical/ofc23/run_experiment_demo.py +++ b/src/tests/scenario3/optical/ofc23/run_experiment_demo.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/sns4sns24/01-tfs-topology.json b/src/tests/sns4sns24/01-tfs-topology.json new file mode 100644 index 0000000000000000000000000000000000000000..c3b95a69b7a8e5138a0cc3889d218bfdfde4f11b --- /dev/null +++ b/src/tests/sns4sns24/01-tfs-topology.json @@ -0,0 +1,102 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "core-net"}}, "device_type": "network", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "int", "type": "copper"}, + {"uuid": "eth1", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "edge-net"}}, "device_type": "network", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "int", "type": "copper"}, + {"uuid": "eth1", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==core-net/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "core-net/eth1==r1/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet10==edge-net/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "edge-net/eth1==r2/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + } + ] +} diff --git a/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json b/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json new file mode 100644 index 0000000000000000000000000000000000000000..0d34cfe9adab63afc37bf4c618a5a6fc25dadbc7 --- /dev/null +++ b/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json @@ -0,0 +1,83 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-edge-core"}]}, + "sites": { + "site": [ + { + "site-id": "site_core-net", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "core-net"}]}, + "devices": {"device": [{"device-id": "core-net", "location": "core-net"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "core-net", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:spoke-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "10.10.10.229", + "customer-address": "10.10.10.0", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + }, + { + "site-id": "site_edge-net", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "edge-net"}]}, + "devices": {"device": [{"device-id": "edge-net", "location": "edge-net"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "eth1", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "edge-net", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:hub-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "10.158.72.229", + "customer-address": "10.158.72.0", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + } + ] + } + } +} diff --git a/src/tests/sns4sns24/02-tfs-l3-service.json b/src/tests/sns4sns24/02-tfs-l3-service.json new file mode 100644 index 0000000000000000000000000000000000000000..1fcd0267b8279a218fea0cded4263323577fec1c --- /dev/null +++ b/src/tests/sns4sns24/02-tfs-l3-service.json @@ -0,0 +1,34 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "core-to-edge-l2svc"} + }, + "service_type": "SERVICETYPE_L3NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "int"}}, + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "int"}} + ], + "service_constraints": [], + "service_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[core-net]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "10.10.10.0", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[r1]/endpoint[Ethernet10]/settings", + "resource_value": {"address_ip": "10.10.10.229", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[r2]/endpoint[Ethernet10]/settings", + "resource_value": {"address_ip": "10.158.72.229", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[edge-net]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "10.158.72.0", "address_prefix": 24, "index": 0} + }} + ]} + } + ] +} diff --git a/src/tests/sns4sns24/clab-cli-r1.sh b/src/tests/sns4sns24/clab-cli-r1.sh new file mode 100755 index 0000000000000000000000000000000000000000..8e6084fe48fd6f3cf1f8b8b53dabd22e47ad6d68 --- /dev/null +++ b/src/tests/sns4sns24/clab-cli-r1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-sns4sns-r1 Cli diff --git a/src/tests/sns4sns24/clab-cli-r2.sh b/src/tests/sns4sns24/clab-cli-r2.sh new file mode 100755 index 0000000000000000000000000000000000000000..8b0ed55d425bd0591fdff42a3590f0da5fd74ed9 --- /dev/null +++ b/src/tests/sns4sns24/clab-cli-r2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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 exec -it clab-sns4sns-r2 Cli diff --git a/src/tests/sns4sns24/clab-deploy.sh b/src/tests/sns4sns24/clab-deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..ec4c674b7c5790c3e759e20b1443256189821be5 --- /dev/null +++ b/src/tests/sns4sns24/clab-deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd /home/$USER/tfs-ctrl/src/tests/sns4sns/ +sudo containerlab deploy --topo sns4sns.clab.yml diff --git a/src/tests/sns4sns24/clab-destroy.sh b/src/tests/sns4sns24/clab-destroy.sh new file mode 100755 index 0000000000000000000000000000000000000000..2c5c18fa398da094c3816ca990f60188e7ece8cc --- /dev/null +++ b/src/tests/sns4sns24/clab-destroy.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd /home/$USER/tfs-ctrl/src/tests/sns4sns/ +sudo containerlab destroy --topo sns4sns.clab.yml +sudo rm -rf clab-sns4sns/ .sns4sns.clab.yml.bak diff --git a/src/tests/sns4sns24/clab-inspect.sh b/src/tests/sns4sns24/clab-inspect.sh new file mode 100755 index 0000000000000000000000000000000000000000..4badf729650880b30ff9c199eb36a2b36e1787d8 --- /dev/null +++ b/src/tests/sns4sns24/clab-inspect.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + +cd /home/$USER/tfs-ctrl/src/tests/sns4sns/ +sudo containerlab inspect --topo sns4sns.clab.yml diff --git a/src/tests/sns4sns24/deploy_specs.sh b/src/tests/sns4sns24/deploy_specs.sh new file mode 100755 index 0000000000000000000000000000000000000000..71bd0d72ca4fed0ad05e19e19befb1f354f0838f --- /dev/null +++ b/src/tests/sns4sns24/deploy_specs.sh @@ -0,0 +1,151 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service slice nbi webui" + +# Uncomment to activate Monitoring +export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing. +# See ./deploy/all.sh or ./deploy/crdb.sh for additional details +export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9009" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" diff --git a/src/tests/sns4sns24/ietf-create.sh b/src/tests/sns4sns24/ietf-create.sh new file mode 100755 index 0000000000000000000000000000000000000000..fa88228ceff99de44a95114ee71db33e36fb2510 --- /dev/null +++ b/src/tests/sns4sns24/ietf-create.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +curl -X POST \ + --header "Content-Type: application/json" \ + --data @02-ietf-l3vpn-nbi.json \ + --user "admin:admin" \ + http://10.10.10.41/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services diff --git a/src/tests/sns4sns24/ietf-delete.sh b/src/tests/sns4sns24/ietf-delete.sh new file mode 100755 index 0000000000000000000000000000000000000000..4e2c2af0404a3ab0b0e42b0991fd42da19c2270f --- /dev/null +++ b/src/tests/sns4sns24/ietf-delete.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +curl -X DELETE \ + --user "admin:admin" \ + http://10.10.10.41/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-edge-core/ diff --git a/src/tests/sns4sns24/ietf-get.sh b/src/tests/sns4sns24/ietf-get.sh new file mode 100755 index 0000000000000000000000000000000000000000..b76ac2d32df00fd0059a40e38238918bd6277b65 --- /dev/null +++ b/src/tests/sns4sns24/ietf-get.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI 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. + + +curl --user "admin:admin" \ + http://10.10.10.41/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-edge-core/ diff --git a/src/tests/sns4sns24/sns4sns.clab.yml b/src/tests/sns4sns24/sns4sns.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..6d017a84982946be8cad767bfb278d0c334fdb50 --- /dev/null +++ b/src/tests/sns4sns24/sns4sns.clab.yml @@ -0,0 +1,47 @@ +# Copyright 2022-2024 ETSI 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. + +# Ref: https://containerlab.dev/manual/network/#macvlan-links +# Ref: https://containerlab.dev/manual/network/#host-links + + +# ETSI SNS4SNS OSL+TFS Integration (Static configuration) + +name: sns4sns-static + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + mtu: 1400 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + image: ceos:4.31.2F + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r1:eth10", "macvlan:enp0s3"] # connect to core domain virtual network + - endpoints: ["r2:eth10", "macvlan:enp0s5"] # connect to shared virtual network with edge domain diff --git a/src/tests/sns4sns24/static_setup/r1-static.cfg b/src/tests/sns4sns24/static_setup/r1-static.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f225a9c5c5273beb65844612e1975a7e516f46d1 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/r1-static.cfg @@ -0,0 +1,45 @@ +! Startup-config last modified at Tue Oct 15 12:24:02 2024 by root +! device: r1 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$WlffHUsmnrG2WVRf$cfZfWFJtrnv9wuGlkyMHRS66VQeA8bOjxM0jSXTB1deScpsqz0I3oVEcvrR6IMrqVOsXANKmoghcZvcDbC4Ry/ +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r1 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 + no switchport + ip address 10.254.254.1/30 +! +interface Ethernet10 + no switchport + ip address 10.10.10.229/24 +! +interface Management0 + ip address 172.20.20.101/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +ip route 10.158.72.0/24 10.254.254.2 +! +end diff --git a/src/tests/sns4sns24/static_setup/r2-static.cfg b/src/tests/sns4sns24/static_setup/r2-static.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2bbd8f80fbb2a6b083dd9b3862db93dd0d41a8f5 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/r2-static.cfg @@ -0,0 +1,45 @@ +! Startup-config last modified at Tue Oct 15 12:23:41 2024 by root +! device: r2 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$3nmPs7/wiY.aN139$BrgG79cp9R5bd.bQST4LnQB6wq6GLuIHKdbafZkcVH2R5D.v771gZNgeQSILN6ubz1.j29Wy5UmavY9Pavsoy0 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r2 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet1 + no switchport + ip address 10.254.254.2/30 +! +interface Ethernet10 + no switchport + ip address 10.158.72.229/24 +! +interface Management0 + ip address 172.20.20.102/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +ip route 10.10.10.0/24 10.254.254.1 +! +end diff --git a/src/tests/sns4sns24/static_setup/sns4sns.clab.yml b/src/tests/sns4sns24/static_setup/sns4sns.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..ac931773bed9868c825f964880b80b218b8397dc --- /dev/null +++ b/src/tests/sns4sns24/static_setup/sns4sns.clab.yml @@ -0,0 +1,49 @@ +# Copyright 2022-2024 ETSI 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. + +# Ref: https://containerlab.dev/manual/network/#macvlan-links +# Ref: https://containerlab.dev/manual/network/#host-links + + +# ETSI SNS4SNS OSL+TFS Integration (Static configuration) + +name: sns4sns-static + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + mtu: 1400 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + image: ceos:4.31.2F + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + startup-config: r1-static.cfg + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + startup-config: r2-static.cfg + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r1:eth10", "macvlan:enp0s3"] # connect to core domain virtual network + - endpoints: ["r2:eth10", "macvlan:enp0s5"] # connect to shared virtual network with edge domain diff --git a/src/tests/sns4sns24/static_setup/static-setup.txt b/src/tests/sns4sns24/static_setup/static-setup.txt new file mode 100644 index 0000000000000000000000000000000000000000..5cbd7d2cfb3b9000ce585983ac3c304317155439 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/static-setup.txt @@ -0,0 +1,39 @@ + | 10.10.10.229/24 (eth10) ++--+--+ +| R1 | ++--+--+ + | .1 (eth2) + | + | 10.254.254.0/30 + | + | .2 (eth1) ++--+--+ +| R2 | ++--+--+ + | 10.158.72.11/24 (eth10) + + +r1(config)#show running-config +interface Ethernet2 + no switchport + ip address 10.254.254.1/30 + +interface Ethernet10 + no switchport + ip address 10.10.10.229/24 + +ip routing +ip route 10.158.72.0/24 10.254.254.2 + + +r2(config)#show running-config +interface Ethernet1 + no switchport + ip address 10.254.254.2/30 + +interface Ethernet10 + no switchport + ip address 10.158.72.11/24 + +ip routing +ip route 10.10.10.0/24 10.254.254.1 diff --git a/src/tests/tools/__init__.py b/src/tests/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/__init__.py +++ b/src/tests/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/load_scenario/__init__.py b/src/tests/tools/load_scenario/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/load_scenario/__init__.py +++ b/src/tests/tools/load_scenario/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/load_scenario/__main__.py b/src/tests/tools/load_scenario/__main__.py index 0e225cc46d104885d065addec867ce9f5841ee65..5c8f2987a931038024d147db2ea5a5651f2f3002 100644 --- a/src/tests/tools/load_scenario/__main__.py +++ b/src/tests/tools/load_scenario/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/load_scenario/run.sh b/src/tests/tools/load_scenario/run.sh index b4c58bcb60b4ca5363d431a6ed800fe50a2d6af4..e3b49272bed443eb5e89216bef5f2bc3ce2840f6 100755 --- a/src/tests/tools/load_scenario/run.sh +++ b/src/tests/tools/load_scenario/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile b/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile index 02af91b62e5ff4110890fc7d19dae020fd5bdb39..8875154cf64b6b06ff0ee8fc08a9a44de6b9043a 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py index 7bc79e55870d52667afc7d608a48a3df168cccf3..ba8497f80d912da434cc9a38f144be1579294413 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/MockIetfActnSdnCtrl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py index 64e47b27317f673fc62e0803c3b6726798d10c61..f1d93a354a0ca0983a5f5e1e034c00280ebd070c 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceEthServices.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py index 85950dfe99e9380459ac9b1d8f5099cf5226b66b..6a5ec91e74ed813e8211aa59f0f0691f257e4e89 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/ResourceOsuTunnels.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py b/src/tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh index 06184bed6b64e3d8fdde08a60b3bdafc01afcd06..3cfe04fde99eb0b5322b5ea0766eeadd6b160c04 100755 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh index 02c32797105e4751fc614fb371f38c76ce4b79b5..c2fa7a7b6e2773aec10fc167a37ae1cde2776886 100755 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml b/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml index f59249e8e4c38ce10bd0e3a4800f7f2dff33c601..c95b01d104d7d0f8eca4e70488a48d0932ea4d9c 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/mock-ietf-actn-sdn-ctrl.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in b/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in index fc3bee8f04fe9dc21793e7d522d53c732fdd4b3f..9fb7bd0e1e8d662903d9d8e019abbc83db1eb6ca 100644 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh b/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh index f6edea6e7171fd14ae0dc35ce6eae1a7d0b9f50f..47ea5717a48542c42c67e546c10e4e5e94de21e7 100755 --- a/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_ietf_actn_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py b/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py index cf8deb1a82d122f4194cf8f2b7b1d9bb6f21b2c8..b7daf4053bb95c21e893d94e4fe795fdfa845751 100644 --- a/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py +++ b/src/tests/tools/mock_ipm_sdn_ctrl/MockIPMSdnCtrl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_ipm_sdn_ctrl/run.sh b/src/tests/tools/mock_ipm_sdn_ctrl/run.sh index f51a627be085d373c0381b1393180d6e36533373..2b42ab287bf437665851bdbbf4015edd79a701aa 100755 --- a/src/tests/tools/mock_ipm_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_ipm_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py b/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py index d67e65db49e507b15236d64b7ba276314b288928..ecf4b503c597b7f98dbd570b8be324142906d1eb 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py +++ b/src/tests/tools/mock_mw_sdn_ctrl/MockMWSdnCtrl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/run.sh b/src/tests/tools/mock_mw_sdn_ctrl/run.sh index 632e481a9f5a570af0973ea1e3faa1dfaae71b02..d46bbef09462afc5e780ef0656c5b7b27a72dee5 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh index 5e6af0e77c89cb23f4c29097ca059bc68d131f7d..4c2662d63d3137e44d02a30e07579b7d915f645a 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/scenario/microwave_deploy.sh @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile index 097844a4148da5500c86de31c0f7e3adfa85ad6c..fc5bdf99a1905fe60be45e60abc09d50f7458958 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh index bea3f9bdf69e2b5136db4c851b5844982299c159..e6fe0979a87f9f614f8a6091e0dbb5f68308d686 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh index e1d2168dfd9512f6f5ba6a56502dec87f1097861..4ec3d94302b5bf4b14fb5c080d63bb7a1f6165dc 100755 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml index bccbfc987872b702c3a77f8d7b2e75ff97e5c6bd..ec89005224995a0143e6cb31e6c2f41fba6f12ea 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/mock-mw-sdn-ctrl.yaml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in index 74e09dfaa621c6d82875b19e5b737effae1c0545..2f736a2fa9feefb304f37ce2a8799a4f8a07dcce 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in +++ b/src/tests/tools/mock_mw_sdn_ctrl/ssl_not_working/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py b/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py index 3165662b18996cf8c6ff486af40e8cf6e90d7d52..654c40fd6660b22d4f59c880b5c115f271115043 100644 --- a/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py +++ b/src/tests/tools/mock_mw_sdn_ctrl/test_mw.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_osm/Constants.py b/src/tests/tools/mock_osm/Constants.py index fb59ef2c7f42736572c175fb02eb08d877523b14..ff145cf388c609b73029834b495ff11af2209292 100644 --- a/src/tests/tools/mock_osm/Constants.py +++ b/src/tests/tools/mock_osm/Constants.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_osm/MockOSM.py b/src/tests/tools/mock_osm/MockOSM.py index 7ced57d3efa64038d09f5cea21fb7098b8ceb2ba..54a123dc40d235f047c99845c00707c82ed0928f 100644 --- a/src/tests/tools/mock_osm/MockOSM.py +++ b/src/tests/tools/mock_osm/MockOSM.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_osm/Tools.py b/src/tests/tools/mock_osm/Tools.py index 3b0ab84875486370d72b4156e19547f5407d2d1a..dc744e87720f3f0d1f5b2c315ea6c55c88ce3c5a 100644 --- a/src/tests/tools/mock_osm/Tools.py +++ b/src/tests/tools/mock_osm/Tools.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_osm/__init__.py b/src/tests/tools/mock_osm/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/mock_osm/__init__.py +++ b/src/tests/tools/mock_osm/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_qkd_nodes/YangValidator.py b/src/tests/tools/mock_qkd_nodes/YangValidator.py index 2056d5df64a1d841fc74c1be73aa6408051ab738..b7d86a362b4910f5575857cc62e4fa6ca9b31490 100644 --- a/src/tests/tools/mock_qkd_nodes/YangValidator.py +++ b/src/tests/tools/mock_qkd_nodes/YangValidator.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_qkd_nodes/start.sh b/src/tests/tools/mock_qkd_nodes/start.sh index 89797b9c9496cdf58061c406ad2886be0d9c47f6..9f0a56edb6f1a7218c5204f8bcc2504c1996b557 100755 --- a/src/tests/tools/mock_qkd_nodes/start.sh +++ b/src/tests/tools/mock_qkd_nodes/start.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_qkd_nodes/wsgi.py b/src/tests/tools/mock_qkd_nodes/wsgi.py index 3f8847849337fbfb1a9f84c783786218db4fb04d..627eb629fe876b5d931fad64142d4654d498a685 100644 --- a/src/tests/tools/mock_qkd_nodes/wsgi.py +++ b/src/tests/tools/mock_qkd_nodes/wsgi.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py b/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py index 3316e6ad564f9037deb82f2a3c89a278f5aa7eda..188109350d23c22a926794bc6c21efc5865c1709 100644 --- a/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py +++ b/src/tests/tools/mock_tfs_optical_sdn_ctrl/MockTfsOpticalSdnCtrl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py b/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py index 91635e6e9682693e72b0d841a8a73f1dbd7d3cf1..96bbbf0e488b71eec77c479cb989ce7fb0d48d78 100644 --- a/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py +++ b/src/tests/tools/mock_tfs_optical_sdn_ctrl/data.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh b/src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh index f89ecbf5c33cbc81893b5cd21b1d71680a50ca9f..f8b79e851086c42d89550b3e47c182c1a7077332 100755 --- a/src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh +++ b/src/tests/tools/mock_tfs_optical_sdn_ctrl/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/Component_RPC_Methods.py b/src/tests/tools/perf_plots/Component_RPC_Methods.py index fe94e5b8b19d188e1cf170bf1dbe74533c838c76..b5046388d89c225dbb3b07c913723b9f9a8a9752 100644 --- a/src/tests/tools/perf_plots/Component_RPC_Methods.py +++ b/src/tests/tools/perf_plots/Component_RPC_Methods.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/Device_Driver_Details.py b/src/tests/tools/perf_plots/Device_Driver_Details.py index 26a2d711e5a872c46ce39a308d46d7117f2c9cdd..4263252e2576c1f978fc3ac6067239e09af320f9 100644 --- a/src/tests/tools/perf_plots/Device_Driver_Details.py +++ b/src/tests/tools/perf_plots/Device_Driver_Details.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/Device_Driver_Methods.py b/src/tests/tools/perf_plots/Device_Driver_Methods.py index b4f70c4fd86d62e9b11abad4ce86e9facc0f8089..9ad6bd5e6edaf35340f532818711927c3de440d2 100644 --- a/src/tests/tools/perf_plots/Device_Driver_Methods.py +++ b/src/tests/tools/perf_plots/Device_Driver_Methods.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/LoadGen_Requests.py b/src/tests/tools/perf_plots/LoadGen_Requests.py index 3ed4861a8c8d3b5022c6b320b796c249ff75da63..f327d4b8bad1b1c0c946b3bcc455b3b353893165 100644 --- a/src/tests/tools/perf_plots/LoadGen_Requests.py +++ b/src/tests/tools/perf_plots/LoadGen_Requests.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/Service_Handler_Methods.py b/src/tests/tools/perf_plots/Service_Handler_Methods.py index 1e6c197f53c585469d19c760c3bf47c55b1e4b6f..d2f2eb058ff0be7431a33fcd78fa6ac5b5034e8f 100644 --- a/src/tests/tools/perf_plots/Service_Handler_Methods.py +++ b/src/tests/tools/perf_plots/Service_Handler_Methods.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/__init__.py b/src/tests/tools/perf_plots/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/perf_plots/__init__.py +++ b/src/tests/tools/perf_plots/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/collect.sh b/src/tests/tools/perf_plots/collect.sh index 6b8d16e59274b308f116bb381ddbcc034ffc8e5f..3bf12167ce62745d3dc5a866ac83b73a3156ff18 100755 --- a/src/tests/tools/perf_plots/collect.sh +++ b/src/tests/tools/perf_plots/collect.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/Experiment.py b/src/tests/tools/perf_plots/experiments/Experiment.py index 2fc03f89a58ee51a9c6954ac8d269d6f61b693dd..618142dd84d14fefe274068b8d6b8cb17e60e7a9 100644 --- a/src/tests/tools/perf_plots/experiments/Experiment.py +++ b/src/tests/tools/perf_plots/experiments/Experiment.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/__init__.py b/src/tests/tools/perf_plots/experiments/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/perf_plots/experiments/__init__.py +++ b/src/tests/tools/perf_plots/experiments/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py b/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py index d96c0c7d44c98005addc0b6c262625d351371708..107f21f71f738066ac141834b6aeb9f41a9e6add 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/Emu_Onboard.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py b/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py index f2fd2a69826eec1a59ddfcb365b98b42da7e97a6..4e32dee2545be75c01fc93797a033f792fe4fad3 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/L2NM_EMU_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py b/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py index 949f070964ffb7e56eb5d00c2d3b00abf109b52b..1a9a4e36b5a5bdc7c139cda87943f9ed9693e664 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/L3NM_EMU_Service.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py b/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py +++ b/src/tests/tools/perf_plots/experiments/scenario_1/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py index e09c36c18c00aa3f99c2463933d112d5b71c2953..778b9ee5194da04fd1a9b3985c454f9ae6bf566e 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_001tnt_005erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py index fd9207b7f91f9c36dc844ff4e8a80064207d0d55..035967053a0e6c5e4cd390f74cce471f587ef269 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_005tnt_025erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py index 02df1a0dd6ceaa31849911732098e9fa83c9da4d..76d39d82aaa2bc4eec6eefd6dcc4f794283556d1 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_010tnt_050erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py index c69f4bb9ea6116cee562dc14bd71b004c550e845..01a75bd1b62e92eecd4e8f53665c509ced1183ff 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_020tnt_100erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py index 910752cf5680896f906792bd4b64fb611726a24b..3363446d55c54e593c569b501b2a5d314c57d700 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_040tnt_200erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py index a45ef712b27eadee053fb4a3f0861f50fe052eab..21c099ce2e9d190e921fa642d1d8a8d0f600000a 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_060tnt_300erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py index 75c567e258f23248fe1a389008a1cddc9ca212cc..4064a081b2230d0a5f1128ca9eb3254fc3af6065 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_080tnt_400erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py index 330c2e6c7e417b2d305353c3d27693c836202500..fcd4d989272aa13bbe67f62fbfee579e71cd8351 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_100tnt_500erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py index f28ec3fba00053fbc66da2f5a818094fc94af5c2..0b867cc091aaa591008af9ccd3195759c0f9e5d5 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/Scal_120tnt_600erl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py b/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py +++ b/src/tests/tools/perf_plots/experiments/scenario_2/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/tools/FileSystem.py b/src/tests/tools/perf_plots/tools/FileSystem.py index 32493639acf861328fe710aca653c7a3912525f8..205d2d903cd9789998da78cb80a864c6a1b620ba 100644 --- a/src/tests/tools/perf_plots/tools/FileSystem.py +++ b/src/tests/tools/perf_plots/tools/FileSystem.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/tools/Histogram.py b/src/tests/tools/perf_plots/tools/Histogram.py index 811b48eaad0e6d6c48eb624e90b52e0026d6d951..483371364c2e6fd8044510484a328bc55b37a8d8 100644 --- a/src/tests/tools/perf_plots/tools/Histogram.py +++ b/src/tests/tools/perf_plots/tools/Histogram.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/tools/HistogramData.py b/src/tests/tools/perf_plots/tools/HistogramData.py index 73b5ccc460fd196840f9f6b2ab9bf5e649411748..528d1810a91793457af4d087630cb7864f7cb563 100644 --- a/src/tests/tools/perf_plots/tools/HistogramData.py +++ b/src/tests/tools/perf_plots/tools/HistogramData.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/tools/Plotter.py b/src/tests/tools/perf_plots/tools/Plotter.py index afb440d48b89dae3afc273c02bce48f37a2354be..ba92361471a2852d5c72b881f42eb9043363cbe4 100644 --- a/src/tests/tools/perf_plots/tools/Plotter.py +++ b/src/tests/tools/perf_plots/tools/Plotter.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/tools/Prometheus.py b/src/tests/tools/perf_plots/tools/Prometheus.py index f6702889d29f9b872263a9d68c66f15b6747abcf..a66d53a4bc5c2850eccf6af0e8b6f26aebb1d6d0 100644 --- a/src/tests/tools/perf_plots/tools/Prometheus.py +++ b/src/tests/tools/perf_plots/tools/Prometheus.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/tests/tools/perf_plots/tools/__init__.py b/src/tests/tools/perf_plots/tools/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/tests/tools/perf_plots/tools/__init__.py +++ b/src/tests/tools/perf_plots/tools/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/.gitlab-ci.yml b/src/vnt_manager/.gitlab-ci.yml index 2566df2387776356b61609b51501b41c167b140a..8199dabcc4a8620931757ce47c21877ea365b399 100644 --- a/src/vnt_manager/.gitlab-ci.yml +++ b/src/vnt_manager/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/Config.py b/src/vnt_manager/Config.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/vnt_manager/Config.py +++ b/src/vnt_manager/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/Dockerfile b/src/vnt_manager/Dockerfile index 2680336e962240c3938b06ffb47079bd6dab1368..3ff0acf3ff250a2921a80b4dfd8bc278d6896f2e 100644 --- a/src/vnt_manager/Dockerfile +++ b/src/vnt_manager/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/__init__.py b/src/vnt_manager/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/vnt_manager/__init__.py +++ b/src/vnt_manager/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/client/VNTManagerClient.py b/src/vnt_manager/client/VNTManagerClient.py index 8ecb3dc0d8f7c937c66b5af6e2f3ae715575b425..b313a590f3c5d8db64a9ae1b7b9ac89a94595f2a 100644 --- a/src/vnt_manager/client/VNTManagerClient.py +++ b/src/vnt_manager/client/VNTManagerClient.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/client/__init__.py b/src/vnt_manager/client/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/vnt_manager/client/__init__.py +++ b/src/vnt_manager/client/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/requirements.in b/src/vnt_manager/requirements.in index 6f9f590845cf3c925b2da23f127bc4aa942253b9..38764add745987ea115b9c8f2a9a169e6d0e3c39 100644 --- a/src/vnt_manager/requirements.in +++ b/src/vnt_manager/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/service/VNTManagerService.py b/src/vnt_manager/service/VNTManagerService.py index 80d635ffe475c7840cf9bd0c0650471bae17cb3e..3f44c4a510245fc2ab145e35b8ff1f35e4ac0f78 100644 --- a/src/vnt_manager/service/VNTManagerService.py +++ b/src/vnt_manager/service/VNTManagerService.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -12,19 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging - from common.Constants import ServiceNameEnum -from common.proto.vnt_manager_pb2_grpc import add_VNTManagerServiceServicer_to_server from common.Settings import get_service_port_grpc +from common.proto.vnt_manager_pb2 import DESCRIPTOR as VNT_MANAGER_DESCRIPTOR +from common.proto.vnt_manager_pb2_grpc import add_VNTManagerServiceServicer_to_server from common.tools.service.GenericGrpcService import GenericGrpcService from .VNTManagerServiceServicerImpl import VNTManagerServiceServicerImpl -LOGGER = logging.getLogger(__name__) - - class VNTManagerService(GenericGrpcService): - def __init__(self, cls_name: str = __name__): + def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.VNTMANAGER) super().__init__(port, cls_name=cls_name) self.vntmanager_servicer = VNTManagerServiceServicerImpl() @@ -33,3 +29,5 @@ class VNTManagerService(GenericGrpcService): add_VNTManagerServiceServicer_to_server( self.vntmanager_servicer, self.server ) + + self.add_reflection_service_name(VNT_MANAGER_DESCRIPTOR, 'VNTManagerService') diff --git a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py index d684e044efd972bd7705f6c1a448b0a5be23431b..835b658fa946a19bd542b47c80c1c51587eb698d 100644 --- a/src/vnt_manager/service/VNTManagerServiceServicerImpl.py +++ b/src/vnt_manager/service/VNTManagerServiceServicerImpl.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/service/__init__.py b/src/vnt_manager/service/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/vnt_manager/service/__init__.py +++ b/src/vnt_manager/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/service/__main__.py b/src/vnt_manager/service/__main__.py index a67eb4cfdf657c00373ce93d617425eda2f00981..c36a0ae1fb7bfa568f79bae26e53cd5d734a4f2e 100644 --- a/src/vnt_manager/service/__main__.py +++ b/src/vnt_manager/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/vnt_manager/service/vntm_config_device.py b/src/vnt_manager/service/vntm_config_device.py index 4735ed31f185ba221033a7611b2b1af3f90c1688..98fddcd954519c64b0a63a9c1e52c9402078d922 100644 --- a/src/vnt_manager/service/vntm_config_device.py +++ b/src/vnt_manager/service/vntm_config_device.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/.gitlab-ci.yml b/src/webui/.gitlab-ci.yml index 48f41744a706c05c97293245fa05c8c798cc005e..c1a445ffed9aa44e8357b73aee075b7827278f61 100644 --- a/src/webui/.gitlab-ci.yml +++ b/src/webui/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/Config.py b/src/webui/Config.py index fc7fa1e57290fb7c5fae2028bc1ab4b91f2029ff..ce491370717964f92d71008c7c4e8e48a921dc36 100644 --- a/src/webui/Config.py +++ b/src/webui/Config.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/Dockerfile b/src/webui/Dockerfile index 8295087667a6a25b209c584fc9627a5457f47f4d..0327b68ef712fbd4d89776ed348cbc00171153c9 100644 --- a/src/webui/Dockerfile +++ b/src/webui/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/__init__.py b/src/webui/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/__init__.py +++ b/src/webui/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/requirements.in b/src/webui/requirements.in index ab512dedb16d95c21d8807732f4ef386475aa32e..f5bbee5bc954aa82392d86d653fda57725cda40b 100644 --- a/src/webui/requirements.in +++ b/src/webui/requirements.in @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py index f137c247e1c4d2f4be5707e72e4140ab75f8e886..f64ecca3b6453baf193c683c11fbb2ca27629286 100644 --- a/src/webui/service/__init__.py +++ b/src/webui/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -14,14 +14,14 @@ import json from typing import List, Tuple, Union -from flask import Flask, request, session +from flask import Flask, session from flask_healthz import healthz, HealthError from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient -from qkd_app.client.QKDAppClient import QKDAppClient from common.Settings import ( - is_deployed_bgpls, is_deployed_load_gen, is_deployed_policy, is_deployed_qkd_app, is_deployed_slice + is_deployed_bgpls, is_deployed_load_gen, is_deployed_optical, + is_deployed_policy, is_deployed_qkd_app, is_deployed_slice ) def get_working_context() -> str: @@ -41,10 +41,6 @@ def readiness(): device_client = DeviceClient() device_client.connect() device_client.close() - # DEPENDENCY QKD - qkd_app_client = QKDAppClient() - qkd_app_client.connect() - qkd_app_client.close() except Exception as e: raise HealthError("Can't connect with the service: {:s}".format(str(e))) from e @@ -86,34 +82,43 @@ def create_app(use_config=None, web_app_root=None): app.register_blueprint(healthz, url_prefix='/healthz') - from webui.service.js.routes import js # pylint: disable=import-outside-toplevel + from webui.service.js.routes import js # pylint: disable=import-outside-toplevel app.register_blueprint(js) - from webui.service.main.routes import main # pylint: disable=import-outside-toplevel + from webui.service.main.routes import main # pylint: disable=import-outside-toplevel app.register_blueprint(main) - from webui.service.load_gen.routes import load_gen # pylint: disable=import-outside-toplevel + from webui.service.load_gen.routes import load_gen # pylint: disable=import-outside-toplevel app.register_blueprint(load_gen) - from webui.service.service.routes import service # pylint: disable=import-outside-toplevel + from webui.service.base_optical.route import base_optical # pylint: disable=import-outside-toplevel + app.register_blueprint(base_optical) + + from webui.service.opticalconfig.routes import opticalconfig # pylint: disable=import-outside-toplevel + app.register_blueprint(opticalconfig) + + from webui.service.optical_link.routes import optical_link # pylint: disable=import-outside-toplevel + app.register_blueprint(optical_link) + + from webui.service.service.routes import service # pylint: disable=import-outside-toplevel app.register_blueprint(service) - from webui.service.slice.routes import slice # pylint: disable=import-outside-toplevel,redefined-builtin + from webui.service.slice.routes import slice # pylint: disable=import-outside-toplevel,redefined-builtin app.register_blueprint(slice) - from webui.service.device.routes import device # pylint: disable=import-outside-toplevel + from webui.service.device.routes import device # pylint: disable=import-outside-toplevel app.register_blueprint(device) - from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel + from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel app.register_blueprint(bgpls) - from webui.service.link.routes import link # pylint: disable=import-outside-toplevel + from webui.service.link.routes import link # pylint: disable=import-outside-toplevel app.register_blueprint(link) - from webui.service.qkd_app.routes import qkd_app # pylint: disable=import-outside-toplevel + from webui.service.qkd_app.routes import qkd_app # pylint: disable=import-outside-toplevel app.register_blueprint(qkd_app) - from webui.service.policy_rule.routes import policy_rule # pylint: disable=import-outside-toplevel + from webui.service.policy_rule.routes import policy_rule # pylint: disable=import-outside-toplevel app.register_blueprint(policy_rule) app.jinja_env.globals.update({ # pylint: disable=no-member @@ -126,6 +131,7 @@ def create_app(use_config=None, web_app_root=None): 'is_deployed_bgpls' : is_deployed_bgpls, 'is_deployed_load_gen': is_deployed_load_gen, + 'is_deployed_optical' : is_deployed_optical, 'is_deployed_policy' : is_deployed_policy, 'is_deployed_qkd_app' : is_deployed_qkd_app, 'is_deployed_slice' : is_deployed_slice, diff --git a/src/webui/service/__main__.py b/src/webui/service/__main__.py index 109c468c7daeda22efedf75a7293c6d8c6f038d8..6f7954147677045da3db36e487f8ce85c1eac32d 100644 --- a/src/webui/service/__main__.py +++ b/src/webui/service/__main__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/base_optical/__init__.py b/src/webui/service/base_optical/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/webui/service/base_optical/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/webui/service/base_optical/route.py b/src/webui/service/base_optical/route.py new file mode 100644 index 0000000000000000000000000000000000000000..1b443474a493675671943bdc2d7efb95e1b48f63 --- /dev/null +++ b/src/webui/service/base_optical/route.py @@ -0,0 +1,33 @@ +# Copyright 2022-2024 ETSI 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. + + +from flask import render_template, Blueprint +#from common.proto.context_pb2 import Empty, OpticalConfigList +#from context.client.ContextClient import ContextClient +#from device.client.DeviceClient import DeviceClient + +base_optical = Blueprint('base_optical', __name__, url_prefix='/base_optical') +#device_client = DeviceClient() +#context_client = ContextClient() + +@base_optical.get('/') +def home(): + # context_client.connect() + # opticalConfig_list:OpticalConfigList = context_client.GetOpticalConfig(Empty()) + # context_client.close() + # device_client.connect() + # device_client.GetDeviceConfiguration(opticalConfig_list) + # device_client.close() + return render_template("base_optical/home.html") diff --git a/src/webui/service/bgpls/__init__.py b/src/webui/service/bgpls/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/webui/service/bgpls/__init__.py +++ b/src/webui/service/bgpls/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/bgpls/forms.py b/src/webui/service/bgpls/forms.py index 46e89e748b1d2a77639acaf5231751a20e073106..6868520ce0d493b81373b511fc053cf2daf55483 100644 --- a/src/webui/service/bgpls/forms.py +++ b/src/webui/service/bgpls/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/bgpls/routes.py b/src/webui/service/bgpls/routes.py index 4148b1cd233e3b2b3dd6d91eb51d103bc8ea7c51..aa2ebc77d78de639f0ea147074a86eca1e2d14f7 100644 --- a/src/webui/service/bgpls/routes.py +++ b/src/webui/service/bgpls/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/context/__init__.py b/src/webui/service/context/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/context/__init__.py +++ b/src/webui/service/context/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/context/routes.py b/src/webui/service/context/routes.py index 7462126a9b4f0aac1592a9430894e2a04bfd594e..463d994c0db3fa15b8b5637459608b1a757bf2d4 100644 --- a/src/webui/service/context/routes.py +++ b/src/webui/service/context/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/device/__init__.py b/src/webui/service/device/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/device/__init__.py +++ b/src/webui/service/device/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index eebc06755f204cd270ff8feca21733cb4426493a..4fa6829e760be6f24ba011a18664ce2ee4635595 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index 429f4a2ea8539b7b12baf5e20eb30760694ede64..16b86c769c5af1b69db4b669f5689043d03536bd 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,10 +13,14 @@ # limitations under the License. import json -from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for +from flask import ( + current_app, render_template, Blueprint, flash, session, redirect, url_for +) from common.DeviceTypes import DeviceTypeEnum from common.proto.context_pb2 import ( - ConfigActionEnum, Device, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, Empty) + ConfigActionEnum, Device, DeviceDriverEnum, DeviceId, DeviceList, + DeviceOperationalStatusEnum, Empty +) from common.tools.context_queries.Device import get_device from common.tools.context_queries.Topology import get_topology from context.client.ContextClient import ContextClient diff --git a/src/webui/service/js/__init__.py b/src/webui/service/js/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/js/__init__.py +++ b/src/webui/service/js/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/js/routes.py b/src/webui/service/js/routes.py index a6180825f7e1294d5ca571e9672d3b4a4b6715d4..dfc965381ddf041b28e6705c5456b17c8ff4825c 100644 --- a/src/webui/service/js/routes.py +++ b/src/webui/service/js/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/link/__init__.py b/src/webui/service/link/__init__.py index 7c7568fdb6e3b1446aa9412ad32a0a5948ba949b..3aa410c134b0aebb3117ca3220e823f7433b180c 100644 --- a/src/webui/service/link/__init__.py +++ b/src/webui/service/link/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/link/routes.py b/src/webui/service/link/routes.py index 973414fb35cde2bd667fcc74e4841f434824e038..42f5984a3c0957a0740690ad6e37bed7438449b7 100644 --- a/src/webui/service/link/routes.py +++ b/src/webui/service/link/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -13,8 +13,10 @@ # limitations under the License. -from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for -from common.proto.context_pb2 import Empty, Link, LinkId, LinkList +from flask import ( + current_app, render_template, Blueprint, flash, session, redirect, url_for +) +from common.proto.context_pb2 import Empty, Link, LinkId, LinkList, LinkTypeEnum from common.tools.context_queries.EndPoint import get_endpoint_names from common.tools.context_queries.Link import get_link from common.tools.context_queries.Topology import get_topology @@ -50,7 +52,10 @@ def home(): device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) context_client.close() - return render_template('link/home.html', links=links, device_names=device_names, endpoints_data=endpoints_data) + return render_template( + 'link/home.html', links=links, device_names=device_names, + endpoints_data=endpoints_data, lte=LinkTypeEnum + ) @link.route('detail/<path:link_uuid>', methods=('GET', 'POST')) @@ -64,7 +69,10 @@ def detail(link_uuid: str): else: device_names, endpoints_data = get_endpoint_names(context_client, link_obj.link_endpoint_ids) context_client.close() - return render_template('link/detail.html',link=link_obj, device_names=device_names, endpoints_data=endpoints_data) + return render_template( + 'link/detail.html', link=link_obj, device_names=device_names, + endpoints_data=endpoints_data, lte=LinkTypeEnum + ) @link.get('<path:link_uuid>/delete') def delete(link_uuid): diff --git a/src/webui/service/load_gen/__init__.py b/src/webui/service/load_gen/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/load_gen/__init__.py +++ b/src/webui/service/load_gen/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/load_gen/forms.py b/src/webui/service/load_gen/forms.py index ede779681eed4c7709d1c91620ce2302ea6981c0..d0454948a3f982b923d434d8cf1d4d42614dc48f 100644 --- a/src/webui/service/load_gen/forms.py +++ b/src/webui/service/load_gen/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/load_gen/routes.py b/src/webui/service/load_gen/routes.py index 24f2a078d2ed70f9ba9c86431336c7018f6d4d8d..fc1bb8f125eadbbc6d438fe26f799e2acb58b6e0 100644 --- a/src/webui/service/load_gen/routes.py +++ b/src/webui/service/load_gen/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/main/__init__.py b/src/webui/service/main/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/main/__init__.py +++ b/src/webui/service/main/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/main/forms.py b/src/webui/service/main/forms.py index dd55fb5640eb7003a0be16d11031460f92027ca0..bddf6d0d323e0742bda684e811cfb027c3dc31bf 100644 --- a/src/webui/service/main/forms.py +++ b/src/webui/service/main/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/main/routes.py b/src/webui/service/main/routes.py index 52944a31c439472055d65e9e75249465dcbca7f7..02e1d28ba4a2f2f334a4cf015368d0a8fb5bb8d2 100644 --- a/src/webui/service/main/routes.py +++ b/src/webui/service/main/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. @@ -153,11 +153,24 @@ def topology(): 'source': link.link_endpoint_ids[0].device_id.device_uuid.uuid, 'target': link.link_endpoint_ids[1].device_id.device_uuid.uuid, }) - - return jsonify({'devices': devices, 'links': links}) + + optical_links = [] + for link in response.optical_links: + if len(link.link_endpoint_ids) != 2: + str_link = grpc_message_to_json_string(link) + LOGGER.warning('Unexpected link with len(endpoints) != 2: {:s}'.format(str_link)) + continue + optical_links.append({ + 'id': link.link_id.link_uuid.uuid, + 'name': link.name, + 'source': link.link_endpoint_ids[0].device_id.device_uuid.uuid, + 'target': link.link_endpoint_ids[1].device_id.device_uuid.uuid, + }) + + return jsonify({'devices': devices, 'links': links, 'optical_links': optical_links}) except: # pylint: disable=bare-except LOGGER.exception('Error retrieving topology') - return jsonify({'devices': [], 'links': []}) + return jsonify({'devices': [], 'links': [], 'optical_links': []}) finally: context_client.close() diff --git a/src/webui/service/optical_link/__init__.py b/src/webui/service/optical_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3aa410c134b0aebb3117ca3220e823f7433b180c --- /dev/null +++ b/src/webui/service/optical_link/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/webui/service/optical_link/routes.py b/src/webui/service/optical_link/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..764d4c266948998b7389f276126f384bff7e7ba8 --- /dev/null +++ b/src/webui/service/optical_link/routes.py @@ -0,0 +1,108 @@ +# Copyright 2022-2024 ETSI 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. + + +from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for +from common.proto.context_pb2 import Empty, OpticalLink, LinkId, OpticalLinkList +from common.tools.context_queries.EndPoint import get_endpoint_names +from common.tools.context_queries.Topology import get_topology +from context.client.ContextClient import ContextClient + +optical_link = Blueprint('optical_link', __name__, url_prefix='/optical_link') +context_client = ContextClient() + +@optical_link.get('/') +def home(): + if 'context_uuid' not in session or 'topology_uuid' not in session: + flash("Please select a context!", "warning") + return redirect(url_for("main.home")) + + context_uuid = session['context_uuid'] + topology_uuid = session['topology_uuid'] + + links, endpoint_ids = list(), list() + device_names, endpoints_data = dict(), dict() + + context_client.connect() + grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) + if grpc_topology is None: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + else: + grpc_links : OpticalLinkList = context_client.GetOpticalLinkList(Empty()) + for link_ in grpc_links.optical_links: + links.append(link_) + endpoint_ids.extend(link_.link_endpoint_ids) + device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + context_client.close() + + return render_template( + 'optical_link/home.html', links=links, device_names=device_names, + endpoints_data=endpoints_data + ) + + +@optical_link.route('detail/<path:link_uuid>', methods=('GET', 'POST')) +def detail(link_uuid: str): + context_client.connect() + # pylint: disable=no-member + link_id = LinkId() + link_id.link_uuid.uuid = link_uuid + link_obj = context_client.GetOpticalLink(link_id) + c_slots=s_slots=l_slots=None + if link_obj is None: + flash('Optical Link({:s}) not found'.format(str(link_uuid)), 'danger') + link_obj = OpticalLink() + device_names, endpoints_data = dict(), dict() + else: + device_names, endpoints_data = get_endpoint_names(context_client, link_obj.link_endpoint_ids) + c_slots = link_obj.optical_details.c_slots + l_slots = link_obj.optical_details.l_slots + s_slots = link_obj.optical_details.s_slots + + context_client.close() + + return render_template( + 'optical_link/detail.html', link=link_obj, device_names=device_names, + endpoints_data=endpoints_data, c_slots=c_slots, l_slots=l_slots, s_slots=s_slots + ) + + +@optical_link.get('<path:link_uuid>/delete') +def delete(link_uuid): + try: + request = LinkId() + request.link_uuid.uuid = link_uuid # pylint: disable=no-member + context_client.connect() + context_client.DeleteOpticalLink(request) + context_client.close() + + flash(f'Optical Link "{link_uuid}" deleted successfully!', 'success') + except Exception as e: # pylint: disable=broad-except + flash(f'Problem deleting link "{link_uuid}": {e.details()}', 'danger') + current_app.logger.exception(e) + return redirect(url_for('optical_link.home')) + + +@optical_link.get("delete_all") +def delete_all(): + try: + context_client.connect() + optical_link_list : OpticalLinkList = context_client.GetOpticalLinkList(Empty()) + for optical_link in optical_link_list.optical_links: + context_client.DeleteOpticalLink(optical_link.link_id) + context_client.close() + flash(f"All Optical Link Deleted Successfully",'success') + except Exception as e: + flash(f"Problem in delete all optical link => {e}",'danger') + return redirect(url_for('optical_link.home')) diff --git a/src/webui/service/opticalconfig/__init__.py b/src/webui/service/opticalconfig/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..53d5157f750bfb085125cbd33faff1cec5924e14 --- /dev/null +++ b/src/webui/service/opticalconfig/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI 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. + diff --git a/src/webui/service/opticalconfig/forms.py b/src/webui/service/opticalconfig/forms.py new file mode 100644 index 0000000000000000000000000000000000000000..21bd1bc22d52e8da0933aa906fc09541c86ca9a3 --- /dev/null +++ b/src/webui/service/opticalconfig/forms.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI 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. + + +from flask_wtf import FlaskForm +from wtforms import StringField, SelectField, SubmitField + +class UpdateDeviceForm(FlaskForm): + power = StringField('Power') + frequency = StringField("Frequency") + operational_mode = StringField("Operational Mode") + line_port = SelectField("Line Port") + submit = SubmitField('Update') + +class AddTrancseiver(FlaskForm): + transceiver = StringField("Transceiver") + submit = SubmitField('Add') + +class UpdateInterfaceForm(FlaskForm): + ip = StringField("IP Address") + prefix_length = StringField("Prefix Length") + +DEVICE_STATUS = [ + ('', 'Select...'), + ('DISABLED', 'DISABLED'), + ('ENABLED', 'ENABLED') +] + +class UpdateStatusForm(FlaskForm): + status = SelectField("Device Status", choices=DEVICE_STATUS) diff --git a/src/webui/service/opticalconfig/routes.py b/src/webui/service/opticalconfig/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..298ef77a938d81f1a49572e8e90e822790c63ce8 --- /dev/null +++ b/src/webui/service/opticalconfig/routes.py @@ -0,0 +1,407 @@ +# Copyright 2022-2024 ETSI 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. + +import json, logging +from flask import ( + request, redirect, render_template, Blueprint, flash, session, url_for, + current_app, make_response +) +from common.proto.context_pb2 import ( + Empty, OpticalConfig, OpticalConfigId, OpticalConfigList +) +from common.tools.context_queries.OpticalConfig import opticalconfig_get_uuid +from common.DeviceTypes import DeviceTypeEnum +from context.client.ContextClient import ContextClient +from device.client.DeviceClient import DeviceClient +from service.client.ServiceClient import ServiceClient +from slice.client.SliceClient import SliceClient +from .forms import UpdateDeviceForm, AddTrancseiver, UpdateStatusForm + +opticalconfig = Blueprint('opticalconfig', __name__, url_prefix="/opticalconfig") + +context_client = ContextClient() +device_client = DeviceClient() +service_client = ServiceClient() +slice_client = SliceClient() + +LOGGER = logging.getLogger(__name__) + +DESCRIPTOR_LOADER_NUM_WORKERS = 10 + +@opticalconfig.get("/") +def home() : + list_config = [] + if 'context_uuid' not in session or 'topology_uuid' not in session: + flash("Please select a context!", "warning") + return redirect(url_for("main.home")) + context_uuid = session['context_uuid'] + topology_uuid = session['topology_uuid'] + + context_client.connect() + opticalConfig_list : OpticalConfigList = context_client.GetOpticalConfig(Empty()) + for configs in opticalConfig_list.opticalconfigs: + value = json.loads(configs.config) if type(configs.config)==str else configs.config + config_type = value["type"] + if config_type != DeviceTypeEnum.OPEN_ROADM._value_ : + if 'channels' in value: + value["channels_number"] = len(value['channels']) + else: + if 'interfaces' in value: + value["channels_number"] = len(value['interfaces']) + # value['operationalMode']=value['operational-mode'] + # value['targetOutputPower']=value['target-output-power'] + value['opticalconfig_id']=configs.opticalconfig_id + # value['line_port']=value["line-port"] + list_config.append(value) + + context_client.close() + return render_template('opticalconfig/home.html', config=list_config) + +@opticalconfig.route('<path:config_uuid>/detail',methods=['GET']) +def show_details(config_uuid): + opticalconfigId = OpticalConfigId() + opticalconfigId.opticalconfig_uuid = config_uuid + device_details = [] + + context_client.connect() + response = context_client.SelectOpticalConfig(opticalconfigId) + context_client.close() + if (response and response.opticalconfig_id.opticalconfig_uuid !=''): + opticalConfig = OpticalConfig() + opticalConfig.CopyFrom(response) + + device_name = "" + config = json.loads(opticalConfig.config) + if "device_name" in config: + device_name = config["device_name"] + + config_type = config["type"] + if config_type == DeviceTypeEnum.OPTICAL_TRANSPONDER._value_: + LOGGER.info("config details from show detail %s",config) + if 'channels' in config: + for channel in config['channels'] : + new_config={} + new_config["name"]=channel['name'] + new_config['operationalMode']=channel['operational-mode'] if 'operational-mode' in channel else '' + new_config['targetOutputPower']=channel['target-output-power'] if 'target-output-power' in channel else '' + new_config["frequency"]=channel['frequency'] if 'frequency' in channel else '' + new_config['line_port']=channel["line-port"] if 'line-port' in channel else '' + new_config["status"] = channel['status'] if 'status' in channel else "" + device_details.append(new_config) + + if config_type == DeviceTypeEnum.OPTICAL_ROADM._value_: + LOGGER.info("config details from show detail %s",config) + if 'channels' in config: + for channel in config['channels'] : + new_config={} + new_config["band_name"]=channel['band_name'] if 'band_name' in channel else None + new_config['type']=channel['type'] if 'type' in channel else '' + new_config['src_port']=channel['src_port'] if 'src_port' in channel else '' + new_config['dest_port']=channel['dest_port'] if 'dest_port' in channel else '' + new_config["lower_frequency"]=channel['lower_frequency'] if 'lower_frequency' in channel else '' + new_config["upper_frequency"]=channel['upper_frequency'] if 'upper_frequency' in channel else '' + new_config["status"] = channel['status'] if 'status' in channel else "" + new_config['optical_band_parent']= channel['optical_band_parent'] if 'optical_band_parent' in channel else '' + new_config['channel_index']= channel['channel_index'] if 'channel_index' in channel else '' + device_details.append(new_config) + + if config_type == DeviceTypeEnum.OPEN_ROADM._value_: + if 'interfaces' in config : + for interface in config["interfaces"]: + new_config={} + new_config["name"]=interface["name"] if "name" in interface else '' + new_config["administrative_state"]=interface[ "administrative_state"] + new_config["circuit_pack_name"]=interface["circuit_pack_name"] + new_config["port"]=interface["port"] + new_config["interface_list"]=interface["interface_list"] + new_config["frequency"]=interface["frequency"] + new_config["width"]=interface[ "width"] + new_config["type"]=interface["type"] + device_details.append(new_config) + + LOGGER.info("device details %s",device_details) + return render_template('opticalconfig/details.html', device=device_details,config_id=config_uuid,device_name=device_name,type=config_type) + + return render_template( + 'opticalconfig/details.html', device=device_details, config_id=config_uuid, + device_name=device_name, type=config_type + ) + + +@opticalconfig.route('<path:opticalconfig_uuid>/delete', methods=['GET']) +def delete_opitcalconfig (opticalconfig_uuid) : + try : + opticalconfigId = OpticalConfigId() + opticalconfigId.opticalconfig_uuid = opticalconfig_uuid + context_client.connect() + context_client.DeleteOpticalConfig(opticalconfigId) + context_client.close() + flash(f'OpticalConfig "{opticalconfig_uuid}" deleted successfully!', 'success') + except Exception as e: # pylint: disable=broad-except + flash(f'Problem deleting optical config {opticalconfig_uuid}', 'danger') + current_app.logger.exception(e) + return redirect(url_for('opticalconfig.home')) + + +@opticalconfig.route('/update_opticalconfig', methods=['POST']) +def update_externally(): + if (request.method == 'POST'): + data = request.get_json() + devices = data.get('devices') + + myResponse = [] + status_code = '' + for device in devices : + port = device.get("port") + channel_name = f"channel-{port}" + device_name = device.get("device_name") + + if device_name: + opticalconfig_uuid = opticalconfig_get_uuid(device_name=device_name) + opticalconfigId=OpticalConfigId() + opticalconfigId.opticalconfig_uuid = opticalconfig_uuid + context_client.connect() + opticalconfig = context_client.SelectOpticalConfig(opticalconfigId) + context_client.close() + + if opticalconfig and opticalconfig.opticalconfig_id.opticalconfig_uuid != '' : + new_opticalconfig = OpticalConfig() + new_opticalconfig.CopyFrom(opticalconfig) + config = json.loads(opticalconfig.config) + channels = config['channels'] + target_channel = next((item for item in channels if item["name"]['index'] == channel_name) , None) + target_power = device.get( "target-output-power") + freq = device.get("frequency") + mode = device.get("operational-mode") + status = device.get("status","ENABLED") + + if target_channel: + if target_power is not None : + target_channel["target-output-power"] =str(target_power) + if freq is not None : + target_channel["frequency"] = freq + if mode is not None : + target_channel["operational-mode"] = mode + if status is not None : + target_channel["status"] = "ENABLED" + #del target_channel['name'] + config["new_config"]=target_channel + config["new_config"]["channel_name"]=channel_name + config["flow"]=[(port,'0')] + opticalconfig.config =json.dumps(config) + + try: + device_client.connect() + device_client.ConfigureOpticalDevice(opticalconfig) + device_client.close() + + myResponse.append(f"device {device_name} port {port} is updated successfully") + status_code = 200 + except Exception as e: # pylint: disable=broad-except + myResponse.append(f"Problem updating the device. {e}") + status_code = 500 + break + else : + myResponse.append(f"requested channel {channel_name} is not existed") + status_code = 400 + break + else : + myResponse.append(f"requested device {device_name} is not existed") + status_code = 400 + break + + response=make_response(f'{myResponse}') + response.status_code=status_code + return response + + #return redirect(url_for('opticalconfig.show_details',config_uuid=opticalconfig_uuid)) + #return redirect(url_for('opticalconfig.home')) + +@opticalconfig.route('<path:config_uuid>/<path:channel_name>/update', methods=['GET', 'POST']) +def update(config_uuid, channel_name): + form = UpdateDeviceForm() + + opticalconfigId = OpticalConfigId() + opticalconfigId.opticalconfig_uuid = config_uuid + context_client.connect() + response = context_client.SelectOpticalConfig(opticalconfigId) + context_client.close() + + opticalconfig = OpticalConfig() + opticalconfig.CopyFrom(response) + config =json.loads(opticalconfig.config) + new_config={} + for channel in config['channels']: + if (channel["name"] == channel_name): + new_config=channel + form.frequency.default = channel["frequency"] + form.operational_mode.default=channel["operational-mode"] + form.power.default=channel["target-output-power"] + form.line_port.choices = [("","")] + + for transceiver in config["transceivers"]['transceiver']: + form.line_port.choices.append((transceiver,transceiver)) + + # listing enum values + if form.validate_on_submit(): + new_config["target-output-power"] =form.power.data if form.power.data != '' else new_config['target-output-power'] + new_config["frequency"]=form.frequency.data if form.frequency.data != '' else new_config['frequency'] + new_config["operational-mode"]=form.operational_mode.data if form.operational_mode.data != '' else new_config['operational-mode'] + new_config["line-port"]=form.line_port.data if form.line_port.data != '' else new_config['line-port'] + opticalconfig.config =json.dumps(new_config) + + try: + device_client.connect() + device_client.ConfigureOpticalDevice(opticalconfig) + device_client.close() + flash(f' device was updated.', 'success') + return redirect(url_for('opticalconfig.show_details',config_uuid=config_uuid)) + except Exception as e: # pylint: disable=broad-except + flash(f'Problem updating the device. {e}', 'danger') + return render_template('device/update.html', device=response, form=form, submit_text='Update Device',channel_name=channel_name) + + +@opticalconfig.route('refresh_all',methods=['POST','GET']) +def refresh_all (): + context_client.connect() + opticalConfig_list:OpticalConfigList = context_client.GetOpticalConfig(Empty()) + context_client.close() + device_client.connect() + device_client.GetDeviceConfiguration(opticalConfig_list) + device_client.close() + return home() + + +@opticalconfig.route('<path:config_uuid>/add_transceiver', methods=['GET','POST']) +def add_transceiver (config_uuid): + config={} + addtrancseiver=AddTrancseiver() + opticalconfigId=OpticalConfig() + opticalconfigId.opticalconfig_uuid=config_uuid + context_client.connect() + response = context_client.SelectOpticalConfig(opticalconfigId) + context_client.close() + opticlConfig=OpticalConfig() + opticlConfig.CopyFrom(response) + + if addtrancseiver.validate_on_submit(): + config["add_transceiver"]=addtrancseiver.transceiver.data + opticlConfig.config=json.dumps(config) + + try: + device_client.connect() + device_client.ConfigureOpticalDevice(opticlConfig) + device_client.close() + flash(f' device was updated.', 'success') + return redirect(url_for('opticalconfig.update',config_uuid=config_uuid)) + except Exception as e: # pylint: disable=broad-except + flash(f'Problem updating the device. {e}', 'danger') + return render_template('opticalconfig/add_transceiver.html',form=addtrancseiver, submit_text='Add Trancseiver') + + +@opticalconfig.route('<path:config_uuid>/<path:channel_name>/update_status', methods=['GET','POST']) +def update_status (config_uuid,channel_name): + config = {} + form = UpdateStatusForm() + + opticalconfigId=OpticalConfigId() + opticalconfigId.opticalconfig_uuid=config_uuid + context_client.connect() + response = context_client.SelectOpticalConfig(opticalconfigId) + context_client.close() + opticlConfig=OpticalConfig() + opticlConfig.CopyFrom(response) + config=json.loads(opticlConfig.config) + new_config={} + port="" + if form.validate_on_submit(): + if channel_name: + port = channel_name.split('-')[1] + new_config["status"]=form.status.data + new_config["name"]=channel_name + config["flow"]=[(port,'0')] + config["new_config"]=new_config + opticlConfig.config=json.dumps(config) + + try: + device_client.connect() + device_client.ConfigureOpticalDevice(opticlConfig) + device_client.close() + flash(f' device was updated.', 'success') + return redirect(url_for('opticalconfig.show_details',config_uuid=config_uuid)) + except Exception as e: # pylint: disable=broad-except + flash(f'Problem updating the device. {e}', 'danger') + return render_template( + 'opticalconfig/update_status.html', form=form, channel_name=channel_name, + submit_text='Update Device Status' + ) + +@opticalconfig.route('/configure_openroadm', methods=['POST']) +def update_openroadm(): + if (request.method == 'POST'): + ports_list= [] + data = request.get_json() + LOGGER.info(f"data {data}") + devices=data.get('devices') + LOGGER.info(f"devices {devices}") + myResponse =[] + status_code='' + config={} + target_interface={} + for device in devices : + frequency = device.get("frequency") + width= device.get("width") + ports=device.get('ports') + device_name=device.get("device_name") + LOGGER.info(f"device from post {device}") + target_interface["frequency"]=frequency + target_interface["width"]=width + target_interface["administrative-state"]="inService" + target_interface["config_type"]=device.get("config_type") + + if (device_name): + opticalconfig_uuid = opticalconfig_get_uuid(device_name=device_name) + opticalconfigId=OpticalConfigId() + opticalconfigId.opticalconfig_uuid=opticalconfig_uuid + context_client.connect() + opticalconfig = context_client.SelectOpticalConfig(opticalconfigId) + context_client.close() + config =json.loads(opticalconfig.config) + for port in ports : + ports_list.append({ + "supporting-circuit-pack-name":port["circuit_pack"], + 'supporting-interface-list':port["interface_list"], + 'supporting-port':port["port"] + }) + target_interface["ports"]=ports_list + config["new_config"]=target_interface + opticalconfig.config =json.dumps(config) + try: + device_client.connect() + device_client.ConfigureOpticalDevice(opticalconfig) + device_client.close() + myResponse.append(f"device {device_name} port {port} is updated successfully") + status_code = 200 + except Exception as e: # pylint: disable=broad-except + myResponse.append(f"Problem updating the device. {e}") + status_code = 500 + break + else : + myResponse.append(f"requested device {device_name} is not existed") + status_code = 400 + break + + response=make_response(f'{myResponse}') + response.status_code=status_code + return response diff --git a/src/webui/service/policy_rule/__init__.py b/src/webui/service/policy_rule/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/policy_rule/__init__.py +++ b/src/webui/service/policy_rule/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/policy_rule/routes.py b/src/webui/service/policy_rule/routes.py index 4fbecabe6a3ba40303f8b42f4887ac6935efab5f..8c2464a79808db310a6d2296ec5c422188b0de0d 100644 --- a/src/webui/service/policy_rule/routes.py +++ b/src/webui/service/policy_rule/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/qkd_app/__init__.py b/src/webui/service/qkd_app/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/webui/service/qkd_app/__init__.py +++ b/src/webui/service/qkd_app/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/qkd_app/routes.py b/src/webui/service/qkd_app/routes.py index 200d6ebdd17918dbb3d026980c4286212f519b82..a5e6111e70056fa85d3c6b9f26a8cc1a86dee241 100644 --- a/src/webui/service/qkd_app/routes.py +++ b/src/webui/service/qkd_app/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/service/__init__.py b/src/webui/service/service/__init__.py index 5cf553eaaec41de7599b6723e31e4ca3f82cbcae..0dc5506ab42d67d67a88cf8976409472213fe098 100644 --- a/src/webui/service/service/__init__.py +++ b/src/webui/service/service/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/service/forms.py b/src/webui/service/service/forms.py index dad15f1c2dbef3a5d1c9a3ecdc6f96c00b883aa2..5228ce4101a8739aa9314c07179c76c738a78bde 100644 --- a/src/webui/service/service/forms.py +++ b/src/webui/service/service/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/service/routes.py b/src/webui/service/service/routes.py index c164b41773e15ac4e9746753e1fdc3b56a51b0d2..02062e98198c98948b4967b4a2a4df5cde9b1ce5 100644 --- a/src/webui/service/service/routes.py +++ b/src/webui/service/service/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/slice/__init__.py b/src/webui/service/slice/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/slice/__init__.py +++ b/src/webui/service/slice/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/slice/routes.py b/src/webui/service/slice/routes.py index 588b0a57116268a2571da870bae3fc6470b8e54e..922f8af96dc916f0ca5658e120cdf3dfa4ec9b21 100644 --- a/src/webui/service/slice/routes.py +++ b/src/webui/service/slice/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index 432f1a095be1a682624a45decf2355310e58238b..d2eadf121b4857c035f24746787c05a1c9f070be 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -1,7 +1,7 @@ <!doctype html> <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. @@ -90,6 +90,16 @@ </li> {% endif %} + {% if is_deployed_optical() %} + <li class="nav-item"> + {% if '/base_optical/' in request.path %} + <a class="nav-link active" aria-current="page" href="{{ url_for('base_optical.home') }}">Optical Config</a> + {% else %} + <a class="nav-link" href="{{ url_for('base_optical.home') }}">Optical Config</a> + {% endif %} + </li> + {% endif %} + {% if is_deployed_policy() %} <li class="nav-item"> {% if '/policy_rule/' in request.path %} @@ -182,7 +192,7 @@ <div class="container"> <div class="row"> <div class="col-md-12"> - <p class="text-center" style="color: white;">© 2022-2024 <a href="https://tfs.etsi.org/">ETSI OSG/SDG TeraFlowSDN (TFS)</a></p> + <p class="text-center" style="color: white;">© 2022-2024 <a href="https://tfs.etsi.org/">ETSI SDG TeraFlowSDN (TFS)</a></p> </div> </div> <div class="row"> diff --git a/src/webui/service/templates/base_optical/home.html b/src/webui/service/templates/base_optical/home.html new file mode 100644 index 0000000000000000000000000000000000000000..c087af016dd18410958edfde9f0b452bf9f0bd83 --- /dev/null +++ b/src/webui/service/templates/base_optical/home.html @@ -0,0 +1,36 @@ +<!-- + Copyright 2022-2024 ETSI 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. + --> + + {% extends 'base.html' %} + + {% block content %} + <h1>Optical Configurations</h1> + + <div class="row"> + <div class="col"> + <a href="{{ url_for('opticalconfig.home') }}" class="btn btn-primary" style="margin-bottom: 10px;"> + + Optical Devices + </a> + </div> + <div class="col"> + <a href="{{ url_for('optical_link.home') }}" class="btn btn-primary" style="margin-bottom: 10px;"> + + Optical Links + </a> + </div> + </div> + {% endblock %} diff --git a/src/webui/service/templates/bgpls/add.html b/src/webui/service/templates/bgpls/add.html index f69eee52eb1ee58bf95033fde5009c7b4180da64..5eb527f79ed0e81012b0f00bfe77146b1ca7f1c9 100644 --- a/src/webui/service/templates/bgpls/add.html +++ b/src/webui/service/templates/bgpls/add.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/bgpls/addSpeaker.html b/src/webui/service/templates/bgpls/addSpeaker.html index 18a87e7654f1a9e2a8d62ad6206a8259bac89c40..c7aa97dfba984844a69e96e55bc0e21c48cbd54c 100644 --- a/src/webui/service/templates/bgpls/addSpeaker.html +++ b/src/webui/service/templates/bgpls/addSpeaker.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/bgpls/editSpeakers.html b/src/webui/service/templates/bgpls/editSpeakers.html index 82ae365b3c928e54c6bf36a998c099315eec5887..71911b09d4d11050a2c2fc72b5c2c3356552c66c 100644 --- a/src/webui/service/templates/bgpls/editSpeakers.html +++ b/src/webui/service/templates/bgpls/editSpeakers.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/bgpls/home.html b/src/webui/service/templates/bgpls/home.html index 557c5939d67aa6d7dbbfa97a8726a6c5e947c1b9..e2191297ae97ee24454e408ef2c0bb0741430224 100644 --- a/src/webui/service/templates/bgpls/home.html +++ b/src/webui/service/templates/bgpls/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/context/home.html b/src/webui/service/templates/context/home.html index c1822ff2741c149dafc40a40d6de490e82a297c9..fe94ef0e41de4a66bafad6ce2ee54e848ea3011a 100644 --- a/src/webui/service/templates/context/home.html +++ b/src/webui/service/templates/context/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/add.html b/src/webui/service/templates/device/add.html index e11c37688c09b96849c63a5d51cd7e546468d558..b5628ab5902d1b59c70413d41d05a6736adc751a 100644 --- a/src/webui/service/templates/device/add.html +++ b/src/webui/service/templates/device/add.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/addconfig.html b/src/webui/service/templates/device/addconfig.html index 8094ff33c79d6e1224bde702ceaef5a7e22f961a..f450f2ac72612f72c16e578028c4d65b18951f7c 100644 --- a/src/webui/service/templates/device/addconfig.html +++ b/src/webui/service/templates/device/addconfig.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/detail.html b/src/webui/service/templates/device/detail.html index 47bdcf39e3730862e411d1f07c5f06e84c6fd461..5a5008b00dce9a994d7a953488d5f4a197c327d9 100644 --- a/src/webui/service/templates/device/detail.html +++ b/src/webui/service/templates/device/detail.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/home.html b/src/webui/service/templates/device/home.html index b1237eac1fde1a16dea30515dd6fcbe353bcdca5..a8934fd73efb8899ac46811e362a33b85af60416 100644 --- a/src/webui/service/templates/device/home.html +++ b/src/webui/service/templates/device/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/inventory.html b/src/webui/service/templates/device/inventory.html index fe4ac97009f094b6bad523c8905abbbd701a441a..b07b11273e4883d24f2da9fe7192196eef0b0413 100644 --- a/src/webui/service/templates/device/inventory.html +++ b/src/webui/service/templates/device/inventory.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/logical.html b/src/webui/service/templates/device/logical.html index 8a2541989f0ed51c1257aae5fe8d76bfd01ff5c3..81799b738826b81344d15cd088443a84e0f712e7 100644 --- a/src/webui/service/templates/device/logical.html +++ b/src/webui/service/templates/device/logical.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/update.html b/src/webui/service/templates/device/update.html index 9f451e117d9a4d37658340d79e0982fd5e0819b6..69b0d203fa6e9a5ea09d09ab4b15e640635cd610 100644 --- a/src/webui/service/templates/device/update.html +++ b/src/webui/service/templates/device/update.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/device/updateconfig.html b/src/webui/service/templates/device/updateconfig.html index bbf7d04ae6c99d12d7d5671da3b5a78c8e752aa7..33a8798b531188236149bfb5d566df2f5bfd564c 100644 --- a/src/webui/service/templates/device/updateconfig.html +++ b/src/webui/service/templates/device/updateconfig.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/js/site.js b/src/webui/service/templates/js/site.js index 63084177b5f9f07c2ae78f70ad8bbfaca7da2ba9..258775965e9d7e003b23efb999eb216cc0512cb6 100644 --- a/src/webui/service/templates/js/site.js +++ b/src/webui/service/templates/js/site.js @@ -1,5 +1,5 @@ /** - * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/js/topology.js b/src/webui/service/templates/js/topology.js index caba65fe5359fb64499408886c36c30377cfbbeb..8a8ba0e40eda2f677b4efee6130ac5dc9cc64206 100644 --- a/src/webui/service/templates/js/topology.js +++ b/src/webui/service/templates/js/topology.js @@ -1,4 +1,4 @@ -// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// Copyright 2022-2024 ETSI 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. @@ -51,7 +51,7 @@ const svg = d3.select('#topology') ; // svg objects -var link, node; +var link, node, optical_link; // values for all forces forceProperties = { @@ -85,6 +85,23 @@ d3.json("{{ url_for('main.topology') }}", function(data) { .attr("stroke-dasharray", function(l) { return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; }); + + optical_link = svg.append("g").attr("class", "links")//.style('stroke', '#aaa') + .selectAll("line") + .data(data.optical_links) + .enter() + .append("line") + .attr("opacity", 1) + .attr("stroke", function(l) { + return l.name.toLowerCase().includes('mgmt') ? '#AAAAAA' : '#555555'; + }) + .attr("stroke-width", function(l) { + return l.name.toLowerCase().includes('mgmt') ? 1 : 2; + }) + .attr("stroke-dasharray", function(l) { + return l.name.toLowerCase().includes('mgmt') ? "5,5" : "0"; + }); + node = svg.append("g").attr("class", "devices").attr('r', 20).style('fill', '#69b3a2') .selectAll("circle") .data(data.devices) @@ -101,6 +118,8 @@ d3.json("{{ url_for('main.topology') }}", function(data) { node.append("title").text(function(n) { return n.name; }); // link tooltip link.append("title").text(function(l) { return l.name; }); + // optical link tooltip + optical_link.append("title").text(function(l) { return l.name; }); // link style //link @@ -111,12 +130,20 @@ d3.json("{{ url_for('main.topology') }}", function(data) { simulation.nodes(data.devices); // add forces, associate each with a name, and set their properties + // Experimental : Optical link part + all_links = data.links.concat(data.optical_links) simulation .force("link", d3.forceLink() .id(function(d) {return d.id;}) .distance(forceProperties.link.distance) .iterations(forceProperties.link.iterations) - .links(forceProperties.link.enabled ? data.links : [])) + .links( + forceProperties.link.enabled ? ( + (all_links.length > 0) ? all_links : [] + ) : [] + ) + ) + .force("charge", d3.forceManyBody() .strength(forceProperties.charge.strength * forceProperties.charge.enabled) .distanceMin(forceProperties.charge.distanceMin) @@ -147,6 +174,12 @@ function ticked() { .attr('x2', function(d) { return d.target.x; }) .attr('y2', function(d) { return d.target.y; }); + optical_link + .attr('x1', function(d) { return d.source.x; }) + .attr('y1', function(d) { return d.source.y; }) + .attr('x2', function(d) { return d.target.x; }) + .attr('y2', function(d) { return d.target.y; }); + node .attr('x', function(d) { return d.x-icon_width/2; }) .attr('y', function(d) { return d.y-icon_height/2; }); diff --git a/src/webui/service/templates/link/detail.html b/src/webui/service/templates/link/detail.html index fe0ecfc77c3e8b0bb4872f9a60e488c6c5fd71cd..775e5392d3dad06eaf13414cda2c9cde2586fe12 100644 --- a/src/webui/service/templates/link/detail.html +++ b/src/webui/service/templates/link/detail.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. @@ -39,6 +39,7 @@ <div class="col-sm-4"> <b>UUID: </b>{{ link.link_id.link_uuid.uuid }}<br> <b>Name: </b>{{ link.name }}<br> + <b>Type: </b>{{ lte.Name(link.link_type).replace('LINKTYPE_', '') }}<br> </div> <div class="col-sm-8"> <table class="table table-striped table-hover"> diff --git a/src/webui/service/templates/link/home.html b/src/webui/service/templates/link/home.html index a020871db3a06a658404b74c056091cce47ec0eb..6632898793c8601bf30f8d824e9090e3a2f7552e 100644 --- a/src/webui/service/templates/link/home.html +++ b/src/webui/service/templates/link/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. @@ -12,87 +12,89 @@ 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. - --> - - {% extends 'base.html' %} - - {% block content %} - <h1>Links</h1> - - <div class="row"> - <div class="col"> - <!-- <a href="#" class="btn btn-primary" style="margin-bottom: 10px;"> - <i class="bi bi-plus"></i> - Add New Link - </a> --> - </div> - <div class="col"> - {{ links | length }} links found in context <i>{{ session['context_uuid'] }}</i> - </div> - <!-- <div class="col"> - <form> - <div class="input-group"> - <input type="text" aria-label="Search" placeholder="Search..." class="form-control"/> - <button type="submit" class="btn btn-primary">Search</button> - </div> - </form> - </div> --> - </div> - - <table class="table table-striped table-hover"> - <thead> - <tr> - <th scope="col">UUID</th> - <th scope="col">Name</th> - <th scope="col">Endpoints</th> - <th scope="col"></th> - </tr> - </thead> - <tbody> - {% if links %} - {% for link in links %} - <tr> - <td> +--> + +{% extends 'base.html' %} + +{% block content %} + <h1>Links</h1> + + <div class="row"> + <div class="col"> + <!-- <a href="#" class="btn btn-primary" style="margin-bottom: 10px;"> + <i class="bi bi-plus"></i> + Add New Link + </a> --> + </div> + <div class="col"> + {{ links | length }} links found in context <i>{{ session['context_uuid'] }}</i> + </div> + <!-- <div class="col"> + <form> + <div class="input-group"> + <input type="text" aria-label="Search" placeholder="Search..." class="form-control"/> + <button type="submit" class="btn btn-primary">Search</button> + </div> + </form> + </div> --> + </div> + + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">UUID</th> + <th scope="col">Name</th> + <th scope="col">Type</th> + <th scope="col">Endpoints</th> + <th scope="col"></th> + </tr> + </thead> + <tbody> + {% if links %} + {% for link in links %} + <tr> + <td> {{ link.link_id.link_uuid.uuid }} - </td> - <td> + </td> + <td> {{ link.name }} </td> - - <td> - <ul> - {% for endpoint in link.link_endpoint_ids %} - <li> - {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }} / - Device: - <a href="{{ url_for('device.detail', device_uuid=endpoint.device_id.device_uuid.uuid) }}"> - {{ device_names.get(endpoint.device_id.device_uuid.uuid, endpoint.device_id.device_uuid.uuid) }} - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> - <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> - <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> - </svg> - </a> - </li> - {% endfor %} - </ul> - </td> + <td> + {{ lte.Name(link.link_type).replace('LINKTYPE_', '') }} + </td> + <td> + <ul> + {% for endpoint in link.link_endpoint_ids %} + <li> + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }} / + Device: + <a href="{{ url_for('device.detail', device_uuid=endpoint.device_id.device_uuid.uuid) }}"> + {{ device_names.get(endpoint.device_id.device_uuid.uuid, endpoint.device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </li> + {% endfor %} + </ul> + </td> - <td> + <td> <a href="{{ url_for('link.detail', link_uuid=link.link_id.link_uuid.uuid) }}"> - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> - <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> - <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> - </svg> - </a> - </td> - </tr> - {% endfor %} - {% else %} - <tr> - <td colspan="7">No links found</td> - </tr> - {% endif %} - </tbody> - </table> - - {% endblock %} \ No newline at end of file + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + </tr> + {% endfor %} + {% else %} + <tr> + <td colspan="7">No links found</td> + </tr> + {% endif %} + </tbody> + </table> +{% endblock %} diff --git a/src/webui/service/templates/load_gen/home.html b/src/webui/service/templates/load_gen/home.html index 75ca417a17544abeba0229d0b720e1aa9add0295..99ec172455e990ec138af907c0b9951a711487c5 100644 --- a/src/webui/service/templates/load_gen/home.html +++ b/src/webui/service/templates/load_gen/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/main/about.html b/src/webui/service/templates/main/about.html index 6fe3e951b68acf497d024dafb2b052dcdc6121e9..43f433af6ca02b9eab2e3ab23350574cd74c7af7 100644 --- a/src/webui/service/templates/main/about.html +++ b/src/webui/service/templates/main/about.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/main/debug.html b/src/webui/service/templates/main/debug.html index 8956856699dc022b826a9384a2df6ac7b28a3e87..d08883946239c120a0e50ad8db01353504f44b64 100644 --- a/src/webui/service/templates/main/debug.html +++ b/src/webui/service/templates/main/debug.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/main/home.html b/src/webui/service/templates/main/home.html index 88d7eab2043e635471b433046974baf8ce3ce53b..b67899ce26517f26dd0c8c3c2872ff27569724bf 100644 --- a/src/webui/service/templates/main/home.html +++ b/src/webui/service/templates/main/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/optical_link/detail.html b/src/webui/service/templates/optical_link/detail.html new file mode 100644 index 0000000000000000000000000000000000000000..2f7cd2326589dbcc93c8d4d232257d5267363b87 --- /dev/null +++ b/src/webui/service/templates/optical_link/detail.html @@ -0,0 +1,158 @@ +<!-- + Copyright 2022-2024 ETSI 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. + --> + +{% extends 'base.html' %} + +{% block content %} +<h1>Link {{ link.name }} ({{ link.link_id.link_uuid.uuid }})</h1> +<div class="row mb-3"> + <div class="col-sm-3"> + <button type="button" class="btn btn-success" onclick="window.location.href='{{ url_for('optical_link.home') }}'"> + <i class="bi bi-box-arrow-in-left"></i> + Back to link list + </button> + </div> + <div class="col-sm-3"> + <!-- <button type="button" class="btn btn-danger"><i class="bi bi-x-square"></i>Delete link</button> --> + <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal"> + <i class="bi bi-x-square"></i> + Delete link + </button> + </div> +</div> + +<br> +<div class="row mb-3"> + <div class="col-sm-4"> + <b>UUID: </b>{{ link.link_id.link_uuid.uuid }}<br> + <b>Name: </b>{{ link.name }}<br> + </div> + <div class="col-sm-8"> + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">Endpoint UUID</th> + <th scope="col">Name</th> + <th scope="col">Device</th> + <th scope="col">Endpoint Type</th> + </tr> + </thead> + <tbody> + {% for endpoint in link.link_endpoint_ids %} + <tr> + <td> + {{ endpoint.endpoint_uuid.uuid }} + </td> + <td> + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }} + </td> + <td> + <a href="{{ url_for('device.detail', device_uuid=endpoint.device_id.device_uuid.uuid) }}"> + {{ device_names.get(endpoint.device_id.device_uuid.uuid, endpoint.device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + <td> + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, ('', '-'))[1] }} + </td> + </tr> + {% endfor %} + </tbody> + </table> + </div> +</div> + + + +<b>Optical Link Detail:</b> +<table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">Key</th> + <th scope="col">Value</th> + </tr> + </thead> + <tbody> + {% for field_descriptor, field_value in link.optical_details.ListFields() %} + {% if field_descriptor.name != "c_slots" and field_descriptor.name != "s_slots" and field_descriptor.name != "l_slots" %} + <tr> + <td> + {{ field_descriptor.name }} + </td> + <td> + {{ field_value }} + </td> + </tr> + {%endif%} + {% endfor %} + {%if c_slots %} + <tr> + <td> + c_slots + </td> + <td> + {{ c_slots }} + </td> + </tr> + {%endif%} + {%if l_slots %} + <tr> + <td> + l_slots + </td> + <td> + {{ l_slots }} + </td> + </tr> + {%endif%} + {%if s_slots %} + <tr> + <td> + s_slots + </td> + <td> + {{ s_slots }} + </td> + </tr> + {%endif%} + </tbody> +</table> +<!-- Modal --> +<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" + aria-labelledby="staticBackdropLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="staticBackdropLabel">Delete link?</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + Are you sure you want to delete the link "{{ link.link_id.link_uuid.uuid }}"? + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No</button> + <a type="button" class="btn btn-danger" + href="{{ url_for('optical_link.delete', link_uuid=link.link_id.link_uuid.uuid) }}"><i + class="bi bi-exclamation-diamond"></i>Yes</a> + </div> + </div> + </div> +</div> + +{% endblock %} diff --git a/src/webui/service/templates/optical_link/home.html b/src/webui/service/templates/optical_link/home.html new file mode 100644 index 0000000000000000000000000000000000000000..188e1a4946dee7ff3985ab3633df0b096ea15eff --- /dev/null +++ b/src/webui/service/templates/optical_link/home.html @@ -0,0 +1,122 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +{% extends 'base.html' %} + + {% block content %} + <h1>Optical Links</h1> + + <div class="row"> + + <div class="col"> + {{ links | length }} links found in context <i>{{ session['context_uuid'] }}</i> + </div> + <div class="col-sm-3"> + <!-- <button type="button" class="btn btn-danger"><i class="bi bi-x-square"></i>Delete link</button> --> + <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal"> + <i class="bi bi-x-square"></i> + Delete All Optical Links + </button> + </div> + <!-- <div class="col"> + <form> + <div class="input-group"> + <input type="text" aria-label="Search" placeholder="Search..." class="form-control"/> + <button type="submit" class="btn btn-primary">Search</button> + </div> + </form> + </div> --> + </div> + + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">UUID</th> + <th scope="col">Name</th> + <th scope="col">Endpoints</th> + <th scope="col"></th> + </tr> + </thead> + <tbody> + {% if links %} + {% for link in links %} + <tr> + <td> + {{ link.link_id.link_uuid.uuid }} + </td> + <td> + {{ link.name }} + </td> + + <td> + <ul> + {% for endpoint in link.link_endpoint_ids %} + <li> + {{ endpoints_data.get(endpoint.endpoint_uuid.uuid, (endpoint.endpoint_uuid.uuid, ''))[0] }} / + Device: + <a href="{{ url_for('device.detail', device_uuid=endpoint.device_id.device_uuid.uuid) }}"> + {{ device_names.get(endpoint.device_id.device_uuid.uuid, endpoint.device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </li> + {% endfor %} + </ul> + </td> + + <td> + <a href="{{ url_for('optical_link.detail', link_uuid=link.link_id.link_uuid.uuid) }}"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + </tr> + {% endfor %} + {% else %} + <tr> + <td colspan="7">No links found</td> + </tr> + {% endif %} + </tbody> + + </table> + +<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" + aria-labelledby="staticBackdropLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="staticBackdropLabel">Delete All Optical links?</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + Are you sure you want to delete all the links ? + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No</button> + <a type="button" class="btn btn-danger" + href="{{ url_for('optical_link.delete_all') }}"><i + class="bi bi-exclamation-diamond"></i>Yes</a> + </div> + </div> + </div> +</div> + +{% endblock %} diff --git a/src/webui/service/templates/opticalconfig/add_transceiver.html b/src/webui/service/templates/opticalconfig/add_transceiver.html new file mode 100644 index 0000000000000000000000000000000000000000..7e97224a99196304642cb0f5c00a8174c4d26ca8 --- /dev/null +++ b/src/webui/service/templates/opticalconfig/add_transceiver.html @@ -0,0 +1,56 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +{% extends 'base.html' %} + +{% block content %} +<h1>Add Transceiver </h1> +<br /> +<form id="Add_transceiver" method="POST"> + {{ form.hidden_tag() }} + <fieldset> + <div class="row mb-3 "> + <div class="col-12"> + {{ form.transceiver.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form.transceiver.errors %} + {{ form.transceiver(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form.transceiver.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + + {{ form.transceiver(class="col-sm-7 form-control") }} + + {% endif %} + </div> + + </div> + <button type="submit" class="btn btn-primary"> + <i class="bi bi-plus-circle-fill"></i> + {{ submit_text }} + </button> + <button type="button" class="btn btn-block btn-secondary" onclick="javascript: history.back()"> + <i class="bi bi-box-arrow-in-left"></i> + Cancel + </button> + </div> + </fieldset> +</form> + +{% endblock %} diff --git a/src/webui/service/templates/opticalconfig/details.html b/src/webui/service/templates/opticalconfig/details.html new file mode 100644 index 0000000000000000000000000000000000000000..0edb762d3f4e17705370d13da8f4118b00187b0a --- /dev/null +++ b/src/webui/service/templates/opticalconfig/details.html @@ -0,0 +1,168 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +{% extends 'base.html' %} + +{% block content %} + +<h1>Optical Configurations</h1> + +<div class="row"> + {% if device %} + <div class="col-sm-12"> + <span>Device ID:</span> + <h5>{{config_id}}</h5> + </div> + <div class="col-sm-12"> + <div class="col-sm-12"> + <div class="row mb-3 "> + <div class="col-sm-3"> + <button type="button" class="btn btn-success" onclick="window.location.href='{{ url_for('opticalconfig.home') }}'"> + <i class="bi bi-box-arrow-in-left"></i> + Back to device list + </button> + </div> + <div class="col-sm-3"> + <!-- <button type="button" class="btn btn-danger"><i class="bi bi-x-square"></i>Delete device</button> --> + <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal"> + <i class="bi bi-x-square"></i> + Delete Optical Config + </button> + </div> + </div> + </div> + <div class="col-sm-12"> + <span>Device Name:</span> + <span>{{device_name}}</span> + </div> + </div> + + {% if type == 'optical-transponder' %} + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">channel name</th> + <th scope="col">Frequency</th> + <th scope="col">Target Output Power</th> + <th scope="col">Operational Mode</th> + <th scope="col">Line Port</th> + <th scope="col">Channel Status</th> + </tr> + </thead> + <tbody> + {% for channel in device %} + <tr style="background-color:{%if channel.status == 'DISABLED' %} gray {% endif %};"> + <td>{{channel.name.index}}</td> + <td>{{channel.frequency}}</td> + <td>{{channel.targetOutputPower}}</td> + <td>{{channel.operationalMode}}</td> + <td>{{channel.line_port}}</td> + <td>{{channel.status}}</td> + </tr> + {% endfor %} + </tbody> + </table> + {% elif type == 'openroadm' %} + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col"> name</th> + <th scope="col"> type</th> + <th scope="col">administrative state</th> + <th scope="col">circuit pack name</th> + <th scope="col">port</th> + <th scope="col">interface list</th> + <th scope="col">frequency</th> + <th scope="col">width</th> + </tr> + </thead> + <tbody> + {% for channel in device %} + <tr style="background-color:{%if channel.status == 'DISABLED' %} gray {% endif %};"> + <td>{{channel.name}}</td> + <td>{{channel.type}}</td> + <td>{{channel.administrative_state}}</td> + <td>{{channel.circuit_pack_name}}</td> + <td>{{channel.port}}</td> + <td>{{channel.interface_list}}</td> + <td>{{channel.frequency}}</td> + <td>{{channel.width}}</td> + </tr> + {% endfor %} + </tbody> + </table> + {% else %} + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">Channel Index</th> + <th scope="col">Optical Band Parent</th> + <th scope="col">Band Name</th> + <th scope="col">Lower Frequency</th> + <th scope="col">Upper Frequency</th> + <th scope="col">type</th> + <th scope="col">Source Port</th> + <th scope="col">Destination Port</th> + <th scope="col">Channel Status </th> + </tr> + </thead> + <tbody> + {% for channel in device %} + <tr> + <td>{{channel.channel_index}}</td> + <td>{{channel.optical_band_parent}}</td> + <td>{{channel.band_name}}</td> + <td>{{channel.lower_frequency}}</td> + <td>{{channel.upper_frequency}}</td> + <td>{{channel.type}}</td> + <td>{{channel.src_port}}</td> + <td>{{channel.dest_port}}</td> + <td>{{channel.status}}</td> + </tr> + {% endfor %} + </tbody> + </table> + {% endif%} + </div> + +{% else %} +<div class="col"> + <h4 colspan="7">No devices found</h4> +</div> +{% endif %} +<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" + aria-labelledby="staticBackdropLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="staticBackdropLabel">Delete Optical Config?</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + Are you sure you want to delete the Optical Config "{{config_id}}"? + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No</button> + <a type="button" class="btn btn-danger" + href="{{ url_for('opticalconfig.delete_opitcalconfig', opticalconfig_uuid=config_id) }}"><i + class="bi bi-exclamation-diamond"></i>Yes</a> + </div> + </div> + </div> +</div> +</div> + +{% endblock %} diff --git a/src/webui/service/templates/opticalconfig/home.html b/src/webui/service/templates/opticalconfig/home.html new file mode 100644 index 0000000000000000000000000000000000000000..6a6437270e4622684c58c1e59fa1ab760a3e4f46 --- /dev/null +++ b/src/webui/service/templates/opticalconfig/home.html @@ -0,0 +1,113 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +{% extends 'base.html' %} + +{% block content %} + <h1>Optical Configurations</h1> + {% if config %} + <div class="row"> + <div class="col-sm-12"> + <div class="row mb-3 "> + + <div class="col-sm-3"> + <button type="button" class="btn btn-success" onclick="window.location.href='{{ url_for('base_optical.home') }}'"> + <i class="bi bi-box-arrow-in-left"></i> + Back to main + </button> + </div> + <div class="col-sm-3"> + <!-- <button type="button" class="btn btn-danger"><i class="bi bi-x-square"></i>Delete device</button> --> + <!-- <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal"> + <i class="bi bi-x-square"></i> + Delete All + </button> --> + <button type="button" class="btn btn-info" + onclick="window.location.href='{{ url_for('opticalconfig.refresh_all') }}'"> + <i class="bi bi-arrow-clockwise"></i> + Refresh + </button> + </div> + </div> + </div> + + + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">UUID</th> + <th scope="col">Device Name</th> + <th scope="col">Device Type</th> + <th scope="col">Channels Number</th> + + </tr> + </thead> + <tbody> + + {% for device in config %} + <tr> + <td>{{device.opticalconfig_id.opticalconfig_uuid}}</td> + <td>{{device.device_name}}</td> + <td> {{device.type}}</td> + {% if device.channels_number %} + <td>{{ device.channels_number }}</td> + {%else%} + <td>__ </td> + {%endif%} + {% if device.opticalconfig_id %} + <td> + <a href="{{ url_for('opticalconfig.show_details', config_uuid=device.opticalconfig_id.opticalconfig_uuid) }}"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + {%endif%} + </tr> + {% endfor %} + + </tbody> + </table> + + </div> + + {% else %} + <div class="col"> + <h4 colspan="7">No devices found</h4> + </div> + {% endif %} + <!-- <div class="col"> + <a href="{{ url_for('service.add') }}" class="btn btn-primary" style="margin-bottom: 10px;"> + <i class="bi bi-plus"></i> + Add New Service + </a> + </div> --> + + <!-- Only display XR service addition button if there are XR constellations. Otherwise it might confuse + user, as other service types do not have GUI to add service yet. --> + + <!-- <div class="col"> + <form> + <div class="input-group"> + <input type="text" aria-label="Search" placeholder="Search..." class="form-control"/> + <button type="submit" class="btn btn-primary">Search</button> + </div> + </form> + </div> --> + </div> + +{% endblock %} diff --git a/src/webui/service/templates/opticalconfig/update_interface.html b/src/webui/service/templates/opticalconfig/update_interface.html new file mode 100644 index 0000000000000000000000000000000000000000..af20d08f6cf8e96ec767655ce8dc7327504ffda1 --- /dev/null +++ b/src/webui/service/templates/opticalconfig/update_interface.html @@ -0,0 +1,90 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +{% extends 'base.html' %} + +{% block content %} +<div class="col-sm-12 d-flex flex-column"> + + <h1>Update Device {{ device.opticalconfig_id.opticalconfig_uuid }}</h1> + <h2> interface :{{interface_name}}</h2> +</div> +<br /> +<form id="update_device" method="POST"> + {{ form.hidden_tag() }} + <fieldset> + <div class="row mb-3 "> + <div class="col-12"> + {{ form.ip.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form.ip.errors %} + {{ form.ip(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form.ip.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + + {{ form.ip(class="col-sm-7 form-control") }} + + {% endif %} + </div> + </div> + <div class="col-12 "> + {{ form.prefix_length.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form.prefix_length.errors %} + {{ form.prefix_length(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form.prefix_length.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + + + {{ form.prefix_length(class="col-sm-7 form-control") }} + + {% endif %} + </div> + + + </div> + </div> + <div class="col-sm-12"> + <div class="row"> + <div class="col-sm-3"> + + <button type="submit" class="btn btn-primary"> + <i class="bi bi-plus-circle-fill"></i> + update interface + </button> + </div> + <div class="col-sm-3 mx-1"> + + <button type="button" class="btn btn-block btn-secondary" onclick="javascript: history.back()"> + <i class="bi bi-box-arrow-in-left"></i> + Cancel + </button> + </div> + </div> + </div> + </div> + </fieldset> +</form> + +{% endblock %} diff --git a/src/webui/service/templates/opticalconfig/update_status.html b/src/webui/service/templates/opticalconfig/update_status.html new file mode 100644 index 0000000000000000000000000000000000000000..08111e4846cd6e03d6e835c5e2957307ecc47bdb --- /dev/null +++ b/src/webui/service/templates/opticalconfig/update_status.html @@ -0,0 +1,67 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + +{% extends 'base.html' %} + +{% block content %} +<h1>Update Channel Status </h1> +<br /> +<div> + channel : <span class="font-weight-bold">{{channel_name}}</span> +</div> +<form id="update_status" method="POST"> + {{ form.hidden_tag() }} + <fieldset> + <div class="row mb-3 "> + <div class="col-12"> + {{ form.status.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form.status.errors %} + {{ form.status(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form.status.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + + {{ form.status(class="col-sm-7 form-control") }} + + {% endif %} + </div> + + </div> + <div class="row gx-2"> + <div class="col-5"> + <button type="submit" class="btn btn-primary" > + <i class="bi bi-plus-circle-fill"></i> + {{ submit_text }} + </button> + <div class="col-5"> + + <button type="button" class="btn btn-block btn-secondary" onclick="javascript: history.back()"> + <i class="bi bi-box-arrow-in-left"></i> + Cancel + </button> + </div> + </div> + </div> + + </div> + </fieldset> +</form> + +{% endblock %} diff --git a/src/webui/service/templates/policy_rule/home.html b/src/webui/service/templates/policy_rule/home.html index e28557e819e664be4e5314d86ea5a47fd1ac1681..cbf6a80629a385523ed6e3fa7c9f9c768892b1c4 100644 --- a/src/webui/service/templates/policy_rule/home.html +++ b/src/webui/service/templates/policy_rule/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/qkd_app/detail.html b/src/webui/service/templates/qkd_app/detail.html index 078895cec81b4680715f9d027beac3158afdc4a4..2bf31af9f1d70b907260b29ef620b1d5f71a5829 100644 --- a/src/webui/service/templates/qkd_app/detail.html +++ b/src/webui/service/templates/qkd_app/detail.html @@ -1,3 +1,19 @@ +<!-- + Copyright 2022-2024 ETSI 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. +--> + {% extends 'base.html' %} {% block content %} diff --git a/src/webui/service/templates/qkd_app/home.html b/src/webui/service/templates/qkd_app/home.html index 39b43ecc4b9b71e03d27bf080ae6c7be2bf1a90d..21e03f2efbcbd513988109050a28e86af5b2961e 100644 --- a/src/webui/service/templates/qkd_app/home.html +++ b/src/webui/service/templates/qkd_app/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + {% extends 'base.html' %} {% block content %} diff --git a/src/webui/service/templates/service/add-xr.html b/src/webui/service/templates/service/add-xr.html index fcf7cbf3d58dd3709b84fa7b4483fe270d03fb01..e6f59580694aecb6c1d716476850899d7c2ddb3e 100644 --- a/src/webui/service/templates/service/add-xr.html +++ b/src/webui/service/templates/service/add-xr.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/add.html b/src/webui/service/templates/service/add.html index 8381ff522ce33cd5f0f04ed2fd745fe48b33aa89..f3dab7b151f4da3bfc49da86a4a36dc315dab4fc 100644 --- a/src/webui/service/templates/service/add.html +++ b/src/webui/service/templates/service/add.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/configure_ACL_IPV4.html b/src/webui/service/templates/service/configure_ACL_IPV4.html index 0fc59faf042a50e264a1d6099972e13c25db40dc..af83a7d8f17307b1686e316a71047408006deec5 100644 --- a/src/webui/service/templates/service/configure_ACL_IPV4.html +++ b/src/webui/service/templates/service/configure_ACL_IPV4.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/configure_ACL_IPV6.html b/src/webui/service/templates/service/configure_ACL_IPV6.html index aa5d268e1df0524829bf944004b59aced65582ef..46114ec5fcc79b52de3abfcd6aced4c99226243d 100644 --- a/src/webui/service/templates/service/configure_ACL_IPV6.html +++ b/src/webui/service/templates/service/configure_ACL_IPV6.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/configure_ACL_L2.html b/src/webui/service/templates/service/configure_ACL_L2.html index f292bfd20d42a0829d3758acb9ea5d0633f66507..7c72e21fad91c9dabfc8b9b532264f48964ba9e7 100644 --- a/src/webui/service/templates/service/configure_ACL_L2.html +++ b/src/webui/service/templates/service/configure_ACL_L2.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/configure_L2VPN.html b/src/webui/service/templates/service/configure_L2VPN.html index 54b1258471f423b02a81272c200815ab268c08d6..90201b63c923d89542ab23b76efb55fe3999805e 100644 --- a/src/webui/service/templates/service/configure_L2VPN.html +++ b/src/webui/service/templates/service/configure_L2VPN.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/configure_L3VPN.html b/src/webui/service/templates/service/configure_L3VPN.html index 439ea315584aba327bc71e419792a0a397f7a352..9d57b33dac7c0e20e590c3c60d23354332c04d00 100644 --- a/src/webui/service/templates/service/configure_L3VPN.html +++ b/src/webui/service/templates/service/configure_L3VPN.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/configure_QKD.html b/src/webui/service/templates/service/configure_QKD.html index a01f4519d7f4b09732fba6d24db034f143be9943..876cc9cea224ff8a433bc07b74f6ea0bb2a2188f 100644 --- a/src/webui/service/templates/service/configure_QKD.html +++ b/src/webui/service/templates/service/configure_QKD.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/detail.html b/src/webui/service/templates/service/detail.html index d97c26db95e975e579a003e9bbd593cc46074fcc..e8dfa618abc9e83551608fafce849c04a9a19487 100644 --- a/src/webui/service/templates/service/detail.html +++ b/src/webui/service/templates/service/detail.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/service/home.html b/src/webui/service/templates/service/home.html index 98638768ef7e59fbf532a37d4115ce8768d8a6e7..696ffeb3ea9b982e0cd10de7c723c8edc4dff0dc 100644 --- a/src/webui/service/templates/service/home.html +++ b/src/webui/service/templates/service/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/slice/detail.html b/src/webui/service/templates/slice/detail.html index 9e2898c29071f8017e3f849cddbadb6e44c79f70..aa4fdbed5883950499e890d53b82045e0c844248 100644 --- a/src/webui/service/templates/slice/detail.html +++ b/src/webui/service/templates/slice/detail.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/slice/home.html b/src/webui/service/templates/slice/home.html index 57f8f54773e3f324f8827fc17f1184be7241f13c..0be082ee202bcef39a88caa4d518650781c42b99 100644 --- a/src/webui/service/templates/slice/home.html +++ b/src/webui/service/templates/slice/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/topology/add.html b/src/webui/service/templates/topology/add.html index 967ecd67e74b1f0d42c21bd07c3a1e593f16c46d..3f17177fdfd0f84cb7ee83fa87d00ef2191a2a7b 100644 --- a/src/webui/service/templates/topology/add.html +++ b/src/webui/service/templates/topology/add.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/topology/addSpeaker.html b/src/webui/service/templates/topology/addSpeaker.html index 87968ce9a6ae40031d438ad1768b7e37834bbdac..8d19ec5c0b0f3172ca3b0b65c111a82d96ad4f79 100644 --- a/src/webui/service/templates/topology/addSpeaker.html +++ b/src/webui/service/templates/topology/addSpeaker.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/topology/editSpeakers.html b/src/webui/service/templates/topology/editSpeakers.html index ccdfaa57cf8a072a235abf3cdcd6cd9a0d86c20d..e1754c29b7bb25a3dd4722a243ac29666f952eb6 100644 --- a/src/webui/service/templates/topology/editSpeakers.html +++ b/src/webui/service/templates/topology/editSpeakers.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/templates/topology/home.html b/src/webui/service/templates/topology/home.html index 6bcaffd30360ec05a9f28f255fcc5564ac7ab29d..95d88269ccc1348d641ad42137c0349545f9256d 100644 --- a/src/webui/service/templates/topology/home.html +++ b/src/webui/service/templates/topology/home.html @@ -1,5 +1,5 @@ <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/topology/__init__.py b/src/webui/service/topology/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..53d5157f750bfb085125cbd33faff1cec5924e14 100644 --- a/src/webui/service/topology/__init__.py +++ b/src/webui/service/topology/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/topology/forms.py b/src/webui/service/topology/forms.py index 1de38e20a3df8d14eac7f07d77770c029761779d..655bcb972e0529e092a2245a813f884a8212e412 100644 --- a/src/webui/service/topology/forms.py +++ b/src/webui/service/topology/forms.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/service/topology/routes.py b/src/webui/service/topology/routes.py index 7bbfae162c52786fe2b5217e234a470d4163ecc0..494ed06598b4dfda698ff0f5a44a99982a94a5f3 100644 --- a/src/webui/service/topology/routes.py +++ b/src/webui/service/topology/routes.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/tests/__init__.py b/src/webui/tests/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/webui/tests/__init__.py +++ b/src/webui/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/tests/test_unitary.py b/src/webui/tests/test_unitary.py index 73782b32ac905d3451995c908ebf361e8af5af26..54f9823f255609457b8a942cccc860620e688968 100644 --- a/src/webui/tests/test_unitary.py +++ b/src/webui/tests/test_unitary.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/utils/__init__.py b/src/webui/utils/__init__.py index bbfc943b68af13a11e562abbc8680ade71db8f02..023830645e0fcb60e3f8583674a954810af222f2 100644 --- a/src/webui/utils/__init__.py +++ b/src/webui/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/webui/utils/form_validators.py b/src/webui/utils/form_validators.py index 9ad5e2e7dc335e74c49d51d2374eb9a60cd3fd88..25034d2656dd7ed914e325b8eeb385b528d4438b 100644 --- a/src/webui/utils/form_validators.py +++ b/src/webui/utils/form_validators.py @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/.gitlab-ci.yml b/src/ztp/.gitlab-ci.yml index 0cd46b21042d2aed9526e4addff7341d527727eb..d9c70dca70b04612e3bdb8b6714df062a12c6414 100644 --- a/src/ztp/.gitlab-ci.yml +++ b/src/ztp/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/pom.xml b/src/ztp/pom.xml index c8242be2c248973bb7a00352dc3d95221eb9c295..2c284b078080b1e82cc42b0b0d8dcd607a43f9a1 100644 --- a/src/ztp/pom.xml +++ b/src/ztp/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/docker/Dockerfile.multistage.jvm b/src/ztp/src/main/docker/Dockerfile.multistage.jvm index a781a251aa8413f6cadd686ddc8f61622a388310..66942a18c30f07c8d784374651d21d333441c722 100644 --- a/src/ztp/src/main/docker/Dockerfile.multistage.jvm +++ b/src/ztp/src/main/docker/Dockerfile.multistage.jvm @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java index 2e4d9fdb69eaa20ff4ee5570eeee8d1ed5a4edd3..233e892a8a2295b9840c5f1c9b651c0f1691de60 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ContextSubscriber.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java index 0b2273f2eec614461f81fc7a0b00556a65bf0de6..cc68bf835a92903bcc81b9e9f80594a0edc7a8eb 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/Serializer.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java index e30bf8360eb1f7b87123130a39c8b4eca76427d2..f5deddb56d3f6a7ad7f841ccf9b050d4783a7fba 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleLivenessCheck.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java index c2de2a8ee8db10604505d8b2dc82a005250ba2db..f8c2318f650ad81bfe9084a0985cbb41b56678bf 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/SimpleReadinessCheck.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java index a129a26366cc9867f7df95023896a28b734a1399..ba5a47194a4251081252779bfe3880486699b31c 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpConfiguration.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java index d3106e7a47372be06a0fe832649be0cffef3db25..60033c2dcf8dbdd1d9c2791d7081e4c48cd3a902 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java index dc1e4e2a838f79c7d2e1ce028e8c4b56f5177398..10051a35b89f01306f47423eff0e890ce4b89fab 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java index 6f2044c2c6f6746e456a9413ad40e3dd7f29e51f..92dafc86d96e8a0a7347a16db4f48890fa23828a 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java index 8ff4dd468c82fb19aeb80f0eeb133e983c07e07d..e82953663b9681fb83b1ac1fcca6335adb921128 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/ZtpServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java index 0a7f21e2c014a875aa950551442980585a5c8c6f..fae4743ea689b7ae8783660edb1d16ce586311c8 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclAction.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java index 90ed34b5678e1ee73134664ea847e3f4c6519305..ba55647c4042d0635b2ede80a901b99dc2a2473e 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclEntry.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java index f13cbbbfe0b8cb0937cf9cd6aafd7310de6ae30e..c12e65ee33cc7151cc43e4a058de67b288360187 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclForwardActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java index 194f823b54ec8ea25193ec01a9a8921bac2c064e..9566398a7c8c1e5de29f0047b6fbb584ed3f61aa 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclLogActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java index 8c877f5c6448d36cdb6d447af633105a4274bdb8..496c9f8d6cc0e2d57fa6e29a55c56ed2ed22e333 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclMatch.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java index c1aee37ca6356d8ebe0eb9fa6fa4b73b4c731afb..46b84509499fad5cd91e55ef0c9f5b3c746e3366 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleSet.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java index 3a87abb9243b9cd4ad542b13650f17987f3d2313..a37c182e4709c78e8015b21dd421a57ccfb577eb 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/acl/AclRuleTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java index 8f990ea0897689e4a80095638c4ca150b01df74e..9b291e03fad169b626a066776101f736de3326f4 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/common/Util.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java index cec5ba09bd62a9373242d7c249b221282a834448..825048b2ab20bcaa86227ff0d26694b184fa7c82 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java index 2b8b1a336226da50f264573907f19d6b453b44b4..e989c6f64530f923ac040a2e3b6189a5e26222c9 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java index fe0316de78a2038bc46b3644bc533bbf82922ef7..731ec4d8b65a8b03afe6833faa4e0b0fb342b24d 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java index 7df928bde04486dc6a198cb30e4cbb91f088a882..4637105f295400ff0f1480b0a40d7c660214ffb1 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/ContextServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java index c04e90907eea38d013f0c1f6d02e20dfb1dc4c1c..23bbe9580392b256444e2bea9b7d53cdd482508c 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigActionEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java index 276884a830c383fdbf2b2a35e519dddef3421ccd..8ec49c70ff2dbef64b50dc581d56d67e89938297 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRule.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java index a6164d75b56c3cfe1eef460cb6eb2e2c93cc6e00..3c9762da2ac4f6bb362dffe9459aafa88d8dec90 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleAcl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java index c75cdf83dbf01562974a310f6e394b05233446da..544cad24a2eff091b12cf1edbf1023ab41dec347 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java index f89ca0f56dee3b4594bdb5bd586c44edf9591f08..58f41b9edb58d0fb8421122e38e2f9edb542f542 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java index bc264f03f533a2d38023fdc24612fd14bb1b6d83..4eca8f3606d2b0c88a4982be129f0f110a39e8d0 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeAcl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java index 71b0d430c5118b580b9548d0b4b5ced15fc81161..1f41cda2c4247f5bf14d349270c4d0c5574eea0c 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/ConfigRuleTypeCustom.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java index ffbe52339feea3af9bbfdb8dd83ed2b53c10ad8c..f4cfab17a903f2323a1eba687f01f96c44333134 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Device.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java index 57901010e9c3edbb225ad2e339552c884f5dccb2..5c62678e436c60c4af1369e0a5035c03064452d0 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java index 5fae90fc67ec89a1522c6a9d3f5d2145e02a4e4d..a7e4a16cfc01d8ccfae3b1c377566bbeb79109af 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceDriverEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java index 06b39d39d766ee38ae41cb20a87b2c7dd9ac12c6..70ec7036e9b9e0a63aa212d764c31d3313910e30 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceEvent.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java index 9741a02b9e82ad2bc3b7cf5cedbf31500a424900..e807a945325fa6384f12ca9e6c970ea0ee95d660 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/DeviceOperationalStatus.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java index 7c6686963c30af14b9b297563c247b4dfdb18e1f..b7d6a73704df2176c9a59a6e76637def23f318df 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Empty.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java index 6c0e73a2a7347c9379587fbe46a2e5f40f4710f6..906c40094de1e921f2c4a0ff592436d1a8522942 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPoint.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java index c2c4785d9555e2dc3a13f7b2ba7bceade2313b14..288551fe77dcaf6dd4c1619e15700de3f1b28bb9 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EndPointId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java index 0666d2c396295e242c9729edec48b9df9587235e..7ee8e9d1a5332caff38632ba01dcb8b7655128cc 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Event.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java index 447a95daf35e1c0c20494dea53c319095ebfbed1..e771229b13eb08c8bc72a3a79aed1bf2243d7fc6 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/EventTypeEnum.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java index b54f90b735f19e84e5e3480f2e1e028af5084c1b..3761c325ede891f49f931cd06873b50f94f1b2fd 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/GpsPosition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java index 3a2df1f01fe928ca94f088a0eb12e1a4651499c6..2302e0cd5a98768eb4d72022a791971b3759bc5a 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/Location.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java index 849d54abd6c55988bfd1bea582322befb532c741..82615c585d000155419dbcf443bdbd84be6c2d90 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java index ef8b9e9fb56b8995567599a7ceca03799c0a0504..728d6c3ddd670875d9032351a58f4bdcf5a7460d 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeGpsPosition.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java index 789a92831e02fbacadefc04c07589873fdba2e35..978f398a5c944c3764fd0795fd7d27d1c54b1f9f 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/LocationTypeRegion.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java index 2b967c4c5b65912df77b4f373040562e2c0afc00..58b74dac9dfc8b9bacd456a0e9c7f000485546dd 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/context/model/TopologyId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java index 757e8101a7c24a994ea112720407cdefa58062d8..b7ac6b3f7072c79e4d35c4b27fe367cb03f5a620 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGateway.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java index 62ca170e87231b47300f00317599821c7dca1a7e..4492c3273d30c5a200e076788ae3b1ccd6198615 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceGatewayImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java index 2cca2555f996fe7c45a5627d3227bf0eeae9ccab..411bc68d662762ebfefb64798fe83dab073108e2 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceService.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java index ff97d89bdf80a9d617f10f5c2157d50c8a6c5370..3e620ede9d4fea23b626721c6923f286a304f758 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/device/DeviceServiceImpl.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java index 3c0ce9f0d5283554cbaaf6ead7cdcd6583422af6..9905228fd5c92e4a7bd663779550bcf12c37e882 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/ExternalServiceFailureException.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java index 42d79f8c567cc6239bc0423b4187b2854f84f449..ce9e1cf774238855afbcef37959a29903d384ea7 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/exception/GeneralExceptionHandler.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java index c95f097a5e8588b05333bc7bb6569392b0910e8e..e2ce29b178970b5aa2c016166ccba015be7e20c5 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/kpi_sample_types/model/KpiSampleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java index 492ea16763087e40ec41a7d1da928c285c232db4..79741b36af1ad0043a39bd4c23cafdb6dcd40dd7 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRole.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java index aa04360a7cc05512a081e71b1427136f2af35490..efd6be3f32ebd6ad1b38945db96079c964d355c8 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleConfig.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java index 8eb116bd26975b28306a1ee1fedf7f61d44bc683..6ac8f2dfa23653d911f28148dbf666d97f21f1e5 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleId.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java index 8f57019dae62a4e6c5dc0f9b0af8e1fa3e36d9f4..8d3b1b42ecc468e26486effabbace812db7e5234 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceRoleType.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java index cdb360ca9e87dc1d6dace55c2044046de554c1a7..84788f98d0a8930720a1f011f244a43c9129f23b 100644 --- a/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java +++ b/src/ztp/src/main/java/org/etsi/tfs/ztp/model/DeviceState.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/main/resources/application.yml b/src/ztp/src/main/resources/application.yml index 561e5a7aa47e6af1b84ceaf5fc53190a9f9645c5..f5f5b00396f889896deb5ffa46d0e32eaa01d3d3 100644 --- a/src/ztp/src/main/resources/application.yml +++ b/src/ztp/src/main/resources/application.yml @@ -1,4 +1,4 @@ -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java index 5185037e276c502ed30a671c4d548a769d2bb4d5..0554ce9c5ad8b664fc6dd9b85ad7c270bea2515a 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ConfigRuleTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java index 8c17d972368505cca64be7691ae959d17f3e756a..dafaf9f4eed1654257ab25e02db82ef45042a90a 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ContextSubscriberTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java index b837765691d878152c77cd7b26fe2d9969459429..5c90081ffacb2edbb0b61b22431beafcb34ebf1d 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/EndPointCreationTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java index fdfb4479a2c64956ae8a741a7a217cba6a665f30..2b4a4ce44981fbb5518f9aa8556bf5a44ced78ee 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/LocationTypeTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java index 09576a0b4e9a4d79787fd91aa1e65c13e90c4cd6..15efebc3ad6b3c15fb34b39348a88bd7ba713ead 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/MockZtpConfiguration.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java index 1d11c2124e86f26a64de8c629b0785c9971d9e73..9b1729263ec202ce018f99908c68fcedf4f45837 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/SerializerTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java index 278c8eac42c08e720f653aefec9e990f5c0530f0..1b1219a1441714a0a15f3f32452ce34fdf39e1d5 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpFunctionalServiceTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java index 63b6dc28df6e2da9bb581a69c0f21481c023906b..e622810bf1442611ae47d0a23f1abd91f94f588a 100644 --- a/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java +++ b/src/ztp/src/test/java/org/etsi/tfs/ztp/ZtpServiceTest.java @@ -1,5 +1,5 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +* Copyright 2022-2024 ETSI 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. diff --git a/src/ztp/util/set_version.sh b/src/ztp/util/set_version.sh index 90c6d6e8a72c4e8507b1bc067d3fd83fc3d31384..56349563b67f29c6d97738ac375eff0fc49c759f 100755 --- a/src/ztp/util/set_version.sh +++ b/src/ztp/util/set_version.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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. diff --git a/update_tfs_runtime_env_vars.sh b/update_tfs_runtime_env_vars.sh index 209551c03a85909b5f02b70f22704675a2f64df5..6751667f5cb505f56d11889db66485d29ee56109 100755 --- a/update_tfs_runtime_env_vars.sh +++ b/update_tfs_runtime_env_vars.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# Copyright 2022-2024 ETSI 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.