diff --git a/deploy/all.sh b/deploy/all.sh index a99607f5b907c2bd1e1b4b889bef881874a63967..6f8331b769b6f84a13ac66b48ca2f861a8308ce5 100755 --- a/deploy/all.sh +++ b/deploy/all.sh @@ -25,14 +25,14 @@ # By default, assume internal MicroK8s registry is used. export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"} -# If not already set, set the list of components you want to build images for, and deploy. +# If not already set, set the list of components, separated by spaces, you want to build images for, and deploy. # By default, only basic components are deployed -export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device monitoring service compute webui"} +export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation monitoring pathcomp service slice compute webui load_generator"} # If not already set, set the tag you want to use for your images. export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"} -# If not already set, set the name of the Kubernetes namespace to deploy to. +# If not already set, set the name of the Kubernetes namespace to deploy TFS to. export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # If not already set, set additional manifest files to be applied after the deployment @@ -41,7 +41,7 @@ export TFS_EXTRA_MANIFESTS=${TFS_EXTRA_MANIFESTS:-""} # If not already set, set the new Grafana admin password export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"} -# If not already set, disable skip-build flag. +# If not already set, disable skip-build flag to rebuild the Docker images. # If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-""} @@ -51,6 +51,12 @@ export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-""} # If not already set, set the namespace where CockroackDB will be deployed. export CRDB_NAMESPACE=${CRDB_NAMESPACE:-"crdb"} +# If not already set, set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL=${CRDB_EXT_PORT_SQL:-"26257"} + +# If not already set, set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP=${CRDB_EXT_PORT_HTTP:-"8081"} + # If not already set, set the database username to be used by Context. export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} @@ -60,12 +66,6 @@ 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 the name of the secret where CockroachDB data and credentials will be stored. -export CRDB_SECRET_NAME=${CRDB_SECRET_NAME:-"crdb-data"} - -# If not already set, set the namespace where the secret containing CockroachDB data and credentials will be stored. -export CRDB_SECRET_NAMESPACE=${CRDB_SECRET_NAMESPACE:-${TFS_K8S_NAMESPACE}} - # If not already set, set CockroachDB installation mode. Accepted values are: 'single' and 'cluster'. # "YES", the database pointed by variable CRDB_NAMESPACE will be dropped while # checking/deploying CockroachDB. @@ -78,7 +78,7 @@ export CRDB_SECRET_NAMESPACE=${CRDB_SECRET_NAMESPACE:-${TFS_K8S_NAMESPACE}} # Ref: https://www.cockroachlabs.com/docs/stable/recommended-production-settings.html export CRDB_DEPLOY_MODE=${CRDB_DEPLOY_MODE:-"single"} -# If not already set, disable flag for dropping database if exists. +# 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_NAMESPACE will be dropped while # checking/deploying CockroachDB. @@ -96,11 +96,11 @@ export CRDB_REDEPLOY=${CRDB_REDEPLOY:-""} # If not already set, set the namespace where NATS will be deployed. export NATS_NAMESPACE=${NATS_NAMESPACE:-"nats"} -# If not already set, set the name of the secret where NATS data and credentials will be stored. -export NATS_SECRET_NAME=${NATS_SECRET_NAME:-"nats-data"} +# If not already set, set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT=${NATS_EXT_PORT_CLIENT:-"4222"} -# If not already set, set the namespace where the secret containing NATS data and credentials will be stored. -export NATS_SECRET_NAMESPACE=${NATS_SECRET_NAMESPACE:-${TFS_K8S_NAMESPACE}} +# If not already set, set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP=${NATS_EXT_PORT_HTTP:-"8222"} # If not already set, disable flag for re-deploying NATS from scratch. # WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE MESSAGE BROKER INFORMATION! @@ -113,20 +113,33 @@ export NATS_REDEPLOY=${NATS_REDEPLOY:-""} # If not already set, set the namespace where QuestDB will be deployed. export QDB_NAMESPACE=${QDB_NAMESPACE:-"qdb"} -# If not already set, set the database username to be used by Monitoring. +# If not already set, set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL=${QDB_EXT_PORT_SQL:-"8812"} + +# If not already set, set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP=${QDB_EXT_PORT_ILP:-"9009"} + +# If not already set, set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP=${QDB_EXT_PORT_HTTP:-"9000"} + +# If not already set, set the database username to be used for QuestDB. export QDB_USERNAME=${QDB_USERNAME:-"admin"} -# If not already set, set the database user's password to be used by Monitoring. +# If not already set, set the database user's password to be used for QuestDB. export QDB_PASSWORD=${QDB_PASSWORD:-"quest"} -# If not already set, set the table name to be used by Monitoring. -export QDB_TABLE=${QDB_TABLE:-"tfs_monitoring"} +# If not already set, set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS:-"tfs_monitoring_kpis"} + +# If not already set, set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS:-"tfs_slice_groups"} -## If not already set, disable flag for dropping table if exists. -## WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE TABLE INFORMATION! -## If QDB_DROP_TABLE_IF_EXISTS is "YES", the table pointed by variable QDB_TABLE will be dropped while -## checking/deploying QuestDB. -#export QDB_DROP_TABLE_IF_EXISTS=${QDB_DROP_TABLE_IF_EXISTS:-""} +# If not already set, disable flag for dropping tables if they exist. +# WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE TABLE INFORMATION! +# If QDB_DROP_TABLES_IF_EXIST is "YES", the tables pointed by variables +# QDB_TABLE_MONITORING_KPIS and QDB_TABLE_SLICE_GROUPS will be dropped while +# checking/deploying QuestDB. +export QDB_DROP_TABLES_IF_EXIST=${QDB_DROP_TABLES_IF_EXIST:-""} # If not already set, disable flag for re-deploying QuestDB from scratch. # WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE DATABASE INFORMATION! diff --git a/deploy/crdb.sh b/deploy/crdb.sh index 98d011f190196b803be27200b8bc348b30c87055..216339117d2156d0ae1beddb5a1d6a7ccbe33219 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -21,6 +21,12 @@ # If not already set, set the namespace where CockroackDB will be deployed. export CRDB_NAMESPACE=${CRDB_NAMESPACE:-"crdb"} +# If not already set, set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL=${CRDB_EXT_PORT_SQL:-"26257"} + +# If not already set, set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP=${CRDB_EXT_PORT_HTTP:-"8081"} + # If not already set, set the database username to be used by Context. export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} @@ -66,9 +72,6 @@ CRDB_MANIFESTS_PATH="manifests/cockroachdb" # Create a tmp folder for files modified during the deployment TMP_MANIFESTS_FOLDER="$TMP_FOLDER/manifests" mkdir -p $TMP_MANIFESTS_FOLDER -TMP_LOGS_FOLDER="$TMP_FOLDER/logs" -mkdir -p $TMP_LOGS_FOLDER -CRDB_LOG_FILE="$TMP_LOGS_FOLDER/crdb_deploy.log" function crdb_deploy_single() { echo "CockroachDB Namespace" @@ -112,24 +115,23 @@ function crdb_deploy_single() { echo echo "CockroachDB Port Mapping" - echo ">>> Expose CockroachDB SQL port (26257->26257)" - CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - PATCH='{"data": {"'${CRDB_SQL_PORT}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_SQL_PORT}'"}}' + echo ">>> Expose CockroachDB SQL port (26257->${CRDB_EXT_PORT_SQL})" + CRDB_PORT_SQL=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + PATCH='{"data": {"'${CRDB_EXT_PORT_SQL}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_PORT_SQL}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${CRDB_SQL_PORT}', "hostPort": '${CRDB_SQL_PORT}'}' + PORT_MAP='{"containerPort": '${CRDB_EXT_PORT_SQL}', "hostPort": '${CRDB_EXT_PORT_SQL}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" echo - echo ">>> Expose CockroachDB HTTP Mgmt GUI port (8080->8081)" - CRDB_GUI_PORT_EXT="8081" - CRDB_GUI_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') - PATCH='{"data": {"'${CRDB_GUI_PORT_EXT}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_GUI_PORT}'"}}' + echo ">>> Expose CockroachDB HTTP Mgmt GUI port (8080->${CRDB_EXT_PORT_HTTP})" + CRDB_PORT_HTTP=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') + PATCH='{"data": {"'${CRDB_EXT_PORT_HTTP}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_PORT_HTTP}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${CRDB_GUI_PORT_EXT}', "hostPort": '${CRDB_GUI_PORT_EXT}'}' + PORT_MAP='{"containerPort": '${CRDB_EXT_PORT_HTTP}', "hostPort": '${CRDB_EXT_PORT_HTTP}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" @@ -156,7 +158,8 @@ function crdb_undeploy_single() { function crdb_drop_database_single() { echo "Drop database if exists" - CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@cockroachdb-0:${CRDB_SQL_PORT}/defaultdb?sslmode=require" + CRDB_PORT_SQL=$(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_SQL}/defaultdb?sslmode=require" kubectl exec -it --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ --execute "DROP DATABASE IF EXISTS ${CRDB_DATABASE};" @@ -266,24 +269,23 @@ function crdb_deploy_cluster() { echo echo "CockroachDB Port Mapping" - echo ">>> Expose CockroachDB SQL port (26257)" - CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - PATCH='{"data": {"'${CRDB_SQL_PORT}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_SQL_PORT}'"}}' + echo ">>> Expose CockroachDB SQL port (26257->${CRDB_EXT_PORT_SQL})" + CRDB_PORT_SQL=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + PATCH='{"data": {"'${CRDB_EXT_PORT_SQL}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_PORT_SQL}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${CRDB_SQL_PORT}', "hostPort": '${CRDB_SQL_PORT}'}' + PORT_MAP='{"containerPort": '${CRDB_EXT_PORT_SQL}', "hostPort": '${CRDB_EXT_PORT_SQL}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" echo - echo ">>> Expose CockroachDB HTTP Mgmt GUI port (8080->8081)" - CRDB_GUI_PORT_EXT="8081" - CRDB_GUI_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') - PATCH='{"data": {"'${CRDB_GUI_PORT_EXT}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_GUI_PORT}'"}}' + echo ">>> Expose CockroachDB HTTP Mgmt GUI port (8080->${CRDB_EXT_PORT_HTTP})" + CRDB_PORT_HTTP=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') + PATCH='{"data": {"'${CRDB_EXT_PORT_HTTP}'": "'${CRDB_NAMESPACE}'/cockroachdb-public:'${CRDB_PORT_HTTP}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${CRDB_GUI_PORT_EXT}', "hostPort": '${CRDB_GUI_PORT_EXT}'}' + PORT_MAP='{"containerPort": '${CRDB_EXT_PORT_HTTP}', "hostPort": '${CRDB_EXT_PORT_HTTP}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" @@ -345,17 +347,23 @@ function crdb_drop_database_cluster() { if [ "$CRDB_DEPLOY_MODE" == "single" ]; then if [ "$CRDB_REDEPLOY" == "YES" ]; then crdb_undeploy_single - elif [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then - crdb_drop_database_single fi + crdb_deploy_single + + if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then + crdb_drop_database_single + fi elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then if [ "$CRDB_REDEPLOY" == "YES" ]; then crdb_undeploy_cluster - elif [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then - crdb_drop_database_cluster fi + crdb_deploy_cluster + + if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then + crdb_drop_database_cluster + fi else echo "Unsupported value: CRDB_DEPLOY_MODE=$CRDB_DEPLOY_MODE" fi diff --git a/deploy/nats.sh b/deploy/nats.sh index 115a185302236b80db385212cd772100392329af..aa082b54ba8806c48f9b5a04c61f110b93b03d6a 100755 --- a/deploy/nats.sh +++ b/deploy/nats.sh @@ -21,6 +21,12 @@ # If not already set, set the namespace where NATS will be deployed. export NATS_NAMESPACE=${NATS_NAMESPACE:-"nats"} +# If not already set, set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT=${NATS_EXT_PORT_CLIENT:-"4222"} + +# If not already set, set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP=${NATS_EXT_PORT_HTTP:-"8222"} + # If not already set, disable flag for re-deploying NATS from scratch. # WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE MESSAGE BROKER INFORMATION! # If NATS_REDEPLOY is "YES", the message broker will be dropped while checking/deploying NATS. @@ -31,14 +37,6 @@ export NATS_REDEPLOY=${NATS_REDEPLOY:-""} # Automated steps start here ######################################################################################################################## -# Constants -TMP_FOLDER="./tmp" -NATS_MANIFESTS_PATH="manifests/nats" - -# Create a tmp folder for files modified during the deployment -TMP_MANIFESTS_FOLDER="$TMP_FOLDER/manifests" -mkdir -p $TMP_MANIFESTS_FOLDER - function nats_deploy_single() { echo "NATS Namespace" echo ">>> Create NATS Namespace (if missing)" @@ -51,14 +49,14 @@ function nats_deploy_single() { echo "Install NATS (single-node)" echo ">>> Checking if NATS is deployed..." - if kubectl get --namespace ${NATS_NAMESPACE} statefulset/nats &> /dev/null; then + if kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; then echo ">>> NATS is present; skipping step." else echo ">>> Deploy NATS" - helm3 install nats nats/nats --namespace ${NATS_NAMESPACE} --set nats.image.tag=2.9-alpine + helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image.tag=2.9-alpine echo ">>> Waiting NATS statefulset to be created..." - while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/nats &> /dev/null; do + while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do printf "%c" "." sleep 1 done @@ -72,32 +70,32 @@ function nats_deploy_single() { #kubectl wait --namespace ${NATS_NAMESPACE} --for=jsonpath='{.status.readyReplicas}'=3 --timeout=300s \ # statefulset/nats echo ">>> NATS statefulset created. Waiting NATS pods to be created..." - while ! kubectl get --namespace ${NATS_NAMESPACE} pod/nats-0 &> /dev/null; do + while ! kubectl get --namespace ${NATS_NAMESPACE} pod/${NATS_NAMESPACE}-0 &> /dev/null; do printf "%c" "." sleep 1 done - kubectl wait --namespace ${NATS_NAMESPACE} --for=condition=Ready --timeout=300s pod/nats-0 + kubectl wait --namespace ${NATS_NAMESPACE} --for=condition=Ready --timeout=300s pod/${NATS_NAMESPACE}-0 fi echo echo "NATS Port Mapping" - echo ">>> Expose NATS Client port (4222)" - NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service nats -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') - PATCH='{"data": {"'${NATS_CLIENT_PORT}'": "'${NATS_NAMESPACE}'/nats:'${NATS_CLIENT_PORT}'"}}' + echo ">>> Expose NATS Client port (4222->${NATS_EXT_PORT_CLIENT})" + NATS_PORT_CLIENT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') + PATCH='{"data": {"'${NATS_EXT_PORT_CLIENT}'": "'${NATS_NAMESPACE}'/'${NATS_NAMESPACE}':'${NATS_PORT_CLIENT}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${NATS_CLIENT_PORT}', "hostPort": '${NATS_CLIENT_PORT}'}' + PORT_MAP='{"containerPort": '${NATS_EXT_PORT_CLIENT}', "hostPort": '${NATS_EXT_PORT_CLIENT}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" echo - echo ">>> Expose NATS HTTP Mgmt GUI port (8222)" - NATS_GUI_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service nats -o 'jsonpath={.spec.ports[?(@.name=="monitor")].port}') - PATCH='{"data": {"'${NATS_GUI_PORT}'": "'${NATS_NAMESPACE}'/nats:'${NATS_GUI_PORT}'"}}' + echo ">>> Expose NATS HTTP Mgmt GUI port (8222->${NATS_EXT_PORT_HTTP})" + NATS_PORT_HTTP=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="monitor")].port}') + PATCH='{"data": {"'${NATS_EXT_PORT_HTTP}'": "'${NATS_NAMESPACE}'/'${NATS_NAMESPACE}':'${NATS_PORT_HTTP}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${NATS_GUI_PORT}', "hostPort": '${NATS_GUI_PORT}'}' + PORT_MAP='{"containerPort": '${NATS_EXT_PORT_HTTP}', "hostPort": '${NATS_EXT_PORT_HTTP}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" @@ -107,9 +105,9 @@ function nats_deploy_single() { function nats_undeploy_single() { echo "NATS" echo ">>> Checking if NATS is deployed..." - if kubectl get --namespace ${NATS_NAMESPACE} statefulset/nats &> /dev/null; then + if kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; then echo ">>> Undeploy NATS" - helm3 uninstall --namespace ${NATS_NAMESPACE} nats + helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE} else echo ">>> NATS is not present; skipping step." fi diff --git a/deploy/qdb.sh b/deploy/qdb.sh index d9a4de353b3309ef0a8a34310089e9bff31589fa..cba8a5c00fa349a032070c81e11cf99b1209cfd8 100755 --- a/deploy/qdb.sh +++ b/deploy/qdb.sh @@ -21,20 +21,33 @@ # If not already set, set the namespace where QuestDB will be deployed. export QDB_NAMESPACE=${QDB_NAMESPACE:-"qdb"} -# If not already set, set the database username to be used by Monitoring. +# If not already set, set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL=${QDB_EXT_PORT_SQL:-"8812"} + +# If not already set, set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP=${QDB_EXT_PORT_ILP:-"9009"} + +# If not already set, set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP=${QDB_EXT_PORT_HTTP:-"9000"} + +# If not already set, set the database username to be used for QuestDB. export QDB_USERNAME=${QDB_USERNAME:-"admin"} -# If not already set, set the database user's password to be used by Monitoring. +# If not already set, set the database user's password to be used for QuestDB. export QDB_PASSWORD=${QDB_PASSWORD:-"quest"} -# If not already set, set the table name to be used by Monitoring. -export QDB_TABLE=${QDB_TABLE:-"tfs_monitoring"} +# If not already set, set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS:-"tfs_monitoring_kpis"} -## If not already set, disable flag for dropping table if exists. -## WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE TABLE INFORMATION! -## If QDB_DROP_TABLE_IF_EXISTS is "YES", the table pointed by variable QDB_TABLE will be dropped while -## checking/deploying QuestDB. -#export QDB_DROP_TABLE_IF_EXISTS=${QDB_DROP_TABLE_IF_EXISTS:-""} +# If not already set, set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS:-"tfs_slice_groups"} + +# If not already set, disable flag for dropping tables if they exist. +# WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE TABLE INFORMATION! +# If QDB_DROP_TABLES_IF_EXIST is "YES", the table pointed by variables +# QDB_TABLE_MONITORING_KPIS and QDB_TABLE_SLICE_GROUPS will be dropped +# while checking/deploying QuestDB. +export QDB_DROP_TABLES_IF_EXIST=${QDB_DROP_TABLES_IF_EXIST:-""} # If not already set, disable flag for re-deploying QuestDB from scratch. # WARNING: ACTIVATING THIS FLAG IMPLIES LOOSING THE DATABASE INFORMATION! @@ -52,9 +65,6 @@ QDB_MANIFESTS_PATH="manifests/questdb" # Create a tmp folder for files modified during the deployment TMP_MANIFESTS_FOLDER="$TMP_FOLDER/manifests" -TMP_LOGS_FOLDER="$TMP_FOLDER/logs" -QDB_LOG_FILE="$TMP_LOGS_FOLDER/qdb_deploy.log" -mkdir -p $TMP_LOGS_FOLDER function qdb_deploy() { echo "QuestDB Namespace" @@ -95,34 +105,34 @@ function qdb_deploy() { echo echo "QuestDB Port Mapping" - echo ">>> Expose QuestDB SQL port (8812->8812)" - QDB_SQL_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') - PATCH='{"data": {"'${QDB_SQL_PORT}'": "'${QDB_NAMESPACE}'/questdb-public:'${QDB_SQL_PORT}'"}}' + echo ">>> Expose QuestDB SQL port (8812->${QDB_EXT_PORT_SQL})" + QDB_PORT_SQL=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') + PATCH='{"data": {"'${QDB_EXT_PORT_SQL}'": "'${QDB_NAMESPACE}'/questdb-public:'${QDB_PORT_SQL}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${QDB_SQL_PORT}', "hostPort": '${QDB_SQL_PORT}'}' + PORT_MAP='{"containerPort": '${QDB_EXT_PORT_SQL}', "hostPort": '${QDB_EXT_PORT_SQL}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" echo - echo ">>> Expose QuestDB Influx Line Protocol port (9009->9009)" - QDB_ILP_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="ilp")].port}') - PATCH='{"data": {"'${QDB_ILP_PORT}'": "'${QDB_NAMESPACE}'/questdb-public:'${QDB_ILP_PORT}'"}}' + echo ">>> Expose QuestDB Influx Line Protocol port (9009->${QDB_EXT_PORT_ILP})" + QDB_PORT_ILP=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="ilp")].port}') + PATCH='{"data": {"'${QDB_EXT_PORT_ILP}'": "'${QDB_NAMESPACE}'/questdb-public:'${QDB_PORT_ILP}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${QDB_ILP_PORT}', "hostPort": '${QDB_ILP_PORT}'}' + PORT_MAP='{"containerPort": '${QDB_EXT_PORT_ILP}', "hostPort": '${QDB_EXT_PORT_ILP}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" echo - echo ">>> Expose QuestDB HTTP Mgmt GUI port (9000->9000)" - QDB_GUI_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') - PATCH='{"data": {"'${QDB_GUI_PORT}'": "'${QDB_NAMESPACE}'/questdb-public:'${QDB_GUI_PORT}'"}}' + echo ">>> Expose QuestDB HTTP Mgmt GUI port (9000->${QDB_EXT_PORT_HTTP})" + QDB_PORT_HTTP=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') + PATCH='{"data": {"'${QDB_EXT_PORT_HTTP}'": "'${QDB_NAMESPACE}'/questdb-public:'${QDB_PORT_HTTP}'"}}' kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}" - PORT_MAP='{"containerPort": '${QDB_GUI_PORT}', "hostPort": '${QDB_GUI_PORT}'}' + PORT_MAP='{"containerPort": '${QDB_EXT_PORT_HTTP}', "hostPort": '${QDB_EXT_PORT_HTTP}'}' CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}' PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}' kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}" @@ -147,19 +157,23 @@ function qdb_undeploy() { echo } -# TODO: implement method to drop table -#function qdb_drop_table() { -# echo "Drop table if exists" -# QDB_CLIENT_URL="postgresql://${QDB_USERNAME}:${QDB_PASSWORD}@questdb-0:${QDB_SQL_PORT}/defaultdb?sslmode=require" -# kubectl exec -it --namespace ${QDB_NAMESPACE} questdb-0 -- \ -# ./qdb sql --certs-dir=/qdb/qdb-certs --url=${QDB_CLIENT_URL} \ -# --execute "DROP TABLE IF EXISTS ${QDB_TABLE};" -# echo -#} +function qdb_drop_tables() { + QDB_HOST=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.clusterIP}') + QDB_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}') + + echo "Drop tables, if exist" + curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_MONITORING_KPIS}+;" + echo + curl "http://${QDB_HOST}:${QDB_PORT}/exec?fmt=json&query=DROP+TABLE+IF+EXISTS+${QDB_TABLE_SLICE_GROUPS}+;" + echo +} if [ "$QDB_REDEPLOY" == "YES" ]; then qdb_undeploy -#elif [ "$QDB_DROP_TABLE_IF_EXISTS" == "YES" ]; then -# qdb_drop_table fi + qdb_deploy + +if [ "$QDB_DROP_TABLES_IF_EXIST" == "YES" ]; then + qdb_drop_tables +fi diff --git a/deploy/tfs.sh b/deploy/tfs.sh index f798f5c3e292dd015a8e8eef3e0492835f02832c..0d0461fa89073d9a1c98e94b5fd4610e191c7a06 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -18,18 +18,21 @@ # Read deployment settings ######################################################################################################################## + +# ----- TeraFlowSDN ------------------------------------------------------------ + # If not already set, set the URL of the Docker registry where the images will be uploaded to. # By default, assume internal MicroK8s registry is used. export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"} -# If not already set, set the list of components you want to build images for, and deploy. +# If not already set, set the list of components, separated by spaces, you want to build images for, and deploy. # By default, only basic components are deployed -export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device monitoring service compute webui"} +export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation monitoring pathcomp service slice compute webui load_generator"} # If not already set, set the tag you want to use for your images. export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"} -# If not already set, set the name of the Kubernetes namespace to deploy to. +# If not already set, set the name of the Kubernetes namespace to deploy TFS to. export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # If not already set, set additional manifest files to be applied after the deployment @@ -38,13 +41,22 @@ export TFS_EXTRA_MANIFESTS=${TFS_EXTRA_MANIFESTS:-""} # If not already set, set the new Grafana admin password export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"} -# If not already set, disable skip-build flag. +# If not already set, disable skip-build flag to rebuild the Docker images. # If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-""} + +# ----- CockroachDB ------------------------------------------------------------ + # If not already set, set the namespace where CockroackDB will be deployed. export CRDB_NAMESPACE=${CRDB_NAMESPACE:-"crdb"} +# If not already set, set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL=${CRDB_EXT_PORT_SQL:-"26257"} + +# If not already set, set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP=${CRDB_EXT_PORT_HTTP:-"8081"} + # If not already set, set the database username to be used by Context. export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"} @@ -54,20 +66,44 @@ 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 ------------------------------------------------------------------- + # If not already set, set the namespace where NATS will be deployed. export NATS_NAMESPACE=${NATS_NAMESPACE:-"nats"} +# If not already set, set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT=${NATS_EXT_PORT_CLIENT:-"4222"} + +# If not already set, set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP=${NATS_EXT_PORT_HTTP:-"8222"} + + +# ----- QuestDB ---------------------------------------------------------------- + # If not already set, set the namespace where QuestDB will be deployed. export QDB_NAMESPACE=${QDB_NAMESPACE:-"qdb"} -# If not already set, set the database username to be used by Monitoring. +# If not already set, set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL=${QDB_EXT_PORT_SQL:-"8812"} + +# If not already set, set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP=${QDB_EXT_PORT_ILP:-"9009"} + +# If not already set, set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP=${QDB_EXT_PORT_HTTP:-"9000"} + +# If not already set, set the database username to be used for QuestDB. export QDB_USERNAME=${QDB_USERNAME:-"admin"} -# If not already set, set the database user's password to be used by Monitoring. +# If not already set, set the database user's password to be used for QuestDB. export QDB_PASSWORD=${QDB_PASSWORD:-"quest"} -# If not already set, set the table name to be used by Monitoring. -export QDB_TABLE=${QDB_TABLE:-"tfs_monitoring"} +# If not already set, set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS:-"tfs_monitoring_kpis"} + +# If not already set, set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS:-"tfs_slice_groups"} ######################################################################################################################## @@ -85,7 +121,7 @@ TMP_LOGS_FOLDER="$TMP_FOLDER/logs" mkdir -p $TMP_LOGS_FOLDER echo "Deleting and Creating a new namespace..." -kubectl delete namespace $TFS_K8S_NAMESPACE +kubectl delete namespace $TFS_K8S_NAMESPACE --ignore-not-found kubectl create namespace $TFS_K8S_NAMESPACE printf "\n" @@ -101,7 +137,7 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type= printf "\n" echo "Create secret with NATS data" -NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service nats -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') +NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}') kubectl create secret generic nats-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ --from-literal=NATS_NAMESPACE=${NATS_NAMESPACE} \ --from-literal=NATS_CLIENT_PORT=${NATS_CLIENT_PORT} @@ -118,7 +154,8 @@ kubectl create secret generic qdb-data --namespace ${TFS_K8S_NAMESPACE} --type=' --from-literal=METRICSDB_REST_PORT=${QDB_HTTP_PORT} \ --from-literal=METRICSDB_ILP_PORT=${QDB_ILP_PORT} \ --from-literal=METRICSDB_SQL_PORT=${QDB_SQL_PORT} \ - --from-literal=METRICSDB_TABLE=${QDB_TABLE} \ + --from-literal=METRICSDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS} \ + --from-literal=METRICSDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS} \ --from-literal=METRICSDB_USERNAME=${QDB_USERNAME} \ --from-literal=METRICSDB_PASSWORD=${QDB_PASSWORD} printf "\n" @@ -287,12 +324,16 @@ for COMPONENT in $TFS_COMPONENTS; do printf "\n" done -if [[ "$TFS_COMPONENTS" == *"webui"* ]] && [[ "$TFS_COMPONENTS" == *"monitoring"* ]]; then +if [[ "$TFS_COMPONENTS" == *"webui"* ]]; then echo "Configuring WebUI DataStores and Dashboards..." sleep 5 + INGRESS_CTRL_NAME=$(echo "${TFS_K8S_NAMESPACE}" | sed "s/tfs/nginx-ingress-microk8s-controller/g") + EXT_HTTP_PORT=$(kubectl get daemonsets.apps --namespace ingress ${INGRESS_CTRL_NAME} \ + -o 'jsonpath={.spec.template.spec.containers[?(@.name=="nginx-ingress-microk8s")].ports[?(@.name=="http")].hostPort}') + # Exposed through the ingress controller "tfs-ingress" - GRAFANA_URL="127.0.0.1:80/grafana" + GRAFANA_URL="127.0.0.1:${EXT_HTTP_PORT}/grafana" # Default Grafana credentials GRAFANA_USERNAME="admin" @@ -301,28 +342,34 @@ if [[ "$TFS_COMPONENTS" == *"webui"* ]] && [[ "$TFS_COMPONENTS" == *"monitoring" # Configure Grafana Admin Password # Ref: https://grafana.com/docs/grafana/latest/http_api/user/#change-password GRAFANA_URL_DEFAULT="http://${GRAFANA_USERNAME}:${GRAFANA_PASSWORD}@${GRAFANA_URL}" - echo "Connecting to grafana at URL: ${GRAFANA_URL_DEFAULT}..." + + echo ">> Updating Grafana 'admin' password..." curl -X PUT -H "Content-Type: application/json" -d '{ "oldPassword": "'${GRAFANA_PASSWORD}'", "newPassword": "'${TFS_GRAFANA_PASSWORD}'", "confirmNew" : "'${TFS_GRAFANA_PASSWORD}'" }' ${GRAFANA_URL_DEFAULT}/api/user/password echo + echo # Updated Grafana API URL GRAFANA_URL_UPDATED="http://${GRAFANA_USERNAME}:${TFS_GRAFANA_PASSWORD}@${GRAFANA_URL}" echo "export GRAFANA_URL_UPDATED=${GRAFANA_URL_UPDATED}" >> $ENV_VARS_SCRIPT + echo ">> Installing Scatter Plot plugin..." + curl -X POST -H "Content-Type: application/json" -H "Content-Length: 0" \ + ${GRAFANA_URL_UPDATED}/api/plugins/michaeldmoore-scatter-panel/install + echo + # Ref: https://grafana.com/docs/grafana/latest/http_api/data_source/ - # TODO: replace user, password and database by variables to be saved QDB_HOST_PORT="${METRICSDB_HOSTNAME}:${QDB_SQL_PORT}" - echo "Creating a datasource..." + echo ">> Creating datasources..." curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{ "access" : "proxy", "type" : "postgres", - "name" : "questdb", + "name" : "questdb-mon-kpi", "url" : "'${QDB_HOST_PORT}'", - "database" : "'${QDB_TABLE}'", + "database" : "'${QDB_TABLE_MONITORING_KPIS}'", "user" : "'${QDB_USERNAME}'", "basicAuth": false, "isDefault": true, @@ -342,16 +389,51 @@ if [[ "$TFS_COMPONENTS" == *"webui"* ]] && [[ "$TFS_COMPONENTS" == *"monitoring" }' ${GRAFANA_URL_UPDATED}/api/datasources echo - # Create Monitoring Dashboard + curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{ + "access" : "proxy", + "type" : "postgres", + "name" : "questdb-slc-grp", + "url" : "'${QDB_HOST_PORT}'", + "database" : "'${QDB_TABLE_SLICE_GROUPS}'", + "user" : "'${QDB_USERNAME}'", + "basicAuth": false, + "isDefault": false, + "jsonData" : { + "sslmode" : "disable", + "postgresVersion" : 1100, + "maxOpenConns" : 0, + "maxIdleConns" : 2, + "connMaxLifetime" : 14400, + "tlsAuth" : false, + "tlsAuthWithCACert" : false, + "timescaledb" : false, + "tlsConfigurationMethod": "file-path", + "tlsSkipVerify" : true + }, + "secureJsonData": {"password": "'${QDB_PASSWORD}'"} + }' ${GRAFANA_URL_UPDATED}/api/datasources + printf "\n\n" + + echo ">> Creating dashboards..." # Ref: https://grafana.com/docs/grafana/latest/http_api/dashboard/ - curl -X POST -H "Content-Type: application/json" \ - -d '@src/webui/grafana_dashboard_psql.json' \ + curl -X POST -H "Content-Type: application/json" -d '@src/webui/grafana_db_mon_kpis_psql.json' \ + ${GRAFANA_URL_UPDATED}/api/dashboards/db + echo + + curl -X POST -H "Content-Type: application/json" -d '@src/webui/grafana_db_slc_grps_psql.json' \ ${GRAFANA_URL_UPDATED}/api/dashboards/db + printf "\n\n" + + echo ">> Staring dashboards..." + DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tfs-l3-monit" + DASHBOARD_ID=$(curl -s "${DASHBOARD_URL}" | jq '.dashboard.id') + curl -X POST ${GRAFANA_URL_UPDATED}/api/user/stars/dashboard/${DASHBOARD_ID} echo - DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tf-l3-monit" + DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tfs-slice-grps" DASHBOARD_ID=$(curl -s "${DASHBOARD_URL}" | jq '.dashboard.id') curl -X POST ${GRAFANA_URL_UPDATED}/api/user/stars/dashboard/${DASHBOARD_ID} + echo printf "\n\n" fi diff --git a/hackfest/mock_osm/__main__.py b/hackfest/mock_osm/__main__.py index 669da2b5e6a1729f35d2958f2d7aa68c0413287d..4ed25eaedbf4eba1f04ea41c72a751ecd7d6380b 100644 --- a/hackfest/mock_osm/__main__.py +++ b/hackfest/mock_osm/__main__.py @@ -58,13 +58,11 @@ SERVICE_CONNECTION_POINTS = [ class MockOSMShell(cmd.Cmd): intro = 'Welcome to the MockOSM shell.\nType help or ? to list commands.\n' prompt = '(mock-osm) ' - file = None def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.mock_osm = MockOSM(WIM_URL, WIM_PORT_MAPPING, WIM_USERNAME, WIM_PASSWORD) - # ----- basic turtle commands ----- def do_create(self, arg): 'Create an ELINE (L2) service' service_uuid = self.mock_osm.create_connectivity_service( diff --git a/hackfest/tfs-descriptors/device-all.json b/hackfest/tfs-descriptors/device-all.json index 8cb8e031488f0dd1fa4176b8d20d01fe2d24abc9..36a93fe98d253dbc5e6db7f91b3b890e529c2ffc 100644 --- a/hackfest/tfs-descriptors/device-all.json +++ b/hackfest/tfs-descriptors/device-all.json @@ -9,7 +9,7 @@ {"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, "delete_rule": true, "device_params": {"name": "default"}, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "default"}, "manager_params": {"timeout" : 120} }}} ]}, @@ -26,7 +26,7 @@ {"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, "delete_rule": true, "device_params": {"name": "default"}, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "default"}, "manager_params": {"timeout" : 120} }}} ]}, @@ -43,7 +43,7 @@ {"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, "delete_rule": true, "device_params": {"name": "default"}, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "default"}, "manager_params": {"timeout" : 120} }}} ]}, @@ -60,7 +60,7 @@ {"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, "delete_rule": true, "device_params": {"name": "default"}, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "default"}, "manager_params": {"timeout" : 120} }}} ]}, diff --git a/hackfest/tfs-descriptors/device-netconf-openconfig.json b/hackfest/tfs-descriptors/device-netconf-openconfig.json index 7e01f037e744493a8cd1190b2510ed3d4d1c86aa..490e36efde5b428781b945ccc5060eb7b29a558a 100644 --- a/hackfest/tfs-descriptors/device-netconf-openconfig.json +++ b/hackfest/tfs-descriptors/device-netconf-openconfig.json @@ -9,7 +9,7 @@ {"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, "delete_rule": true, "device_params": {"name": "default"}, + "allow_agent": false, "commit_per_rule": true, "device_params": {"name": "default"}, "manager_params": {"timeout" : 15} }}} ]}, diff --git a/hackfest/tfs-descriptors/old/device.json b/hackfest/tfs-descriptors/old/device.json index 03736314dee9ea0a8aae27627361dcdd24457fca..abe529e729955b8048c00fd688ce1d1a8b5a0285 100644 --- a/hackfest/tfs-descriptors/old/device.json +++ b/hackfest/tfs-descriptors/old/device.json @@ -27,7 +27,7 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.15"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8301"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"admin\", \"password\": \"admin\", \"force_running\": true, \"hostkey_verify\": false, \"look_for_keys\": false, \"allow_agent\": true, \"delete_rule\": false, \"device_params\" : {\"name\": \"default\"}, \"manager_params\" : {\"timeout\": 15}}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"admin\", \"password\": \"admin\", \"force_running\": true, \"hostkey_verify\": false, \"look_for_keys\": false, \"allow_agent\": true, \"commit_per_rule\": false, \"device_params\" : {\"name\": \"default\"}, \"manager_params\" : {\"timeout\": 15}}"}} ]}, "device_operational_status": 1, "device_drivers": [1], @@ -39,7 +39,7 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.15"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8302"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"admin\", \"password\": \"admin\", \"force_running\": true, \"hostkey_verify\": false, \"look_for_keys\": false, \"allow_agent\": true, \"delete_rule\": false, \"device_params\" : {\"name\": \"default\"}, \"manager_params\" : {\"timeout\": 15}}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"admin\", \"password\": \"admin\", \"force_running\": true, \"hostkey_verify\": false, \"look_for_keys\": false, \"allow_agent\": true, \"commit_per_rule\": false, \"device_params\" : {\"name\": \"default\"}, \"manager_params\" : {\"timeout\": 15}}"}} ]}, "device_operational_status": 1, "device_drivers": [1], @@ -51,7 +51,7 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.15"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "8303"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"admin\", \"password\": \"admin\", \"force_running\": true, \"hostkey_verify\": false, \"look_for_keys\": false, \"allow_agent\": true, \"delete_rule\": false, \"device_params\" : {\"name\": \"default\"}, \"manager_params\" : {\"timeout\": 15}}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"admin\", \"password\": \"admin\", \"force_running\": true, \"hostkey_verify\": false, \"look_for_keys\": false, \"allow_agent\": true, \"commit_per_rule\": false, \"device_params\" : {\"name\": \"default\"}, \"manager_params\" : {\"timeout\": 15}}"}} ]}, "device_operational_status": 1, "device_drivers": [1], diff --git a/hackfest/tfs-descriptors/old/service.json b/hackfest/tfs-descriptors/old/service.json index a25d0171dbfdbf174a877151201752c76759514a..26804dcf133fa6c83be70a72374b0f19435d24d6 100644 --- a/hackfest/tfs-descriptors/old/service.json +++ b/hackfest/tfs-descriptors/old/service.json @@ -18,8 +18,8 @@ {"device_id":{"device_uuid":{"uuid":"R2"}},"endpoint_uuid":{"uuid":"1/3"}} ], "service_constraints":[ - {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "10.0"}}, - {"custom": {"constraint_type": "latency[ms]", "constraint_value": "20.0"}} + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 20.0}} ], "service_config":{"config_rules":[]} } diff --git a/hackfest/tfs-descriptors/service-l3vpn.json b/hackfest/tfs-descriptors/service-l3vpn.json index 457ba1a509aebc5eaea8caa37a09ac62ef286f32..723453b8b3d43a56386e15dec6f70fc368bca517 100644 --- a/hackfest/tfs-descriptors/service-l3vpn.json +++ b/hackfest/tfs-descriptors/service-l3vpn.json @@ -12,8 +12,8 @@ {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "1/2"}} ], "service_constraints": [ - {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "10.0"}}, - {"custom": {"constraint_type": "latency[ms]", "constraint_value": "15.2"}} + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 15.2}} ], "service_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "/settings", "resource_value": { diff --git a/manifests/l3_attackmitigatorservice.yaml b/manifests/l3_attackmitigatorservice.yaml index dec1bc4d936a9db5758679691f0fb130a5d67324..a01ae50058d702e90d0861c26644923ebe45c13e 100644 --- a/manifests/l3_attackmitigatorservice.yaml +++ b/manifests/l3_attackmitigatorservice.yaml @@ -32,6 +32,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 10002 + - containerPort: 9192 env: - name: LOG_LEVEL value: "DEBUG" @@ -53,11 +54,71 @@ apiVersion: v1 kind: Service metadata: name: l3-attackmitigatorservice + labels: + app: l3-attackmitigatorservice spec: type: ClusterIP selector: app: l3-attackmitigatorservice ports: + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 - name: grpc port: 10002 targetPort: 10002 +strategy: + type: Recreate + +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: l3-attackmitigatorservice-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: l3-attackmitigatorservice + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 80 + behavior: + scaleDown: + stabilizationWindowSeconds: 120 + +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: tfs-l3-attackmitigatorservice-metric + labels: + app: l3-attackmitigatorservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: l3-attackmitigatorservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running diff --git a/manifests/l3_centralizedattackdetectorservice.yaml b/manifests/l3_centralizedattackdetectorservice.yaml index 0ef23ba512ac5397203baa4195ceebe17cf6c743..0432f20897391a843418fd61c8d6a14dad970c49 100644 --- a/manifests/l3_centralizedattackdetectorservice.yaml +++ b/manifests/l3_centralizedattackdetectorservice.yaml @@ -32,6 +32,7 @@ spec: imagePullPolicy: Always ports: - containerPort: 10001 + - containerPort: 9192 env: - name: LOG_LEVEL value: "DEBUG" @@ -53,11 +54,70 @@ apiVersion: v1 kind: Service metadata: name: l3-centralizedattackdetectorservice + labels: + app: l3-centralizedattackdetectorservice spec: type: ClusterIP selector: app: l3-centralizedattackdetectorservice ports: + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 - name: grpc port: 10001 targetPort: 10001 +strategy: + type: Recreate + +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: l3-centralizedattackdetectorservice-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: l3-centralizedattackdetectorservice + minReplicas: 1 + maxReplicas: 10 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 80 + behavior: + scaleDown: + stabilizationWindowSeconds: 120 +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: tfs-l3-centralizedattackdetectorservice-metric + labels: + app: l3-centralizedattackdetectorservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: l3-centralizedattackdetectorservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running diff --git a/manifests/sliceservice.yaml b/manifests/sliceservice.yaml index 447f6a1c77cc6862db3df3e83b73add3257a5c0d..49e2b5943d20586941f80e8fc4b5c32c99d70f8e 100644 --- a/manifests/sliceservice.yaml +++ b/manifests/sliceservice.yaml @@ -37,6 +37,11 @@ spec: env: - name: LOG_LEVEL value: "INFO" + - name: SLICE_GROUPING + value: "DISABLE" + envFrom: + - secretRef: + name: qdb-data readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:4040"] diff --git a/my_deploy.sh b/my_deploy.sh index 7b8ab1ade02cd7830db68dfa8b15e5d0dc42da3e..00b25e41c5853ac952ff5fe026010126bafb2ed5 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -9,22 +9,65 @@ export TFS_SKIP_BUILD="" # ----- CockroachDB ------------------------------------------------------------ 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" export CRDB_PASSWORD="tfs123" export CRDB_DATABASE="tfs" export CRDB_DEPLOY_MODE="single" + +# Disable flag for dropping database, if it exists. export CRDB_DROP_DATABASE_IF_EXISTS="" export CRDB_REDEPLOY="" # ----- NATS ------------------------------------------------------------------- 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" -export QDB_TABLE="tfs_monitoring" + +# 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="" + +# Disable flag for re-deploying QuestDB from scratch. export QDB_REDEPLOY="" export CRDB_DROP_DATABASE_IF_EXISTS="YES" diff --git a/proto/context.proto b/proto/context.proto index e403c4a22f2df62f695041c094cc1c6e6a193d5f..49d16229cdac5de84f25cfaa7d196d25184f46f0 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -509,6 +509,7 @@ message Constraint_SLA_Capacity { message Constraint_SLA_Availability { uint32 num_disjoint_paths = 1; bool all_active = 2; + float availability = 3; // 0.0 .. 100.0 percentage of availability } enum IsolationLevelEnum { diff --git a/proto/load_generator.proto b/proto/load_generator.proto index 98f6eefda88db7abac4651857326952789a879ba..86f9469588f1586da5339edad198e39e82598cde 100644 --- a/proto/load_generator.proto +++ b/proto/load_generator.proto @@ -18,6 +18,36 @@ package load_generator; import "context.proto"; service LoadGeneratorService { - rpc Start(context.Empty) returns (context.Empty) {} - rpc Stop (context.Empty) returns (context.Empty) {} + rpc Start (Parameters ) returns (context.Empty) {} + rpc GetStatus(context.Empty) returns (Status ) {} + rpc Stop (context.Empty) returns (context.Empty) {} +} + +enum RequestTypeEnum { + REQUESTTYPE_UNDEFINED = 0; + REQUESTTYPE_SERVICE_L2NM = 1; + REQUESTTYPE_SERVICE_L3NM = 2; + REQUESTTYPE_SERVICE_MW = 3; + REQUESTTYPE_SERVICE_TAPI = 4; + REQUESTTYPE_SLICE_L2NM = 5; + REQUESTTYPE_SLICE_L3NM = 6; +} + +message Parameters { + uint64 num_requests = 1; // if == 0, generate infinite requests + repeated RequestTypeEnum request_types = 2; + float offered_load = 3; + float holding_time = 4; + float inter_arrival_time = 5; + bool do_teardown = 6; + bool dry_mode = 7; + bool record_to_dlt = 8; + string dlt_domain_id = 9; +} + +message Status { + Parameters parameters = 1; + uint64 num_generated = 2; + bool infinite_loop = 3; + bool running = 4; } diff --git a/scripts/show_logs_load_generator.sh b/scripts/show_logs_load_generator.sh new file mode 100755 index 0000000000000000000000000000000000000000..d0f2527d74840d48a10e0ec7ba018f513eea2c52 --- /dev/null +++ b/scripts/show_logs_load_generator.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# 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 +######################################################################################################################## + +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/load-generatorservice diff --git a/src/common/Constants.py b/src/common/Constants.py index 05d7fcaaea3c6d1d17a669d3464320c8c00c2f66..64373923939aca19765fd5be6a402bb8c64bb787 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -85,7 +85,6 @@ DEFAULT_SERVICE_HTTP_PORTS = { # Default HTTP/REST-API service base URLs DEFAULT_SERVICE_HTTP_BASEURLS = { - ServiceNameEnum.CONTEXT .value : '/api', - ServiceNameEnum.COMPUTE .value : '/restconf/data', + ServiceNameEnum.COMPUTE .value : '/restconf', ServiceNameEnum.WEBUI .value : None, } diff --git a/src/common/method_wrappers/tests/deploy_specs.sh b/src/common/method_wrappers/tests/deploy_specs.sh index 571990ecabfbf120b517f44fd99b4550a4b8a9a1..1f41d2348e5a2d60c816071ef3414df281caeaaa 100755 --- a/src/common/method_wrappers/tests/deploy_specs.sh +++ b/src/common/method_wrappers/tests/deploy_specs.sh @@ -1,10 +1,11 @@ +#!/bin/bash # Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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, @@ -12,21 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Set the URL of your local Docker registry where the images will be uploaded to. -export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" + +# ----- 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. -# Supported components are: -# context device automation policy service compute monitoring webui -# interdomain slice pathcomp dlt -# dbscanserving opticalattackmitigator opticalattackdetector -# l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector -export TFS_COMPONENTS="context device pathcomp service slice webui load_generator" # automation monitoring compute dlt +export TFS_COMPONENTS="context device pathcomp service slice webui load_generator" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" -# Set the name of the Kubernetes namespace to deploy to. +# 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 @@ -35,6 +34,63 @@ export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml manifests/servicem # Set the new Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+" -# If not already set, disable skip-build flag. -# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. -export TFS_SKIP_BUILD="NO" #${TFS_SKIP_BUILD:-"YES"} +# 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 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 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" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# 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 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="" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" diff --git a/src/common/tests/LoadScenario.py b/src/common/tests/LoadScenario.py deleted file mode 100644 index 93cf3708cfc5f8a4296a5cb68772984beefd7563..0000000000000000000000000000000000000000 --- a/src/common/tests/LoadScenario.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import logging -from common.tools.descriptor.Loader import DescriptorLoader, compose_notifications -from context.client.ContextClient import ContextClient -from device.client.DeviceClient import DeviceClient -from service.client.ServiceClient import ServiceClient -from slice.client.SliceClient import SliceClient - -LOGGER = logging.getLogger(__name__) -LOGGERS = { - 'success': LOGGER.info, - 'danger' : LOGGER.error, - 'error' : LOGGER.error, -} - -def load_scenario_from_descriptor( - descriptor_file : str, context_client : ContextClient, device_client : DeviceClient, - service_client : ServiceClient, slice_client : SliceClient -) -> DescriptorLoader: - with open(descriptor_file, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader( - descriptors, - context_client=context_client, device_client=device_client, - service_client=service_client, slice_client=slice_client) - results = descriptor_loader.process() - - num_errors = 0 - for message,level in compose_notifications(results): - LOGGERS.get(level)(message) - if level != 'success': num_errors += 1 - if num_errors > 0: - MSG = 'Failed to load descriptors in file {:s}' - raise Exception(MSG.format(str(descriptor_file))) - - return descriptor_loader \ No newline at end of file diff --git a/src/common/tools/context_queries/Context.py b/src/common/tools/context_queries/Context.py index d28ca3991fe7de0cdf9d069db413ff528ace4335..a627b9ba5828d31caca8332d7241d28e126895d3 100644 --- a/src/common/tools/context_queries/Context.py +++ b/src/common/tools/context_queries/Context.py @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from common.proto.context_pb2 import Context, Empty +import grpc +from typing import Optional +from common.proto.context_pb2 import Context, ContextId, Empty from common.tools.object_factory.Context import json_context from context.client.ContextClient import ContextClient @@ -23,3 +25,17 @@ def create_context( existing_context_uuids = {context_id.context_uuid.uuid for context_id in existing_context_ids.context_ids} if context_uuid in existing_context_uuids: return context_client.SetContext(Context(**json_context(context_uuid))) + +def get_context(context_client : ContextClient, context_uuid : str, rw_copy : bool = False) -> Optional[Context]: + try: + # pylint: disable=no-member + context_id = ContextId() + context_id.context_uuid.uuid = context_uuid + ro_context = context_client.GetContext(context_id) + if not rw_copy: return ro_context + rw_context = Context() + rw_context.CopyFrom(ro_context) + return rw_context + except grpc.RpcError: + #LOGGER.exception('Unable to get Context({:s})'.format(str(context_uuid))) + return None diff --git a/src/common/tools/context_queries/InterDomain.py b/src/common/tools/context_queries/InterDomain.py index 7317cc793f5dd46e6a9f741bf259635a5bd0462f..edb640708b17b6734fbde6d759db5a2cdea692ec 100644 --- a/src/common/tools/context_queries/InterDomain.py +++ b/src/common/tools/context_queries/InterDomain.py @@ -136,13 +136,11 @@ def compute_interdomain_path( service_endpoint_id = pathcomp_req_svc.service_endpoint_ids.add() service_endpoint_id.CopyFrom(endpoint_id) - constraint_bw = pathcomp_req_svc.service_constraints.add() - constraint_bw.custom.constraint_type = 'bandwidth[gbps]' - constraint_bw.custom.constraint_value = '10.0' + constraint_sla_capacity = pathcomp_req_svc.service_constraints.add() + constraint_sla_capacity.sla_capacity.capacity_gbps = 10.0 - constraint_lat = pathcomp_req_svc.service_constraints.add() - constraint_lat.custom.constraint_type = 'latency[ms]' - constraint_lat.custom.constraint_value = '100.0' + constraint_sla_latency = pathcomp_req_svc.service_constraints.add() + constraint_sla_latency.sla_latency.e2e_latency_ms = 100.0 LOGGER.debug('pathcomp_req = {:s}'.format(grpc_message_to_json_string(pathcomp_req))) pathcomp_rep = pathcomp_client.Compute(pathcomp_req) diff --git a/src/common/tools/context_queries/Link.py b/src/common/tools/context_queries/Link.py index 83a878bde85ddfe25bc345ed987670164bacf2c6..291cdcf375d942b72008daea5c2c5ff357a994ef 100644 --- a/src/common/tools/context_queries/Link.py +++ b/src/common/tools/context_queries/Link.py @@ -12,11 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import List, Set -from common.proto.context_pb2 import ContextId, Empty, Link, Topology, TopologyId +import grpc +from typing import List, Optional, Set +from common.proto.context_pb2 import ContextId, Empty, Link, LinkId, Topology, TopologyId from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient +def get_link(context_client : ContextClient, link_uuid : str, rw_copy : bool = False) -> Optional[Link]: + try: + # pylint: disable=no-member + link_id = LinkId() + link_id.link_uuid.uuid = link_uuid + ro_link = context_client.GetLink(link_id) + if not rw_copy: return ro_link + rw_link = Link() + rw_link.CopyFrom(ro_link) + return rw_link + except grpc.RpcError: + #LOGGER.exception('Unable to get Link({:s})'.format(str(link_uuid))) + return None + def get_existing_link_uuids(context_client : ContextClient) -> Set[str]: existing_link_ids = context_client.ListLinkIds(Empty()) existing_link_uuids = {link_id.link_uuid.uuid for link_id in existing_link_ids.link_ids} diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index fc3b008b4004efe5afc270da65246c4635c777c3..0e1d8c7371e87b47bfc47a4242e00039add48e7f 100644 --- a/src/common/tools/descriptor/Loader.py +++ b/src/common/tools/descriptor/Loader.py @@ -15,25 +15,30 @@ # SDN controller descriptor loader # Usage example (WebUI): -# descriptors = json.loads(descriptors_data_from_client) +# descriptors = json.loads( +# descriptors=descriptors_data_from_client, num_workers=10, +# context_client=..., device_client=..., service_client=..., slice_client=...) # descriptor_loader = DescriptorLoader(descriptors) # results = descriptor_loader.process() # for message,level in compose_notifications(results): # flash(message, level) # Usage example (pytest): -# with open('path/to/descriptor.json', 'r', encoding='UTF-8') as f: -# descriptors = json.loads(f.read()) # descriptor_loader = DescriptorLoader( -# descriptors, context_client=..., device_client=..., service_client=..., slice_client=...) +# descriptors_file='path/to/descriptor.json', num_workers=10, +# context_client=..., device_client=..., service_client=..., slice_client=...) # results = descriptor_loader.process() -# loggers = {'success': LOGGER.info, 'danger': LOGGER.error, 'error': LOGGER.error} -# for message,level in compose_notifications(results): -# loggers.get(level)(message) - -import json -from typing import Dict, List, Optional, Tuple, Union -from common.proto.context_pb2 import Connection, Context, Device, Link, Service, Slice, Topology +# check_results(results, descriptor_loader) +# descriptor_loader.validate() +# # do test ... +# descriptor_loader.unload() + +import concurrent.futures, json, logging, operator +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) +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 @@ -43,6 +48,13 @@ from .Tools import ( get_descriptors_add_contexts, get_descriptors_add_services, get_descriptors_add_slices, get_descriptors_add_topologies, split_devices_by_rules) +LOGGER = logging.getLogger(__name__) +LOGGERS = { + 'success': LOGGER.info, + 'danger' : LOGGER.error, + 'error' : LOGGER.error, +} + ENTITY_TO_TEXT = { # name => singular, plural 'context' : ('Context', 'Contexts' ), @@ -65,25 +77,26 @@ TypeResults = List[Tuple[str, str, int, List[str]]] # entity_name, action, num_o TypeNotification = Tuple[str, str] # message, level TypeNotificationList = List[TypeNotification] -def compose_notifications(results : TypeResults) -> TypeNotificationList: - notifications = [] - for entity_name, action_name, num_ok, error_list in results: - entity_name_singluar,entity_name_plural = ENTITY_TO_TEXT[entity_name] - action_infinitive, action_past = ACTION_TO_TEXT[action_name] - num_err = len(error_list) - for error in error_list: - notifications.append((f'Unable to {action_infinitive} {entity_name_singluar} {error}', 'error')) - if num_ok : notifications.append((f'{str(num_ok)} {entity_name_plural} {action_past}', 'success')) - if num_err: notifications.append((f'{str(num_err)} {entity_name_plural} failed', 'danger')) - return notifications - class DescriptorLoader: def __init__( - self, descriptors : Union[str, Dict], + self, descriptors : Optional[Union[str, Dict]] = None, descriptors_file : Optional[str] = None, + num_workers : int = 1, context_client : Optional[ContextClient] = None, device_client : Optional[DeviceClient] = None, service_client : Optional[ServiceClient] = None, slice_client : Optional[SliceClient] = None ) -> None: - self.__descriptors = json.loads(descriptors) if isinstance(descriptors, str) else descriptors + if (descriptors is None) == (descriptors_file is None): + raise Exception('Exactly one of "descriptors" or "descriptors_file" is required') + + if descriptors_file is not None: + with open(descriptors_file, 'r', encoding='UTF-8') as f: + self.__descriptors = json.loads(f.read()) + self.__descriptor_file_path = descriptors_file + else: # descriptors is not None + self.__descriptors = json.loads(descriptors) if isinstance(descriptors, str) else descriptors + self.__descriptor_file_path = '' + + 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' , []) @@ -107,6 +120,24 @@ class DescriptorLoader: self.__results : TypeResults = list() + @property + def descriptor_file_path(self) -> Optional[str]: return self.__descriptor_file_path + + @property + def num_workers(self) -> int: return self.__num_workers + + @property + def context_client(self) -> Optional[ContextClient]: return self.__ctx_cli + + @property + def device_client(self) -> Optional[DeviceClient]: return self.__dev_cli + + @property + def service_client(self) -> Optional[ServiceClient]: return self.__svc_cli + + @property + def slice_client(self) -> Optional[SliceClient]: return self.__slc_cli + @property def contexts(self) -> List[Dict]: return self.__contexts @@ -242,12 +273,108 @@ class DescriptorLoader: #self.__dev_cli.close() #self.__ctx_cli.close() + @staticmethod + def worker(grpc_method, grpc_class, entity) -> Any: + return grpc_method(grpc_class(**entity)) + def _process_descr(self, entity_name, action_name, grpc_method, grpc_class, entities) -> None: num_ok, error_list = 0, [] - for entity in entities: - try: - grpc_method(grpc_class(**entity)) - num_ok += 1 - except Exception as e: # pylint: disable=broad-except - error_list.append(f'{str(entity)}: {str(e)}') + + with concurrent.futures.ThreadPoolExecutor(max_workers=self.__num_workers) as executor: + future_to_entity = { + executor.submit(DescriptorLoader.worker, grpc_method, grpc_class, entity): (i, entity) + for i,entity in enumerate(entities) + } + + for future in concurrent.futures.as_completed(future_to_entity): + i, entity = future_to_entity[future] + try: + _ = future.result() + num_ok += 1 + except Exception as e: # pylint: disable=broad-except + error_list.append((i, f'{str(entity)}: {str(e)}')) + + error_list = [str_error for _,str_error in sorted(error_list, key=operator.itemgetter(0))] self.__results.append((entity_name, action_name, num_ok, error_list)) + + def validate(self) -> None: + self.__ctx_cli.connect() + + contexts = self.__ctx_cli.ListContexts(Empty()) + assert len(contexts.contexts) == self.num_contexts + + for context_uuid, num_topologies in self.num_topologies.items(): + response = self.__ctx_cli.ListTopologies(ContextId(**json_context_id(context_uuid))) + assert len(response.topologies) == num_topologies + + response = self.__ctx_cli.ListDevices(Empty()) + assert len(response.devices) == self.num_devices + + response = self.__ctx_cli.ListLinks(Empty()) + assert len(response.links) == self.num_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 + + for context_uuid, num_slices in self.num_slices.items(): + response = self.__ctx_cli.ListSlices(ContextId(**json_context_id(context_uuid))) + assert len(response.slices) == num_slices + + def unload(self) -> None: + self.__ctx_cli.connect() + self.__dev_cli.connect() + self.__svc_cli.connect() + self.__slc_cli.connect() + + for _, slice_list in self.slices.items(): + for slice_ in slice_list: + self.__slc_cli.DeleteSlice(SliceId(**slice_['slice_id'])) + + for _, service_list in self.services.items(): + for service in service_list: + self.__svc_cli.DeleteService(ServiceId(**service['service_id'])) + + for link in self.links: + self.__ctx_cli.RemoveLink(LinkId(**link['link_id'])) + + for device in self.devices: + self.__dev_cli.DeleteDevice(DeviceId(**device['device_id'])) + + for _, topology_list in self.topologies.items(): + for topology in topology_list: + self.__ctx_cli.RemoveTopology(TopologyId(**topology['topology_id'])) + + for context in self.contexts: + self.__ctx_cli.RemoveContext(ContextId(**context['context_id'])) + +def compose_notifications(results : TypeResults) -> TypeNotificationList: + notifications = [] + for entity_name, action_name, num_ok, error_list in results: + entity_name_singluar,entity_name_plural = ENTITY_TO_TEXT[entity_name] + action_infinitive, action_past = ACTION_TO_TEXT[action_name] + num_err = len(error_list) + for error in error_list: + notifications.append((f'Unable to {action_infinitive} {entity_name_singluar} {error}', 'error')) + if num_ok : notifications.append((f'{str(num_ok)} {entity_name_plural} {action_past}', 'success')) + if num_err: notifications.append((f'{str(num_err)} {entity_name_plural} failed', 'danger')) + return notifications + +def check_descriptor_load_results(results : TypeResults, descriptor_loader : DescriptorLoader) -> None: + num_errors = 0 + for message,level in compose_notifications(results): + LOGGERS.get(level)(message) + if level != 'success': num_errors += 1 + if num_errors > 0: + MSG = 'Failed to load descriptors from "{:s}"' + raise Exception(MSG.format(str(descriptor_loader.descriptor_file_path))) + +def validate_empty_scenario(context_client : ContextClient) -> None: + response = context_client.ListContexts(Empty()) + assert len(response.contexts) == 0 + + response = context_client.ListDevices(Empty()) + assert len(response.devices) == 0 + + response = context_client.ListLinks(Empty()) + assert len(response.links) == 0 diff --git a/src/common/tools/descriptor/Tools.py b/src/common/tools/descriptor/Tools.py index 9d6275748e6e35eaf240f80f100e993334d4c5ea..f03c635b802e5c003a6ea80af46ef740b97e500b 100644 --- a/src/common/tools/descriptor/Tools.py +++ b/src/common/tools/descriptor/Tools.py @@ -72,7 +72,7 @@ def format_service_custom_config_rules(service : Dict) -> Dict: return service def format_slice_custom_config_rules(slice_ : Dict) -> Dict: - config_rules = slice_.get('service_config', {}).get('config_rules', []) + config_rules = slice_.get('slice_config', {}).get('config_rules', []) config_rules = format_custom_config_rules(config_rules) slice_['slice_config']['config_rules'] = config_rules return slice_ diff --git a/src/common/tools/grpc/Constraints.py b/src/common/tools/grpc/Constraints.py index 53f7dfd9822eb3a2efd48bf1b628547339a3ca69..07f0b7782dbd93479774af6324683753f906c5a1 100644 --- a/src/common/tools/grpc/Constraints.py +++ b/src/common/tools/grpc/Constraints.py @@ -17,7 +17,7 @@ import json -from typing import Any, Dict, Optional, Tuple +from typing import Any, Dict, List, Optional, Tuple from common.proto.context_pb2 import Constraint, EndPointId from common.tools.grpc.Tools import grpc_message_to_json_string @@ -137,7 +137,31 @@ def update_constraint_endpoint_priority(constraints, endpoint_id : EndPointId, p constraint.endpoint_priority.priority = priority return constraint -def update_constraint_sla_availability(constraints, num_disjoint_paths : int, all_active : bool) -> Constraint: +def update_constraint_sla_capacity(constraints, capacity_gbps : float) -> Constraint: + for constraint in constraints: + if constraint.WhichOneof('constraint') != 'sla_capacity': continue + break # found, end loop + else: + # not found, add it + constraint = constraints.add() # pylint: disable=no-member + + constraint.sla_capacity.capacity_gbps = capacity_gbps + return constraint + +def update_constraint_sla_latency(constraints, e2e_latency_ms : float) -> Constraint: + for constraint in constraints: + if constraint.WhichOneof('constraint') != 'sla_latency': continue + break # found, end loop + else: + # not found, add it + constraint = constraints.add() # pylint: disable=no-member + + constraint.sla_latency.e2e_latency_ms = e2e_latency_ms + return constraint + +def update_constraint_sla_availability( + constraints, num_disjoint_paths : int, all_active : bool, availability : float +) -> Constraint: for constraint in constraints: if constraint.WhichOneof('constraint') != 'sla_availability': continue break # found, end loop @@ -147,8 +171,21 @@ def update_constraint_sla_availability(constraints, num_disjoint_paths : int, al constraint.sla_availability.num_disjoint_paths = num_disjoint_paths constraint.sla_availability.all_active = all_active + constraint.sla_availability.availability = availability return constraint +def update_constraint_sla_isolation(constraints, isolation_levels : List[int]) -> Constraint: + for constraint in constraints: + if constraint.WhichOneof('constraint') != 'sla_isolation': continue + break # found, end loop + else: + # not found, add it + constraint = constraints.add() # pylint: disable=no-member + + for isolation_level in isolation_levels: + if isolation_level in constraint.sla_isolation.isolation_level: continue + constraint.sla_isolation.isolation_level.append(isolation_level) + return constraint def copy_constraints(source_constraints, target_constraints): for source_constraint in source_constraints: @@ -189,11 +226,27 @@ def copy_constraints(source_constraints, target_constraints): priority = source_constraint.endpoint_priority.priority update_constraint_endpoint_priority(target_constraints, endpoint_id, priority) + elif constraint_kind == 'sla_capacity': + sla_capacity = source_constraint.sla_capacity + capacity_gbps = sla_capacity.capacity_gbps + update_constraint_sla_capacity(target_constraints, capacity_gbps) + + elif constraint_kind == 'sla_latency': + sla_latency = source_constraint.sla_latency + e2e_latency_ms = sla_latency.e2e_latency_ms + update_constraint_sla_latency(target_constraints, e2e_latency_ms) + elif constraint_kind == 'sla_availability': sla_availability = source_constraint.sla_availability num_disjoint_paths = sla_availability.num_disjoint_paths all_active = sla_availability.all_active - update_constraint_sla_availability(target_constraints, num_disjoint_paths, all_active) + availability = sla_availability.availability + update_constraint_sla_availability(target_constraints, num_disjoint_paths, all_active, availability) + + elif constraint_kind == 'sla_isolation': + sla_isolation = source_constraint.sla_isolation + isolation_levels = sla_isolation.isolation_level + update_constraint_sla_isolation(target_constraints, isolation_levels) else: raise NotImplementedError('Constraint({:s})'.format(grpc_message_to_json_string(source_constraint))) diff --git a/src/common/tools/mutex_queues/MutexQueues.py b/src/common/tools/mutex_queues/MutexQueues.py index b9fc567d561287ed5d92f51a3cab0f92d58d88ed..96e22a86f012cb8326c380a0ebbf0c1b40cae21c 100644 --- a/src/common/tools/mutex_queues/MutexQueues.py +++ b/src/common/tools/mutex_queues/MutexQueues.py @@ -35,7 +35,7 @@ # self.mutex_queues.signal_done(device_uuid) import threading -from queue import Queue +from queue import Queue, Empty from typing import Dict class MutexQueues: @@ -67,8 +67,11 @@ class MutexQueues: with self.lock: queue : Queue = self.mutex_queues.setdefault(queue_name, Queue()) - # remove muself from the queue - queue.get_nowait() + # remove myself from the queue + try: + queue.get(block=True, timeout=0.1) + except Empty: + pass # if there are no other tasks queued, return if queue.qsize() == 0: return diff --git a/src/common/tools/object_factory/Constraint.py b/src/common/tools/object_factory/Constraint.py index e3c5129fd5bda5fb4a6659fc39b208bbdf0bb40f..ef00e3872343196f0a9f8de97d3b1ab6fc12d847 100644 --- a/src/common/tools/object_factory/Constraint.py +++ b/src/common/tools/object_factory/Constraint.py @@ -13,7 +13,7 @@ # limitations under the License. import json -from typing import Any, Dict, Union +from typing import Any, Dict, List, Union def json_constraint_custom(constraint_type : str, constraint_value : Union[str, Dict[str, Any]]) -> Dict: if not isinstance(constraint_value, str): constraint_value = json.dumps(constraint_value, sort_keys=True) @@ -29,5 +29,16 @@ def json_constraint_endpoint_location_gps(endpoint_id : Dict, latitude : float, def json_constraint_endpoint_priority(endpoint_id : Dict, priority : int) -> Dict: return {'endpoint_priority': {'endpoint_id': endpoint_id, 'priority': priority}} -def json_constraint_sla_availability(num_disjoint_paths : int, all_active : bool) -> Dict: - return {'sla_availability': {'num_disjoint_paths': num_disjoint_paths, 'all_active': all_active}} +def json_constraint_sla_availability(num_disjoint_paths : int, all_active : bool, availability : float) -> Dict: + return {'sla_availability': { + 'num_disjoint_paths': num_disjoint_paths, 'all_active': all_active, 'availability': availability + }} + +def json_constraint_sla_capacity(capacity_gbps : float) -> Dict: + return {'sla_capacity': {'capacity_gbps': capacity_gbps}} + +def json_constraint_sla_isolation(isolation_levels : List[int]) -> Dict: + return {'sla_isolation': {'isolation_level': isolation_levels}} + +def json_constraint_sla_latency(e2e_latency_ms : float) -> Dict: + return {'sla_latency': {'e2e_latency_ms': e2e_latency_ms}} diff --git a/src/compute/service/__main__.py b/src/compute/service/__main__.py index 998c4c98f21648f6e186ad91bae90875dac84fab..19a04c4c8ef4f77b3b7fb6949a1b567ef5cbec00 100644 --- a/src/compute/service/__main__.py +++ b/src/compute/service/__main__.py @@ -22,11 +22,12 @@ from .ComputeService import ComputeService from .rest_server.RestServer import RestServer from .rest_server.nbi_plugins.debug_api import register_debug_api from .rest_server.nbi_plugins.ietf_l2vpn import register_ietf_l2vpn +from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss terminate = threading.Event() LOGGER = None -def signal_handler(signal, frame): # pylint: disable=redefined-outer-name +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name, unused-argument LOGGER.warning('Terminate signal received') terminate.set() @@ -58,8 +59,9 @@ def main(): grpc_service.start() rest_server = RestServer() + register_ietf_l2vpn(rest_server) # Registering L2VPN entrypoint + register_ietf_nss(rest_server) # Registering NSS entrypoint register_debug_api(rest_server) - register_ietf_l2vpn(rest_server) rest_server.start() # Wait for Ctrl+C or termination signal diff --git a/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py b/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py index 0c66254d93220392d44c8393373ba94ddd7b3f93..67ef3dfb0ba1519440b0a22f46935165c8388cb8 100644 --- a/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py +++ b/src/compute/service/rest_server/nbi_plugins/debug_api/Resources.py @@ -12,48 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from flask.json import jsonify from flask_restful import Resource -from common.proto.context_pb2 import ConnectionId, ContextId, DeviceId, Empty, LinkId, ServiceId, SliceId, TopologyId -from common.proto.policy_pb2 import PolicyRuleId -from common.tools.grpc.Tools import grpc_message_to_json -from common.tools.object_factory.Connection import json_connection_id -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.PolicyRule import json_policyrule_id -from common.tools.object_factory.Service import json_service_id -from common.tools.object_factory.Slice import json_slice_id -from common.tools.object_factory.Topology import json_topology_id +from common.proto.context_pb2 import Empty from context.client.ContextClient import ContextClient - - -def format_grpc_to_json(grpc_reply): - return jsonify(grpc_message_to_json(grpc_reply)) - -def grpc_connection_id(connection_uuid): - return ConnectionId(**json_connection_id(connection_uuid)) - -def grpc_context_id(context_uuid): - return ContextId(**json_context_id(context_uuid)) - -def grpc_device_id(device_uuid): - return DeviceId(**json_device_id(device_uuid)) - -def grpc_link_id(link_uuid): - return LinkId(**json_link_id(link_uuid)) - -def grpc_service_id(context_uuid, service_uuid): - return ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) - -def grpc_slice_id(context_uuid, slice_uuid): - return SliceId(**json_slice_id(slice_uuid, context_id=json_context_id(context_uuid))) - -def grpc_topology_id(context_uuid, topology_uuid): - return TopologyId(**json_topology_id(topology_uuid, context_id=json_context_id(context_uuid))) - -def grpc_policy_rule_id(policy_rule_uuid): - return PolicyRuleId(**json_policyrule_id(policy_rule_uuid)) +from .Tools import ( + format_grpc_to_json, grpc_connection_id, grpc_context_id, grpc_device_id, grpc_link_id, grpc_policy_rule_id, + grpc_service_id, grpc_slice_id, grpc_topology_id) class _Resource(Resource): diff --git a/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py b/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..f3dff545ba9812ff3f4e13c3da53774af7626014 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/debug_api/Tools.py @@ -0,0 +1,54 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from flask.json import jsonify +from common.proto.context_pb2 import ConnectionId, ContextId, DeviceId, LinkId, ServiceId, SliceId, TopologyId +from common.proto.policy_pb2 import PolicyRuleId +from common.tools.grpc.Tools import grpc_message_to_json +from common.tools.object_factory.Connection import json_connection_id +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.PolicyRule import json_policyrule_id +from common.tools.object_factory.Service import json_service_id +from common.tools.object_factory.Slice import json_slice_id +from common.tools.object_factory.Topology import json_topology_id + + +def format_grpc_to_json(grpc_reply): + return jsonify(grpc_message_to_json(grpc_reply)) + +def grpc_connection_id(connection_uuid): + return ConnectionId(**json_connection_id(connection_uuid)) + +def grpc_context_id(context_uuid): + return ContextId(**json_context_id(context_uuid)) + +def grpc_device_id(device_uuid): + return DeviceId(**json_device_id(device_uuid)) + +def grpc_link_id(link_uuid): + return LinkId(**json_link_id(link_uuid)) + +def grpc_service_id(context_uuid, service_uuid): + return ServiceId(**json_service_id(service_uuid, context_id=json_context_id(context_uuid))) + +def grpc_slice_id(context_uuid, slice_uuid): + return SliceId(**json_slice_id(slice_uuid, context_id=json_context_id(context_uuid))) + +def grpc_topology_id(context_uuid, topology_uuid): + return TopologyId(**json_topology_id(topology_uuid, context_id=json_context_id(context_uuid))) + +def grpc_policy_rule_id(policy_rule_uuid): + return PolicyRuleId(**json_policyrule_id(policy_rule_uuid)) diff --git a/src/compute/service/rest_server/nbi_plugins/debug_api/__init__.py b/src/compute/service/rest_server/nbi_plugins/debug_api/__init__.py index d9243cca711a2b2ad00509102ecab5b06c6cc334..d1309353c412a738e2f2238d0bb4fff07765b825 100644 --- a/src/compute/service/rest_server/nbi_plugins/debug_api/__init__.py +++ b/src/compute/service/rest_server/nbi_plugins/debug_api/__init__.py @@ -12,52 +12,48 @@ # See the License for the specific language governing permissions and # limitations under the License. -# RFC 8466 - L2VPN Service Model (L2SM) -# Ref: https://datatracker.ietf.org/doc/html/rfc8466 - from compute.service.rest_server.RestServer import RestServer from .Resources import ( Connection, ConnectionIds, Connections, Context, ContextIds, Contexts, Device, DeviceIds, Devices, Link, LinkIds, Links, PolicyRule, PolicyRuleIds, PolicyRules, Service, ServiceIds, Services, Slice, SliceIds, Slices, Topologies, Topology, TopologyIds) -URL_PREFIX = '/api' +URL_PREFIX = '/debug-api' -# Use 'path' type in Service and Sink because service_uuid and link_uuid might contain char '/' and Flask is unable to -# recognize them in 'string' type. +# 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.context', Context, '/context/'), + ('api.context', Context, '/context/'), - ('api.topology_ids', TopologyIds, '/context//topology_ids'), - ('api.topologies', Topologies, '/context//topologies'), - ('api.topology', Topology, '/context//topology/'), + ('api.topology_ids', TopologyIds, '/context//topology_ids'), + ('api.topologies', Topologies, '/context//topologies'), + ('api.topology', Topology, '/context//topology/'), - ('api.service_ids', ServiceIds, '/context//service_ids'), - ('api.services', Services, '/context//services'), - ('api.service', Service, '/context//service/'), + ('api.service_ids', ServiceIds, '/context//service_ids'), + ('api.services', Services, '/context//services'), + ('api.service', Service, '/context//service/'), - ('api.slice_ids', SliceIds, '/context//slice_ids'), - ('api.slices', Slices, '/context//slices'), - ('api.slice', Slice, '/context//slice/'), + ('api.slice_ids', SliceIds, '/context//slice_ids'), + ('api.slices', Slices, '/context//slices'), + ('api.slice', Slice, '/context//slice/'), ('api.device_ids', DeviceIds, '/device_ids'), ('api.devices', Devices, '/devices'), - ('api.device', Device, '/device/'), + ('api.device', Device, '/device/'), ('api.link_ids', LinkIds, '/link_ids'), ('api.links', Links, '/links'), ('api.link', Link, '/link/'), - ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), - ('api.connections', Connections, '/context//service//connections'), + ('api.connection_ids', ConnectionIds, '/context//service//connection_ids'), + ('api.connections', Connections, '/context//service//connections'), ('api.connection', Connection, '/connection/'), ('api.policyrule_ids', PolicyRuleIds, '/policyrule_ids'), ('api.policyrules', PolicyRules, '/policyrules'), - ('api.policyrule', PolicyRule, '/policyrule/'), + ('api.policyrule', PolicyRule, '/policyrule/'), ] def register_debug_api(rest_server : RestServer): diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py index 2db231221faad1af2c7f0651dee2b95427e97acd..f12c4526aec27a60e579540ecae90720c707a117 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Service.py @@ -20,8 +20,8 @@ from common.proto.context_pb2 import SliceStatusEnum from common.tools.context_queries.Slice import get_slice from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient -from .tools.Authentication import HTTP_AUTH -from .tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR LOGGER = logging.getLogger(__name__) diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py index dcdecb70ffff4059e557d1dadbbb958a4e264fab..69676bd0d0165160da4e64c515d04b5a3252102c 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_Services.py @@ -22,9 +22,9 @@ from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import SliceStatusEnum, Slice from slice.client.SliceClient import SliceClient from .schemas.vpn_service import SCHEMA_VPN_SERVICE -from .tools.Authentication import HTTP_AUTH -from .tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR -from .tools.Validator import validate_message +from compute.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_CREATED, HTTP_SERVERERROR +from compute.service.rest_server.nbi_plugins.tools.Validator import validate_message +from compute.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH LOGGER = logging.getLogger(__name__) diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py index 1a8936ed4025586bf4de280b64cf2008b14c1a50..ff7ad3c1481d3c0f3cdf7a6b6004f62677948ecc 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py @@ -30,11 +30,10 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient from .schemas.site_network_access import SCHEMA_SITE_NETWORK_ACCESS -from .tools.Authentication import HTTP_AUTH -from .tools.HttpStatusCodes import HTTP_NOCONTENT, HTTP_SERVERERROR -from .tools.Validator import validate_message -from .Constants import ( - BEARER_MAPPINGS, DEFAULT_ADDRESS_FAMILIES, DEFAULT_BGP_AS, DEFAULT_BGP_ROUTE_TARGET, DEFAULT_MTU) +from compute.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH +from compute.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_NOCONTENT, HTTP_SERVERERROR +from compute.service.rest_server.nbi_plugins.tools.Validator import validate_message +from .Constants import BEARER_MAPPINGS, DEFAULT_ADDRESS_FAMILIES, DEFAULT_BGP_AS, DEFAULT_BGP_ROUTE_TARGET, DEFAULT_MTU LOGGER = logging.getLogger(__name__) @@ -113,7 +112,7 @@ def process_site_network_access(context_client : ContextClient, site_id : str, s location_endpoints.setdefault(str_location_id, set()).add(str_endpoint_id) num_endpoints_per_location = {len(endpoints) for endpoints in location_endpoints.values()} num_disjoint_paths = min(num_endpoints_per_location) - update_constraint_sla_availability(constraints, num_disjoint_paths, all_active) + update_constraint_sla_availability(constraints, num_disjoint_paths, all_active, 0.0) return target diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py index 1b9027b1feb7c65c6fb3ee6ecdef485e4719a1b5..110c51af5fe0e4cd8e012fd4105712ed176dd12a 100644 --- a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py +++ b/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/__init__.py @@ -21,7 +21,7 @@ from .L2VPN_Services import L2VPN_Services from .L2VPN_Service import L2VPN_Service from .L2VPN_SiteNetworkAccesses import L2VPN_SiteNetworkAccesses -URL_PREFIX = '/ietf-l2vpn-svc:l2vpn-svc' +URL_PREFIX = '/data/ietf-l2vpn-svc:l2vpn-svc' def _add_resource(rest_server : RestServer, resource : Resource, *urls, **kwargs): urls = [(URL_PREFIX + url) for url in urls] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py new file mode 100644 index 0000000000000000000000000000000000000000..f9b17c8b144ad6cf477b978ceb50b3497c9c074b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Service.py @@ -0,0 +1,78 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from flask.json import jsonify +from flask_restful import Resource +from common.proto.context_pb2 import SliceStatusEnum +from common.tools.context_queries.Slice import get_slice +from common.tools.grpc.Tools import grpc_message_to_json +from context.client.ContextClient import ContextClient +from slice.client.SliceClient import SliceClient +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_GATEWAYTIMEOUT, HTTP_NOCONTENT, HTTP_OK, HTTP_SERVERERROR + +LOGGER = logging.getLogger(__name__) + +class NSS_Service(Resource): + @HTTP_AUTH.login_required + def get(self, slice_id : str): + LOGGER.debug('GET Slice ID: {:s}'.format(str(slice_id))) + try: + context_client = ContextClient() + + target = get_slice(context_client, slice_id, rw_copy=True) + if target is None: + raise Exception('Slice({:s}) not found in database'.format(str(slice_id))) + + if target.slice_id.slice_uuid.uuid != slice_id: # pylint: disable=no-member + raise Exception('Slice retrieval failed. Wrong Slice Id was returned') + + slice_ready_status = SliceStatusEnum.SLICESTATUS_ACTIVE + slice_status = target.slice_status.slice_status # pylint: disable=no-member + response = jsonify(grpc_message_to_json(target)) + response.status_code = HTTP_OK if slice_status == slice_ready_status else HTTP_GATEWAYTIMEOUT + + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Something went wrong Retrieving Slice({:s})'.format(str(slice_id))) + response = jsonify({'error': str(e)}) + response.status_code = HTTP_SERVERERROR + return response + + + @HTTP_AUTH.login_required + def delete(self, slice_id : str): + LOGGER.debug('DELETE Slice ID: {:s}'.format(str(slice_id))) + try: + context_client = ContextClient() + target = get_slice(context_client, slice_id) + + response = jsonify({}) + response.status_code = HTTP_OK + + if target is None: + LOGGER.warning('Slice({:s}) not found in database. Nothing done.'.format(str(slice_id))) + response.status_code = HTTP_NOCONTENT + else: + if target.slice_id.slice_uuid.uuid != slice_id: # pylint: disable=no-member + raise Exception('Slice retrieval failed. Wrong Slice Id was returned') + slice_client = SliceClient() + slice_client.DeleteSlice(target.slice_id) + LOGGER.debug(f"Slice({slice_id}) successfully deleted") + + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Something went wrong Deleting Slice({:s})'.format(str(slice_id))) + response = jsonify({'error': str(e)}) + response.status_code = HTTP_SERVERERROR + return response \ No newline at end of file diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py new file mode 100644 index 0000000000000000000000000000000000000000..72b09f2b7d1422da2554a3dfe873a6bcff87413d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/NSS_Services.py @@ -0,0 +1,122 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import json +import logging +import ssl +import uuid +from typing import Dict +from flask.json import jsonify +from flask_restful import Resource +from flask import request + +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import Slice, SliceStatusEnum, EndPointId, Constraint +from common.tools.grpc.Tools import grpc_message_to_json +from ..tools.Authentication import HTTP_AUTH +from ..tools.HttpStatusCodes import HTTP_BADREQUEST, HTTP_OK, HTTP_CREATED, HTTP_SERVERERROR +from werkzeug.exceptions import UnsupportedMediaType + +from slice.client.SliceClient import SliceClient +from .bindings import load_json_data +from .bindings.network_slice_services import NetworkSliceServices + +LOGGER = logging.getLogger(__name__) + +class NSS_Services(Resource): + @HTTP_AUTH.login_required + def get(self): + response = jsonify({"message": "All went well!"}) + # TODO Return list of current network-slice-services + return response + + @HTTP_AUTH.login_required + def post(self): + if not request.is_json: + raise UnsupportedMediaType('JSON payload is required') + request_data = json.dumps(request.json) + response = jsonify({}) + response.status_code = HTTP_CREATED + + slices: NetworkSliceServices = load_json_data(request_data, NetworkSliceServices)[0] + for ietf_slice in slices.slice_service: + slice_request: Slice = Slice() + # Meta information + # TODO implement name and owner based on "tags" + slice_request.slice_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + slice_request.slice_id.slice_uuid.uuid = ietf_slice.service_id() + # TODO map with admin status of IETF Slice + slice_request.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_PLANNED + + list_endpoints = [] + for sdp in ietf_slice.sdps().sdp: + endpoint = EndPointId() + endpoint.topology_id.context_id.context_uuid.uuid = DEFAULT_CONTEXT_NAME + endpoint.device_id.device_uuid.uuid = sdp.node_id() + endpoint.endpoint_uuid.uuid = sdp.sdp_id() + list_endpoints.append(endpoint) + slice_request.slice_endpoint_ids.extend(list_endpoints) + + # TODO Map connectivity_groups and connectivity constructs to real connections + LOGGER.debug(f"Connection groups detected: {len(ietf_slice.connection_groups().connection_group())}") + list_constraints = [] + for cg in ietf_slice.connection_groups().connection_group: + for cc in cg.connectivity_construct: + if cc.slo_sle_policy.custom: + with cc.slo_sle_policy.custom as slo: + for metric_bound in slo.service_slo_sle_policy().metric_bounds().metric_bound: + metric_type = str(metric_bound.metric_type()).casefold() + if metric_type == "service-slo-two-way-bandwidth": # TODO fix to two way! + constraint = Constraint() + metric_unit = metric_bound.metric_unit().casefold() + capacity = float(metric_bound.bound()) # Assuming capacity already in Gbps + if metric_unit == "mbps": + capacity /= 1E3 + elif metric_unit != "gbps": + LOGGER.warning(f"Invalided metric unit ({metric_bound.metric_unit()}), must be Mbps or Gbps") + response.status_code = HTTP_SERVERERROR + return response + constraint.sla_capacity.capacity_gbps = capacity + list_constraints.append(constraint) + + elif metric_type == "service-slo-one-way-delay": + if metric_bound.metric_unit().casefold() == "ms": + latency = int(metric_bound.bound()) + else: + LOGGER.warning(f"Invalided metric unit ({metric_bound.metric_unit()}), must be \"ms\" ") + response.status_code = HTTP_SERVERERROR + return response + constraint = Constraint() + constraint.sla_latency.e2e_latency_ms = latency + list_constraints.append(constraint) + + elif metric_type == "service-slo-availability": + availability = float(metric_bound.bound()) + if availability > 100.0 or availability < 0.0: + raise Exception(f'Slice SLO availability ({availability}) must be constrained [0,100]') + constraint = Constraint() + constraint.sla_availability.availability = availability + # TODO not really necessary, remove after OFC2023 + constraint.sla_availability.num_disjoint_paths = 0 + constraint.sla_availability.all_active = False + list_constraints.append(constraint) + + slice_request.slice_constraints.extend(list_constraints) + LOGGER.debug(grpc_message_to_json(slice_request)) # TODO remove + # TODO adding owner, needs to be recoded after updating the bindings + owner = request.json["data"]["ietf-network-slice-service:network-slice-services"]["slice-service"][0]["service-tags"][0]["value"] + slice_request.slice_owner.owner_string = owner + slice_request.slice_owner.owner_uuid.uuid = str(uuid.uuid5(uuid.NAMESPACE_DNS, owner)) + slice_client = SliceClient() + slice_client.CreateSlice(slice_request) + return response diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8aca124acfd15b2003b4272cf0b3103dbca3bdb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/__init__.py @@ -0,0 +1,31 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# IETF draft-ietf-teas-ietf-network-slice-nbi-yang-02 - IETF Network Slice Service YANG Model +# Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-ietf-network-slice-nbi-yang/ + +from flask_restful import Resource +from compute.service.rest_server.RestServer import RestServer +from .NSS_Services import NSS_Services +from .NSS_Service import NSS_Service + +URL_PREFIX = '/data/ietf-network-slice-service:ietf-nss' + +def _add_resource(rest_server : RestServer, resource : Resource, *urls, **kwargs): + urls = [(URL_PREFIX + url) for url in urls] + rest_server.add_resource(resource, *urls, **kwargs) + +def register_ietf_nss(rest_server : RestServer): + _add_resource(rest_server, NSS_Services, '/network-slice-services') + _add_resource(rest_server, NSS_Service, '/network-slice-services/slice-service=') diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7a0c786e1defad55a4dcc20461b221472d3be687 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/__init__.py @@ -0,0 +1,535 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from itertools import chain +from typing import ( + Any, AnyStr, Dict, Iterator, List, Optional, Tuple, Type, Union) + +import json + + +class YANGMember: + + _yang_name: str = None + _yang_namespace: str = None + _yang_module_name: str = None + + def __init__( + self, yang_name: str, yang_namespace: str, + yang_module_name: str): + + self._yang_name = yang_name + self._yang_namespace = yang_namespace + self._yang_module_name = yang_module_name + + @property + def yang_name(self) -> str: + return self._yang_name + + @property + def yang_namespace(self) -> str: + return self._yang_namespace + + @property + def yang_module_name(self) -> str: + return self._yang_module_name + + +class YANGLeafMember(YANGMember): + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_name = self._yang_name + yang_member = self + + class ChildLeaf: + + def __call__(self): + data = instance._data + if (key := yang_name) in data: + return data[key] + + return data.get(':'.join(( + yang_member._yang_module_name, yang_name))) + + @property + def yang_name(self) -> str: + return yang_member._yang_name + + @property + def yang_namespace(self) -> str: + return yang_member._yang_namespace + + @property + def yang_module_name(self) -> str: + return yang_member._yang_module_name + + def __enter__(self): + return self() + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + def __repr__(self): + return ( + f"<{owner.__qualname__}.{type(self).__name__}: " + + f"{yang_member._yang_module_name}" + + f":{yang_member.yang_name}>") + + return ChildLeaf() + + def __set__(self, instance, value): + if instance is None: + return + + data = instance._data + if ((key := ':'.join((self._yang_module_name, self._yang_name))) + in data): + + data[key] = value + else: + data[self._yang_name] = value + + +class YANGContainerMember(YANGMember): + + _yang_container_type: Type['YANGContainer'] = None + + def __init__(self, yang_container_type: Type['YANGContainer']): + super().__init__( + yang_container_type._yang_name, + yang_container_type._yang_namespace, + yang_container_type._yang_module_name) + + self._yang_container_type = yang_container_type + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_container_type = self._yang_container_type + yang_name = self._yang_name + yang_member = self + + class ChildContainer: + + def __call__(self) -> yang_container_type: + data = instance._data + + if (key := ':'.join(( + yang_member._yang_module_name, yang_name))) in data: + + child_data = data[key] + else: + child_data = data.setdefault(yang_name, {}) + + return yang_container_type({yang_name: child_data}) + + @property + def yang_name(self) -> str: + return yang_member._yang_name + + @property + def yang_namespace(self) -> str: + return yang_member._yang_namespace + + @property + def yang_module_name(self) -> str: + return yang_member._yang_module_name + + def __enter__(self): + return self() + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + def to_json(self, yang_parent_module_name: str=None): + return self().to_json( + yang_parent_module_name=yang_parent_module_name) + + return ChildContainer() + + +class YANGListMember(YANGMember): + + _yang_list_item_type: Type['YANGListItem'] = None + + def __init__(self, yang_list_item_type: Type['YANGListItem']): + super().__init__( + yang_list_item_type._yang_name, + yang_list_item_type._yang_namespace, + yang_list_item_type._yang_module_name) + + self._yang_list_item_type = yang_list_item_type + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_list_item_type = self._yang_list_item_type + yang_name = self._yang_name + yang_member = self + + class ChildList: + + @staticmethod + def _child_data_list(): + data = instance._data + if (key := ':'.join(( + yang_member._yang_module_name, yang_name))) in data: + + return data[key] + + return data.setdefault(yang_name, []) + + def __call__(self) -> List[yang_list_item_type]: + return list(iter(self)) + + def __iter__(self) -> Iterator[yang_list_item_type]: + for child_data in self._child_data_list(): + yield yang_list_item_type({yang_name: [child_data]}) + + def __getitem__(self, key) -> yang_list_item_type: + child_data_list = self._child_data_list() + child = yang_list_item_type( + {yang_member._yang_name: child_data_list}, + json_data_list_key=key) + + if not id(child_data := child._data) in map( + id, child_data_list): + child_data_list.append(child_data) + return child + + @property + def yang_name(self) -> str: + return yang_member._yang_name + + @property + def yang_namespace(self) -> str: + return yang_member._yang_namespace + + @property + def yang_module_name(self) -> str: + return yang_member._yang_module_name + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + def to_json(self, yang_parent_module_name=None): + json_data = {} + for child in self(): + for child_name, child_data_list in (child.to_json( + yang_parent_module_name=( + yang_parent_module_name))).items(): + + json_data.setdefault(child_name, []).extend( + child_data_list) + + return json_data + + return ChildList() + + +class YANGContainer: + """Base class for YANG container handlers.""" + + _yang_name: str = None + _yang_namespace: str = None + _yang_module_name: str = None + + _data: Dict[str, Any] = None + + _yang_leaf_members: Dict[str, YANGLeafMember] = None + _yang_container_members: Dict[str, YANGContainerMember] = None + _yang_list_members: Dict[str, YANGListMember] = None + + _yang_choices: Dict[str, 'YANGChoice'] = None + + def __init__( + self, json_data: Optional[Union[AnyStr, Dict[str, Any]]]=None): + + if json_data is None: + self._data = {} + return + + if isinstance(json_data, bytes): + json_data = json_data.decode('utf8') + + if isinstance(json_data, str): + json_data = json.loads(json_data) + + if (key := ':'.join(( + self._yang_module_name, self._yang_name))) not in json_data: + key = self._yang_name + + data = json_data.get(key, {}) + if not isinstance(data, dict): + raise TypeError(f"{key!r} should be a dict, not: {type(data)}") + + for yang_choice in self._yang_choices.values(): + yang_choice(data) + + self._data = data + + @property + def yang_name(self) -> str: + return self._yang_name + + @property + def yang_namespace(self) -> str: + return self._yang_namespace + + @property + def yang_module_name(self) -> str: + return self._yang_module_name + + def to_json(self, yang_parent_module_name=None) -> Dict[str, Any]: + + def child_items(): + for yang_name, yang_member in self._yang_leaf_members.items(): + if (value := yang_member.__get__(self)()) is not None: + + if (yang_child_module_name := + yang_member.yang_module_name) != ( + self._yang_module_name): + + child_key = ':'.join(( + yang_child_module_name, yang_name)) + else: + child_key = yang_name + + yield child_key, value + + for yang_name, yang_member in ( + self._yang_container_members.items()): + + if yang_name in self._data or ':'.join(( + yang_member._yang_namespace, + yang_name)) in self._data: + + yield from yang_member.__get__(self).to_json( + yang_parent_module_name=( + self._yang_module_name)).items() + + for yang_name, yang_member in self._yang_list_members.items(): + if yang_name in self._data or ':'.join(( + yang_member._yang_namespace, + yang_name)) in self._data: + + yield from yang_member.__get__(self).to_json( + yang_parent_module_name=( + self._yang_module_name)).items() + + for yang_choice in self._yang_choices.values(): + if (yang_case_container := + yang_choice._yang_case_container) is not None: + + yield from next(iter(yang_case_container.to_json( + yang_parent_module_name=( + self._yang_module_name)).values())).items() + + if (yang_module_name := self._yang_module_name) != ( + yang_parent_module_name): + key = ':'.join((yang_module_name, self._yang_name)) + else: + key = self._yang_name + + return {key: dict(child_items())} + + +class YANGListItem(YANGContainer): + """Base class for YANG list item handlers.""" + + _yang_list_key_names: Tuple[str] = None + + def __init__( + self, json_data: Optional[Union[AnyStr, Dict[str, Any]]]=None, + json_data_list_key=None): + + if json_data is None: + raise ValueError(f"{self._yang_name!r} list needs input data") + + if isinstance(json_data, bytes): + json_data = json_data.decode('utf8') + + if isinstance(json_data, str): + json_data = json.loads(json_data) + + if (key := ':'.join(( + self._yang_module_name, self._yang_name))) not in json_data: + key = self._yang_name + + data_list = json_data.get(key, []) + if not isinstance(data_list, list): + raise TypeError( + f"{key!r} should be a list, not: {type(data_list)}") + + if json_data_list_key is None: + if len(data_list) == 1: + data = data_list[0] + else: + raise ValueError(f"{key!r} list key is missing") + + else: + if not isinstance(json_data_list_key, tuple): + json_data_list_key = (json_data_list_key, ) + + for data in json_data.get(key, []): + if tuple( + data.get(yang_name) for yang_name + in self._yang_list_key_names) == json_data_list_key: + + break + else: + data = {key: value for key, value in zip( + self._yang_list_key_names, json_data_list_key)} + + if not isinstance(data, dict): + raise TypeError( + f"{key!r} list item should be a dict, not: {type(data)}") + + for yang_choice in self._yang_choices.values(): + yang_choice(data) + + self._data = data + + def yang_key(self): + if len(self._yang_list_key_names) == 1: + return self._yang_leaf_members[ + self._yang_list_key_names[0]].__get__(self)() + + return tuple( + self._yang_leaf_members[yang_name].__get__(self)() + for yang_name in self._yang_list_key_names) + + def to_json(self, yang_parent_module_name=None) -> Dict[str, list]: + return {key: [data] for key, data in super().to_json( + yang_parent_module_name=yang_parent_module_name).items()} + + +class YANGChoiceCase: + """Base class for YANG choice case handlers.""" + + _yang_name: str = None + + _yang_container_type: Type[YANGContainer] = None + + _yang_container: YANGContainer = None + + def __init__(self, yang_container_type: Type[YANGContainer]): + self._yang_container_type = yang_container_type + self._yang_name = yang_container_type._yang_name + + @property + def yang_name(self) -> str: + return self._yang_name + + def __get__(self, instance, owner=None): + if instance is None: + return self + + yang_case_container_type = self._yang_container_type + yang_name = self._yang_name + yang_choice_case = self + + class Case: + + def __bool__(self) -> bool: + return (yang_case_container := + yang_choice_case._yang_container) is not None and ( + bool(yang_case_container._data)) + + def __call__(self, data: Optional[Dict[str, Any]]=None): + if data: + for yang_member in chain( + yang_case_container_type. + _yang_leaf_members.values(), + + yang_case_container_type. + _yang_container_members.values(), + + yang_case_container_type. + _yang_list_members.values()): + + if yang_member._yang_name in data or ':'.join(( + yang_member._yang_module_name, + yang_member._yang_name)) in data: + break + else: + data = None + + if data: + yang_choice_case._yang_container = ( + yang_case_container_type({yang_name: data})) + + elif yang_choice_case._yang_container is None: + yang_choice_case._yang_container = ( + yang_case_container_type()) + + return yang_choice_case._yang_container + + def __enter__(self): + return self() + + def __exit__(self, exc_type, exc, traceback): + if exc is not None: + raise exc + + return Case() + + +class YANGChoice(YANGMember): + """Base class for YANG choice handlers.""" + + _yang_parent: YANGContainer = None + + _yang_cases: Dict[str, YANGChoiceCase] = None + + def __init__(self, yang_parent: YANGContainer): + self._yang_parent = yang_parent + + def __call__(self, data: Dict[str, Any]): + for yang_case in self._yang_cases.values(): + yang_case.__get__(self)(data) + + @property + def _yang_case_container(self) -> YANGContainer: + for yang_case in self._yang_cases.values(): + if (yang_container := + yang_case._yang_container) is not None and ( + yang_container._data): + return yang_container + + +def load_json_data( + json_data: Union[AnyStr, Dict[str, Any]], + *yang_types: Type[YANGContainer]) -> List[YANGContainer]: + + if isinstance(json_data, bytes): + json_data = json_data.decode('utf8') + + if isinstance(json_data, str): + json_data = json.loads(json_data) + + json_data = json_data.get('data', json_data) + + return [yang_type(json_data) for yang_type in yang_types] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5a00cae7ce23108a5db10e6192b315330e3a86b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/__init__.py @@ -0,0 +1,141 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NacmMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: nacm + """ + from .groups import Groups + from .rule_list import RuleList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: nacm + """ + + def __init__(self): + super().__init__(Nacm) + + def __get__(self, instance, owner=None) -> ( + 'NacmMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Nacm': + pass + + def __enter__(self) -> 'Nacm': + pass + + +class Nacm( + YANGContainer, + metaclass=NacmMeta): + """ + YANG container handler. + + YANG name: nacm + """ + + _yang_name: Final[str] = 'nacm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'denied-data-writes': ( + denied_data_writes := YANGLeafMember( + 'denied-data-writes', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'exec-default': ( + exec_default := YANGLeafMember( + 'exec-default', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'denied-notifications': ( + denied_notifications := YANGLeafMember( + 'denied-notifications', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'enable-external-groups': ( + enable_external_groups := YANGLeafMember( + 'enable-external-groups', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'enable-nacm': ( + enable_nacm := YANGLeafMember( + 'enable-nacm', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'read-default': ( + read_default := YANGLeafMember( + 'read-default', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'denied-operations': ( + denied_operations := YANGLeafMember( + 'denied-operations', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'write-default': ( + write_default := YANGLeafMember( + 'write-default', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'groups': ( + groups := ( # YANGContainerMember( + NacmMeta. + Groups. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'rule-list': ( + rule_list := ( # YANGListMember( + NacmMeta. + RuleList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Nacm': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e95275ad804d53820f3fc4a0210d60c645a70d14 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GroupsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: groups + """ + from .group import Group + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: groups + """ + + def __init__(self): + super().__init__(Groups) + + def __get__(self, instance, owner=None) -> ( + 'GroupsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Groups': + pass + + def __enter__(self) -> 'Groups': + pass + + +class Groups( + YANGContainer, + metaclass=GroupsMeta): + """ + YANG container handler. + + YANG name: groups + """ + + _yang_name: Final[str] = 'groups' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'group': ( + group := ( # YANGListMember( + GroupsMeta. + Group. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Groups': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c294bb266b4b8f6416b1ffe0ea59276c5a109b0f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/groups/group/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GroupMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: group + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: group + """ + + def __init__(self): + super().__init__(Group) + + def __get__(self, instance, owner=None) -> ( + 'GroupMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Group']: + pass + + def __iter__(self, key) -> Iterator['Group']: + return super().__iter__() + + def __getitem__(self, key) -> 'Group': + return super()[key] + + def __enter__(self) -> ( + 'GroupMeta.yang_list_descriptor'): + pass + + +class Group( + YANGListItem, + metaclass=GroupMeta): + """ + YANG list item handler. + + YANG name: group + """ + + _yang_name: Final[str] = 'group' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Group': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dd0f9808e43dd3930efcec86b5b484b4107b77f6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RuleListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: rule-list + """ + from .rule import Rule + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: rule-list + """ + + def __init__(self): + super().__init__(RuleList) + + def __get__(self, instance, owner=None) -> ( + 'RuleListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RuleList']: + pass + + def __iter__(self, key) -> Iterator['RuleList']: + return super().__iter__() + + def __getitem__(self, key) -> 'RuleList': + return super()[key] + + def __enter__(self) -> ( + 'RuleListMeta.yang_list_descriptor'): + pass + + +class RuleList( + YANGListItem, + metaclass=RuleListMeta): + """ + YANG list item handler. + + YANG name: rule-list + """ + + _yang_name: Final[str] = 'rule-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'rule': ( + rule := ( # YANGListMember( + RuleListMeta. + Rule. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RuleList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4ec5ba06dbf93901881ab6045d1896b85583a642 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/__init__.py @@ -0,0 +1,130 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RuleMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: rule + """ + from .rule_type import RuleType + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: rule + """ + + def __init__(self): + super().__init__(Rule) + + def __get__(self, instance, owner=None) -> ( + 'RuleMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Rule']: + pass + + def __iter__(self, key) -> Iterator['Rule']: + return super().__iter__() + + def __getitem__(self, key) -> 'Rule': + return super()[key] + + def __enter__(self) -> ( + 'RuleMeta.yang_list_descriptor'): + pass + + +class Rule( + YANGListItem, + metaclass=RuleMeta): + """ + YANG list item handler. + + YANG name: rule + """ + + _yang_name: Final[str] = 'rule' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'action': ( + action := YANGLeafMember( + 'action', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'access-operations': ( + access_operations := YANGLeafMember( + 'access-operations', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'comment': ( + comment := YANGLeafMember( + 'comment', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + + 'module-name': ( + module_name := YANGLeafMember( + 'module-name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Rule': + instance = super().__new__(cls) + instance._yang_choices = { + + 'rule-type': + RuleMeta.RuleType( + instance), + } + return instance + + @property + def rule_type(self) -> ( + RuleMeta.RuleType): + return self._yang_choices['rule-type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d470943c38427e03302d60c52cf22cdb16597d37 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/__init__.py @@ -0,0 +1,130 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RuleTypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: rule-type + """ + + from .notification import Notification + from .protocol_operation import ProtocolOperation + from .data_node import DataNode + + class notification_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: notification + """ + + def __init__(self): + super().__init__( + RuleTypeMeta.Notification) + + def __get__(self, instance, owner=None) -> ( + 'RuleTypeMeta.notification_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'RuleTypeMeta.Notification'): + pass + + def __enter__(self) -> ( + 'RuleTypeMeta.Notification'): + pass + + class protocol_operation_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: protocol-operation + """ + + def __init__(self): + super().__init__( + RuleTypeMeta.ProtocolOperation) + + def __get__(self, instance, owner=None) -> ( + 'RuleTypeMeta.protocol_operation_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'RuleTypeMeta.ProtocolOperation'): + pass + + def __enter__(self) -> ( + 'RuleTypeMeta.ProtocolOperation'): + pass + + class data_node_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: data-node + """ + + def __init__(self): + super().__init__( + RuleTypeMeta.DataNode) + + def __get__(self, instance, owner=None) -> ( + 'RuleTypeMeta.data_node_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'RuleTypeMeta.DataNode'): + pass + + def __enter__(self) -> ( + 'RuleTypeMeta.DataNode'): + pass + + +class RuleType(YANGChoice, metaclass=RuleTypeMeta): + """ + YANG choice handler. + + YANG name: rule-type + """ + + _yang_name: Final[str] = 'rule-type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'notification': ( + notification := ( # YANGChoiceCase( + RuleTypeMeta. + notification_case_descriptor())), + + 'protocol-operation': ( + protocol_operation := ( # YANGChoiceCase( + RuleTypeMeta. + protocol_operation_case_descriptor())), + + 'data-node': ( + data_node := ( # YANGChoiceCase( + RuleTypeMeta. + data_node_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f7ddf138eefd0c4a086a06a2b846e74bf45b1f6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/data_node/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class DataNodeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: data-node + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: data-node + """ + + def __init__(self): + super().__init__(DataNode) + + def __get__(self, instance, owner=None) -> ( + 'DataNodeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'DataNode': + pass + + def __enter__(self) -> 'DataNode': + pass + + +class DataNode( + YANGContainer, + metaclass=DataNodeMeta): + """ + YANG container handler. + + YANG name: data-node + """ + + _yang_name: Final[str] = 'data-node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path': ( + path := YANGLeafMember( + 'path', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'DataNode': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed29784183bf0d387a6c4facd935e0870251e560 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/notification/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NotificationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: notification + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: notification + """ + + def __init__(self): + super().__init__(Notification) + + def __get__(self, instance, owner=None) -> ( + 'NotificationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Notification': + pass + + def __enter__(self) -> 'Notification': + pass + + +class Notification( + YANGContainer, + metaclass=NotificationMeta): + """ + YANG container handler. + + YANG name: notification + """ + + _yang_name: Final[str] = 'notification' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'notification-name': ( + notification_name := YANGLeafMember( + 'notification-name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Notification': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1371c9edb91fac8da7f5bcdb3854d5dbc8cc2d1d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/nacm/rule_list/rule/rule_type/protocol_operation/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ProtocolOperationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: protocol-operation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: protocol-operation + """ + + def __init__(self): + super().__init__(ProtocolOperation) + + def __get__(self, instance, owner=None) -> ( + 'ProtocolOperationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ProtocolOperation': + pass + + def __enter__(self) -> 'ProtocolOperation': + pass + + +class ProtocolOperation( + YANGContainer, + metaclass=ProtocolOperationMeta): + """ + YANG container handler. + + YANG name: protocol-operation + """ + + _yang_name: Final[str] = 'protocol-operation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm' + _yang_module_name: Final[str] = 'ietf-netconf-acm' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'rpc-name': ( + rpc_name := YANGLeafMember( + 'rpc-name', + 'urn:ietf:params:xml:ns:yang:ietf-netconf-acm', + 'ietf-netconf-acm')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ProtocolOperation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..296b880921a48cd2087ba3a9f82c18324e03d7b0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworkSliceServicesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: network-slice-services + """ + from .slo_sle_templates import SloSleTemplates + from .slice_service import SliceService + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: network-slice-services + """ + + def __init__(self): + super().__init__(NetworkSliceServices) + + def __get__(self, instance, owner=None) -> ( + 'NetworkSliceServicesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NetworkSliceServices': + pass + + def __enter__(self) -> 'NetworkSliceServices': + pass + + +class NetworkSliceServices( + YANGContainer, + metaclass=NetworkSliceServicesMeta): + """ + YANG container handler. + + YANG name: network-slice-services + """ + + _yang_name: Final[str] = 'network-slice-services' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'slo-sle-templates': ( + slo_sle_templates := ( # YANGContainerMember( + NetworkSliceServicesMeta. + SloSleTemplates. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'slice-service': ( + slice_service := ( # YANGListMember( + NetworkSliceServicesMeta. + SliceService. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NetworkSliceServices': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0e8520f1b36270cbc09d1acddda316eb7198c535 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/__init__.py @@ -0,0 +1,147 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SliceServiceMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: slice-service + """ + from .connection_groups import ConnectionGroups + from .te_topology_identifier import TeTopologyIdentifier + from .status import Status + from .sdps import Sdps + from .service_tags import ServiceTags + from .slo_sle_policy import SloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: slice-service + """ + + def __init__(self): + super().__init__(SliceService) + + def __get__(self, instance, owner=None) -> ( + 'SliceServiceMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SliceService']: + pass + + def __iter__(self, key) -> Iterator['SliceService']: + return super().__iter__() + + def __getitem__(self, key) -> 'SliceService': + return super()[key] + + def __enter__(self) -> ( + 'SliceServiceMeta.yang_list_descriptor'): + pass + + +class SliceService( + YANGListItem, + metaclass=SliceServiceMeta): + """ + YANG list item handler. + + YANG name: slice-service + """ + + _yang_name: Final[str] = 'slice-service' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'service-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'service-id': ( + service_id := YANGLeafMember( + 'service-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'service-description': ( + service_description := YANGLeafMember( + 'service-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connection-groups': ( + connection_groups := ( # YANGContainerMember( + SliceServiceMeta. + ConnectionGroups. + yang_container_descriptor())), + + 'te-topology-identifier': ( + te_topology_identifier := ( # YANGContainerMember( + SliceServiceMeta. + TeTopologyIdentifier. + yang_container_descriptor())), + + 'status': ( + status := ( # YANGContainerMember( + SliceServiceMeta. + Status. + yang_container_descriptor())), + + 'sdps': ( + sdps := ( # YANGContainerMember( + SliceServiceMeta. + Sdps. + yang_container_descriptor())), + + 'service-tags': ( + service_tags := ( # YANGContainerMember( + SliceServiceMeta. + ServiceTags. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SliceService': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + SliceServiceMeta.SloSlePolicy( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + SliceServiceMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a67fcd383e6ecaabe98b4aa1c1d892f68d21840f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectionGroupsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connection-groups + """ + from .connection_group import ConnectionGroup + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connection-groups + """ + + def __init__(self): + super().__init__(ConnectionGroups) + + def __get__(self, instance, owner=None) -> ( + 'ConnectionGroupsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectionGroups': + pass + + def __enter__(self) -> 'ConnectionGroups': + pass + + +class ConnectionGroups( + YANGContainer, + metaclass=ConnectionGroupsMeta): + """ + YANG container handler. + + YANG name: connection-groups + """ + + _yang_name: Final[str] = 'connection-groups' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connection-group': ( + connection_group := ( # YANGListMember( + ConnectionGroupsMeta. + ConnectionGroup. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectionGroups': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38302dd8447f8af0dc7f4e9f133b2337ef8ef3c4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/__init__.py @@ -0,0 +1,132 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectionGroupMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connection-group + """ + from .connection_group_monitoring import ConnectionGroupMonitoring + from .connectivity_construct import ConnectivityConstruct + from .slo_sle_policy import SloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connection-group + """ + + def __init__(self): + super().__init__(ConnectionGroup) + + def __get__(self, instance, owner=None) -> ( + 'ConnectionGroupMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectionGroup']: + pass + + def __iter__(self, key) -> Iterator['ConnectionGroup']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectionGroup': + return super()[key] + + def __enter__(self) -> ( + 'ConnectionGroupMeta.yang_list_descriptor'): + pass + + +class ConnectionGroup( + YANGListItem, + metaclass=ConnectionGroupMeta): + """ + YANG list item handler. + + YANG name: connection-group + """ + + _yang_name: Final[str] = 'connection-group' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'connection-group-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'connectivity-type': ( + connectivity_type := YANGLeafMember( + 'connectivity-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'connection-group-id': ( + connection_group_id := YANGLeafMember( + 'connection-group-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'service-slo-sle-policy-override': ( + service_slo_sle_policy_override := YANGLeafMember( + 'service-slo-sle-policy-override', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connection-group-monitoring': ( + connection_group_monitoring := ( # YANGContainerMember( + ConnectionGroupMeta. + ConnectionGroupMonitoring. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connectivity-construct': ( + connectivity_construct := ( # YANGListMember( + ConnectionGroupMeta. + ConnectivityConstruct. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectionGroup': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + ConnectionGroupMeta.SloSlePolicy( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + ConnectionGroupMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..395aabd46097a05d51746b4298b5fa845a369068 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connection_group_monitoring/__init__.py @@ -0,0 +1,127 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectionGroupMonitoringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connection-group-monitoring + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connection-group-monitoring + """ + + def __init__(self): + super().__init__(ConnectionGroupMonitoring) + + def __get__(self, instance, owner=None) -> ( + 'ConnectionGroupMonitoringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectionGroupMonitoring': + pass + + def __enter__(self) -> 'ConnectionGroupMonitoring': + pass + + +class ConnectionGroupMonitoring( + YANGContainer, + metaclass=ConnectionGroupMonitoringMeta): + """ + YANG container handler. + + YANG name: connection-group-monitoring + """ + + _yang_name: Final[str] = 'connection-group-monitoring' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'one-way-delay-variation': ( + one_way_delay_variation := YANGLeafMember( + 'one-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-max-delay': ( + one_way_max_delay := YANGLeafMember( + 'one-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-packet-loss': ( + one_way_packet_loss := YANGLeafMember( + 'one-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-max-delay': ( + two_way_max_delay := YANGLeafMember( + 'two-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-min-delay': ( + two_way_min_delay := YANGLeafMember( + 'two-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-min-delay': ( + one_way_min_delay := YANGLeafMember( + 'one-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-packet-loss': ( + two_way_packet_loss := YANGLeafMember( + 'two-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-delay-variation': ( + two_way_delay_variation := YANGLeafMember( + 'two-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectionGroupMonitoring': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..124ac4ddc30dc414c79160077a4fc4042924472e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityConstructMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connectivity-construct + """ + from .connectivity_construct_monitoring import ConnectivityConstructMonitoring + from .slo_sle_policy import SloSlePolicy + from .connectivity_construct_type import ConnectivityConstructType + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connectivity-construct + """ + + def __init__(self): + super().__init__(ConnectivityConstruct) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectivityConstruct']: + pass + + def __iter__(self, key) -> Iterator['ConnectivityConstruct']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectivityConstruct': + return super()[key] + + def __enter__(self) -> ( + 'ConnectivityConstructMeta.yang_list_descriptor'): + pass + + +class ConnectivityConstruct( + YANGListItem, + metaclass=ConnectivityConstructMeta): + """ + YANG list item handler. + + YANG name: connectivity-construct + """ + + _yang_name: Final[str] = 'connectivity-construct' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'cc-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'service-slo-sle-policy-override': ( + service_slo_sle_policy_override := YANGLeafMember( + 'service-slo-sle-policy-override', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cc-id': ( + cc_id := YANGLeafMember( + 'cc-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connectivity-construct-monitoring': ( + connectivity_construct_monitoring := ( # YANGContainerMember( + ConnectivityConstructMeta. + ConnectivityConstructMonitoring. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityConstruct': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + ConnectivityConstructMeta.SloSlePolicy( + instance), + + 'connectivity-construct-type': + ConnectivityConstructMeta.ConnectivityConstructType( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + ConnectivityConstructMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] + + @property + def connectivity_construct_type(self) -> ( + ConnectivityConstructMeta.ConnectivityConstructType): + return self._yang_choices['connectivity-construct-type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bfca50ba90e73161807ba1173e7d5113348a7581 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_monitoring/__init__.py @@ -0,0 +1,127 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityConstructMonitoringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-construct-monitoring + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-construct-monitoring + """ + + def __init__(self): + super().__init__(ConnectivityConstructMonitoring) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructMonitoringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityConstructMonitoring': + pass + + def __enter__(self) -> 'ConnectivityConstructMonitoring': + pass + + +class ConnectivityConstructMonitoring( + YANGContainer, + metaclass=ConnectivityConstructMonitoringMeta): + """ + YANG container handler. + + YANG name: connectivity-construct-monitoring + """ + + _yang_name: Final[str] = 'connectivity-construct-monitoring' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'one-way-delay-variation': ( + one_way_delay_variation := YANGLeafMember( + 'one-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-max-delay': ( + two_way_max_delay := YANGLeafMember( + 'two-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-packet-loss': ( + two_way_packet_loss := YANGLeafMember( + 'two-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-packet-loss': ( + one_way_packet_loss := YANGLeafMember( + 'one-way-packet-loss', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-max-delay': ( + one_way_max_delay := YANGLeafMember( + 'one-way-max-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-delay-variation': ( + two_way_delay_variation := YANGLeafMember( + 'two-way-delay-variation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'two-way-min-delay': ( + two_way_min_delay := YANGLeafMember( + 'two-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'one-way-min-delay': ( + one_way_min_delay := YANGLeafMember( + 'one-way-min-delay', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityConstructMonitoring': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6e1424075780ca5a04525d4124fb2af47404ec23 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/__init__.py @@ -0,0 +1,130 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityConstructTypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: connectivity-construct-type + """ + + from .p2mp import P2mp + from .a2a import A2a + from .p2p import P2p + + class p2mp_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: p2mp + """ + + def __init__(self): + super().__init__( + ConnectivityConstructTypeMeta.P2mp) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructTypeMeta.p2mp_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'ConnectivityConstructTypeMeta.P2mp'): + pass + + def __enter__(self) -> ( + 'ConnectivityConstructTypeMeta.P2mp'): + pass + + class a2a_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: a2a + """ + + def __init__(self): + super().__init__( + ConnectivityConstructTypeMeta.A2a) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructTypeMeta.a2a_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'ConnectivityConstructTypeMeta.A2a'): + pass + + def __enter__(self) -> ( + 'ConnectivityConstructTypeMeta.A2a'): + pass + + class p2p_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: p2p + """ + + def __init__(self): + super().__init__( + ConnectivityConstructTypeMeta.P2p) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityConstructTypeMeta.p2p_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'ConnectivityConstructTypeMeta.P2p'): + pass + + def __enter__(self) -> ( + 'ConnectivityConstructTypeMeta.P2p'): + pass + + +class ConnectivityConstructType(YANGChoice, metaclass=ConnectivityConstructTypeMeta): + """ + YANG choice handler. + + YANG name: connectivity-construct-type + """ + + _yang_name: Final[str] = 'connectivity-construct-type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'p2mp': ( + p2mp := ( # YANGChoiceCase( + ConnectivityConstructTypeMeta. + p2mp_case_descriptor())), + + 'a2a': ( + a2a := ( # YANGChoiceCase( + ConnectivityConstructTypeMeta. + a2a_case_descriptor())), + + 'p2p': ( + p2p := ( # YANGChoiceCase( + ConnectivityConstructTypeMeta. + p2p_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1e9d402c2c675f5f6b65fc17952ad0909b8059d2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class A2aMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: a2a + """ + from .a2a_sdp import A2aSdp + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: a2a + """ + + def __init__(self): + super().__init__(A2a) + + def __get__(self, instance, owner=None) -> ( + 'A2aMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'A2a': + pass + + def __enter__(self) -> 'A2a': + pass + + +class A2a( + YANGContainer, + metaclass=A2aMeta): + """ + YANG container handler. + + YANG name: a2a + """ + + _yang_name: Final[str] = 'a2a' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'a2a-sdp': ( + a2a_sdp := ( # YANGListMember( + A2aMeta. + A2aSdp. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'A2a': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fa176413be0dab678f83a0d9a41737c4bdd90859 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class A2aSdpMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: a2a-sdp + """ + from .slo_sle_policy import SloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: a2a-sdp + """ + + def __init__(self): + super().__init__(A2aSdp) + + def __get__(self, instance, owner=None) -> ( + 'A2aSdpMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['A2aSdp']: + pass + + def __iter__(self, key) -> Iterator['A2aSdp']: + return super().__iter__() + + def __getitem__(self, key) -> 'A2aSdp': + return super()[key] + + def __enter__(self) -> ( + 'A2aSdpMeta.yang_list_descriptor'): + pass + + +class A2aSdp( + YANGListItem, + metaclass=A2aSdpMeta): + """ + YANG list item handler. + + YANG name: a2a-sdp + """ + + _yang_name: Final[str] = 'a2a-sdp' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sdp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sdp-id': ( + sdp_id := YANGLeafMember( + 'sdp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'A2aSdp': + instance = super().__new__(cls) + instance._yang_choices = { + + 'slo-sle-policy': + A2aSdpMeta.SloSlePolicy( + instance), + } + return instance + + @property + def slo_sle_policy(self) -> ( + A2aSdpMeta.SloSlePolicy): + return self._yang_choices['slo-sle-policy'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..afe092733209a8030bf14f62f3baf77eaabdd6bb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .metric_bounds import MetricBounds + from .steering_constraints import SteeringConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07832b8f39b43c7edd743e03c369c60d5c63624d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c308b850384ee650e0ea222b7776b52b378718fd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .path_constraints import PathConstraints + from .service_function import ServiceFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/a2a/a2a_sdp/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26189213c12a3803a76ecbcf06ff15c598e6dbce --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2mp/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class P2mpMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: p2mp + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: p2mp + """ + + def __init__(self): + super().__init__(P2mp) + + def __get__(self, instance, owner=None) -> ( + 'P2mpMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'P2mp': + pass + + def __enter__(self) -> 'P2mp': + pass + + +class P2mp( + YANGContainer, + metaclass=P2mpMeta): + """ + YANG container handler. + + YANG name: p2mp + """ + + _yang_name: Final[str] = 'p2mp' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'p2mp-sender-sdp': ( + p2mp_sender_sdp := YANGLeafMember( + 'p2mp-sender-sdp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'P2mp': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5abb50263afbcf98d9fa2036fa274ba69695984f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/connectivity_construct_type/p2p/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class P2pMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: p2p + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: p2p + """ + + def __init__(self): + super().__init__(P2p) + + def __get__(self, instance, owner=None) -> ( + 'P2pMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'P2p': + pass + + def __enter__(self) -> 'P2p': + pass + + +class P2p( + YANGContainer, + metaclass=P2pMeta): + """ + YANG container handler. + + YANG name: p2p + """ + + _yang_name: Final[str] = 'p2p' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'p2p-sender-sdp': ( + p2p_sender_sdp := YANGLeafMember( + 'p2p-sender-sdp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'p2p-receiver-sdp': ( + p2p_receiver_sdp := YANGLeafMember( + 'p2p-receiver-sdp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'P2p': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..afe092733209a8030bf14f62f3baf77eaabdd6bb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .metric_bounds import MetricBounds + from .steering_constraints import SteeringConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32ab7d60c22d534b878f967b4bf57e0509583bbb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c022caf902743b8abe798b61b8f1439d276862 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .service_function import ServiceFunction + from .path_constraints import PathConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/connectivity_construct/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ea6d366eb1ff15535bea20dc431827e5f859bc4f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .steering_constraints import SteeringConstraints + from .metric_bounds import MetricBounds + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..23374967999723000d8649da5d3ec8d5489a5794 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c022caf902743b8abe798b61b8f1439d276862 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .service_function import ServiceFunction + from .path_constraints import PathConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/connection_groups/connection_group/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3239d57811ab3ddff018c0347524513d77934aa --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdps + """ + from .sdp import Sdp + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdps + """ + + def __init__(self): + super().__init__(Sdps) + + def __get__(self, instance, owner=None) -> ( + 'SdpsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Sdps': + pass + + def __enter__(self) -> 'Sdps': + pass + + +class Sdps( + YANGContainer, + metaclass=SdpsMeta): + """ + YANG container handler. + + YANG name: sdps + """ + + _yang_name: Final[str] = 'sdps' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'sdp': ( + sdp := ( # YANGListMember( + SdpsMeta. + Sdp. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Sdps': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5fc0ff62c3ed5a5ea1a7d64e77edeb84d3edf286 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/__init__.py @@ -0,0 +1,182 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: sdp + """ + from .sdp_monitoring import SdpMonitoring + from .outgoing_qos_policy import OutgoingQosPolicy + from .service_match_criteria import ServiceMatchCriteria + from .sdp_peering import SdpPeering + from .status import Status + from .attachment_circuits import AttachmentCircuits + from .location import Location + from .incoming_qos_policy import IncomingQosPolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: sdp + """ + + def __init__(self): + super().__init__(Sdp) + + def __get__(self, instance, owner=None) -> ( + 'SdpMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Sdp']: + pass + + def __iter__(self, key) -> Iterator['Sdp']: + return super().__iter__() + + def __getitem__(self, key) -> 'Sdp': + return super()[key] + + def __enter__(self) -> ( + 'SdpMeta.yang_list_descriptor'): + pass + + +class Sdp( + YANGListItem, + metaclass=SdpMeta): + """ + YANG list item handler. + + YANG name: sdp + """ + + _yang_name: Final[str] = 'sdp' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sdp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sdp-id': ( + sdp_id := YANGLeafMember( + 'sdp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'peer-sap-id': ( + peer_sap_id := YANGLeafMember( + 'peer-sap-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'sdp-description': ( + sdp_description := YANGLeafMember( + 'sdp-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'sdp-ip': ( + sdp_ip := YANGLeafMember( + 'sdp-ip', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ltp': ( + ltp := YANGLeafMember( + 'ltp', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'sdp-monitoring': ( + sdp_monitoring := ( # YANGContainerMember( + SdpMeta. + SdpMonitoring. + yang_container_descriptor())), + + 'outgoing-qos-policy': ( + outgoing_qos_policy := ( # YANGContainerMember( + SdpMeta. + OutgoingQosPolicy. + yang_container_descriptor())), + + 'service-match-criteria': ( + service_match_criteria := ( # YANGContainerMember( + SdpMeta. + ServiceMatchCriteria. + yang_container_descriptor())), + + 'sdp-peering': ( + sdp_peering := ( # YANGContainerMember( + SdpMeta. + SdpPeering. + yang_container_descriptor())), + + 'status': ( + status := ( # YANGContainerMember( + SdpMeta. + Status. + yang_container_descriptor())), + + 'attachment-circuits': ( + attachment_circuits := ( # YANGContainerMember( + SdpMeta. + AttachmentCircuits. + yang_container_descriptor())), + + 'location': ( + location := ( # YANGContainerMember( + SdpMeta. + Location. + yang_container_descriptor())), + + 'incoming-qos-policy': ( + incoming_qos_policy := ( # YANGContainerMember( + SdpMeta. + IncomingQosPolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Sdp': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..624b09988064151b30cfd5286a6a0ef6681e3dd0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttachmentCircuitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: attachment-circuits + """ + from .attachment_circuit import AttachmentCircuit + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: attachment-circuits + """ + + def __init__(self): + super().__init__(AttachmentCircuits) + + def __get__(self, instance, owner=None) -> ( + 'AttachmentCircuitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AttachmentCircuits': + pass + + def __enter__(self) -> 'AttachmentCircuits': + pass + + +class AttachmentCircuits( + YANGContainer, + metaclass=AttachmentCircuitsMeta): + """ + YANG container handler. + + YANG name: attachment-circuits + """ + + _yang_name: Final[str] = 'attachment-circuits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'attachment-circuit': ( + attachment_circuit := ( # YANGListMember( + AttachmentCircuitsMeta. + AttachmentCircuit. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AttachmentCircuits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..93194779e9c37ccae0bca5adcb51ccfb0ff7c349 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/__init__.py @@ -0,0 +1,166 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttachmentCircuitMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: attachment-circuit + """ + from .ac_tags import AcTags + from .outgoing_qos_policy import OutgoingQosPolicy + from .incoming_qos_policy import IncomingQosPolicy + from .sdp_peering import SdpPeering + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: attachment-circuit + """ + + def __init__(self): + super().__init__(AttachmentCircuit) + + def __get__(self, instance, owner=None) -> ( + 'AttachmentCircuitMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AttachmentCircuit']: + pass + + def __iter__(self, key) -> Iterator['AttachmentCircuit']: + return super().__iter__() + + def __getitem__(self, key) -> 'AttachmentCircuit': + return super()[key] + + def __enter__(self) -> ( + 'AttachmentCircuitMeta.yang_list_descriptor'): + pass + + +class AttachmentCircuit( + YANGListItem, + metaclass=AttachmentCircuitMeta): + """ + YANG list item handler. + + YANG name: attachment-circuit + """ + + _yang_name: Final[str] = 'attachment-circuit' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'ac-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'ac-node-id': ( + ac_node_id := YANGLeafMember( + 'ac-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-tp-id': ( + ac_tp_id := YANGLeafMember( + 'ac-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-ip-prefix-length': ( + ac_ip_prefix_length := YANGLeafMember( + 'ac-ip-prefix-length', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-ip-address': ( + ac_ip_address := YANGLeafMember( + 'ac-ip-address', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-description': ( + ac_description := YANGLeafMember( + 'ac-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ac-id': ( + ac_id := YANGLeafMember( + 'ac-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'peer-sap-id': ( + peer_sap_id := YANGLeafMember( + 'peer-sap-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'ac-tags': ( + ac_tags := ( # YANGContainerMember( + AttachmentCircuitMeta. + AcTags. + yang_container_descriptor())), + + 'outgoing-qos-policy': ( + outgoing_qos_policy := ( # YANGContainerMember( + AttachmentCircuitMeta. + OutgoingQosPolicy. + yang_container_descriptor())), + + 'incoming-qos-policy': ( + incoming_qos_policy := ( # YANGContainerMember( + AttachmentCircuitMeta. + IncomingQosPolicy. + yang_container_descriptor())), + + 'sdp-peering': ( + sdp_peering := ( # YANGContainerMember( + AttachmentCircuitMeta. + SdpPeering. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AttachmentCircuit': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a18ad45c114040f6b3d58ff592ea6cfd9461a8ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AcTagsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: ac-tags + """ + from .ac_tags import AcTags + from .ac_tag_opaque import AcTagOpaque + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: ac-tags + """ + + def __init__(self): + super().__init__(AcTags) + + def __get__(self, instance, owner=None) -> ( + 'AcTagsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AcTags': + pass + + def __enter__(self) -> 'AcTags': + pass + + +class AcTags( + YANGContainer, + metaclass=AcTagsMeta): + """ + YANG container handler. + + YANG name: ac-tags + """ + + _yang_name: Final[str] = 'ac-tags' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'ac-tags': ( + ac_tags := ( # YANGListMember( + AcTagsMeta. + AcTags. + yang_list_descriptor())), + + 'ac-tag-opaque': ( + ac_tag_opaque := ( # YANGListMember( + AcTagsMeta. + AcTagOpaque. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AcTags': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d56e829739daeecc91ead77fb6e40c954532a15e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tag_opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AcTagOpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: ac-tag-opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: ac-tag-opaque + """ + + def __init__(self): + super().__init__(AcTagOpaque) + + def __get__(self, instance, owner=None) -> ( + 'AcTagOpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AcTagOpaque']: + pass + + def __iter__(self, key) -> Iterator['AcTagOpaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'AcTagOpaque': + return super()[key] + + def __enter__(self) -> ( + 'AcTagOpaqueMeta.yang_list_descriptor'): + pass + + +class AcTagOpaque( + YANGListItem, + metaclass=AcTagOpaqueMeta): + """ + YANG list item handler. + + YANG name: ac-tag-opaque + """ + + _yang_name: Final[str] = 'ac-tag-opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tag-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tag-name': ( + tag_name := YANGLeafMember( + 'tag-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AcTagOpaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ef753261d2bf1b99a0fd2a2cf198785baffff1e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/ac_tags/ac_tags/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AcTagsMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: ac-tags + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: ac-tags + """ + + def __init__(self): + super().__init__(AcTags) + + def __get__(self, instance, owner=None) -> ( + 'AcTagsMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AcTags']: + pass + + def __iter__(self, key) -> Iterator['AcTags']: + return super().__iter__() + + def __getitem__(self, key) -> 'AcTags': + return super()[key] + + def __enter__(self) -> ( + 'AcTagsMeta.yang_list_descriptor'): + pass + + +class AcTags( + YANGListItem, + metaclass=AcTagsMeta): + """ + YANG list item handler. + + YANG name: ac-tags + """ + + _yang_name: Final[str] = 'ac-tags' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'ac-tag-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'ac-tag-type': ( + ac_tag_type := YANGLeafMember( + 'ac-tag-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AcTags': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abad77461c9f94149dc016054d669526c83570af --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class IncomingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: incoming-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: incoming-qos-policy + """ + + def __init__(self): + super().__init__(IncomingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'IncomingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'IncomingQosPolicy': + pass + + def __enter__(self) -> 'IncomingQosPolicy': + pass + + +class IncomingQosPolicy( + YANGContainer, + metaclass=IncomingQosPolicyMeta): + """ + YANG container handler. + + YANG name: incoming-qos-policy + """ + + _yang_name: Final[str] = 'incoming-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + IncomingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'IncomingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..492759055bf57b40705a54dfd087f89fa61a87dc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/incoming_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..893cb264eba6e98af718d8244d262d0888793ca0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OutgoingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: outgoing-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: outgoing-qos-policy + """ + + def __init__(self): + super().__init__(OutgoingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'OutgoingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OutgoingQosPolicy': + pass + + def __enter__(self) -> 'OutgoingQosPolicy': + pass + + +class OutgoingQosPolicy( + YANGContainer, + metaclass=OutgoingQosPolicyMeta): + """ + YANG container handler. + + YANG name: outgoing-qos-policy + """ + + _yang_name: Final[str] = 'outgoing-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + OutgoingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OutgoingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..445a7a5df5d7db2b92ecb59f0f54a4c316328d78 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/outgoing_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c7b5e10b24076aa3928995dc846b4e138516379b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpPeeringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdp-peering + """ + from .opaque import Opaque + from .protocol import Protocol + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdp-peering + """ + + def __init__(self): + super().__init__(SdpPeering) + + def __get__(self, instance, owner=None) -> ( + 'SdpPeeringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SdpPeering': + pass + + def __enter__(self) -> 'SdpPeering': + pass + + +class SdpPeering( + YANGContainer, + metaclass=SdpPeeringMeta): + """ + YANG container handler. + + YANG name: sdp-peering + """ + + _yang_name: Final[str] = 'sdp-peering' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'opaque': ( + opaque := ( # YANGListMember( + SdpPeeringMeta. + Opaque. + yang_list_descriptor())), + + 'protocol': ( + protocol := ( # YANGListMember( + SdpPeeringMeta. + Protocol. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SdpPeering': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b367227c3d43cd31c1b3df857ed944d62d371806 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: opaque + """ + + def __init__(self): + super().__init__(Opaque) + + def __get__(self, instance, owner=None) -> ( + 'OpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Opaque']: + pass + + def __iter__(self, key) -> Iterator['Opaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'Opaque': + return super()[key] + + def __enter__(self) -> ( + 'OpaqueMeta.yang_list_descriptor'): + pass + + +class Opaque( + YANGListItem, + metaclass=OpaqueMeta): + """ + YANG list item handler. + + YANG name: opaque + """ + + _yang_name: Final[str] = 'opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-name': ( + attribute_name := YANGLeafMember( + 'attribute-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Opaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..850f7d924c02b4a89030c1a7757b1e728ad35326 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ProtocolMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: protocol + """ + from .attribute import Attribute + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: protocol + """ + + def __init__(self): + super().__init__(Protocol) + + def __get__(self, instance, owner=None) -> ( + 'ProtocolMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Protocol']: + pass + + def __iter__(self, key) -> Iterator['Protocol']: + return super().__iter__() + + def __getitem__(self, key) -> 'Protocol': + return super()[key] + + def __enter__(self) -> ( + 'ProtocolMeta.yang_list_descriptor'): + pass + + +class Protocol( + YANGListItem, + metaclass=ProtocolMeta): + """ + YANG list item handler. + + YANG name: protocol + """ + + _yang_name: Final[str] = 'protocol' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'protocol-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protocol-type': ( + protocol_type := YANGLeafMember( + 'protocol-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'attribute': ( + attribute := ( # YANGListMember( + ProtocolMeta. + Attribute. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Protocol': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76180637c83f2a158838bacaae99add6e9fe5b61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/attachment_circuits/attachment_circuit/sdp_peering/protocol/attribute/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttributeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: attribute + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: attribute + """ + + def __init__(self): + super().__init__(Attribute) + + def __get__(self, instance, owner=None) -> ( + 'AttributeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Attribute']: + pass + + def __iter__(self, key) -> Iterator['Attribute']: + return super().__iter__() + + def __getitem__(self, key) -> 'Attribute': + return super()[key] + + def __enter__(self) -> ( + 'AttributeMeta.yang_list_descriptor'): + pass + + +class Attribute( + YANGListItem, + metaclass=AttributeMeta): + """ + YANG list item handler. + + YANG name: attribute + """ + + _yang_name: Final[str] = 'attribute' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-type': ( + attribute_type := YANGLeafMember( + 'attribute-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Attribute': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abad77461c9f94149dc016054d669526c83570af --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class IncomingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: incoming-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: incoming-qos-policy + """ + + def __init__(self): + super().__init__(IncomingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'IncomingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'IncomingQosPolicy': + pass + + def __enter__(self) -> 'IncomingQosPolicy': + pass + + +class IncomingQosPolicy( + YANGContainer, + metaclass=IncomingQosPolicyMeta): + """ + YANG container handler. + + YANG name: incoming-qos-policy + """ + + _yang_name: Final[str] = 'incoming-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + IncomingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'IncomingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..49a7b3deeb46fce3abf89af50e4e3b922a00bcc5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/incoming_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a88123d6c81ab2c15db96d13ffa2af9458fa904e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/location/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: location + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: location + """ + + def __init__(self): + super().__init__(Location) + + def __get__(self, instance, owner=None) -> ( + 'LocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Location': + pass + + def __enter__(self) -> 'Location': + pass + + +class Location( + YANGContainer, + metaclass=LocationMeta): + """ + YANG container handler. + + YANG name: location + """ + + _yang_name: Final[str] = 'location' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Location': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..893cb264eba6e98af718d8244d262d0888793ca0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OutgoingQosPolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: outgoing-qos-policy + """ + from .rate_limits import RateLimits + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: outgoing-qos-policy + """ + + def __init__(self): + super().__init__(OutgoingQosPolicy) + + def __get__(self, instance, owner=None) -> ( + 'OutgoingQosPolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OutgoingQosPolicy': + pass + + def __enter__(self) -> 'OutgoingQosPolicy': + pass + + +class OutgoingQosPolicy( + YANGContainer, + metaclass=OutgoingQosPolicyMeta): + """ + YANG container handler. + + YANG name: outgoing-qos-policy + """ + + _yang_name: Final[str] = 'outgoing-qos-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'qos-policy-name': ( + qos_policy_name := YANGLeafMember( + 'qos-policy-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'rate-limits': ( + rate_limits := ( # YANGContainerMember( + OutgoingQosPolicyMeta. + RateLimits. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OutgoingQosPolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fdf96f15c5ceeb7ae878052b998c9658202e04d0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/outgoing_qos_policy/rate_limits/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RateLimitsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: rate-limits + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: rate-limits + """ + + def __init__(self): + super().__init__(RateLimits) + + def __get__(self, instance, owner=None) -> ( + 'RateLimitsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'RateLimits': + pass + + def __enter__(self) -> 'RateLimits': + pass + + +class RateLimits( + YANGContainer, + metaclass=RateLimitsMeta): + """ + YANG container handler. + + YANG name: rate-limits + """ + + _yang_name: Final[str] = 'rate-limits' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'eir': ( + eir := YANGLeafMember( + 'eir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cir': ( + cir := YANGLeafMember( + 'cir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pir': ( + pir := YANGLeafMember( + 'pir', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'pbs': ( + pbs := YANGLeafMember( + 'pbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'cbs': ( + cbs := YANGLeafMember( + 'cbs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'ebs': ( + ebs := YANGLeafMember( + 'ebs', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RateLimits': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a65f09fc30c0324738fdabb36a717bcfddf3496e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_monitoring/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpMonitoringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdp-monitoring + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdp-monitoring + """ + + def __init__(self): + super().__init__(SdpMonitoring) + + def __get__(self, instance, owner=None) -> ( + 'SdpMonitoringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SdpMonitoring': + pass + + def __enter__(self) -> 'SdpMonitoring': + pass + + +class SdpMonitoring( + YANGContainer, + metaclass=SdpMonitoringMeta): + """ + YANG container handler. + + YANG name: sdp-monitoring + """ + + _yang_name: Final[str] = 'sdp-monitoring' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'incoming-utilized-bandwidth': ( + incoming_utilized_bandwidth := YANGLeafMember( + 'incoming-utilized-bandwidth', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'incoming-bw-utilization': ( + incoming_bw_utilization := YANGLeafMember( + 'incoming-bw-utilization', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'outgoing-bw-utilization': ( + outgoing_bw_utilization := YANGLeafMember( + 'outgoing-bw-utilization', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'outgoing-utilized-bandwidth': ( + outgoing_utilized_bandwidth := YANGLeafMember( + 'outgoing-utilized-bandwidth', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SdpMonitoring': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d745437bd534e2fa460f16fb2ca3bb982d4ce3fc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SdpPeeringMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: sdp-peering + """ + from .protocol import Protocol + from .opaque import Opaque + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: sdp-peering + """ + + def __init__(self): + super().__init__(SdpPeering) + + def __get__(self, instance, owner=None) -> ( + 'SdpPeeringMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SdpPeering': + pass + + def __enter__(self) -> 'SdpPeering': + pass + + +class SdpPeering( + YANGContainer, + metaclass=SdpPeeringMeta): + """ + YANG container handler. + + YANG name: sdp-peering + """ + + _yang_name: Final[str] = 'sdp-peering' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'protocol': ( + protocol := ( # YANGListMember( + SdpPeeringMeta. + Protocol. + yang_list_descriptor())), + + 'opaque': ( + opaque := ( # YANGListMember( + SdpPeeringMeta. + Opaque. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SdpPeering': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b367227c3d43cd31c1b3df857ed944d62d371806 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: opaque + """ + + def __init__(self): + super().__init__(Opaque) + + def __get__(self, instance, owner=None) -> ( + 'OpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Opaque']: + pass + + def __iter__(self, key) -> Iterator['Opaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'Opaque': + return super()[key] + + def __enter__(self) -> ( + 'OpaqueMeta.yang_list_descriptor'): + pass + + +class Opaque( + YANGListItem, + metaclass=OpaqueMeta): + """ + YANG list item handler. + + YANG name: opaque + """ + + _yang_name: Final[str] = 'opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-name': ( + attribute_name := YANGLeafMember( + 'attribute-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Opaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..850f7d924c02b4a89030c1a7757b1e728ad35326 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ProtocolMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: protocol + """ + from .attribute import Attribute + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: protocol + """ + + def __init__(self): + super().__init__(Protocol) + + def __get__(self, instance, owner=None) -> ( + 'ProtocolMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Protocol']: + pass + + def __iter__(self, key) -> Iterator['Protocol']: + return super().__iter__() + + def __getitem__(self, key) -> 'Protocol': + return super()[key] + + def __enter__(self) -> ( + 'ProtocolMeta.yang_list_descriptor'): + pass + + +class Protocol( + YANGListItem, + metaclass=ProtocolMeta): + """ + YANG list item handler. + + YANG name: protocol + """ + + _yang_name: Final[str] = 'protocol' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'protocol-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protocol-type': ( + protocol_type := YANGLeafMember( + 'protocol-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'attribute': ( + attribute := ( # YANGListMember( + ProtocolMeta. + Attribute. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Protocol': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76180637c83f2a158838bacaae99add6e9fe5b61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/sdp_peering/protocol/attribute/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AttributeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: attribute + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: attribute + """ + + def __init__(self): + super().__init__(Attribute) + + def __get__(self, instance, owner=None) -> ( + 'AttributeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Attribute']: + pass + + def __iter__(self, key) -> Iterator['Attribute']: + return super().__iter__() + + def __getitem__(self, key) -> 'Attribute': + return super()[key] + + def __enter__(self) -> ( + 'AttributeMeta.yang_list_descriptor'): + pass + + +class Attribute( + YANGListItem, + metaclass=AttributeMeta): + """ + YANG list item handler. + + YANG name: attribute + """ + + _yang_name: Final[str] = 'attribute' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'attribute-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'attribute-type': ( + attribute_type := YANGLeafMember( + 'attribute-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Attribute': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f39dc9971795fd83eb61a09ca7a4fea42352ac18 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceMatchCriteriaMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-match-criteria + """ + from .match_criterion import MatchCriterion + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-match-criteria + """ + + def __init__(self): + super().__init__(ServiceMatchCriteria) + + def __get__(self, instance, owner=None) -> ( + 'ServiceMatchCriteriaMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceMatchCriteria': + pass + + def __enter__(self) -> 'ServiceMatchCriteria': + pass + + +class ServiceMatchCriteria( + YANGContainer, + metaclass=ServiceMatchCriteriaMeta): + """ + YANG container handler. + + YANG name: service-match-criteria + """ + + _yang_name: Final[str] = 'service-match-criteria' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'match-criterion': ( + match_criterion := ( # YANGListMember( + ServiceMatchCriteriaMeta. + MatchCriterion. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceMatchCriteria': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..99d87b7934889ec3665b1e4af12f836ec76016e0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/service_match_criteria/match_criterion/__init__.py @@ -0,0 +1,120 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MatchCriterionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: match-criterion + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: match-criterion + """ + + def __init__(self): + super().__init__(MatchCriterion) + + def __get__(self, instance, owner=None) -> ( + 'MatchCriterionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MatchCriterion']: + pass + + def __iter__(self, key) -> Iterator['MatchCriterion']: + return super().__iter__() + + def __getitem__(self, key) -> 'MatchCriterion': + return super()[key] + + def __enter__(self) -> ( + 'MatchCriterionMeta.yang_list_descriptor'): + pass + + +class MatchCriterion( + YANGListItem, + metaclass=MatchCriterionMeta): + """ + YANG list item handler. + + YANG name: match-criterion + """ + + _yang_name: Final[str] = 'match-criterion' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'connection-group-sdp-role': ( + connection_group_sdp_role := YANGLeafMember( + 'connection-group-sdp-role', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'target-connection-group-id': ( + target_connection_group_id := YANGLeafMember( + 'target-connection-group-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'target-connectivity-construct-id': ( + target_connectivity_construct_id := YANGLeafMember( + 'target-connectivity-construct-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'match-type': ( + match_type := YANGLeafMember( + 'match-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MatchCriterion': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f802183296df337e7ebacca0d3290f433341130d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: status + """ + from .oper_status import OperStatus + from .admin_status import AdminStatus + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: status + """ + + def __init__(self): + super().__init__(Status) + + def __get__(self, instance, owner=None) -> ( + 'StatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Status': + pass + + def __enter__(self) -> 'Status': + pass + + +class Status( + YANGContainer, + metaclass=StatusMeta): + """ + YANG container handler. + + YANG name: status + """ + + _yang_name: Final[str] = 'status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'oper-status': ( + oper_status := ( # YANGContainerMember( + StatusMeta. + OperStatus. + yang_container_descriptor())), + + 'admin-status': ( + admin_status := ( # YANGContainerMember( + StatusMeta. + AdminStatus. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Status': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5581ef12dac29ce3050652c8c969a76f0ac88fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/admin_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AdminStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: admin-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: admin-status + """ + + def __init__(self): + super().__init__(AdminStatus) + + def __get__(self, instance, owner=None) -> ( + 'AdminStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AdminStatus': + pass + + def __enter__(self) -> 'AdminStatus': + pass + + +class AdminStatus( + YANGContainer, + metaclass=AdminStatusMeta): + """ + YANG container handler. + + YANG name: admin-status + """ + + _yang_name: Final[str] = 'admin-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AdminStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ab3508c5b8babc01483e2d3a2e2996481a28ef43 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/sdps/sdp/status/oper_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OperStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: oper-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: oper-status + """ + + def __init__(self): + super().__init__(OperStatus) + + def __get__(self, instance, owner=None) -> ( + 'OperStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OperStatus': + pass + + def __enter__(self) -> 'OperStatus': + pass + + +class OperStatus( + YANGContainer, + metaclass=OperStatusMeta): + """ + YANG container handler. + + YANG name: oper-status + """ + + _yang_name: Final[str] = 'oper-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OperStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fceafd62985c5230276d129779bf35378d84e87d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceTagsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-tags + """ + from .tag_opaque import TagOpaque + from .tag_type import TagType + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-tags + """ + + def __init__(self): + super().__init__(ServiceTags) + + def __get__(self, instance, owner=None) -> ( + 'ServiceTagsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceTags': + pass + + def __enter__(self) -> 'ServiceTags': + pass + + +class ServiceTags( + YANGContainer, + metaclass=ServiceTagsMeta): + """ + YANG container handler. + + YANG name: service-tags + """ + + _yang_name: Final[str] = 'service-tags' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tag-opaque': ( + tag_opaque := ( # YANGListMember( + ServiceTagsMeta. + TagOpaque. + yang_list_descriptor())), + + 'tag-type': ( + tag_type := ( # YANGListMember( + ServiceTagsMeta. + TagType. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceTags': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d40d27cb705b0fbf4970fa215054e46b4743d885 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_opaque/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TagOpaqueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tag-opaque + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tag-opaque + """ + + def __init__(self): + super().__init__(TagOpaque) + + def __get__(self, instance, owner=None) -> ( + 'TagOpaqueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TagOpaque']: + pass + + def __iter__(self, key) -> Iterator['TagOpaque']: + return super().__iter__() + + def __getitem__(self, key) -> 'TagOpaque': + return super()[key] + + def __enter__(self) -> ( + 'TagOpaqueMeta.yang_list_descriptor'): + pass + + +class TagOpaque( + YANGListItem, + metaclass=TagOpaqueMeta): + """ + YANG list item handler. + + YANG name: tag-opaque + """ + + _yang_name: Final[str] = 'tag-opaque' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tag-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tag-name': ( + tag_name := YANGLeafMember( + 'tag-name', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TagOpaque': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4fff2c3b44b9e1649b5eabb6b12cb36d376b6e1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/service_tags/tag_type/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TagTypeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tag-type + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tag-type + """ + + def __init__(self): + super().__init__(TagType) + + def __get__(self, instance, owner=None) -> ( + 'TagTypeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TagType']: + pass + + def __iter__(self, key) -> Iterator['TagType']: + return super().__iter__() + + def __getitem__(self, key) -> 'TagType': + return super()[key] + + def __enter__(self) -> ( + 'TagTypeMeta.yang_list_descriptor'): + pass + + +class TagType( + YANGListItem, + metaclass=TagTypeMeta): + """ + YANG list item handler. + + YANG name: tag-type + """ + + _yang_name: Final[str] = 'tag-type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tag-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tag-type': ( + tag_type := YANGLeafMember( + 'tag-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TagType': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b239a65e175236f7873bd8165ac2a2c423e1f448 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSlePolicyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: slo-sle-policy + """ + + from .standard import Standard + from .custom import Custom + + class standard_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Standard) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.standard_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Standard'): + pass + + class custom_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__( + SloSlePolicyMeta.Custom) + + def __get__(self, instance, owner=None) -> ( + 'SloSlePolicyMeta.custom_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + def __enter__(self) -> ( + 'SloSlePolicyMeta.Custom'): + pass + + +class SloSlePolicy(YANGChoice, metaclass=SloSlePolicyMeta): + """ + YANG choice handler. + + YANG name: slo-sle-policy + """ + + _yang_name: Final[str] = 'slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'standard': ( + standard := ( # YANGChoiceCase( + SloSlePolicyMeta. + standard_case_descriptor())), + + 'custom': ( + custom := ( # YANGChoiceCase( + SloSlePolicyMeta. + custom_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d0c87599d2b498607615d75ec2bbaab7318af15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class CustomMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: custom + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: custom + """ + + def __init__(self): + super().__init__(Custom) + + def __get__(self, instance, owner=None) -> ( + 'CustomMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Custom': + pass + + def __enter__(self) -> 'Custom': + pass + + +class Custom( + YANGContainer, + metaclass=CustomMeta): + """ + YANG container handler. + + YANG name: custom + """ + + _yang_name: Final[str] = 'custom' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + CustomMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Custom': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f20900d5bafe087db15381e30cca8d6c7555875c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .steering_constraints import SteeringConstraints + from .metric_bounds import MetricBounds + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0cd58260dfa621982847da9dc6fd2bfd5c74331b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c308b850384ee650e0ea222b7776b52b378718fd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .path_constraints import PathConstraints + from .service_function import ServiceFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/custom/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..46e20b7346f1d22e7a61b81a4afb170d9ed36a5b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/slo_sle_policy/standard/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StandardMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: standard + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: standard + """ + + def __init__(self): + super().__init__(Standard) + + def __get__(self, instance, owner=None) -> ( + 'StandardMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Standard': + pass + + def __enter__(self) -> 'Standard': + pass + + +class Standard( + YANGContainer, + metaclass=StandardMeta): + """ + YANG container handler. + + YANG name: standard + """ + + _yang_name: Final[str] = 'standard' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'slo-sle-template': ( + slo_sle_template := YANGLeafMember( + 'slo-sle-template', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Standard': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b4239eb7df15eb9629be735267d4fb31ae46af03 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: status + """ + from .admin_status import AdminStatus + from .oper_status import OperStatus + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: status + """ + + def __init__(self): + super().__init__(Status) + + def __get__(self, instance, owner=None) -> ( + 'StatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Status': + pass + + def __enter__(self) -> 'Status': + pass + + +class Status( + YANGContainer, + metaclass=StatusMeta): + """ + YANG container handler. + + YANG name: status + """ + + _yang_name: Final[str] = 'status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'admin-status': ( + admin_status := ( # YANGContainerMember( + StatusMeta. + AdminStatus. + yang_container_descriptor())), + + 'oper-status': ( + oper_status := ( # YANGContainerMember( + StatusMeta. + OperStatus. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Status': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f5581ef12dac29ce3050652c8c969a76f0ac88fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/admin_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AdminStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: admin-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: admin-status + """ + + def __init__(self): + super().__init__(AdminStatus) + + def __get__(self, instance, owner=None) -> ( + 'AdminStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AdminStatus': + pass + + def __enter__(self) -> 'AdminStatus': + pass + + +class AdminStatus( + YANGContainer, + metaclass=AdminStatusMeta): + """ + YANG container handler. + + YANG name: admin-status + """ + + _yang_name: Final[str] = 'admin-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AdminStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69e53ef62d967bc5dbd072cf4f405d60c28be30 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/status/oper_status/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OperStatusMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: oper-status + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: oper-status + """ + + def __init__(self): + super().__init__(OperStatus) + + def __get__(self, instance, owner=None) -> ( + 'OperStatusMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'OperStatus': + pass + + def __enter__(self) -> 'OperStatus': + pass + + +class OperStatus( + YANGContainer, + metaclass=OperStatusMeta): + """ + YANG container handler. + + YANG name: oper-status + """ + + _yang_name: Final[str] = 'oper-status' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'last-change': ( + last_change := YANGLeafMember( + 'last-change', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'status': ( + status := YANGLeafMember( + 'status', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OperStatus': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b76cce7a32018d0f77c2a9ac3c7fbbc94665680f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slice_service/te_topology_identifier/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeTopologyIdentifierMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-topology-identifier + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-topology-identifier + """ + + def __init__(self): + super().__init__(TeTopologyIdentifier) + + def __get__(self, instance, owner=None) -> ( + 'TeTopologyIdentifierMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeTopologyIdentifier': + pass + + def __enter__(self) -> 'TeTopologyIdentifier': + pass + + +class TeTopologyIdentifier( + YANGContainer, + metaclass=TeTopologyIdentifierMeta): + """ + YANG container handler. + + YANG name: te-topology-identifier + """ + + _yang_name: Final[str] = 'te-topology-identifier' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'client-id': ( + client_id := YANGLeafMember( + 'client-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'topology-id': ( + topology_id := YANGLeafMember( + 'topology-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'provider-id': ( + provider_id := YANGLeafMember( + 'provider-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeTopologyIdentifier': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..27cda68070b24236354d46b094d0ad3787ab4485 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSleTemplatesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: slo-sle-templates + """ + from .slo_sle_template import SloSleTemplate + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: slo-sle-templates + """ + + def __init__(self): + super().__init__(SloSleTemplates) + + def __get__(self, instance, owner=None) -> ( + 'SloSleTemplatesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SloSleTemplates': + pass + + def __enter__(self) -> 'SloSleTemplates': + pass + + +class SloSleTemplates( + YANGContainer, + metaclass=SloSleTemplatesMeta): + """ + YANG container handler. + + YANG name: slo-sle-templates + """ + + _yang_name: Final[str] = 'slo-sle-templates' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'slo-sle-template': ( + slo_sle_template := ( # YANGListMember( + SloSleTemplatesMeta. + SloSleTemplate. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SloSleTemplates': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e97edc736f2f5435711ad71a78313fa2f98b446b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SloSleTemplateMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: slo-sle-template + """ + from .service_slo_sle_policy import ServiceSloSlePolicy + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: slo-sle-template + """ + + def __init__(self): + super().__init__(SloSleTemplate) + + def __get__(self, instance, owner=None) -> ( + 'SloSleTemplateMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SloSleTemplate']: + pass + + def __iter__(self, key) -> Iterator['SloSleTemplate']: + return super().__iter__() + + def __getitem__(self, key) -> 'SloSleTemplate': + return super()[key] + + def __enter__(self) -> ( + 'SloSleTemplateMeta.yang_list_descriptor'): + pass + + +class SloSleTemplate( + YANGListItem, + metaclass=SloSleTemplateMeta): + """ + YANG list item handler. + + YANG name: slo-sle-template + """ + + _yang_name: Final[str] = 'slo-sle-template' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'template-ref': ( + template_ref := YANGLeafMember( + 'template-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'template-description': ( + template_description := YANGLeafMember( + 'template-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-slo-sle-policy': ( + service_slo_sle_policy := ( # YANGContainerMember( + SloSleTemplateMeta. + ServiceSloSlePolicy. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SloSleTemplate': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6992f5bf7f3fc87ff009bcf075de2cf2cd698f12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceSloSlePolicyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-slo-sle-policy + """ + from .metric_bounds import MetricBounds + from .steering_constraints import SteeringConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-slo-sle-policy + """ + + def __init__(self): + super().__init__(ServiceSloSlePolicy) + + def __get__(self, instance, owner=None) -> ( + 'ServiceSloSlePolicyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceSloSlePolicy': + pass + + def __enter__(self) -> 'ServiceSloSlePolicy': + pass + + +class ServiceSloSlePolicy( + YANGContainer, + metaclass=ServiceSloSlePolicyMeta): + """ + YANG container handler. + + YANG name: service-slo-sle-policy + """ + + _yang_name: Final[str] = 'service-slo-sle-policy' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'mtu': ( + mtu := YANGLeafMember( + 'mtu', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'max-occupancy-level': ( + max_occupancy_level := YANGLeafMember( + 'max-occupancy-level', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'isolation': ( + isolation := YANGLeafMember( + 'isolation', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'policy-description': ( + policy_description := YANGLeafMember( + 'policy-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'metric-bounds': ( + metric_bounds := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + MetricBounds. + yang_container_descriptor())), + + 'steering-constraints': ( + steering_constraints := ( # YANGContainerMember( + ServiceSloSlePolicyMeta. + SteeringConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceSloSlePolicy': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85730b2d943861ca804a89d0a32ab69bcc27f5c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric-bounds + """ + from .metric_bound import MetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric-bounds + """ + + def __init__(self): + super().__init__(MetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MetricBounds': + pass + + def __enter__(self) -> 'MetricBounds': + pass + + +class MetricBounds( + YANGContainer, + metaclass=MetricBoundsMeta): + """ + YANG container handler. + + YANG name: metric-bounds + """ + + _yang_name: Final[str] = 'metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'metric-bound': ( + metric_bound := ( # YANGListMember( + MetricBoundsMeta. + MetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2664a9278a5332d04479df4c5026f38ec2f379d9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/metric_bounds/metric_bound/__init__.py @@ -0,0 +1,114 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: metric-bound + """ + + def __init__(self): + super().__init__(MetricBound) + + def __get__(self, instance, owner=None) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MetricBound']: + pass + + def __iter__(self, key) -> Iterator['MetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'MetricBound': + return super()[key] + + def __enter__(self) -> ( + 'MetricBoundMeta.yang_list_descriptor'): + pass + + +class MetricBound( + YANGListItem, + metaclass=MetricBoundMeta): + """ + YANG list item handler. + + YANG name: metric-bound + """ + + _yang_name: Final[str] = 'metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-unit': ( + metric_unit := YANGLeafMember( + 'metric-unit', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'value-description': ( + value_description := YANGLeafMember( + 'value-description', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + + 'bound': ( + bound := YANGLeafMember( + 'bound', + 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service', + 'ietf-network-slice-service')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e2c022caf902743b8abe798b61b8f1439d276862 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SteeringConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: steering-constraints + """ + from .service_function import ServiceFunction + from .path_constraints import PathConstraints + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: steering-constraints + """ + + def __init__(self): + super().__init__(SteeringConstraints) + + def __get__(self, instance, owner=None) -> ( + 'SteeringConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'SteeringConstraints': + pass + + def __enter__(self) -> 'SteeringConstraints': + pass + + +class SteeringConstraints( + YANGContainer, + metaclass=SteeringConstraintsMeta): + """ + YANG container handler. + + YANG name: steering-constraints + """ + + _yang_name: Final[str] = 'steering-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'service-function': ( + service_function := ( # YANGContainerMember( + SteeringConstraintsMeta. + ServiceFunction. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + SteeringConstraintsMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SteeringConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34f1d097105a51fd50e9f351f61e915352319bd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/path_constraints/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2593c301f7b0b52ce5c155c0a8672714de5dae84 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/network_slice_services/slo_sle_templates/slo_sle_template/service_slo_sle_policy/steering_constraints/service_function/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ServiceFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: service-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: service-function + """ + + def __init__(self): + super().__init__(ServiceFunction) + + def __get__(self, instance, owner=None) -> ( + 'ServiceFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ServiceFunction': + pass + + def __enter__(self) -> 'ServiceFunction': + pass + + +class ServiceFunction( + YANGContainer, + metaclass=ServiceFunctionMeta): + """ + YANG container handler. + + YANG name: service-function + """ + + _yang_name: Final[str] = 'service-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-slice-service' + _yang_module_name: Final[str] = 'ietf-network-slice-service' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ServiceFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..55faa977ba04330042964cb79ab2a3bdd8a6571c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworksMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: networks + """ + from .te import Te + from .network import Network + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: networks + """ + + def __init__(self): + super().__init__(Networks) + + def __get__(self, instance, owner=None) -> ( + 'NetworksMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Networks': + pass + + def __enter__(self) -> 'Networks': + pass + + +class Networks( + YANGContainer, + metaclass=NetworksMeta): + """ + YANG container handler. + + YANG name: networks + """ + + _yang_name: Final[str] = 'networks' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + NetworksMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'network': ( + network := ( # YANGListMember( + NetworksMeta. + Network. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Networks': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..44952bf764009ce37b74d8ab45cf20dc0e0e450e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/__init__.py @@ -0,0 +1,138 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: network + """ + from .te import Te + from .te_topology_identifier import TeTopologyIdentifier + from .network_types import NetworkTypes + from .node import Node + from .supporting_network import SupportingNetwork + from .link import Link + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: network + """ + + def __init__(self): + super().__init__(Network) + + def __get__(self, instance, owner=None) -> ( + 'NetworkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Network']: + pass + + def __iter__(self, key) -> Iterator['Network']: + return super().__iter__() + + def __getitem__(self, key) -> 'Network': + return super()[key] + + def __enter__(self) -> ( + 'NetworkMeta.yang_list_descriptor'): + pass + + +class Network( + YANGListItem, + metaclass=NetworkMeta): + """ + YANG list item handler. + + YANG name: network + """ + + _yang_name: Final[str] = 'network' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-id': ( + network_id := YANGLeafMember( + 'network-id', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + NetworkMeta. + Te. + yang_container_descriptor())), + + 'te-topology-identifier': ( + te_topology_identifier := ( # YANGContainerMember( + NetworkMeta. + TeTopologyIdentifier. + yang_container_descriptor())), + + 'network-types': ( + network_types := ( # YANGContainerMember( + NetworkMeta. + NetworkTypes. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'node': ( + node := ( # YANGListMember( + NetworkMeta. + Node. + yang_list_descriptor())), + + 'supporting-network': ( + supporting_network := ( # YANGListMember( + NetworkMeta. + SupportingNetwork. + yang_list_descriptor())), + + 'link': ( + link := ( # YANGListMember( + NetworkMeta. + Link. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Network': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3efc3e1518f16330422d43ba925ea7713a2cef25 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/__init__.py @@ -0,0 +1,124 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: link + """ + from .source import Source + from .destination import Destination + from .te import Te + from .supporting_link import SupportingLink + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: link + """ + + def __init__(self): + super().__init__(Link) + + def __get__(self, instance, owner=None) -> ( + 'LinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Link']: + pass + + def __iter__(self, key) -> Iterator['Link']: + return super().__iter__() + + def __getitem__(self, key) -> 'Link': + return super()[key] + + def __enter__(self) -> ( + 'LinkMeta.yang_list_descriptor'): + pass + + +class Link( + YANGListItem, + metaclass=LinkMeta): + """ + YANG list item handler. + + YANG name: link + """ + + _yang_name: Final[str] = 'link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'link-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-id': ( + link_id := YANGLeafMember( + 'link-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'source': ( + source := ( # YANGContainerMember( + LinkMeta. + Source. + yang_container_descriptor())), + + 'destination': ( + destination := ( # YANGContainerMember( + LinkMeta. + Destination. + yang_container_descriptor())), + + 'te': ( + te := ( # YANGContainerMember( + LinkMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'supporting-link': ( + supporting_link := ( # YANGListMember( + LinkMeta. + SupportingLink. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Link': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..387af3071c585daebb4f11cb2bc7890a37967e56 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/destination/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class DestinationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: destination + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: destination + """ + + def __init__(self): + super().__init__(Destination) + + def __get__(self, instance, owner=None) -> ( + 'DestinationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Destination': + pass + + def __enter__(self) -> 'Destination': + pass + + +class Destination( + YANGContainer, + metaclass=DestinationMeta): + """ + YANG container handler. + + YANG name: destination + """ + + _yang_name: Final[str] = 'destination' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'dest-node': ( + dest_node := YANGLeafMember( + 'dest-node', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'dest-tp': ( + dest_tp := YANGLeafMember( + 'dest-tp', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Destination': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f1ea95f113d40f596ea39edaa5d1b07273f22148 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/source/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SourceMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: source + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: source + """ + + def __init__(self): + super().__init__(Source) + + def __get__(self, instance, owner=None) -> ( + 'SourceMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Source': + pass + + def __enter__(self) -> 'Source': + pass + + +class Source( + YANGContainer, + metaclass=SourceMeta): + """ + YANG container handler. + + YANG name: source + """ + + _yang_name: Final[str] = 'source' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source-tp': ( + source_tp := YANGLeafMember( + 'source-tp', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'source-node': ( + source_node := YANGLeafMember( + 'source-node', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Source': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dc99caa282f1b3c61577107a169430654949fe3f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/supporting_link/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingLinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-link + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-link + """ + + def __init__(self): + super().__init__(SupportingLink) + + def __get__(self, instance, owner=None) -> ( + 'SupportingLinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingLink']: + pass + + def __iter__(self, key) -> Iterator['SupportingLink']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingLink': + return super()[key] + + def __enter__(self) -> ( + 'SupportingLinkMeta.yang_list_descriptor'): + pass + + +class SupportingLink( + YANGListItem, + metaclass=SupportingLinkMeta): + """ + YANG list item handler. + + YANG name: supporting-link + """ + + _yang_name: Final[str] = 'supporting-link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + 'link-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-ref': ( + link_ref := YANGLeafMember( + 'link-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingLink': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2fac1a941b3f2b45da7b78f3f4eef6cace58f3b5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/__init__.py @@ -0,0 +1,155 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .statistics import Statistics + from .te_link_attributes import TeLinkAttributes + from .underlay import Underlay + from .recovery import Recovery + from .information_source_state import InformationSourceState + from .information_source_entry import InformationSourceEntry + from .bundle_stack_level import BundleStackLevel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'is-transitional': ( + is_transitional := YANGLeafMember( + 'is-transitional', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'statistics': ( + statistics := ( # YANGContainerMember( + TeMeta. + Statistics. + yang_container_descriptor())), + + 'te-link-attributes': ( + te_link_attributes := ( # YANGContainerMember( + TeMeta. + TeLinkAttributes. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + TeMeta. + Underlay. + yang_container_descriptor())), + + 'recovery': ( + recovery := ( # YANGContainerMember( + TeMeta. + Recovery. + yang_container_descriptor())), + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + TeMeta. + InformationSourceState. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'information-source-entry': ( + information_source_entry := ( # YANGListMember( + TeMeta. + InformationSourceEntry. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + + 'bundle-stack-level': + TeMeta.BundleStackLevel( + instance), + } + return instance + + @property + def bundle_stack_level(self) -> ( + TeMeta.BundleStackLevel): + return self._yang_choices['bundle-stack-level'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..225c39aa448d3165a61a66735cb5755c9eaa4908 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundleStackLevelMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: bundle-stack-level + """ + + from .component import Component + from .bundle import Bundle + + class component_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: component + """ + + def __init__(self): + super().__init__( + BundleStackLevelMeta.Component) + + def __get__(self, instance, owner=None) -> ( + 'BundleStackLevelMeta.component_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'BundleStackLevelMeta.Component'): + pass + + def __enter__(self) -> ( + 'BundleStackLevelMeta.Component'): + pass + + class bundle_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: bundle + """ + + def __init__(self): + super().__init__( + BundleStackLevelMeta.Bundle) + + def __get__(self, instance, owner=None) -> ( + 'BundleStackLevelMeta.bundle_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'BundleStackLevelMeta.Bundle'): + pass + + def __enter__(self) -> ( + 'BundleStackLevelMeta.Bundle'): + pass + + +class BundleStackLevel(YANGChoice, metaclass=BundleStackLevelMeta): + """ + YANG choice handler. + + YANG name: bundle-stack-level + """ + + _yang_name: Final[str] = 'bundle-stack-level' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'component': ( + component := ( # YANGChoiceCase( + BundleStackLevelMeta. + component_case_descriptor())), + + 'bundle': ( + bundle := ( # YANGChoiceCase( + BundleStackLevelMeta. + bundle_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ac76501adeb07f82ad08b8084a64534cca4a163 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundleMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: bundle + """ + from .bundled_links import BundledLinks + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: bundle + """ + + def __init__(self): + super().__init__(Bundle) + + def __get__(self, instance, owner=None) -> ( + 'BundleMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Bundle': + pass + + def __enter__(self) -> 'Bundle': + pass + + +class Bundle( + YANGContainer, + metaclass=BundleMeta): + """ + YANG container handler. + + YANG name: bundle + """ + + _yang_name: Final[str] = 'bundle' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'bundled-links': ( + bundled_links := ( # YANGContainerMember( + BundleMeta. + BundledLinks. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Bundle': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fc2b9edfb5c0d0a12233c23e4b0982fc72020ae0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundledLinksMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: bundled-links + """ + from .bundled_link import BundledLink + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: bundled-links + """ + + def __init__(self): + super().__init__(BundledLinks) + + def __get__(self, instance, owner=None) -> ( + 'BundledLinksMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'BundledLinks': + pass + + def __enter__(self) -> 'BundledLinks': + pass + + +class BundledLinks( + YANGContainer, + metaclass=BundledLinksMeta): + """ + YANG container handler. + + YANG name: bundled-links + """ + + _yang_name: Final[str] = 'bundled-links' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'bundled-link': ( + bundled_link := ( # YANGListMember( + BundledLinksMeta. + BundledLink. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BundledLinks': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b10b2d452b813e8821571384ff36553830cea9b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/bundle/bundled_links/bundled_link/__init__.py @@ -0,0 +1,108 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BundledLinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: bundled-link + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: bundled-link + """ + + def __init__(self): + super().__init__(BundledLink) + + def __get__(self, instance, owner=None) -> ( + 'BundledLinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BundledLink']: + pass + + def __iter__(self, key) -> Iterator['BundledLink']: + return super().__iter__() + + def __getitem__(self, key) -> 'BundledLink': + return super()[key] + + def __enter__(self) -> ( + 'BundledLinkMeta.yang_list_descriptor'): + pass + + +class BundledLink( + YANGListItem, + metaclass=BundledLinkMeta): + """ + YANG list item handler. + + YANG name: bundled-link + """ + + _yang_name: Final[str] = 'bundled-link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sequence', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sequence': ( + sequence := YANGLeafMember( + 'sequence', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'src-tp-ref': ( + src_tp_ref := YANGLeafMember( + 'src-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'des-tp-ref': ( + des_tp_ref := YANGLeafMember( + 'des-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BundledLink': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8cd4a23746aa284e47784cb4fccdf7278ebce34 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ComponentMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: component + """ + from .component_links import ComponentLinks + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: component + """ + + def __init__(self): + super().__init__(Component) + + def __get__(self, instance, owner=None) -> ( + 'ComponentMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Component': + pass + + def __enter__(self) -> 'Component': + pass + + +class Component( + YANGContainer, + metaclass=ComponentMeta): + """ + YANG container handler. + + YANG name: component + """ + + _yang_name: Final[str] = 'component' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'component-links': ( + component_links := ( # YANGContainerMember( + ComponentMeta. + ComponentLinks. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Component': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2dea8fc98c2766683324fb1271d8adb121b4dea8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ComponentLinksMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: component-links + """ + from .component_link import ComponentLink + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: component-links + """ + + def __init__(self): + super().__init__(ComponentLinks) + + def __get__(self, instance, owner=None) -> ( + 'ComponentLinksMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ComponentLinks': + pass + + def __enter__(self) -> 'ComponentLinks': + pass + + +class ComponentLinks( + YANGContainer, + metaclass=ComponentLinksMeta): + """ + YANG container handler. + + YANG name: component-links + """ + + _yang_name: Final[str] = 'component-links' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'component-link': ( + component_link := ( # YANGListMember( + ComponentLinksMeta. + ComponentLink. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ComponentLinks': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6195320b1b05440e98cb09c672a9286f7ac08017 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/bundle_stack_level/component/component_links/component_link/__init__.py @@ -0,0 +1,108 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ComponentLinkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: component-link + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: component-link + """ + + def __init__(self): + super().__init__(ComponentLink) + + def __get__(self, instance, owner=None) -> ( + 'ComponentLinkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ComponentLink']: + pass + + def __iter__(self, key) -> Iterator['ComponentLink']: + return super().__iter__() + + def __getitem__(self, key) -> 'ComponentLink': + return super()[key] + + def __enter__(self) -> ( + 'ComponentLinkMeta.yang_list_descriptor'): + pass + + +class ComponentLink( + YANGListItem, + metaclass=ComponentLinkMeta): + """ + YANG list item handler. + + YANG name: component-link + """ + + _yang_name: Final[str] = 'component-link' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'sequence', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'src-interface-ref': ( + src_interface_ref := YANGLeafMember( + 'src-interface-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sequence': ( + sequence := YANGLeafMember( + 'sequence', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'des-interface-ref': ( + des_interface_ref := YANGLeafMember( + 'des-interface-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ComponentLink': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aacb98f85b2ac241f3599daa93b27fc0f520c8ff --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/__init__.py @@ -0,0 +1,195 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceEntryMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: information-source-entry + """ + from .max_link_bandwidth import MaxLinkBandwidth + from .label_restrictions import LabelRestrictions + from .information_source_state import InformationSourceState + from .max_resv_link_bandwidth import MaxResvLinkBandwidth + from .te_srlgs import TeSrlgs + from .te_nsrlgs import TeNsrlgs + from .interface_switching_capability import InterfaceSwitchingCapability + from .unreserved_bandwidth import UnreservedBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: information-source-entry + """ + + def __init__(self): + super().__init__(InformationSourceEntry) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InformationSourceEntry']: + pass + + def __iter__(self, key) -> Iterator['InformationSourceEntry']: + return super().__iter__() + + def __getitem__(self, key) -> 'InformationSourceEntry': + return super()[key] + + def __enter__(self) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + pass + + +class InformationSourceEntry( + YANGListItem, + metaclass=InformationSourceEntryMeta): + """ + YANG list item handler. + + YANG name: information-source-entry + """ + + _yang_name: Final[str] = 'information-source-entry' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'information-source', + 'information-source-instance', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-igp-metric': ( + te_igp_metric := YANGLeafMember( + 'te-igp-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-default-metric': ( + te_default_metric := YANGLeafMember( + 'te-default-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-delay-metric': ( + te_delay_metric := YANGLeafMember( + 'te-delay-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-index': ( + link_index := YANGLeafMember( + 'link-index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection-type': ( + link_protection_type := YANGLeafMember( + 'link-protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'administrative-group': ( + administrative_group := YANGLeafMember( + 'administrative-group', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'max-link-bandwidth': ( + max_link_bandwidth := ( # YANGContainerMember( + InformationSourceEntryMeta. + MaxLinkBandwidth. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + InformationSourceEntryMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + InformationSourceEntryMeta. + InformationSourceState. + yang_container_descriptor())), + + 'max-resv-link-bandwidth': ( + max_resv_link_bandwidth := ( # YANGContainerMember( + InformationSourceEntryMeta. + MaxResvLinkBandwidth. + yang_container_descriptor())), + + 'te-srlgs': ( + te_srlgs := ( # YANGContainerMember( + InformationSourceEntryMeta. + TeSrlgs. + yang_container_descriptor())), + + 'te-nsrlgs': ( + te_nsrlgs := ( # YANGContainerMember( + InformationSourceEntryMeta. + TeNsrlgs. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + InformationSourceEntryMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + + 'unreserved-bandwidth': ( + unreserved_bandwidth := ( # YANGListMember( + InformationSourceEntryMeta. + UnreservedBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceEntry': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26d315f6a43287274e5b410c83c64a950c07014d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63598ce3305f3b8b540d2d10d31cf66604ea175c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-ref': ( + link_ref := YANGLeafMember( + 'link-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42361e143910d3dc4963a100c961f548c4740f4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1f85292e3a5a398b30f523c488c31588fc79925c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_step import LabelStep + from .label_end import LabelEnd + from .label_start import LabelStart + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxLinkBandwidth': + pass + + def __enter__(self) -> 'MaxLinkBandwidth': + pass + + +class MaxLinkBandwidth( + YANGContainer, + metaclass=MaxLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-link-bandwidth + """ + + _yang_name: Final[str] = 'max-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e8cf6bf3d3ec018101b740c97d4721224527f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxResvLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-resv-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxResvLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxResvLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxResvLinkBandwidth': + pass + + def __enter__(self) -> 'MaxResvLinkBandwidth': + pass + + +class MaxResvLinkBandwidth( + YANGContainer, + metaclass=MaxResvLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + + _yang_name: Final[str] = 'max-resv-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxResvLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxResvLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e97fc164047e8b36086ca3700f75d61848220c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_nsrlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNsrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-nsrlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-nsrlgs + """ + + def __init__(self): + super().__init__(TeNsrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeNsrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNsrlgs': + pass + + def __enter__(self) -> 'TeNsrlgs': + pass + + +class TeNsrlgs( + YANGContainer, + metaclass=TeNsrlgsMeta): + """ + YANG container handler. + + YANG name: te-nsrlgs + """ + + _yang_name: Final[str] = 'te-nsrlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNsrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..561b31be827190ecd2cf49c88adb2118e8018b00 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/te_srlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeSrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-srlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-srlgs + """ + + def __init__(self): + super().__init__(TeSrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeSrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeSrlgs': + pass + + def __enter__(self) -> 'TeSrlgs': + pass + + +class TeSrlgs( + YANGContainer, + metaclass=TeSrlgsMeta): + """ + YANG container handler. + + YANG name: te-srlgs + """ + + _yang_name: Final[str] = 'te-srlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeSrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd4e9d8a913ee8fb4ba711c3d10310583ea16711 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnreservedBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: unreserved-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: unreserved-bandwidth + """ + + def __init__(self): + super().__init__(UnreservedBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['UnreservedBandwidth']: + pass + + def __iter__(self, key) -> Iterator['UnreservedBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'UnreservedBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + pass + + +class UnreservedBandwidth( + YANGListItem, + metaclass=UnreservedBandwidthMeta): + """ + YANG list item handler. + + YANG name: unreserved-bandwidth + """ + + _yang_name: Final[str] = 'unreserved-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + UnreservedBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnreservedBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_entry/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..91fd095ce45cdfe4669215874ed2aeabfc57b835 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63598ce3305f3b8b540d2d10d31cf66604ea175c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-ref': ( + link_ref := YANGLeafMember( + 'link-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ecaf0b0c27bf56b948e42a76356e755c71ebf360 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/recovery/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RecoveryMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: recovery + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: recovery + """ + + def __init__(self): + super().__init__(Recovery) + + def __get__(self, instance, owner=None) -> ( + 'RecoveryMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Recovery': + pass + + def __enter__(self) -> 'Recovery': + pass + + +class Recovery( + YANGContainer, + metaclass=RecoveryMeta): + """ + YANG container handler. + + YANG name: recovery + """ + + _yang_name: Final[str] = 'recovery' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'restoration-status': ( + restoration_status := YANGLeafMember( + 'restoration-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-status': ( + protection_status := YANGLeafMember( + 'protection-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Recovery': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08e82ba9e2412515916a0d1c4aeb8cb819cf7ba8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/statistics/__init__.py @@ -0,0 +1,187 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatisticsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: statistics + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: statistics + """ + + def __init__(self): + super().__init__(Statistics) + + def __get__(self, instance, owner=None) -> ( + 'StatisticsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Statistics': + pass + + def __enter__(self) -> 'Statistics': + pass + + +class Statistics( + YANGContainer, + metaclass=StatisticsMeta): + """ + YANG container handler. + + YANG name: statistics + """ + + _yang_name: Final[str] = 'statistics' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'fault-detects': ( + fault_detects := YANGLeafMember( + 'fault-detects', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-failures': ( + restoration_failures := YANGLeafMember( + 'restoration-failures', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-switches': ( + protection_switches := YANGLeafMember( + 'protection-switches', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'downs': ( + downs := YANGLeafMember( + 'downs', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-successes': ( + restoration_successes := YANGLeafMember( + 'restoration-successes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-reversion-starts': ( + restoration_reversion_starts := YANGLeafMember( + 'restoration-reversion-starts', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-clears': ( + maintenance_clears := YANGLeafMember( + 'maintenance-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-reverts': ( + protection_reverts := YANGLeafMember( + 'protection-reverts', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-reversion-successes': ( + restoration_reversion_successes := YANGLeafMember( + 'restoration-reversion-successes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'ups': ( + ups := YANGLeafMember( + 'ups', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-starts': ( + restoration_starts := YANGLeafMember( + 'restoration-starts', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'discontinuity-time': ( + discontinuity_time := YANGLeafMember( + 'discontinuity-time', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'fault-clears': ( + fault_clears := YANGLeafMember( + 'fault-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-sets': ( + maintenance_sets := YANGLeafMember( + 'maintenance-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restoration-reversion-failures': ( + restoration_reversion_failures := YANGLeafMember( + 'restoration-reversion-failures', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Statistics': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..706a755fae50b2e463f93632ba44e2dafcf21661 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/__init__.py @@ -0,0 +1,202 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLinkAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-link-attributes + """ + from .max_resv_link_bandwidth import MaxResvLinkBandwidth + from .max_link_bandwidth import MaxLinkBandwidth + from .underlay import Underlay + from .te_srlgs import TeSrlgs + from .label_restrictions import LabelRestrictions + from .external_domain import ExternalDomain + from .te_nsrlgs import TeNsrlgs + from .unreserved_bandwidth import UnreservedBandwidth + from .interface_switching_capability import InterfaceSwitchingCapability + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-link-attributes + """ + + def __init__(self): + super().__init__(TeLinkAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeLinkAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLinkAttributes': + pass + + def __enter__(self) -> 'TeLinkAttributes': + pass + + +class TeLinkAttributes( + YANGContainer, + metaclass=TeLinkAttributesMeta): + """ + YANG container handler. + + YANG name: te-link-attributes + """ + + _yang_name: Final[str] = 'te-link-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-index': ( + link_index := YANGLeafMember( + 'link-index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-default-metric': ( + te_default_metric := YANGLeafMember( + 'te-default-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection-type': ( + link_protection_type := YANGLeafMember( + 'link-protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-igp-metric': ( + te_igp_metric := YANGLeafMember( + 'te-igp-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'access-type': ( + access_type := YANGLeafMember( + 'access-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-delay-metric': ( + te_delay_metric := YANGLeafMember( + 'te-delay-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'administrative-group': ( + administrative_group := YANGLeafMember( + 'administrative-group', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'max-resv-link-bandwidth': ( + max_resv_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxResvLinkBandwidth. + yang_container_descriptor())), + + 'max-link-bandwidth': ( + max_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxLinkBandwidth. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + TeLinkAttributesMeta. + Underlay. + yang_container_descriptor())), + + 'te-srlgs': ( + te_srlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeSrlgs. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + TeLinkAttributesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'external-domain': ( + external_domain := ( # YANGContainerMember( + TeLinkAttributesMeta. + ExternalDomain. + yang_container_descriptor())), + + 'te-nsrlgs': ( + te_nsrlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeNsrlgs. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'unreserved-bandwidth': ( + unreserved_bandwidth := ( # YANGListMember( + TeLinkAttributesMeta. + UnreservedBandwidth. + yang_list_descriptor())), + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + TeLinkAttributesMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLinkAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..58a1d9d4dcf0f87fa40fddfc379b3245219a8ef0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/external_domain/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExternalDomainMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: external-domain + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: external-domain + """ + + def __init__(self): + super().__init__(ExternalDomain) + + def __get__(self, instance, owner=None) -> ( + 'ExternalDomainMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExternalDomain': + pass + + def __enter__(self) -> 'ExternalDomain': + pass + + +class ExternalDomain( + YANGContainer, + metaclass=ExternalDomainMeta): + """ + YANG container handler. + + YANG name: external-domain + """ + + _yang_name: Final[str] = 'external-domain' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'remote-te-node-id': ( + remote_te_node_id := YANGLeafMember( + 'remote-te-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'remote-te-link-tp-id': ( + remote_te_link_tp_id := YANGLeafMember( + 'remote-te-link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExternalDomain': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42361e143910d3dc4963a100c961f548c4740f4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4a396a20af1746df44dc4e4f479436fde2d35e17 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_step import LabelStep + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxLinkBandwidth': + pass + + def __enter__(self) -> 'MaxLinkBandwidth': + pass + + +class MaxLinkBandwidth( + YANGContainer, + metaclass=MaxLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-link-bandwidth + """ + + _yang_name: Final[str] = 'max-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e8cf6bf3d3ec018101b740c97d4721224527f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxResvLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-resv-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxResvLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxResvLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxResvLinkBandwidth': + pass + + def __enter__(self) -> 'MaxResvLinkBandwidth': + pass + + +class MaxResvLinkBandwidth( + YANGContainer, + metaclass=MaxResvLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + + _yang_name: Final[str] = 'max-resv-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxResvLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxResvLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e97fc164047e8b36086ca3700f75d61848220c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_nsrlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNsrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-nsrlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-nsrlgs + """ + + def __init__(self): + super().__init__(TeNsrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeNsrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNsrlgs': + pass + + def __enter__(self) -> 'TeNsrlgs': + pass + + +class TeNsrlgs( + YANGContainer, + metaclass=TeNsrlgsMeta): + """ + YANG container handler. + + YANG name: te-nsrlgs + """ + + _yang_name: Final[str] = 'te-nsrlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNsrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..561b31be827190ecd2cf49c88adb2118e8018b00 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/te_srlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeSrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-srlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-srlgs + """ + + def __init__(self): + super().__init__(TeSrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeSrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeSrlgs': + pass + + def __enter__(self) -> 'TeSrlgs': + pass + + +class TeSrlgs( + YANGContainer, + metaclass=TeSrlgsMeta): + """ + YANG container handler. + + YANG name: te-srlgs + """ + + _yang_name: Final[str] = 'te-srlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeSrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee438314ebe12c55dba835cf5f6839760a31c61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95deb32ec877a103436ef7b54fd1a23501216fab --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..652da89e61bd32067e97591a11a2970e965bed4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6792cd8e4b1e1a843abf183eea400e13dbb78be --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .label import Label + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2aa767b55c350d6b4b7ec04998c04f5fa568d051 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd4e9d8a913ee8fb4ba711c3d10310583ea16711 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnreservedBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: unreserved-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: unreserved-bandwidth + """ + + def __init__(self): + super().__init__(UnreservedBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['UnreservedBandwidth']: + pass + + def __iter__(self, key) -> Iterator['UnreservedBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'UnreservedBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + pass + + +class UnreservedBandwidth( + YANGListItem, + metaclass=UnreservedBandwidthMeta): + """ + YANG list item handler. + + YANG name: unreserved-bandwidth + """ + + _yang_name: Final[str] = 'unreserved-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + UnreservedBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnreservedBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ea01121d057b002c61d31fe6f49e50049c04b952 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/link/te/underlay/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'dynamic': ( + dynamic := YANGLeafMember( + 'dynamic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'committed': ( + committed := YANGLeafMember( + 'committed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0fb174b74c14bff912498e9c690c949d93d2b76b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NetworkTypesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: network-types + """ + from .te_topology import TeTopology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: network-types + """ + + def __init__(self): + super().__init__(NetworkTypes) + + def __get__(self, instance, owner=None) -> ( + 'NetworkTypesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NetworkTypes': + pass + + def __enter__(self) -> 'NetworkTypes': + pass + + +class NetworkTypes( + YANGContainer, + metaclass=NetworkTypesMeta): + """ + YANG container handler. + + YANG name: network-types + """ + + _yang_name: Final[str] = 'network-types' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-topology': ( + te_topology := ( # YANGContainerMember( + NetworkTypesMeta. + TeTopology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NetworkTypes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d41731af61cc5a91e1178ed27ff7a5634149f15 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/network_types/te_topology/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-topology + """ + + def __init__(self): + super().__init__(TeTopology) + + def __get__(self, instance, owner=None) -> ( + 'TeTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeTopology': + pass + + def __enter__(self) -> 'TeTopology': + pass + + +class TeTopology( + YANGContainer, + metaclass=TeTopologyMeta): + """ + YANG container handler. + + YANG name: te-topology + """ + + _yang_name: Final[str] = 'te-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c6a31d9a0e3b49286b2df219900fc10df3c39c56 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/__init__.py @@ -0,0 +1,123 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NodeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: node + """ + from .te import Te + from .termination_point import TerminationPoint + from .supporting_node import SupportingNode + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: node + """ + + def __init__(self): + super().__init__(Node) + + def __get__(self, instance, owner=None) -> ( + 'NodeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Node']: + pass + + def __iter__(self, key) -> Iterator['Node']: + return super().__iter__() + + def __getitem__(self, key) -> 'Node': + return super()[key] + + def __enter__(self) -> ( + 'NodeMeta.yang_list_descriptor'): + pass + + +class Node( + YANGListItem, + metaclass=NodeMeta): + """ + YANG list item handler. + + YANG name: node + """ + + _yang_name: Final[str] = 'node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'node-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'te-node-id': ( + te_node_id := YANGLeafMember( + 'te-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + NodeMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'termination-point': ( + termination_point := ( # YANGListMember( + NodeMeta. + TerminationPoint. + yang_list_descriptor())), + + 'supporting-node': ( + supporting_node := ( # YANGListMember( + NodeMeta. + SupportingNode. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Node': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..abeb4a984b9b0c939ae51217ac7144f568841550 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/supporting_node/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingNodeMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-node + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-node + """ + + def __init__(self): + super().__init__(SupportingNode) + + def __get__(self, instance, owner=None) -> ( + 'SupportingNodeMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingNode']: + pass + + def __iter__(self, key) -> Iterator['SupportingNode']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingNode': + return super()[key] + + def __enter__(self) -> ( + 'SupportingNodeMeta.yang_list_descriptor'): + pass + + +class SupportingNode( + YANGListItem, + metaclass=SupportingNodeMeta): + """ + YANG list item handler. + + YANG name: supporting-node + """ + + _yang_name: Final[str] = 'supporting-node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + 'node-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingNode': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ad66ed994421c34ac0e36ef0189e6f5a21b646f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/__init__.py @@ -0,0 +1,145 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .statistics import Statistics + from .geolocation import Geolocation + from .te_node_attributes import TeNodeAttributes + from .information_source_state import InformationSourceState + from .tunnel_termination_point import TunnelTerminationPoint + from .information_source_entry import InformationSourceEntry + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-multi-access-dr': ( + is_multi_access_dr := YANGLeafMember( + 'is-multi-access-dr', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'statistics': ( + statistics := ( # YANGContainerMember( + TeMeta. + Statistics. + yang_container_descriptor())), + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TeMeta. + Geolocation. + yang_container_descriptor())), + + 'te-node-attributes': ( + te_node_attributes := ( # YANGContainerMember( + TeMeta. + TeNodeAttributes. + yang_container_descriptor())), + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + TeMeta. + InformationSourceState. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel-termination-point': ( + tunnel_termination_point := ( # YANGListMember( + TeMeta. + TunnelTerminationPoint. + yang_list_descriptor())), + + 'information-source-entry': ( + information_source_entry := ( # YANGListMember( + TeMeta. + InformationSourceEntry. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a631c3553d9ab5ce7b22b799dbf338a0f87fa43 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21bfe84df044875786766febf0915d7c70737106 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/__init__.py @@ -0,0 +1,142 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceEntryMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: information-source-entry + """ + from .information_source_state import InformationSourceState + from .underlay_topology import UnderlayTopology + from .connectivity_matrices import ConnectivityMatrices + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: information-source-entry + """ + + def __init__(self): + super().__init__(InformationSourceEntry) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InformationSourceEntry']: + pass + + def __iter__(self, key) -> Iterator['InformationSourceEntry']: + return super().__iter__() + + def __getitem__(self, key) -> 'InformationSourceEntry': + return super()[key] + + def __enter__(self) -> ( + 'InformationSourceEntryMeta.yang_list_descriptor'): + pass + + +class InformationSourceEntry( + YANGListItem, + metaclass=InformationSourceEntryMeta): + """ + YANG list item handler. + + YANG name: information-source-entry + """ + + _yang_name: Final[str] = 'information-source-entry' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'information-source', + 'information-source-instance', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'information-source': ( + information_source := YANGLeafMember( + 'information-source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'domain-id': ( + domain_id := YANGLeafMember( + 'domain-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'information-source-instance': ( + information_source_instance := YANGLeafMember( + 'information-source-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'information-source-state': ( + information_source_state := ( # YANGContainerMember( + InformationSourceEntryMeta. + InformationSourceState. + yang_container_descriptor())), + + 'underlay-topology': ( + underlay_topology := ( # YANGContainerMember( + InformationSourceEntryMeta. + UnderlayTopology. + yang_container_descriptor())), + + 'connectivity-matrices': ( + connectivity_matrices := ( # YANGContainerMember( + InformationSourceEntryMeta. + ConnectivityMatrices. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceEntry': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..08c000d9b26dfa8e9c926a9ef5705a9e9fa0fa31 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatricesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-matrices + """ + from .path_properties import PathProperties + from .path_constraints import PathConstraints + from .optimizations import Optimizations + from .underlay import Underlay + from .label_restrictions import LabelRestrictions + from .connectivity_matrix import ConnectivityMatrix + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-matrices + """ + + def __init__(self): + super().__init__(ConnectivityMatrices) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatricesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityMatrices': + pass + + def __enter__(self) -> 'ConnectivityMatrices': + pass + + +class ConnectivityMatrices( + YANGContainer, + metaclass=ConnectivityMatricesMeta): + """ + YANG container handler. + + YANG name: connectivity-matrices + """ + + _yang_name: Final[str] = 'connectivity-matrices' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'number-of-entries': ( + number_of_entries := YANGLeafMember( + 'number-of-entries', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathProperties. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathConstraints. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Optimizations. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Underlay. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ConnectivityMatricesMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connectivity-matrix': ( + connectivity_matrix := ( # YANGListMember( + ConnectivityMatricesMeta. + ConnectivityMatrix. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrices': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bc57f620463762241042a9afbb5d5fa46368dc55 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/__init__.py @@ -0,0 +1,144 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatrixMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connectivity-matrix + """ + from .to import To + from .underlay import Underlay + from .path_properties import PathProperties + from .optimizations import Optimizations + from .from import From + from .path_constraints import PathConstraints + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connectivity-matrix + """ + + def __init__(self): + super().__init__(ConnectivityMatrix) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectivityMatrix']: + pass + + def __iter__(self, key) -> Iterator['ConnectivityMatrix']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectivityMatrix': + return super()[key] + + def __enter__(self) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + pass + + +class ConnectivityMatrix( + YANGListItem, + metaclass=ConnectivityMatrixMeta): + """ + YANG list item handler. + + YANG name: connectivity-matrix + """ + + _yang_name: Final[str] = 'connectivity-matrix' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'to': ( + to := ( # YANGContainerMember( + ConnectivityMatrixMeta. + To. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Underlay. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathProperties. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Optimizations. + yang_container_descriptor())), + + 'from': ( + from := ( # YANGContainerMember( + ConnectivityMatrixMeta. + From. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrix': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14cbae7304f9e1b80e18a1547974269f00b66621 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class FromMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: from + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: from + """ + + def __init__(self): + super().__init__(From) + + def __get__(self, instance, owner=None) -> ( + 'FromMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'From': + pass + + def __enter__(self) -> 'From': + pass + + +class From( + YANGContainer, + metaclass=FromMeta): + """ + YANG container handler. + + YANG name: from + """ + + _yang_name: Final[str] = 'from' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + FromMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'From': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..86c3a10ff67557b730c7883f68f60a5220014139 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_step import LabelStep + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .objective_function import ObjectiveFunction + from .metric import Metric + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0b3f85a0993ca8184c4cec6a891f373b0666767 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e00223044020f31fddaff4d0a41e5b5c2c7181bc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .srlg import Srlg + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2aa767b55c350d6b4b7ec04998c04f5fa568d051 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..99085dad5868ea8d4f63c188ccd69653b0d7a1d4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .label import Label + from .as_number import AsNumber + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2aa767b55c350d6b4b7ec04998c04f5fa568d051 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b473367cc49ea6b9b116af98e3d25cf058f70ffc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .te_bandwidth import TeBandwidth + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinity_names import PathAffinityNames + from .path_metric_bounds import PathMetricBounds + from .path_affinities_values import PathAffinitiesValues + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..76541b227cefa1dca289ff8b4cc6350032acc02f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_route_objects import PathRouteObjects + from .path_srlgs_names import PathSrlgsNames + from .path_srlgs_lists import PathSrlgsLists + from .path_affinities_values import PathAffinitiesValues + from .path_affinity_names import PathAffinityNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ae074074e7913854992f9bd32a8f51f6b9d7b7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8bc2d82e13718733c4ed76acde67b8508071d571 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a6876e61b9d99b8ed5b00bc13f60857e8fb3d76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d03118f5c94e3726341c4332447847c61623d616 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ToMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: to + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: to + """ + + def __init__(self): + super().__init__(To) + + def __get__(self, instance, owner=None) -> ( + 'ToMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'To': + pass + + def __enter__(self) -> 'To': + pass + + +class To( + YANGContainer, + metaclass=ToMeta): + """ + YANG container handler. + + YANG name: to + """ + + _yang_name: Final[str] = 'to' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ToMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'To': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..61cb67d4bdc9682e1228c9cb9ddfb86817c96f62 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2feb9b8f1d3512055ea66c91d1dfc9059e8cf901 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnels import Tunnels + from .tunnel_termination_points import TunnelTerminationPoints + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee438314ebe12c55dba835cf5f6839760a31c61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..077e86df002f4bbdf6f8b1a9767746e1493b8fc4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..00c674167360cd2724dd7263e34c54dbb27dbccb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a2076e54c3ca2f4e75844db6a7ca736e6a1cc6ce --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e568286bdabfa9cd970ff66b3e9b6a807b0f31f3 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..32c30d13361c09cf5f2a51b8e1e645103a430a6a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_step import LabelStep + from .label_start import LabelStart + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82c7bf9c5ec990484589d660738ffe3d2d9f6bf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .metric import Metric + from .objective_function import ObjectiveFunction + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bad2331fc0f109b98bda93287a822244302b5d1e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8411b9056a87031a8a5453bd7ef0d46324215a2f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .srlg import Srlg + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8837ea16f120b8d9f40ee5099f46294b6ab79579 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..70317d31c9d8ee9d772e58c135569168cf8843f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .label import Label + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aa5135a1afed60270d2606ad4c7ad19b66f70d7c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b600b1aeaf464f293a697c09c163096f730379f2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .te_bandwidth import TeBandwidth + from .path_metric_bounds import PathMetricBounds + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_srlgs_names import PathSrlgsNames + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e72a44fd364b7d9238cef98eba888090a23f76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..149786798cff216d2d5c3159b457969263950a72 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_affinities_values import PathAffinitiesValues + from .path_route_objects import PathRouteObjects + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_srlgs_names import PathSrlgsNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7645abedd4d25aeb9c77aa579c2972a450d00a6e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..535505eea9d601de2d3ee70ab7061cbcf2e35bc8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0f8e113b567402f37aecdf644dae003b86cc8bb4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac722c47add5d381fef94d2c3a2f5750b49a2688 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .tunnels import Tunnels + from .tunnel_termination_points import TunnelTerminationPoints + from .primary_path import PrimaryPath + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..eee438314ebe12c55dba835cf5f6839760a31c61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3762dccee93d6c5fc548fea761a80e03cd0398d6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..00c674167360cd2724dd7263e34c54dbb27dbccb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1ab68ff674ea58adde5a644c74609928fe6f874 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .label import Label + from .numbered_link_hop import NumberedLinkHop + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c909481cb8745c1895e9d6bcb7fb53fa10296f40 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d36aa35acd17db473e177b143afdec573f0b4927 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26d315f6a43287274e5b410c83c64a950c07014d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e09ccdff8c5f951521b350308c3922079bad836 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42dee7a72fe4a5d79128cf6ad278af68094e6692 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_entry/underlay_topology/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay-topology + """ + + def __init__(self): + super().__init__(UnderlayTopology) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnderlayTopology': + pass + + def __enter__(self) -> 'UnderlayTopology': + pass + + +class UnderlayTopology( + YANGContainer, + metaclass=UnderlayTopologyMeta): + """ + YANG container handler. + + YANG name: underlay-topology + """ + + _yang_name: Final[str] = 'underlay-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnderlayTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6d2edeb71cbf031bc1516862b7175c9ed004e9a0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/__init__.py @@ -0,0 +1,104 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InformationSourceStateMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: information-source-state + """ + from .topology import Topology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: information-source-state + """ + + def __init__(self): + super().__init__(InformationSourceState) + + def __get__(self, instance, owner=None) -> ( + 'InformationSourceStateMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'InformationSourceState': + pass + + def __enter__(self) -> 'InformationSourceState': + pass + + +class InformationSourceState( + YANGContainer, + metaclass=InformationSourceStateMeta): + """ + YANG container handler. + + YANG name: information-source-state + """ + + _yang_name: Final[str] = 'information-source-state' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'logical-network-element': ( + logical_network_element := YANGLeafMember( + 'logical-network-element', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'credibility-preference': ( + credibility_preference := YANGLeafMember( + 'credibility-preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-instance': ( + network_instance := YANGLeafMember( + 'network-instance', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'topology': ( + topology := ( # YANGContainerMember( + InformationSourceStateMeta. + Topology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InformationSourceState': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e09ccdff8c5f951521b350308c3922079bad836 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/information_source_state/topology/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: topology + """ + + def __init__(self): + super().__init__(Topology) + + def __get__(self, instance, owner=None) -> ( + 'TopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Topology': + pass + + def __enter__(self) -> 'Topology': + pass + + +class Topology( + YANGContainer, + metaclass=TopologyMeta): + """ + YANG container handler. + + YANG name: topology + """ + + _yang_name: Final[str] = 'topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Topology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5c42b5a651c746140109908a98c5d411f7b354b4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/__init__.py @@ -0,0 +1,99 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatisticsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: statistics + """ + from .node import Node + from .connectivity_matrix_entry import ConnectivityMatrixEntry + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: statistics + """ + + def __init__(self): + super().__init__(Statistics) + + def __get__(self, instance, owner=None) -> ( + 'StatisticsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Statistics': + pass + + def __enter__(self) -> 'Statistics': + pass + + +class Statistics( + YANGContainer, + metaclass=StatisticsMeta): + """ + YANG container handler. + + YANG name: statistics + """ + + _yang_name: Final[str] = 'statistics' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'discontinuity-time': ( + discontinuity_time := YANGLeafMember( + 'discontinuity-time', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'node': ( + node := ( # YANGContainerMember( + StatisticsMeta. + Node. + yang_container_descriptor())), + + 'connectivity-matrix-entry': ( + connectivity_matrix_entry := ( # YANGContainerMember( + StatisticsMeta. + ConnectivityMatrixEntry. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Statistics': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7ae31f705e9a8fa0e6bb6614787e440ad5d86410 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/connectivity_matrix_entry/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatrixEntryMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-matrix-entry + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-matrix-entry + """ + + def __init__(self): + super().__init__(ConnectivityMatrixEntry) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatrixEntryMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityMatrixEntry': + pass + + def __enter__(self) -> 'ConnectivityMatrixEntry': + pass + + +class ConnectivityMatrixEntry( + YANGContainer, + metaclass=ConnectivityMatrixEntryMeta): + """ + YANG container handler. + + YANG name: connectivity-matrix-entry + """ + + _yang_name: Final[str] = 'connectivity-matrix-entry' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'creates': ( + creates := YANGLeafMember( + 'creates', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'deletes': ( + deletes := YANGLeafMember( + 'deletes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrixEntry': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c56ab2444397767e1a021bf9158d0f3ccad1a088 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/statistics/node/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NodeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: node + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: node + """ + + def __init__(self): + super().__init__(Node) + + def __get__(self, instance, owner=None) -> ( + 'NodeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Node': + pass + + def __enter__(self) -> 'Node': + pass + + +class Node( + YANGContainer, + metaclass=NodeMeta): + """ + YANG container handler. + + YANG name: node + """ + + _yang_name: Final[str] = 'node' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-clears': ( + maintenance_clears := YANGLeafMember( + 'maintenance-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-sets': ( + maintenance_sets := YANGLeafMember( + 'maintenance-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Node': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d34072811b1c72f6894141790ae68180723d5b09 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNodeAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-node-attributes + """ + from .connectivity_matrices import ConnectivityMatrices + from .underlay_topology import UnderlayTopology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-node-attributes + """ + + def __init__(self): + super().__init__(TeNodeAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeNodeAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNodeAttributes': + pass + + def __enter__(self) -> 'TeNodeAttributes': + pass + + +class TeNodeAttributes( + YANGContainer, + metaclass=TeNodeAttributesMeta): + """ + YANG container handler. + + YANG name: te-node-attributes + """ + + _yang_name: Final[str] = 'te-node-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'domain-id': ( + domain_id := YANGLeafMember( + 'domain-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'connectivity-matrices': ( + connectivity_matrices := ( # YANGContainerMember( + TeNodeAttributesMeta. + ConnectivityMatrices. + yang_container_descriptor())), + + 'underlay-topology': ( + underlay_topology := ( # YANGContainerMember( + TeNodeAttributesMeta. + UnderlayTopology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNodeAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b6cae8709d65455d297c24861f6fd52badff4745 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatricesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: connectivity-matrices + """ + from .label_restrictions import LabelRestrictions + from .optimizations import Optimizations + from .underlay import Underlay + from .path_properties import PathProperties + from .path_constraints import PathConstraints + from .connectivity_matrix import ConnectivityMatrix + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: connectivity-matrices + """ + + def __init__(self): + super().__init__(ConnectivityMatrices) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatricesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ConnectivityMatrices': + pass + + def __enter__(self) -> 'ConnectivityMatrices': + pass + + +class ConnectivityMatrices( + YANGContainer, + metaclass=ConnectivityMatricesMeta): + """ + YANG container handler. + + YANG name: connectivity-matrices + """ + + _yang_name: Final[str] = 'connectivity-matrices' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'number-of-entries': ( + number_of_entries := YANGLeafMember( + 'number-of-entries', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ConnectivityMatricesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Optimizations. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatricesMeta. + Underlay. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathProperties. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatricesMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'connectivity-matrix': ( + connectivity_matrix := ( # YANGListMember( + ConnectivityMatricesMeta. + ConnectivityMatrix. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrices': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..caf8d26a9e2be21ed0d3b862f36049fb6a191df9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/__init__.py @@ -0,0 +1,144 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ConnectivityMatrixMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: connectivity-matrix + """ + from .to import To + from .path_properties import PathProperties + from .underlay import Underlay + from .path_constraints import PathConstraints + from .from import From + from .optimizations import Optimizations + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: connectivity-matrix + """ + + def __init__(self): + super().__init__(ConnectivityMatrix) + + def __get__(self, instance, owner=None) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['ConnectivityMatrix']: + pass + + def __iter__(self, key) -> Iterator['ConnectivityMatrix']: + return super().__iter__() + + def __getitem__(self, key) -> 'ConnectivityMatrix': + return super()[key] + + def __enter__(self) -> ( + 'ConnectivityMatrixMeta.yang_list_descriptor'): + pass + + +class ConnectivityMatrix( + YANGListItem, + metaclass=ConnectivityMatrixMeta): + """ + YANG list item handler. + + YANG name: connectivity-matrix + """ + + _yang_name: Final[str] = 'connectivity-matrix' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'to': ( + to := ( # YANGContainerMember( + ConnectivityMatrixMeta. + To. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathProperties. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Underlay. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + ConnectivityMatrixMeta. + PathConstraints. + yang_container_descriptor())), + + 'from': ( + from := ( # YANGContainerMember( + ConnectivityMatrixMeta. + From. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + ConnectivityMatrixMeta. + Optimizations. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ConnectivityMatrix': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..14cbae7304f9e1b80e18a1547974269f00b66621 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class FromMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: from + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: from + """ + + def __init__(self): + super().__init__(From) + + def __get__(self, instance, owner=None) -> ( + 'FromMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'From': + pass + + def __enter__(self) -> 'From': + pass + + +class From( + YANGContainer, + metaclass=FromMeta): + """ + YANG container handler. + + YANG name: from + """ + + _yang_name: Final[str] = 'from' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + FromMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'From': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..90d6fbfa8ef329a23ca16908801c5dfc1c509b01 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_step import LabelStep + from .label_start import LabelStart + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/from/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82c7bf9c5ec990484589d660738ffe3d2d9f6bf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .metric import Metric + from .objective_function import ObjectiveFunction + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bad2331fc0f109b98bda93287a822244302b5d1e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8100bae93730074ddc472dfb8328dc9ec9b34a21 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .srlg import Srlg + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7de25b7bbfed705b63d9c681cad27d7bd9b9584d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f251c42ed301ea688e4e921968867ed262acfa2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .label import Label + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7de25b7bbfed705b63d9c681cad27d7bd9b9584d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6f5aceab23841faec8396e85e86e21692641125f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_metric_bounds import PathMetricBounds + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinity_names import PathAffinityNames + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..df295258db86b4261becc2471833afaabe8421be --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_names import PathSrlgsNames + from .path_route_objects import PathRouteObjects + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ae074074e7913854992f9bd32a8f51f6b9d7b7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..28ea603a0e4ee2c731661a01ab1dbbee36529de5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..652da89e61bd32067e97591a11a2970e965bed4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d03118f5c94e3726341c4332447847c61623d616 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ToMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: to + """ + from .label_restrictions import LabelRestrictions + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: to + """ + + def __init__(self): + super().__init__(To) + + def __get__(self, instance, owner=None) -> ( + 'ToMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'To': + pass + + def __enter__(self) -> 'To': + pass + + +class To( + YANGContainer, + metaclass=ToMeta): + """ + YANG container handler. + + YANG name: to + """ + + _yang_name: Final[str] = 'to' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + ToMeta. + LabelRestrictions. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'To': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6963852ba0c84a4b78122f6ad1185f29748eb5f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_step import LabelStep + from .label_end import LabelEnd + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/to/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ac722c47add5d381fef94d2c3a2f5750b49a2688 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .tunnels import Tunnels + from .tunnel_termination_points import TunnelTerminationPoints + from .primary_path import PrimaryPath + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..39f656215584aa2bcf14b3ba1a003b8347ff4977 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .label import Label + from .numbered_node_hop import NumberedNodeHop + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..17a8ab32f6e4e90649c07d42b9433c6639fb2934 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e01f01986b3d51fd6143967c4f05b169aff11129 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..652da89e61bd32067e97591a11a2970e965bed4a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/connectivity_matrix/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..832dd2f7ef2d442bd2e0efe6ad680c3d4fd15402 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d82c7bf9c5ec990484589d660738ffe3d2d9f6bf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .metric import Metric + from .objective_function import ObjectiveFunction + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e69ea24d5d4bc36b6bf78a13fb98a25a1e5916 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..519535f45f22cf80d11d26ecfff5511b21632ae4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .srlg import Srlg + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cdc24c09f1b3ccadebb91f2dbb9442bbfbd3595d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0fc658253392d53b5678ebb702dd6ecb3cee4165 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5baa996de0fff24876e40ec73f87a7a90da1f2ea --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..28191362a8a0f4d9e8af895e993672214dc2b00f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_metric_bounds import PathMetricBounds + from .path_affinity_names import PathAffinityNames + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .te_bandwidth import TeBandwidth + from .path_affinities_values import PathAffinitiesValues + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..149786798cff216d2d5c3159b457969263950a72 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_affinities_values import PathAffinitiesValues + from .path_route_objects import PathRouteObjects + from .path_srlgs_lists import PathSrlgsLists + from .path_affinity_names import PathAffinityNames + from .path_srlgs_names import PathSrlgsNames + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7645abedd4d25aeb9c77aa579c2972a450d00a6e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5f251c42ed301ea688e4e921968867ed262acfa2 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + from .label import Label + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e16cb666ce1a7bc800b744b15e11b1d4b7279e6d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c1142926ba50c34d71606b198e801811b621385 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c00e57c237e53df3a2bba30cffe83a15d1149756 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d36aa35acd17db473e177b143afdec573f0b4927 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/connectivity_matrices/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42dee7a72fe4a5d79128cf6ad278af68094e6692 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/te_node_attributes/underlay_topology/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay-topology + """ + + def __init__(self): + super().__init__(UnderlayTopology) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnderlayTopology': + pass + + def __enter__(self) -> 'UnderlayTopology': + pass + + +class UnderlayTopology( + YANGContainer, + metaclass=UnderlayTopologyMeta): + """ + YANG container handler. + + YANG name: underlay-topology + """ + + _yang_name: Final[str] = 'underlay-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnderlayTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a2840f2560d9dcbb55f2d1dcd7515046766223b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/__init__.py @@ -0,0 +1,167 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel-termination-point + """ + from .client_layer_adaptation import ClientLayerAdaptation + from .statistics import Statistics + from .local_link_connectivities import LocalLinkConnectivities + from .geolocation import Geolocation + from .supporting_tunnel_termination_point import SupportingTunnelTerminationPoint + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel-termination-point + """ + + def __init__(self): + super().__init__(TunnelTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TunnelTerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['TunnelTerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'TunnelTerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'TunnelTerminationPointMeta.yang_list_descriptor'): + pass + + +class TunnelTerminationPoint( + YANGListItem, + metaclass=TunnelTerminationPointMeta): + """ + YANG list item handler. + + YANG name: tunnel-termination-point + """ + + _yang_name: Final[str] = 'tunnel-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-tp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-tp-id': ( + tunnel_tp_id := YANGLeafMember( + 'tunnel-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'client-layer-adaptation': ( + client_layer_adaptation := ( # YANGContainerMember( + TunnelTerminationPointMeta. + ClientLayerAdaptation. + yang_container_descriptor())), + + 'statistics': ( + statistics := ( # YANGContainerMember( + TunnelTerminationPointMeta. + Statistics. + yang_container_descriptor())), + + 'local-link-connectivities': ( + local_link_connectivities := ( # YANGContainerMember( + TunnelTerminationPointMeta. + LocalLinkConnectivities. + yang_container_descriptor())), + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TunnelTerminationPointMeta. + Geolocation. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'supporting-tunnel-termination-point': ( + supporting_tunnel_termination_point := ( # YANGListMember( + TunnelTerminationPointMeta. + SupportingTunnelTerminationPoint. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..38f9ec314a9426a5fe03975be29a2e28b422a31e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ClientLayerAdaptationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: client-layer-adaptation + """ + from .switching_capability import SwitchingCapability + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: client-layer-adaptation + """ + + def __init__(self): + super().__init__(ClientLayerAdaptation) + + def __get__(self, instance, owner=None) -> ( + 'ClientLayerAdaptationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ClientLayerAdaptation': + pass + + def __enter__(self) -> 'ClientLayerAdaptation': + pass + + +class ClientLayerAdaptation( + YANGContainer, + metaclass=ClientLayerAdaptationMeta): + """ + YANG container handler. + + YANG name: client-layer-adaptation + """ + + _yang_name: Final[str] = 'client-layer-adaptation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'switching-capability': ( + switching_capability := ( # YANGListMember( + ClientLayerAdaptationMeta. + SwitchingCapability. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ClientLayerAdaptation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74c496e9c8505568c18ca8db338e3c313884945d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: switching-capability + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: switching-capability + """ + + def __init__(self): + super().__init__(SwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'SwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['SwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'SwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'SwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class SwitchingCapability( + YANGListItem, + metaclass=SwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: switching-capability + """ + + _yang_name: Final[str] = 'switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + SwitchingCapabilityMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/client_layer_adaptation/switching_capability/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e58eb1516669a36eac9abd5451d7335da8de62a4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d107aca7146b13039b609d38c023443bfe120a37 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocalLinkConnectivitiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: local-link-connectivities + """ + from .underlay import Underlay + from .path_constraints import PathConstraints + from .path_properties import PathProperties + from .label_restrictions import LabelRestrictions + from .optimizations import Optimizations + from .local_link_connectivity import LocalLinkConnectivity + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: local-link-connectivities + """ + + def __init__(self): + super().__init__(LocalLinkConnectivities) + + def __get__(self, instance, owner=None) -> ( + 'LocalLinkConnectivitiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LocalLinkConnectivities': + pass + + def __enter__(self) -> 'LocalLinkConnectivities': + pass + + +class LocalLinkConnectivities( + YANGContainer, + metaclass=LocalLinkConnectivitiesMeta): + """ + YANG container handler. + + YANG name: local-link-connectivities + """ + + _yang_name: Final[str] = 'local-link-connectivities' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'number-of-entries': ( + number_of_entries := YANGLeafMember( + 'number-of-entries', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'underlay': ( + underlay := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + Underlay. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + PathConstraints. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + PathProperties. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + LocalLinkConnectivitiesMeta. + Optimizations. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'local-link-connectivity': ( + local_link_connectivity := ( # YANGListMember( + LocalLinkConnectivitiesMeta. + LocalLinkConnectivity. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LocalLinkConnectivities': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..814ea59a555c0c31d59f79bd58db695d0fb105e8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..89dc7a8809c12f5dc8f942f7719322884fea3b49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/__init__.py @@ -0,0 +1,137 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocalLinkConnectivityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: local-link-connectivity + """ + from .underlay import Underlay + from .optimizations import Optimizations + from .label_restrictions import LabelRestrictions + from .path_properties import PathProperties + from .path_constraints import PathConstraints + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: local-link-connectivity + """ + + def __init__(self): + super().__init__(LocalLinkConnectivity) + + def __get__(self, instance, owner=None) -> ( + 'LocalLinkConnectivityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LocalLinkConnectivity']: + pass + + def __iter__(self, key) -> Iterator['LocalLinkConnectivity']: + return super().__iter__() + + def __getitem__(self, key) -> 'LocalLinkConnectivity': + return super()[key] + + def __enter__(self) -> ( + 'LocalLinkConnectivityMeta.yang_list_descriptor'): + pass + + +class LocalLinkConnectivity( + YANGListItem, + metaclass=LocalLinkConnectivityMeta): + """ + YANG list item handler. + + YANG name: local-link-connectivity + """ + + _yang_name: Final[str] = 'local-link-connectivity' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'link-tp-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-ref': ( + link_tp_ref := YANGLeafMember( + 'link-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-allowed': ( + is_allowed := YANGLeafMember( + 'is-allowed', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'underlay': ( + underlay := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + Underlay. + yang_container_descriptor())), + + 'optimizations': ( + optimizations := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + Optimizations. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'path-properties': ( + path_properties := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + PathProperties. + yang_container_descriptor())), + + 'path-constraints': ( + path_constraints := ( # YANGContainerMember( + LocalLinkConnectivityMeta. + PathConstraints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LocalLinkConnectivity': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1075ea1483389fe2d8a6245c8b19b16007859ffb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_start import LabelStart + from .label_end import LabelEnd + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .objective_function import ObjectiveFunction + from .metric import Metric + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e69ea24d5d4bc36b6bf78a13fb98a25a1e5916 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d71309cbb007ad744071cd2a2bbacb7964114efc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .srlg import Srlg + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..97c7b52d53563f340bcf3adef447aa2d718ee50b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8d9d3d58559fab79fa12a634fb4aecbef61780f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07c0b7b779289a6ac9a9123fd540526dc6d190fb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4ffa7b66e87daa14eb143c6501aa376cc779aed5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_srlgs_names import PathSrlgsNames + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_metric_bounds import PathMetricBounds + from .te_bandwidth import TeBandwidth + from .path_affinity_names import PathAffinityNames + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e6e72a44fd364b7d9238cef98eba888090a23f76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bde8f98e58827b2019a01b80cad4ec0198201e72 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinities_values import PathAffinitiesValues + from .path_affinity_names import PathAffinityNames + from .path_route_objects import PathRouteObjects + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7645abedd4d25aeb9c77aa579c2972a450d00a6e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ce99e420e4339dbff19a79559a99828a5632ed52 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7de25b7bbfed705b63d9c681cad27d7bd9b9584d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..718667143f90b280fcd63585a43ec31bd9555933 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .tunnels import Tunnels + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d1ab68ff674ea58adde5a644c74609928fe6f874 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .label import Label + from .numbered_link_hop import NumberedLinkHop + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1182654a4bf2eb5a4496796aa2c9752309208f46 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2961e2bf8c581c42005442bebf3b91dd7424a524 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .as_number import AsNumber + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..088a2a9a5842516b7391cf36f8c90e94028a03d5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d36aa35acd17db473e177b143afdec573f0b4927 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/local_link_connectivity/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c8d4f4c8def0e90dabe399cc305dc3b8d3d500 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: optimizations + """ + from .algorithm import Algorithm + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: optimizations + """ + + def __init__(self): + super().__init__(Optimizations) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Optimizations': + pass + + def __enter__(self) -> 'Optimizations': + pass + + +class Optimizations( + YANGContainer, + metaclass=OptimizationsMeta): + """ + YANG container handler. + + YANG name: optimizations + """ + + _yang_name: Final[str] = 'optimizations' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Optimizations': + instance = super().__new__(cls) + instance._yang_choices = { + + 'algorithm': + OptimizationsMeta.Algorithm( + instance), + } + return instance + + @property + def algorithm(self) -> ( + OptimizationsMeta.Algorithm): + return self._yang_choices['algorithm'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e0ca52a42ed25af1b7e0612d3e9a6b3d43b6ef9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/__init__.py @@ -0,0 +1,101 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AlgorithmMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: algorithm + """ + + from .objective_function import ObjectiveFunction + from .metric import Metric + + class objective_function_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.objective_function_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.ObjectiveFunction'): + pass + + class metric_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__( + AlgorithmMeta.Metric) + + def __get__(self, instance, owner=None) -> ( + 'AlgorithmMeta.metric_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + def __enter__(self) -> ( + 'AlgorithmMeta.Metric'): + pass + + +class Algorithm(YANGChoice, metaclass=AlgorithmMeta): + """ + YANG choice handler. + + YANG name: algorithm + """ + + _yang_name: Final[str] = 'algorithm' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'objective-function': ( + objective_function := ( # YANGChoiceCase( + AlgorithmMeta. + objective_function_case_descriptor())), + + 'metric': ( + metric := ( # YANGChoiceCase( + AlgorithmMeta. + metric_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e7d1da8ee3719d0d6a3c401df7340fbd3517e8ed --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MetricMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: metric + """ + from .tiebreakers import Tiebreakers + from .optimization_metric import OptimizationMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: metric + """ + + def __init__(self): + super().__init__(Metric) + + def __get__(self, instance, owner=None) -> ( + 'MetricMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Metric': + pass + + def __enter__(self) -> 'Metric': + pass + + +class Metric( + YANGContainer, + metaclass=MetricMeta): + """ + YANG container handler. + + YANG name: metric + """ + + _yang_name: Final[str] = 'metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tiebreakers': ( + tiebreakers := ( # YANGContainerMember( + MetricMeta. + Tiebreakers. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'optimization-metric': ( + optimization_metric := ( # YANGListMember( + MetricMeta. + OptimizationMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Metric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e0b3f85a0993ca8184c4cec6a891f373b0666767 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class OptimizationMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: optimization-metric + """ + from .explicit_route_include_objects import ExplicitRouteIncludeObjects + from .explicit_route_exclude_objects import ExplicitRouteExcludeObjects + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: optimization-metric + """ + + def __init__(self): + super().__init__(OptimizationMetric) + + def __get__(self, instance, owner=None) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['OptimizationMetric']: + pass + + def __iter__(self, key) -> Iterator['OptimizationMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'OptimizationMetric': + return super()[key] + + def __enter__(self) -> ( + 'OptimizationMetricMeta.yang_list_descriptor'): + pass + + +class OptimizationMetric( + YANGListItem, + metaclass=OptimizationMetricMeta): + """ + YANG list item handler. + + YANG name: optimization-metric + """ + + _yang_name: Final[str] = 'optimization-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'weight': ( + weight := YANGLeafMember( + 'weight', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'explicit-route-include-objects': ( + explicit_route_include_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteIncludeObjects. + yang_container_descriptor())), + + 'explicit-route-exclude-objects': ( + explicit_route_exclude_objects := ( # YANGContainerMember( + OptimizationMetricMeta. + ExplicitRouteExcludeObjects. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'OptimizationMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aea7bdd4cd5ed1743a1764899878a1ac8035348e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteExcludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + from .route_object_exclude_object import RouteObjectExcludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-exclude-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteExcludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteExcludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteExcludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteExcludeObjects': + pass + + +class ExplicitRouteExcludeObjects( + YANGContainer, + metaclass=ExplicitRouteExcludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-exclude-objects + """ + + _yang_name: Final[str] = 'explicit-route-exclude-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-exclude-object': ( + route_object_exclude_object := ( # YANGListMember( + ExplicitRouteExcludeObjectsMeta. + RouteObjectExcludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteExcludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..405906d3e6d9dd1eda79aae3a6302c37e0e24988 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectExcludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-exclude-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-exclude-object + """ + + def __init__(self): + super().__init__(RouteObjectExcludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectExcludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectExcludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectExcludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectExcludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectExcludeObject( + YANGListItem, + metaclass=RouteObjectExcludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-exclude-object + """ + + _yang_name: Final[str] = 'route-object-exclude-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectExcludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectExcludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectExcludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ef448f1cfb4766cf527a00e8da8e1a261466c995 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/__init__.py @@ -0,0 +1,217 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .srlg import Srlg + from .numbered_node_hop import NumberedNodeHop + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .label import Label + + class srlg_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__( + TypeMeta.Srlg) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.srlg_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Srlg'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Srlg'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'srlg': ( + srlg := ( # YANGChoiceCase( + TypeMeta. + srlg_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..420f996a13a20bf122ec87f0fbb109b34246eb61 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + from .srlg import Srlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'srlg': ( + srlg := ( # YANGContainerMember( + SrlgMeta. + Srlg. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95a1628e4caf545e0d31823f89ea93178ffb76c7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/srlg/srlg/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SrlgMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: srlg + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: srlg + """ + + def __init__(self): + super().__init__(Srlg) + + def __get__(self, instance, owner=None) -> ( + 'SrlgMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Srlg': + pass + + def __enter__(self) -> 'Srlg': + pass + + +class Srlg( + YANGContainer, + metaclass=SrlgMeta): + """ + YANG container handler. + + YANG name: srlg + """ + + _yang_name: Final[str] = 'srlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'srlg': ( + srlg := YANGLeafMember( + 'srlg', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Srlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_exclude_objects/route_object_exclude_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3209b99bad73493077e9e91a8053f320b05c11c0 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExplicitRouteIncludeObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: explicit-route-include-objects + """ + from .route_object_include_object import RouteObjectIncludeObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: explicit-route-include-objects + """ + + def __init__(self): + super().__init__(ExplicitRouteIncludeObjects) + + def __get__(self, instance, owner=None) -> ( + 'ExplicitRouteIncludeObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExplicitRouteIncludeObjects': + pass + + def __enter__(self) -> 'ExplicitRouteIncludeObjects': + pass + + +class ExplicitRouteIncludeObjects( + YANGContainer, + metaclass=ExplicitRouteIncludeObjectsMeta): + """ + YANG container handler. + + YANG name: explicit-route-include-objects + """ + + _yang_name: Final[str] = 'explicit-route-include-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'route-object-include-object': ( + route_object_include_object := ( # YANGListMember( + ExplicitRouteIncludeObjectsMeta. + RouteObjectIncludeObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExplicitRouteIncludeObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c9f24330ff35e20e47be0db730f6ec682dd71d2d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class RouteObjectIncludeObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: route-object-include-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: route-object-include-object + """ + + def __init__(self): + super().__init__(RouteObjectIncludeObject) + + def __get__(self, instance, owner=None) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['RouteObjectIncludeObject']: + pass + + def __iter__(self, key) -> Iterator['RouteObjectIncludeObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'RouteObjectIncludeObject': + return super()[key] + + def __enter__(self) -> ( + 'RouteObjectIncludeObjectMeta.yang_list_descriptor'): + pass + + +class RouteObjectIncludeObject( + YANGListItem, + metaclass=RouteObjectIncludeObjectMeta): + """ + YANG list item handler. + + YANG name: route-object-include-object + """ + + _yang_name: Final[str] = 'route-object-include-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'RouteObjectIncludeObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + RouteObjectIncludeObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + RouteObjectIncludeObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..943ba0bd2ef587976729a620de43a51d18612462 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_link_hop import NumberedLinkHop + from .numbered_node_hop import NumberedNodeHop + from .label import Label + from .as_number import AsNumber + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ad1ed06e7edbba03876800aa1f46233860ec8b0d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/optimization_metric/explicit_route_include_objects/route_object_include_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d345b57b342afaa50a04c5782794f34b810b795c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakersMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tiebreakers + """ + from .tiebreaker import Tiebreaker + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tiebreakers + """ + + def __init__(self): + super().__init__(Tiebreakers) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakersMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tiebreakers': + pass + + def __enter__(self) -> 'Tiebreakers': + pass + + +class Tiebreakers( + YANGContainer, + metaclass=TiebreakersMeta): + """ + YANG container handler. + + YANG name: tiebreakers + """ + + _yang_name: Final[str] = 'tiebreakers' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tiebreaker': ( + tiebreaker := ( # YANGListMember( + TiebreakersMeta. + Tiebreaker. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreakers': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..500d880ad6ad48b8079aa3bea0b1e644f7008f49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/metric/tiebreakers/tiebreaker/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TiebreakerMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tiebreaker + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tiebreaker + """ + + def __init__(self): + super().__init__(Tiebreaker) + + def __get__(self, instance, owner=None) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tiebreaker']: + pass + + def __iter__(self, key) -> Iterator['Tiebreaker']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tiebreaker': + return super()[key] + + def __enter__(self) -> ( + 'TiebreakerMeta.yang_list_descriptor'): + pass + + +class Tiebreaker( + YANGListItem, + metaclass=TiebreakerMeta): + """ + YANG list item handler. + + YANG name: tiebreaker + """ + + _yang_name: Final[str] = 'tiebreaker' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tiebreaker-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tiebreaker-type': ( + tiebreaker_type := YANGLeafMember( + 'tiebreaker-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tiebreaker': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbd32a2bb98c6e47f795103fbc122cbf7957e1e6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + from .objective_function import ObjectiveFunction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'objective-function': ( + objective_function := ( # YANGContainerMember( + ObjectiveFunctionMeta. + ObjectiveFunction. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..af72bcf2702ccee1d360bad39000241d1abfdc19 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/optimizations/algorithm/objective_function/objective_function/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ObjectiveFunctionMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: objective-function + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: objective-function + """ + + def __init__(self): + super().__init__(ObjectiveFunction) + + def __get__(self, instance, owner=None) -> ( + 'ObjectiveFunctionMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ObjectiveFunction': + pass + + def __enter__(self) -> 'ObjectiveFunction': + pass + + +class ObjectiveFunction( + YANGContainer, + metaclass=ObjectiveFunctionMeta): + """ + YANG container handler. + + YANG name: objective-function + """ + + _yang_name: Final[str] = 'objective-function' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'objective-function-type': ( + objective_function_type := YANGLeafMember( + 'objective-function-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ObjectiveFunction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c83cf0a2d0df81953e96e2a55fde9fd16c751d0a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/__init__.py @@ -0,0 +1,151 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathConstraintsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-constraints + """ + from .path_affinities_values import PathAffinitiesValues + from .path_srlgs_lists import PathSrlgsLists + from .path_metric_bounds import PathMetricBounds + from .path_srlgs_names import PathSrlgsNames + from .path_affinity_names import PathAffinityNames + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-constraints + """ + + def __init__(self): + super().__init__(PathConstraints) + + def __get__(self, instance, owner=None) -> ( + 'PathConstraintsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathConstraints': + pass + + def __enter__(self) -> 'PathConstraints': + pass + + +class PathConstraints( + YANGContainer, + metaclass=PathConstraintsMeta): + """ + YANG container handler. + + YANG name: path-constraints + """ + + _yang_name: Final[str] = 'path-constraints' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hold-priority': ( + hold_priority := YANGLeafMember( + 'hold-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'setup-priority': ( + setup_priority := YANGLeafMember( + 'setup-priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'signaling-type': ( + signaling_type := YANGLeafMember( + 'signaling-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection': ( + link_protection := YANGLeafMember( + 'link-protection', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinitiesValues. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-metric-bounds': ( + path_metric_bounds := ( # YANGContainerMember( + PathConstraintsMeta. + PathMetricBounds. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathConstraintsMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + PathConstraintsMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathConstraints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e4a21b11accc2103aa85169cb46c386658d5cc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..356f7761b99b2e313b0638407dbaaa3996e6c418 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-metric-bounds + """ + from .path_metric_bound import PathMetricBound + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-metric-bounds + """ + + def __init__(self): + super().__init__(PathMetricBounds) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathMetricBounds': + pass + + def __enter__(self) -> 'PathMetricBounds': + pass + + +class PathMetricBounds( + YANGContainer, + metaclass=PathMetricBoundsMeta): + """ + YANG container handler. + + YANG name: path-metric-bounds + """ + + _yang_name: Final[str] = 'path-metric-bounds' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric-bound': ( + path_metric_bound := ( # YANGListMember( + PathMetricBoundsMeta. + PathMetricBound. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBounds': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a97d5e3e1d7066756b051d139f997d9a46b3c6b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_metric_bounds/path_metric_bound/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricBoundMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric-bound + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric-bound + """ + + def __init__(self): + super().__init__(PathMetricBound) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetricBound']: + pass + + def __iter__(self, key) -> Iterator['PathMetricBound']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetricBound': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricBoundMeta.yang_list_descriptor'): + pass + + +class PathMetricBound( + YANGListItem, + metaclass=PathMetricBoundMeta): + """ + YANG list item handler. + + YANG name: path-metric-bound + """ + + _yang_name: Final[str] = 'path-metric-bound' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'upper-bound': ( + upper_bound := YANGLeafMember( + 'upper-bound', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetricBound': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_constraints/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..41c96a46e00a42f281a1cdc712517006ccd5fa0b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathPropertiesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-properties + """ + from .path_route_objects import PathRouteObjects + from .path_affinity_names import PathAffinityNames + from .path_srlgs_lists import PathSrlgsLists + from .path_srlgs_names import PathSrlgsNames + from .path_affinities_values import PathAffinitiesValues + from .path_metric import PathMetric + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-properties + """ + + def __init__(self): + super().__init__(PathProperties) + + def __get__(self, instance, owner=None) -> ( + 'PathPropertiesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathProperties': + pass + + def __enter__(self) -> 'PathProperties': + pass + + +class PathProperties( + YANGContainer, + metaclass=PathPropertiesMeta): + """ + YANG container handler. + + YANG name: path-properties + """ + + _yang_name: Final[str] = 'path-properties' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'path-route-objects': ( + path_route_objects := ( # YANGContainerMember( + PathPropertiesMeta. + PathRouteObjects. + yang_container_descriptor())), + + 'path-affinity-names': ( + path_affinity_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinityNames. + yang_container_descriptor())), + + 'path-srlgs-lists': ( + path_srlgs_lists := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsLists. + yang_container_descriptor())), + + 'path-srlgs-names': ( + path_srlgs_names := ( # YANGContainerMember( + PathPropertiesMeta. + PathSrlgsNames. + yang_container_descriptor())), + + 'path-affinities-values': ( + path_affinities_values := ( # YANGContainerMember( + PathPropertiesMeta. + PathAffinitiesValues. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-metric': ( + path_metric := ( # YANGListMember( + PathPropertiesMeta. + PathMetric. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathProperties': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c038ff21414923b939355bb6bdda825d64ece5a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValuesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinities-values + """ + from .path_affinities_value import PathAffinitiesValue + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinities-values + """ + + def __init__(self): + super().__init__(PathAffinitiesValues) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValuesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinitiesValues': + pass + + def __enter__(self) -> 'PathAffinitiesValues': + pass + + +class PathAffinitiesValues( + YANGContainer, + metaclass=PathAffinitiesValuesMeta): + """ + YANG container handler. + + YANG name: path-affinities-values + """ + + _yang_name: Final[str] = 'path-affinities-values' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinities-value': ( + path_affinities_value := ( # YANGListMember( + PathAffinitiesValuesMeta. + PathAffinitiesValue. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValues': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7560d7f51b4174c036b96d1a6599a2a3ada8d674 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinities_values/path_affinities_value/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinitiesValueMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinities-value + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinities-value + """ + + def __init__(self): + super().__init__(PathAffinitiesValue) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinitiesValue']: + pass + + def __iter__(self, key) -> Iterator['PathAffinitiesValue']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinitiesValue': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinitiesValueMeta.yang_list_descriptor'): + pass + + +class PathAffinitiesValue( + YANGListItem, + metaclass=PathAffinitiesValueMeta): + """ + YANG list item handler. + + YANG name: path-affinities-value + """ + + _yang_name: Final[str] = 'path-affinities-value' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'value': ( + value := YANGLeafMember( + 'value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinitiesValue': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a8439d312f2b42a7a09bb2b04e3c9207920fe69c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-affinity-names + """ + from .path_affinity_name import PathAffinityName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-affinity-names + """ + + def __init__(self): + super().__init__(PathAffinityNames) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathAffinityNames': + pass + + def __enter__(self) -> 'PathAffinityNames': + pass + + +class PathAffinityNames( + YANGContainer, + metaclass=PathAffinityNamesMeta): + """ + YANG container handler. + + YANG name: path-affinity-names + """ + + _yang_name: Final[str] = 'path-affinity-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-affinity-name': ( + path_affinity_name := ( # YANGListMember( + PathAffinityNamesMeta. + PathAffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f56a1940217a7ca828879399878fa57c2402196c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathAffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-affinity-name + """ + from .affinity_name import AffinityName + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-affinity-name + """ + + def __init__(self): + super().__init__(PathAffinityName) + + def __get__(self, instance, owner=None) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathAffinityName']: + pass + + def __iter__(self, key) -> Iterator['PathAffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathAffinityName': + return super()[key] + + def __enter__(self) -> ( + 'PathAffinityNameMeta.yang_list_descriptor'): + pass + + +class PathAffinityName( + YANGListItem, + metaclass=PathAffinityNameMeta): + """ + YANG list item handler. + + YANG name: path-affinity-name + """ + + _yang_name: Final[str] = 'path-affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'affinity-name': ( + affinity_name := ( # YANGListMember( + PathAffinityNameMeta. + AffinityName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathAffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75d22895c1b8c77e3c13ad584eaac74d23d0e359 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_affinity_names/path_affinity_name/affinity_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AffinityNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: affinity-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: affinity-name + """ + + def __init__(self): + super().__init__(AffinityName) + + def __get__(self, instance, owner=None) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['AffinityName']: + pass + + def __iter__(self, key) -> Iterator['AffinityName']: + return super().__iter__() + + def __getitem__(self, key) -> 'AffinityName': + return super()[key] + + def __enter__(self) -> ( + 'AffinityNameMeta.yang_list_descriptor'): + pass + + +class AffinityName( + YANGListItem, + metaclass=AffinityNameMeta): + """ + YANG list item handler. + + YANG name: affinity-name + """ + + _yang_name: Final[str] = 'affinity-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AffinityName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ae074074e7913854992f9bd32a8f51f6b9d7b7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_metric/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathMetricMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-metric + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-metric + """ + + def __init__(self): + super().__init__(PathMetric) + + def __get__(self, instance, owner=None) -> ( + 'PathMetricMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathMetric']: + pass + + def __iter__(self, key) -> Iterator['PathMetric']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathMetric': + return super()[key] + + def __enter__(self) -> ( + 'PathMetricMeta.yang_list_descriptor'): + pass + + +class PathMetric( + YANGListItem, + metaclass=PathMetricMeta): + """ + YANG list item handler. + + YANG name: path-metric + """ + + _yang_name: Final[str] = 'path-metric' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'metric-type', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'metric-type': ( + metric_type := YANGLeafMember( + 'metric-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'accumulative-value': ( + accumulative_value := YANGLeafMember( + 'accumulative-value', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathMetric': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2af8eb3f47d7b0ceb2d21f9f5b1ee44b432ab35f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-route-objects + """ + from .path_route_object import PathRouteObject + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-route-objects + """ + + def __init__(self): + super().__init__(PathRouteObjects) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathRouteObjects': + pass + + def __enter__(self) -> 'PathRouteObjects': + pass + + +class PathRouteObjects( + YANGContainer, + metaclass=PathRouteObjectsMeta): + """ + YANG container handler. + + YANG name: path-route-objects + """ + + _yang_name: Final[str] = 'path-route-objects' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-route-object': ( + path_route_object := ( # YANGListMember( + PathRouteObjectsMeta. + PathRouteObject. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObjects': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..74b9e21c769902d7a2bb1f362d2e95cbf5d862cd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathRouteObjectMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-route-object + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-route-object + """ + + def __init__(self): + super().__init__(PathRouteObject) + + def __get__(self, instance, owner=None) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathRouteObject']: + pass + + def __iter__(self, key) -> Iterator['PathRouteObject']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathRouteObject': + return super()[key] + + def __enter__(self) -> ( + 'PathRouteObjectMeta.yang_list_descriptor'): + pass + + +class PathRouteObject( + YANGListItem, + metaclass=PathRouteObjectMeta): + """ + YANG list item handler. + + YANG name: path-route-object + """ + + _yang_name: Final[str] = 'path-route-object' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathRouteObject': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathRouteObjectMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathRouteObjectMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ba147c0c9510241b8cc6f8aa2235042dd634f850 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .label import Label + from .unnumbered_link_hop import UnnumberedLinkHop + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1cb78075b80ccd8887818376324a016daf17b67c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e568286bdabfa9cd970ff66b3e9b6a807b0f31f3 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_route_objects/path_route_object/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e807a0b29d665deaaed7620fee6b2b7c697fbb6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-lists + """ + from .path_srlgs_list import PathSrlgsList + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-lists + """ + + def __init__(self): + super().__init__(PathSrlgsLists) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsLists': + pass + + def __enter__(self) -> 'PathSrlgsLists': + pass + + +class PathSrlgsLists( + YANGContainer, + metaclass=PathSrlgsListsMeta): + """ + YANG container handler. + + YANG name: path-srlgs-lists + """ + + _yang_name: Final[str] = 'path-srlgs-lists' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-list': ( + path_srlgs_list := ( # YANGListMember( + PathSrlgsListsMeta. + PathSrlgsList. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsLists': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..631911d141fd6e870942bd77f7ad80c33e221091 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_lists/path_srlgs_list/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsListMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-list + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-list + """ + + def __init__(self): + super().__init__(PathSrlgsList) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsList']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsList']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsList': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsListMeta.yang_list_descriptor'): + pass + + +class PathSrlgsList( + YANGListItem, + metaclass=PathSrlgsListMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-list + """ + + _yang_name: Final[str] = 'path-srlgs-list' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsList': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..54d85c0e52070f3cffb5a27ea963d0923bdcc379 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNamesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: path-srlgs-names + """ + from .path_srlgs_name import PathSrlgsName + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: path-srlgs-names + """ + + def __init__(self): + super().__init__(PathSrlgsNames) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNamesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PathSrlgsNames': + pass + + def __enter__(self) -> 'PathSrlgsNames': + pass + + +class PathSrlgsNames( + YANGContainer, + metaclass=PathSrlgsNamesMeta): + """ + YANG container handler. + + YANG name: path-srlgs-names + """ + + _yang_name: Final[str] = 'path-srlgs-names' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-srlgs-name': ( + path_srlgs_name := ( # YANGListMember( + PathSrlgsNamesMeta. + PathSrlgsName. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsNames': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b66f1860f862ec66429b96c9f73d88815ecfd6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/path_properties/path_srlgs_names/path_srlgs_name/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathSrlgsNameMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-srlgs-name + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-srlgs-name + """ + + def __init__(self): + super().__init__(PathSrlgsName) + + def __get__(self, instance, owner=None) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathSrlgsName']: + pass + + def __iter__(self, key) -> Iterator['PathSrlgsName']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathSrlgsName': + return super()[key] + + def __enter__(self) -> ( + 'PathSrlgsNameMeta.yang_list_descriptor'): + pass + + +class PathSrlgsName( + YANGListItem, + metaclass=PathSrlgsNameMeta): + """ + YANG list item handler. + + YANG name: path-srlgs-name + """ + + _yang_name: Final[str] = 'path-srlgs-name' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'usage', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'usage': ( + usage := YANGLeafMember( + 'usage', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathSrlgsName': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..756916fe5305db0152f03d2c6c3aabec84ab6e89 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_node_hop import NumberedNodeHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b97fc02b90568c1b4e8df5f758ab24f6bcb5be9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3a6876e61b9d99b8ed5b00bc13f60857e8fb3d76 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dcd3c6917ac3e0b72b371917edbce5bc14d39c40 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .unnumbered_link_hop import UnnumberedLinkHop + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..64a8ec6d5e2fd4a77c59c13b3e37cacb001c91fe --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5baa996de0fff24876e40ec73f87a7a90da1f2ea --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae8cc268f3c4fc331cd1e1018be41d113da9183 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/local_link_connectivities/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ed869cac9cbe0a847a4fd06e39f4e8cb0944cfb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/__init__.py @@ -0,0 +1,99 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class StatisticsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: statistics + """ + from .tunnel_termination_point import TunnelTerminationPoint + from .local_link_connectivity import LocalLinkConnectivity + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: statistics + """ + + def __init__(self): + super().__init__(Statistics) + + def __get__(self, instance, owner=None) -> ( + 'StatisticsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Statistics': + pass + + def __enter__(self) -> 'Statistics': + pass + + +class Statistics( + YANGContainer, + metaclass=StatisticsMeta): + """ + YANG container handler. + + YANG name: statistics + """ + + _yang_name: Final[str] = 'statistics' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'discontinuity-time': ( + discontinuity_time := YANGLeafMember( + 'discontinuity-time', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'tunnel-termination-point': ( + tunnel_termination_point := ( # YANGContainerMember( + StatisticsMeta. + TunnelTerminationPoint. + yang_container_descriptor())), + + 'local-link-connectivity': ( + local_link_connectivity := ( # YANGContainerMember( + StatisticsMeta. + LocalLinkConnectivity. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Statistics': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..968aa5f224d812d13c53912ca6346f0e872afa9d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/local_link_connectivity/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LocalLinkConnectivityMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: local-link-connectivity + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: local-link-connectivity + """ + + def __init__(self): + super().__init__(LocalLinkConnectivity) + + def __get__(self, instance, owner=None) -> ( + 'LocalLinkConnectivityMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LocalLinkConnectivity': + pass + + def __enter__(self) -> 'LocalLinkConnectivity': + pass + + +class LocalLinkConnectivity( + YANGContainer, + metaclass=LocalLinkConnectivityMeta): + """ + YANG container handler. + + YANG name: local-link-connectivity + """ + + _yang_name: Final[str] = 'local-link-connectivity' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'creates': ( + creates := YANGLeafMember( + 'creates', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'deletes': ( + deletes := YANGLeafMember( + 'deletes', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LocalLinkConnectivity': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0226e0183e765f0c6bfc59a10e95220a32c88eb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/statistics/tunnel_termination_point/__init__.py @@ -0,0 +1,133 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-point + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-point + """ + + def __init__(self): + super().__init__(TunnelTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoint': + pass + + def __enter__(self) -> 'TunnelTerminationPoint': + pass + + +class TunnelTerminationPoint( + YANGContainer, + metaclass=TunnelTerminationPointMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-point + """ + + _yang_name: Final[str] = 'tunnel-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'maintenance-sets': ( + maintenance_sets := YANGLeafMember( + 'maintenance-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'downs': ( + downs := YANGLeafMember( + 'downs', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'modifies': ( + modifies := YANGLeafMember( + 'modifies', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disables': ( + disables := YANGLeafMember( + 'disables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'in-service-sets': ( + in_service_sets := YANGLeafMember( + 'in-service-sets', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'enables': ( + enables := YANGLeafMember( + 'enables', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'maintenance-clears': ( + maintenance_clears := YANGLeafMember( + 'maintenance-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'ups': ( + ups := YANGLeafMember( + 'ups', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'in-service-clears': ( + in_service_clears := YANGLeafMember( + 'in-service-clears', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6c49df48431602d92607be89318349d2e837536e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/te/tunnel_termination_point/supporting_tunnel_termination_point/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingTunnelTerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-tunnel-termination-point + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-tunnel-termination-point + """ + + def __init__(self): + super().__init__(SupportingTunnelTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'SupportingTunnelTerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingTunnelTerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['SupportingTunnelTerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingTunnelTerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'SupportingTunnelTerminationPointMeta.yang_list_descriptor'): + pass + + +class SupportingTunnelTerminationPoint( + YANGListItem, + metaclass=SupportingTunnelTerminationPointMeta): + """ + YANG list item handler. + + YANG name: supporting-tunnel-termination-point + """ + + _yang_name: Final[str] = 'supporting-tunnel-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'node-ref', + 'tunnel-tp-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'tunnel-tp-ref': ( + tunnel_tp_ref := YANGLeafMember( + 'tunnel-tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingTunnelTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c57b1997c1a86a82962fe2fa49041f529d8c1e0b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/__init__.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: termination-point + """ + from .te import Te + from .supporting_termination_point import SupportingTerminationPoint + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: termination-point + """ + + def __init__(self): + super().__init__(TerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'TerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['TerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['TerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'TerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'TerminationPointMeta.yang_list_descriptor'): + pass + + +class TerminationPoint( + YANGListItem, + metaclass=TerminationPointMeta): + """ + YANG list item handler. + + YANG name: termination-point + """ + + _yang_name: Final[str] = 'termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tp-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'te-tp-id': ( + te_tp_id := YANGLeafMember( + 'te-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tp-id': ( + tp_id := YANGLeafMember( + 'tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te': ( + te := ( # YANGContainerMember( + TerminationPointMeta. + Te. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'supporting-termination-point': ( + supporting_termination_point := ( # YANGListMember( + TerminationPointMeta. + SupportingTerminationPoint. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..677a83f1ad4e37460d2b705a8aae82f716d19ced --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/supporting_termination_point/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingTerminationPointMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-termination-point + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-termination-point + """ + + def __init__(self): + super().__init__(SupportingTerminationPoint) + + def __get__(self, instance, owner=None) -> ( + 'SupportingTerminationPointMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingTerminationPoint']: + pass + + def __iter__(self, key) -> Iterator['SupportingTerminationPoint']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingTerminationPoint': + return super()[key] + + def __enter__(self) -> ( + 'SupportingTerminationPointMeta.yang_list_descriptor'): + pass + + +class SupportingTerminationPoint( + YANGListItem, + metaclass=SupportingTerminationPointMeta): + """ + YANG list item handler. + + YANG name: supporting-termination-point + """ + + _yang_name: Final[str] = 'supporting-termination-point' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network-topology' + _yang_module_name: Final[str] = 'ietf-network-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + 'node-ref', + 'tp-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-ref': ( + node_ref := YANGLeafMember( + 'node-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'tp-ref': ( + tp_ref := YANGLeafMember( + 'tp-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network-topology', + 'ietf-network-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingTerminationPoint': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..01c6bcdf0dcc0a0e9c3adb4b0c4580182a030510 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/__init__.py @@ -0,0 +1,117 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .geolocation import Geolocation + from .interface_switching_capability import InterfaceSwitchingCapability + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'inter-domain-plug-id': ( + inter_domain_plug_id := YANGLeafMember( + 'inter-domain-plug-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'oper-status': ( + oper_status := YANGLeafMember( + 'oper-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TeMeta. + Geolocation. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + TeMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e58eb1516669a36eac9abd5451d7335da8de62a4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aed5f69dcca9f3ba106cbda0db555f0efa7fecd1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/node/termination_point/te/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1edaacf9b3aac3691d69f548e6e01772d428b4c6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/supporting_network/__init__.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class SupportingNetworkMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: supporting-network + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: supporting-network + """ + + def __init__(self): + super().__init__(SupportingNetwork) + + def __get__(self, instance, owner=None) -> ( + 'SupportingNetworkMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['SupportingNetwork']: + pass + + def __iter__(self, key) -> Iterator['SupportingNetwork']: + return super().__iter__() + + def __getitem__(self, key) -> 'SupportingNetwork': + return super()[key] + + def __enter__(self) -> ( + 'SupportingNetworkMeta.yang_list_descriptor'): + pass + + +class SupportingNetwork( + YANGListItem, + metaclass=SupportingNetworkMeta): + """ + YANG list item handler. + + YANG name: supporting-network + """ + + _yang_name: Final[str] = 'supporting-network' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-network' + _yang_module_name: Final[str] = 'ietf-network' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'network-ref', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-network', + 'ietf-network')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'SupportingNetwork': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..748195d4bd7b81c2ed3d20720cab2c5bff4750aa --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/__init__.py @@ -0,0 +1,111 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .geolocation import Geolocation + from .nsrlg import Nsrlg + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'preference': ( + preference := YANGLeafMember( + 'preference', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'optimization-criterion': ( + optimization_criterion := YANGLeafMember( + 'optimization-criterion', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'geolocation': ( + geolocation := ( # YANGContainerMember( + TeMeta. + Geolocation. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'nsrlg': ( + nsrlg := ( # YANGListMember( + TeMeta. + Nsrlg. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a631c3553d9ab5ce7b22b799dbf338a0f87fa43 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/geolocation/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GeolocationMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: geolocation + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: geolocation + """ + + def __init__(self): + super().__init__(Geolocation) + + def __get__(self, instance, owner=None) -> ( + 'GeolocationMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Geolocation': + pass + + def __enter__(self) -> 'Geolocation': + pass + + +class Geolocation( + YANGContainer, + metaclass=GeolocationMeta): + """ + YANG container handler. + + YANG name: geolocation + """ + + _yang_name: Final[str] = 'geolocation' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'latitude': ( + latitude := YANGLeafMember( + 'latitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'altitude': ( + altitude := YANGLeafMember( + 'altitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'longitude': ( + longitude := YANGLeafMember( + 'longitude', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Geolocation': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed5c7ab09b9180c21eb845684ade6a69b7ca0705 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te/nsrlg/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NsrlgMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: nsrlg + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: nsrlg + """ + + def __init__(self): + super().__init__(Nsrlg) + + def __get__(self, instance, owner=None) -> ( + 'NsrlgMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Nsrlg']: + pass + + def __iter__(self, key) -> Iterator['Nsrlg']: + return super().__iter__() + + def __getitem__(self, key) -> 'Nsrlg': + return super()[key] + + def __enter__(self) -> ( + 'NsrlgMeta.yang_list_descriptor'): + pass + + +class Nsrlg( + YANGListItem, + metaclass=NsrlgMeta): + """ + YANG list item handler. + + YANG name: nsrlg + """ + + _yang_name: Final[str] = 'nsrlg' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'id': ( + id := YANGLeafMember( + 'id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'disjointness': ( + disjointness := YANGLeafMember( + 'disjointness', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Nsrlg': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7960995015a5d11e0610babc72827436a32087c1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/network/te_topology_identifier/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeTopologyIdentifierMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-topology-identifier + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-topology-identifier + """ + + def __init__(self): + super().__init__(TeTopologyIdentifier) + + def __get__(self, instance, owner=None) -> ( + 'TeTopologyIdentifierMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeTopologyIdentifier': + pass + + def __enter__(self) -> 'TeTopologyIdentifier': + pass + + +class TeTopologyIdentifier( + YANGContainer, + metaclass=TeTopologyIdentifierMeta): + """ + YANG container handler. + + YANG name: te-topology-identifier + """ + + _yang_name: Final[str] = 'te-topology-identifier' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'topology-id': ( + topology_id := YANGLeafMember( + 'topology-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'provider-id': ( + provider_id := YANGLeafMember( + 'provider-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'client-id': ( + client_id := YANGLeafMember( + 'client-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeTopologyIdentifier': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e44025b207547eea5e7bd79b657543db9c3a4deb --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te + """ + from .templates import Templates + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te + """ + + def __init__(self): + super().__init__(Te) + + def __get__(self, instance, owner=None) -> ( + 'TeMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Te': + pass + + def __enter__(self) -> 'Te': + pass + + +class Te( + YANGContainer, + metaclass=TeMeta): + """ + YANG container handler. + + YANG name: te + """ + + _yang_name: Final[str] = 'te' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'templates': ( + templates := ( # YANGContainerMember( + TeMeta. + Templates. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Te': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7445085d6958e61bbe27aa9366276cfb2d0f2fa4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/__init__.py @@ -0,0 +1,93 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TemplatesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: templates + """ + from .link_template import LinkTemplate + from .node_template import NodeTemplate + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: templates + """ + + def __init__(self): + super().__init__(Templates) + + def __get__(self, instance, owner=None) -> ( + 'TemplatesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Templates': + pass + + def __enter__(self) -> 'Templates': + pass + + +class Templates( + YANGContainer, + metaclass=TemplatesMeta): + """ + YANG container handler. + + YANG name: templates + """ + + _yang_name: Final[str] = 'templates' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'link-template': ( + link_template := ( # YANGListMember( + TemplatesMeta. + LinkTemplate. + yang_list_descriptor())), + + 'node-template': ( + node_template := ( # YANGListMember( + TemplatesMeta. + NodeTemplate. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Templates': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6436895020aa9f268a9cf4b4959e7b3782ab8fdd --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LinkTemplateMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: link-template + """ + from .te_link_attributes import TeLinkAttributes + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: link-template + """ + + def __init__(self): + super().__init__(LinkTemplate) + + def __get__(self, instance, owner=None) -> ( + 'LinkTemplateMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LinkTemplate']: + pass + + def __iter__(self, key) -> Iterator['LinkTemplate']: + return super().__iter__() + + def __getitem__(self, key) -> 'LinkTemplate': + return super()[key] + + def __enter__(self) -> ( + 'LinkTemplateMeta.yang_list_descriptor'): + pass + + +class LinkTemplate( + YANGListItem, + metaclass=LinkTemplateMeta): + """ + YANG list item handler. + + YANG name: link-template + """ + + _yang_name: Final[str] = 'link-template' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'reference-change-policy': ( + reference_change_policy := YANGLeafMember( + 'reference-change-policy', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-link-attributes': ( + te_link_attributes := ( # YANGContainerMember( + LinkTemplateMeta. + TeLinkAttributes. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LinkTemplate': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8165170f1f32e48c8d9e9a8bf33effd915d56ea8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/__init__.py @@ -0,0 +1,202 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLinkAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-link-attributes + """ + from .external_domain import ExternalDomain + from .max_link_bandwidth import MaxLinkBandwidth + from .te_nsrlgs import TeNsrlgs + from .max_resv_link_bandwidth import MaxResvLinkBandwidth + from .label_restrictions import LabelRestrictions + from .underlay import Underlay + from .te_srlgs import TeSrlgs + from .interface_switching_capability import InterfaceSwitchingCapability + from .unreserved_bandwidth import UnreservedBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-link-attributes + """ + + def __init__(self): + super().__init__(TeLinkAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeLinkAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLinkAttributes': + pass + + def __enter__(self) -> 'TeLinkAttributes': + pass + + +class TeLinkAttributes( + YANGContainer, + metaclass=TeLinkAttributesMeta): + """ + YANG container handler. + + YANG name: te-link-attributes + """ + + _yang_name: Final[str] = 'te-link-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'te-delay-metric': ( + te_delay_metric := YANGLeafMember( + 'te-delay-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'administrative-group': ( + administrative_group := YANGLeafMember( + 'administrative-group', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-index': ( + link_index := YANGLeafMember( + 'link-index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'access-type': ( + access_type := YANGLeafMember( + 'access-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-igp-metric': ( + te_igp_metric := YANGLeafMember( + 'te-igp-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'te-default-metric': ( + te_default_metric := YANGLeafMember( + 'te-default-metric', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-protection-type': ( + link_protection_type := YANGLeafMember( + 'link-protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'external-domain': ( + external_domain := ( # YANGContainerMember( + TeLinkAttributesMeta. + ExternalDomain. + yang_container_descriptor())), + + 'max-link-bandwidth': ( + max_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxLinkBandwidth. + yang_container_descriptor())), + + 'te-nsrlgs': ( + te_nsrlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeNsrlgs. + yang_container_descriptor())), + + 'max-resv-link-bandwidth': ( + max_resv_link_bandwidth := ( # YANGContainerMember( + TeLinkAttributesMeta. + MaxResvLinkBandwidth. + yang_container_descriptor())), + + 'label-restrictions': ( + label_restrictions := ( # YANGContainerMember( + TeLinkAttributesMeta. + LabelRestrictions. + yang_container_descriptor())), + + 'underlay': ( + underlay := ( # YANGContainerMember( + TeLinkAttributesMeta. + Underlay. + yang_container_descriptor())), + + 'te-srlgs': ( + te_srlgs := ( # YANGContainerMember( + TeLinkAttributesMeta. + TeSrlgs. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'interface-switching-capability': ( + interface_switching_capability := ( # YANGListMember( + TeLinkAttributesMeta. + InterfaceSwitchingCapability. + yang_list_descriptor())), + + 'unreserved-bandwidth': ( + unreserved_bandwidth := ( # YANGListMember( + TeLinkAttributesMeta. + UnreservedBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLinkAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..30e28c4c7b69dff7823e0a7aa87672840b5f317b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/external_domain/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class ExternalDomainMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: external-domain + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: external-domain + """ + + def __init__(self): + super().__init__(ExternalDomain) + + def __get__(self, instance, owner=None) -> ( + 'ExternalDomainMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'ExternalDomain': + pass + + def __enter__(self) -> 'ExternalDomain': + pass + + +class ExternalDomain( + YANGContainer, + metaclass=ExternalDomainMeta): + """ + YANG container handler. + + YANG name: external-domain + """ + + _yang_name: Final[str] = 'external-domain' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'remote-te-link-tp-id': ( + remote_te_link_tp_id := YANGLeafMember( + 'remote-te-link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'remote-te-node-id': ( + remote_te_node_id := YANGLeafMember( + 'remote-te-node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'ExternalDomain': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..aed5f69dcca9f3ba106cbda0db555f0efa7fecd1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class InterfaceSwitchingCapabilityMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: interface-switching-capability + """ + from .max_lsp_bandwidth import MaxLspBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: interface-switching-capability + """ + + def __init__(self): + super().__init__(InterfaceSwitchingCapability) + + def __get__(self, instance, owner=None) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['InterfaceSwitchingCapability']: + pass + + def __iter__(self, key) -> Iterator['InterfaceSwitchingCapability']: + return super().__iter__() + + def __getitem__(self, key) -> 'InterfaceSwitchingCapability': + return super()[key] + + def __enter__(self) -> ( + 'InterfaceSwitchingCapabilityMeta.yang_list_descriptor'): + pass + + +class InterfaceSwitchingCapability( + YANGListItem, + metaclass=InterfaceSwitchingCapabilityMeta): + """ + YANG list item handler. + + YANG name: interface-switching-capability + """ + + _yang_name: Final[str] = 'interface-switching-capability' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'switching-capability', + 'encoding', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'encoding': ( + encoding := YANGLeafMember( + 'encoding', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'switching-capability': ( + switching_capability := YANGLeafMember( + 'switching-capability', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'max-lsp-bandwidth': ( + max_lsp_bandwidth := ( # YANGListMember( + InterfaceSwitchingCapabilityMeta. + MaxLspBandwidth. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'InterfaceSwitchingCapability': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ddad298bbc0cc7c626bd869965fe6da4630b6fb5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLspBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: max-lsp-bandwidth + """ + + def __init__(self): + super().__init__(MaxLspBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['MaxLspBandwidth']: + pass + + def __iter__(self, key) -> Iterator['MaxLspBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'MaxLspBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'MaxLspBandwidthMeta.yang_list_descriptor'): + pass + + +class MaxLspBandwidth( + YANGListItem, + metaclass=MaxLspBandwidthMeta): + """ + YANG list item handler. + + YANG name: max-lsp-bandwidth + """ + + _yang_name: Final[str] = 'max-lsp-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLspBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLspBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/interface_switching_capability/max_lsp_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29f30ca794c567238bb34de6d5de219f72b68cca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-restrictions + """ + from .label_restriction import LabelRestriction + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-restrictions + """ + + def __init__(self): + super().__init__(LabelRestrictions) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelRestrictions': + pass + + def __enter__(self) -> 'LabelRestrictions': + pass + + +class LabelRestrictions( + YANGContainer, + metaclass=LabelRestrictionsMeta): + """ + YANG container handler. + + YANG name: label-restrictions + """ + + _yang_name: Final[str] = 'label-restrictions' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'label-restriction': ( + label_restriction := ( # YANGListMember( + LabelRestrictionsMeta. + LabelRestriction. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestrictions': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..59861169cdfff61daccfdded5e79caf46694f7f1 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/__init__.py @@ -0,0 +1,129 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelRestrictionMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: label-restriction + """ + from .label_end import LabelEnd + from .label_start import LabelStart + from .label_step import LabelStep + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: label-restriction + """ + + def __init__(self): + super().__init__(LabelRestriction) + + def __get__(self, instance, owner=None) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['LabelRestriction']: + pass + + def __iter__(self, key) -> Iterator['LabelRestriction']: + return super().__iter__() + + def __getitem__(self, key) -> 'LabelRestriction': + return super()[key] + + def __enter__(self) -> ( + 'LabelRestrictionMeta.yang_list_descriptor'): + pass + + +class LabelRestriction( + YANGListItem, + metaclass=LabelRestrictionMeta): + """ + YANG list item handler. + + YANG name: label-restriction + """ + + _yang_name: Final[str] = 'label-restriction' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'range-bitmap': ( + range_bitmap := YANGLeafMember( + 'range-bitmap', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'restriction': ( + restriction := YANGLeafMember( + 'restriction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-end': ( + label_end := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelEnd. + yang_container_descriptor())), + + 'label-start': ( + label_start := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStart. + yang_container_descriptor())), + + 'label-step': ( + label_step := ( # YANGContainerMember( + LabelRestrictionMeta. + LabelStep. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelRestriction': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2ad525773e032b7b224f5b661e728ffe8950e98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelEndMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-end + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-end + """ + + def __init__(self): + super().__init__(LabelEnd) + + def __get__(self, instance, owner=None) -> ( + 'LabelEndMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelEnd': + pass + + def __enter__(self) -> 'LabelEnd': + pass + + +class LabelEnd( + YANGContainer, + metaclass=LabelEndMeta): + """ + YANG container handler. + + YANG name: label-end + """ + + _yang_name: Final[str] = 'label-end' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelEndMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelEnd': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_end/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8985523ba0c69fac8fbd1852bd47f2891d92bc6 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStartMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-start + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-start + """ + + def __init__(self): + super().__init__(LabelStart) + + def __get__(self, instance, owner=None) -> ( + 'LabelStartMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStart': + pass + + def __enter__(self) -> 'LabelStart': + pass + + +class LabelStart( + YANGContainer, + metaclass=LabelStartMeta): + """ + YANG container handler. + + YANG name: label-start + """ + + _yang_name: Final[str] = 'label-start' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelStartMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStart': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_start/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7d3aeed125a790da60e394f9e834fb871ab9c3b9 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelStepMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-step + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-step + """ + + def __init__(self): + super().__init__(LabelStep) + + def __get__(self, instance, owner=None) -> ( + 'LabelStepMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelStep': + pass + + def __enter__(self) -> 'LabelStep': + pass + + +class LabelStep( + YANGContainer, + metaclass=LabelStepMeta): + """ + YANG container handler. + + YANG name: label-step + """ + + _yang_name: Final[str] = 'label-step' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelStep': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + LabelStepMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + LabelStepMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/label_restrictions/label_restriction/label_step/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8dbcffdcef6a5a8e5db53b62fce3a3f123ea450f --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxLinkBandwidth': + pass + + def __enter__(self) -> 'MaxLinkBandwidth': + pass + + +class MaxLinkBandwidth( + YANGContainer, + metaclass=MaxLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-link-bandwidth + """ + + _yang_name: Final[str] = 'max-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92e8cf6bf3d3ec018101b740c97d4721224527f7 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class MaxResvLinkBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: max-resv-link-bandwidth + """ + + def __init__(self): + super().__init__(MaxResvLinkBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'MaxResvLinkBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'MaxResvLinkBandwidth': + pass + + def __enter__(self) -> 'MaxResvLinkBandwidth': + pass + + +class MaxResvLinkBandwidth( + YANGContainer, + metaclass=MaxResvLinkBandwidthMeta): + """ + YANG container handler. + + YANG name: max-resv-link-bandwidth + """ + + _yang_name: Final[str] = 'max-resv-link-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + MaxResvLinkBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'MaxResvLinkBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/max_resv_link_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e5e97fc164047e8b36086ca3700f75d61848220c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_nsrlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNsrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-nsrlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-nsrlgs + """ + + def __init__(self): + super().__init__(TeNsrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeNsrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNsrlgs': + pass + + def __enter__(self) -> 'TeNsrlgs': + pass + + +class TeNsrlgs( + YANGContainer, + metaclass=TeNsrlgsMeta): + """ + YANG container handler. + + YANG name: te-nsrlgs + """ + + _yang_name: Final[str] = 'te-nsrlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNsrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..561b31be827190ecd2cf49c88adb2118e8018b00 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/te_srlgs/__init__.py @@ -0,0 +1,79 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeSrlgsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-srlgs + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-srlgs + """ + + def __init__(self): + super().__init__(TeSrlgs) + + def __get__(self, instance, owner=None) -> ( + 'TeSrlgsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeSrlgs': + pass + + def __enter__(self) -> 'TeSrlgs': + pass + + +class TeSrlgs( + YANGContainer, + metaclass=TeSrlgsMeta): + """ + YANG container handler. + + YANG name: te-srlgs + """ + + _yang_name: Final[str] = 'te-srlgs' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeSrlgs': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9ef388cd63aa7c8947fc3391bad703bb01f3d827 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay + """ + from .primary_path import PrimaryPath + from .tunnel_termination_points import TunnelTerminationPoints + from .tunnels import Tunnels + from .backup_path import BackupPath + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay + """ + + def __init__(self): + super().__init__(Underlay) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Underlay': + pass + + def __enter__(self) -> 'Underlay': + pass + + +class Underlay( + YANGContainer, + metaclass=UnderlayMeta): + """ + YANG container handler. + + YANG name: underlay + """ + + _yang_name: Final[str] = 'underlay' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'enabled': ( + enabled := YANGLeafMember( + 'enabled', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'protection-type': ( + protection_type := YANGLeafMember( + 'protection-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'primary-path': ( + primary_path := ( # YANGContainerMember( + UnderlayMeta. + PrimaryPath. + yang_container_descriptor())), + + 'tunnel-termination-points': ( + tunnel_termination_points := ( # YANGContainerMember( + UnderlayMeta. + TunnelTerminationPoints. + yang_container_descriptor())), + + 'tunnels': ( + tunnels := ( # YANGContainerMember( + UnderlayMeta. + Tunnels. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'backup-path': ( + backup_path := ( # YANGListMember( + UnderlayMeta. + BackupPath. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Underlay': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6b6e1ff5cb9da5f8c265df0f8c0854de089ff9ef --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/__init__.py @@ -0,0 +1,109 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class BackupPathMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: backup-path + """ + from .path_element import PathElement + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: backup-path + """ + + def __init__(self): + super().__init__(BackupPath) + + def __get__(self, instance, owner=None) -> ( + 'BackupPathMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['BackupPath']: + pass + + def __iter__(self, key) -> Iterator['BackupPath']: + return super().__iter__() + + def __getitem__(self, key) -> 'BackupPath': + return super()[key] + + def __enter__(self) -> ( + 'BackupPathMeta.yang_list_descriptor'): + pass + + +class BackupPath( + YANGListItem, + metaclass=BackupPathMeta): + """ + YANG list item handler. + + YANG name: backup-path + """ + + _yang_name: Final[str] = 'backup-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'index', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'index': ( + index := YANGLeafMember( + 'index', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + BackupPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'BackupPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e16cb666ce1a7bc800b744b15e11b1d4b7279e6d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .as_number import AsNumber + from .label import Label + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .numbered_link_hop import NumberedLinkHop + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7fbc8696d952dbd4da8674d436ba19f95c93755d --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f2c993df52db1f2e1aa1085a57856c8585fcba58 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..088a2a9a5842516b7391cf36f8c90e94028a03d5 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/backup_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..34a2a729ce6d45e11174065699c428a7ac677a8b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PrimaryPathMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: primary-path + """ + from .path_element import PathElement + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: primary-path + """ + + def __init__(self): + super().__init__(PrimaryPath) + + def __get__(self, instance, owner=None) -> ( + 'PrimaryPathMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'PrimaryPath': + pass + + def __enter__(self) -> 'PrimaryPath': + pass + + +class PrimaryPath( + YANGContainer, + metaclass=PrimaryPathMeta): + """ + YANG container handler. + + YANG name: primary-path + """ + + _yang_name: Final[str] = 'primary-path' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'path-element': ( + path_element := ( # YANGListMember( + PrimaryPathMeta. + PathElement. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PrimaryPath': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1d5e7a0625d0a7e1ed45c21fef726919e7abb0df --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/__init__.py @@ -0,0 +1,106 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class PathElementMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: path-element + """ + from .type import Type + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: path-element + """ + + def __init__(self): + super().__init__(PathElement) + + def __get__(self, instance, owner=None) -> ( + 'PathElementMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['PathElement']: + pass + + def __iter__(self, key) -> Iterator['PathElement']: + return super().__iter__() + + def __getitem__(self, key) -> 'PathElement': + return super()[key] + + def __enter__(self) -> ( + 'PathElementMeta.yang_list_descriptor'): + pass + + +class PathElement( + YANGListItem, + metaclass=PathElementMeta): + """ + YANG list item handler. + + YANG name: path-element + """ + + _yang_name: Final[str] = 'path-element' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'path-element-id', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'path-element-id': ( + path_element_id := YANGLeafMember( + 'path-element-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'PathElement': + instance = super().__new__(cls) + instance._yang_choices = { + + 'type': + PathElementMeta.Type( + instance), + } + return instance + + @property + def type(self) -> ( + PathElementMeta.Type): + return self._yang_choices['type'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..82e2d504aaeb513b94637bc327bfe2492f2f2447 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/__init__.py @@ -0,0 +1,188 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TypeMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: type + """ + + from .numbered_node_hop import NumberedNodeHop + from .unnumbered_link_hop import UnnumberedLinkHop + from .as_number import AsNumber + from .numbered_link_hop import NumberedLinkHop + from .label import Label + + class numbered_node_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_node_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedNodeHop'): + pass + + class unnumbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.unnumbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.UnnumberedLinkHop'): + pass + + class as_number_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__( + TypeMeta.AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.as_number_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + def __enter__(self) -> ( + 'TypeMeta.AsNumber'): + pass + + class numbered_link_hop_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__( + TypeMeta.NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.numbered_link_hop_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + def __enter__(self) -> ( + 'TypeMeta.NumberedLinkHop'): + pass + + class label_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__( + TypeMeta.Label) + + def __get__(self, instance, owner=None) -> ( + 'TypeMeta.label_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TypeMeta.Label'): + pass + + def __enter__(self) -> ( + 'TypeMeta.Label'): + pass + + +class Type(YANGChoice, metaclass=TypeMeta): + """ + YANG choice handler. + + YANG name: type + """ + + _yang_name: Final[str] = 'type' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_node_hop_case_descriptor())), + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + unnumbered_link_hop_case_descriptor())), + + 'as-number': ( + as_number := ( # YANGChoiceCase( + TypeMeta. + as_number_case_descriptor())), + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGChoiceCase( + TypeMeta. + numbered_link_hop_case_descriptor())), + + 'label': ( + label := ( # YANGChoiceCase( + TypeMeta. + label_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a9e6397e1378c9d49d0720f95118a7bc09d8d589 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number + """ + from .as_number_hop import AsNumberHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number + """ + + def __init__(self): + super().__init__(AsNumber) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumber': + pass + + def __enter__(self) -> 'AsNumber': + pass + + +class AsNumber( + YANGContainer, + metaclass=AsNumberMeta): + """ + YANG container handler. + + YANG name: as-number + """ + + _yang_name: Final[str] = 'as-number' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'as-number-hop': ( + as_number_hop := ( # YANGContainerMember( + AsNumberMeta. + AsNumberHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumber': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3d4d7cc089c766991270dfdd2f888bff8b38bb49 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/as_number/as_number_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class AsNumberHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: as-number-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: as-number-hop + """ + + def __init__(self): + super().__init__(AsNumberHop) + + def __get__(self, instance, owner=None) -> ( + 'AsNumberHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'AsNumberHop': + pass + + def __enter__(self) -> 'AsNumberHop': + pass + + +class AsNumberHop( + YANGContainer, + metaclass=AsNumberHopMeta): + """ + YANG container handler. + + YANG name: as-number-hop + """ + + _yang_name: Final[str] = 'as-number-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'as-number': ( + as_number := YANGLeafMember( + 'as-number', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'AsNumberHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f3d584796ce0d9f70bed72da335de382683781da --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label + """ + from .label_hop import LabelHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label + """ + + def __init__(self): + super().__init__(Label) + + def __get__(self, instance, owner=None) -> ( + 'LabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Label': + pass + + def __enter__(self) -> 'Label': + pass + + +class Label( + YANGContainer, + metaclass=LabelMeta): + """ + YANG container handler. + + YANG name: label + """ + + _yang_name: Final[str] = 'label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'label-hop': ( + label_hop := ( # YANGContainerMember( + LabelMeta. + LabelHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Label': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2203b992611860dfd058f330ff7fd5f4d751e43c --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class LabelHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: label-hop + """ + from .te_label import TeLabel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: label-hop + """ + + def __init__(self): + super().__init__(LabelHop) + + def __get__(self, instance, owner=None) -> ( + 'LabelHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'LabelHop': + pass + + def __enter__(self) -> 'LabelHop': + pass + + +class LabelHop( + YANGContainer, + metaclass=LabelHopMeta): + """ + YANG container handler. + + YANG name: label-hop + """ + + _yang_name: Final[str] = 'label-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-label': ( + te_label := ( # YANGContainerMember( + LabelHopMeta. + TeLabel. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'LabelHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf308375db86584b3adcea9d5c6d782f2307e12 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/__init__.py @@ -0,0 +1,95 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeLabelMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-label + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-label + """ + + def __init__(self): + super().__init__(TeLabel) + + def __get__(self, instance, owner=None) -> ( + 'TeLabelMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeLabel': + pass + + def __enter__(self) -> 'TeLabel': + pass + + +class TeLabel( + YANGContainer, + metaclass=TeLabelMeta): + """ + YANG container handler. + + YANG name: te-label + """ + + _yang_name: Final[str] = 'te-label' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeLabel': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeLabelMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeLabelMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/label/label_hop/te_label/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..75b0008fe318c4c34997b7532696828e42b85abf --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + from .numbered_link_hop import NumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-link-hop': ( + numbered_link_hop := ( # YANGContainerMember( + NumberedLinkHopMeta. + NumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1abedb4d3f8145943387f3e66e3e17fed741dcdc --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_link_hop/numbered_link_hop/__init__.py @@ -0,0 +1,97 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-link-hop + """ + + def __init__(self): + super().__init__(NumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedLinkHop': + pass + + def __enter__(self) -> 'NumberedLinkHop': + pass + + +class NumberedLinkHop( + YANGContainer, + metaclass=NumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: numbered-link-hop + """ + + _yang_name: Final[str] = 'numbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f0ceac062e9d2ce79e6681b5f812cb2adae4a9ca --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + from .numbered_node_hop import NumberedNodeHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'numbered-node-hop': ( + numbered_node_hop := ( # YANGContainerMember( + NumberedNodeHopMeta. + NumberedNodeHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b8413f9714b640282ccc3b07327104536c117b38 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/numbered_node_hop/numbered_node_hop/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NumberedNodeHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: numbered-node-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: numbered-node-hop + """ + + def __init__(self): + super().__init__(NumberedNodeHop) + + def __get__(self, instance, owner=None) -> ( + 'NumberedNodeHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'NumberedNodeHop': + pass + + def __enter__(self) -> 'NumberedNodeHop': + pass + + +class NumberedNodeHop( + YANGContainer, + metaclass=NumberedNodeHopMeta): + """ + YANG container handler. + + YANG name: numbered-node-hop + """ + + _yang_name: Final[str] = 'numbered-node-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NumberedNodeHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..18213797fc567b08150fc431ac7611ef32d54622 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/__init__.py @@ -0,0 +1,86 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + from .unnumbered_link_hop import UnnumberedLinkHop + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'unnumbered-link-hop': ( + unnumbered_link_hop := ( # YANGContainerMember( + UnnumberedLinkHopMeta. + UnnumberedLinkHop. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ee74a2b7c7f647d2a88dfb22f44ed0ec1e80e4 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/primary_path/path_element/type/unnumbered_link_hop/unnumbered_link_hop/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnnumberedLinkHopMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: unnumbered-link-hop + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: unnumbered-link-hop + """ + + def __init__(self): + super().__init__(UnnumberedLinkHop) + + def __get__(self, instance, owner=None) -> ( + 'UnnumberedLinkHopMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnnumberedLinkHop': + pass + + def __enter__(self) -> 'UnnumberedLinkHop': + pass + + +class UnnumberedLinkHop( + YANGContainer, + metaclass=UnnumberedLinkHopMeta): + """ + YANG container handler. + + YANG name: unnumbered-link-hop + """ + + _yang_name: Final[str] = 'unnumbered-link-hop' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'direction': ( + direction := YANGLeafMember( + 'direction', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'hop-type': ( + hop_type := YANGLeafMember( + 'hop-type', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'link-tp-id': ( + link_tp_id := YANGLeafMember( + 'link-tp-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'node-id': ( + node_id := YANGLeafMember( + 'node-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnnumberedLinkHop': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c5cccf39482c3497e05c1c7ab8f4fdd3e2d7490b --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnel_termination_points/__init__.py @@ -0,0 +1,91 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelTerminationPointsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnel-termination-points + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnel-termination-points + """ + + def __init__(self): + super().__init__(TunnelTerminationPoints) + + def __get__(self, instance, owner=None) -> ( + 'TunnelTerminationPointsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TunnelTerminationPoints': + pass + + def __enter__(self) -> 'TunnelTerminationPoints': + pass + + +class TunnelTerminationPoints( + YANGContainer, + metaclass=TunnelTerminationPointsMeta): + """ + YANG container handler. + + YANG name: tunnel-termination-points + """ + + _yang_name: Final[str] = 'tunnel-termination-points' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'destination': ( + destination := YANGLeafMember( + 'destination', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'source': ( + source := YANGLeafMember( + 'source', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TunnelTerminationPoints': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..303858f3e0c28faecf9696d2fbf403d5510cced8 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/__init__.py @@ -0,0 +1,92 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelsMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: tunnels + """ + from .tunnel import Tunnel + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: tunnels + """ + + def __init__(self): + super().__init__(Tunnels) + + def __get__(self, instance, owner=None) -> ( + 'TunnelsMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Tunnels': + pass + + def __enter__(self) -> 'Tunnels': + pass + + +class Tunnels( + YANGContainer, + metaclass=TunnelsMeta): + """ + YANG container handler. + + YANG name: tunnels + """ + + _yang_name: Final[str] = 'tunnels' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + + 'tunnel': ( + tunnel := ( # YANGListMember( + TunnelsMeta. + Tunnel. + yang_list_descriptor())), + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnels': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f854dfd329ce016317b7b9743ace874769f03094 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/underlay/tunnels/tunnel/__init__.py @@ -0,0 +1,102 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TunnelMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: tunnel + """ + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: tunnel + """ + + def __init__(self): + super().__init__(Tunnel) + + def __get__(self, instance, owner=None) -> ( + 'TunnelMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['Tunnel']: + pass + + def __iter__(self, key) -> Iterator['Tunnel']: + return super().__iter__() + + def __getitem__(self, key) -> 'Tunnel': + return super()[key] + + def __enter__(self) -> ( + 'TunnelMeta.yang_list_descriptor'): + pass + + +class Tunnel( + YANGListItem, + metaclass=TunnelMeta): + """ + YANG list item handler. + + YANG name: tunnel + """ + + _yang_name: Final[str] = 'tunnel' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'tunnel-name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'sharing': ( + sharing := YANGLeafMember( + 'sharing', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'tunnel-name': ( + tunnel_name := YANGLeafMember( + 'tunnel-name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Tunnel': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd4e9d8a913ee8fb4ba711c3d10310583ea16711 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/__init__.py @@ -0,0 +1,103 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnreservedBandwidthMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: unreserved-bandwidth + """ + from .te_bandwidth import TeBandwidth + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: unreserved-bandwidth + """ + + def __init__(self): + super().__init__(UnreservedBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['UnreservedBandwidth']: + pass + + def __iter__(self, key) -> Iterator['UnreservedBandwidth']: + return super().__iter__() + + def __getitem__(self, key) -> 'UnreservedBandwidth': + return super()[key] + + def __enter__(self) -> ( + 'UnreservedBandwidthMeta.yang_list_descriptor'): + pass + + +class UnreservedBandwidth( + YANGListItem, + metaclass=UnreservedBandwidthMeta): + """ + YANG list item handler. + + YANG name: unreserved-bandwidth + """ + + _yang_name: Final[str] = 'unreserved-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'priority', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-bandwidth': ( + te_bandwidth := ( # YANGContainerMember( + UnreservedBandwidthMeta. + TeBandwidth. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnreservedBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..21c93df9e732a17da394efda2c59b6166de1374a --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/__init__.py @@ -0,0 +1,89 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeBandwidthMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-bandwidth + """ + from .technology import Technology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-bandwidth + """ + + def __init__(self): + super().__init__(TeBandwidth) + + def __get__(self, instance, owner=None) -> ( + 'TeBandwidthMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeBandwidth': + pass + + def __enter__(self) -> 'TeBandwidth': + pass + + +class TeBandwidth( + YANGContainer, + metaclass=TeBandwidthMeta): + """ + YANG container handler. + + YANG name: te-bandwidth + """ + + _yang_name: Final[str] = 'te-bandwidth' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeBandwidth': + instance = super().__new__(cls) + instance._yang_choices = { + + 'technology': + TeBandwidthMeta.Technology( + instance), + } + return instance + + @property + def technology(self) -> ( + TeBandwidthMeta.Technology): + return self._yang_choices['technology'] diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b7c35cb35140e0059a8596a975e71e1cfa92c717 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/__init__.py @@ -0,0 +1,72 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TechnologyMeta(type): + """ + Metaclass for YANG choice handler. + + YANG name: technology + """ + + from .generic import Generic + + class generic_case_descriptor(YANGChoiceCase): + """ + YANG choice case descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__( + TechnologyMeta.Generic) + + def __get__(self, instance, owner=None) -> ( + 'TechnologyMeta.generic_case_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + def __enter__(self) -> ( + 'TechnologyMeta.Generic'): + pass + + +class Technology(YANGChoice, metaclass=TechnologyMeta): + """ + YANG choice handler. + + YANG name: technology + """ + + _yang_name: Final[str] = 'technology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_cases: Final[Dict[str, YANGChoiceCase]] = { + + 'generic': ( + generic := ( # YANGChoiceCase( + TechnologyMeta. + generic_case_descriptor())), + } diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..81dce6de335c51cb366c8fa8c6fe4d53dbad586e --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/link_template/te_link_attributes/unreserved_bandwidth/te_bandwidth/technology/generic/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class GenericMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: generic + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: generic + """ + + def __init__(self): + super().__init__(Generic) + + def __get__(self, instance, owner=None) -> ( + 'GenericMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'Generic': + pass + + def __enter__(self) -> 'Generic': + pass + + +class Generic( + YANGContainer, + metaclass=GenericMeta): + """ + YANG container handler. + + YANG name: generic + """ + + _yang_name: Final[str] = 'generic' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'generic': ( + generic := YANGLeafMember( + 'generic', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'Generic': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b2973312bf2c09a332f8dc3751bd797b11115c98 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/__init__.py @@ -0,0 +1,115 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final, Iterator, List, Tuple + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class NodeTemplateMeta(type): + """ + Metaclass for YANG list item handler. + + YANG name: node-template + """ + from .te_node_attributes import TeNodeAttributes + + class yang_list_descriptor( + YANGListMember): + """ + YANG list descriptor class. + + YANG name: node-template + """ + + def __init__(self): + super().__init__(NodeTemplate) + + def __get__(self, instance, owner=None) -> ( + 'NodeTemplateMeta.yang_list_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> List['NodeTemplate']: + pass + + def __iter__(self, key) -> Iterator['NodeTemplate']: + return super().__iter__() + + def __getitem__(self, key) -> 'NodeTemplate': + return super()[key] + + def __enter__(self) -> ( + 'NodeTemplateMeta.yang_list_descriptor'): + pass + + +class NodeTemplate( + YANGListItem, + metaclass=NodeTemplateMeta): + """ + YANG list item handler. + + YANG name: node-template + """ + + _yang_name: Final[str] = 'node-template' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_list_key_names: Final[Tuple[str]] = ( + 'name', + ) + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'reference-change-policy': ( + reference_change_policy := YANGLeafMember( + 'reference-change-policy', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'priority': ( + priority := YANGLeafMember( + 'priority', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'te-node-attributes': ( + te_node_attributes := ( # YANGContainerMember( + NodeTemplateMeta. + TeNodeAttributes. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'NodeTemplate': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d33037182fea0bb3aaf9c33036500240c54c6058 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/__init__.py @@ -0,0 +1,110 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class TeNodeAttributesMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: te-node-attributes + """ + from .underlay_topology import UnderlayTopology + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: te-node-attributes + """ + + def __init__(self): + super().__init__(TeNodeAttributes) + + def __get__(self, instance, owner=None) -> ( + 'TeNodeAttributesMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'TeNodeAttributes': + pass + + def __enter__(self) -> 'TeNodeAttributes': + pass + + +class TeNodeAttributes( + YANGContainer, + metaclass=TeNodeAttributesMeta): + """ + YANG container handler. + + YANG name: te-node-attributes + """ + + _yang_name: Final[str] = 'te-node-attributes' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'name': ( + name := YANGLeafMember( + 'name', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'is-abstract': ( + is_abstract := YANGLeafMember( + 'is-abstract', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'domain-id': ( + domain_id := YANGLeafMember( + 'domain-id', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + + 'admin-status': ( + admin_status := YANGLeafMember( + 'admin-status', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + + 'underlay-topology': ( + underlay_topology := ( # YANGContainerMember( + TeNodeAttributesMeta. + UnderlayTopology. + yang_container_descriptor())), + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'TeNodeAttributes': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42dee7a72fe4a5d79128cf6ad278af68094e6692 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/bindings/networks/te/templates/node_template/te_node_attributes/underlay_topology/__init__.py @@ -0,0 +1,85 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, Final + +from .. import ( + YANGChoice, YANGChoiceCase, YANGContainer, YANGContainerMember, + YANGLeafMember, YANGListItem, YANGListMember) + + +class UnderlayTopologyMeta(type): + """ + Metaclass for YANG container handler. + + YANG name: underlay-topology + """ + + class yang_container_descriptor( + YANGContainerMember): + """ + YANG container descriptor class. + + YANG name: underlay-topology + """ + + def __init__(self): + super().__init__(UnderlayTopology) + + def __get__(self, instance, owner=None) -> ( + 'UnderlayTopologyMeta.yang_container_descriptor'): + return super().__get__(instance, owner) + + def __call__(self) -> 'UnderlayTopology': + pass + + def __enter__(self) -> 'UnderlayTopology': + pass + + +class UnderlayTopology( + YANGContainer, + metaclass=UnderlayTopologyMeta): + """ + YANG container handler. + + YANG name: underlay-topology + """ + + _yang_name: Final[str] = 'underlay-topology' + _yang_namespace: Final[str] = 'urn:ietf:params:xml:ns:yang:ietf-te-topology' + _yang_module_name: Final[str] = 'ietf-te-topology' + + _yang_leaf_members: Final[Dict[str, YANGLeafMember]] = { + + 'network-ref': ( + network_ref := YANGLeafMember( + 'network-ref', + 'urn:ietf:params:xml:ns:yang:ietf-te-topology', + 'ietf-te-topology')), + } + + _yang_container_members: Final[Dict[str, YANGContainerMember]] = { + } + + _yang_list_members: Final[Dict[str, YANGListMember]] = { + } + + _yang_choices: Final[Dict[str, YANGChoice]] = None + + def __new__(cls, *args, **kwargs) -> 'UnderlayTopology': + instance = super().__new__(cls) + instance._yang_choices = { + } + return instance diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt new file mode 100644 index 0000000000000000000000000000000000000000..b81498dd8aa94457e2658cc29586de66242ae391 --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ietf-network-slice-service.txt @@ -0,0 +1,261 @@ +# IETF draft-ietf-teas-ietf-network-slice-nbi-yang-02 - IETF Network Slice Service YANG Model +# Ref: https://datatracker.ietf.org/doc/draft-ietf-teas-ietf-network-slice-nbi-yang/ + +module: ietf-network-slice-service + +--rw network-slice-services + +--rw slo-sle-templates + | +--rw slo-sle-template* [id] + | +--rw id string + | +--rw template-description? string + +--rw slice-service* [service-id] + +--rw service-id string + +--rw service-description? string + +--rw service-tags + | +--rw tag-type* [tag-type] + | | +--rw tag-type identityref + | | +--rw value* string + | +--rw tag-opaque* [tag-name] + | +--rw tag-name string + | +--rw value* string + +--rw (slo-sle-policy)? + | +--:(standard) + | | +--rw slo-sle-template? leafref + | +--:(custom) + | +--rw service-slo-sle-policy + | +--rw policy-description? string + | +--rw metric-bounds + | | +--rw metric-bound* [metric-type] + | | +--rw metric-type identityref + | | +--rw metric-unit string + | | +--rw value-description? string + | | +--rw bound? uint64 + | +--rw security* identityref + | +--rw isolation? identityref + | +--rw max-occupancy-level? uint8 + | +--rw mtu? uint16 + | +--rw steering-constraints + | +--rw path-constraints + | +--rw service-function + +--rw status + | +--rw admin-status + | | +--rw status? identityref + | | +--rw last-updated? yang:date-and-time + | +--ro oper-status + | +--ro status? identityref + | +--ro last-updated? yang:date-and-time + +--rw sdps + | +--rw sdp* [sdp-id] + | +--rw sdp-id string + | +--rw sdp-description? string + | +--rw location + | | +--rw altitude? int64 + | | +--rw latitude? decimal64 + | | +--rw longitude? decimal64 + | +--rw node-id? string + | +--rw sdp-ip? inet:ip-address + | +--rw service-match-criteria + | | +--rw match-criterion* [index] + | | +--rw index uint32 + | | +--rw match-type + | | | identityref + | | +--rw value* string + | | +--rw target-connection-group-id leafref + | | +--rw connection-group-sdp-role? + | | | identityref + | | +--rw target-connectivity-construct-id? leafref + | +--rw sdp-peering + | | +--rw protocol* [protocol-type] + | | | +--rw protocol-type identityref + | | | +--rw attribute* [attribute-type] + | | | +--rw attribute-type identityref + | | | +--rw value* string + | | +--rw opaque* [attribute-name] + | | +--rw attribute-name string + | | +--rw value* string + | +--rw attachment-circuits + | | +--rw attachment-circuit* [ac-id] + | | +--rw ac-id string + | | +--rw ac-description? string + | | +--rw ac-node-id? string + | | +--rw ac-tp-id? string + | | +--rw ac-ip-address? inet:ip-address + | | +--rw ac-ip-prefix-length? uint8 + | | +--rw ac-qos-policy-name? string + | | +--rw mtu? uint16 + | | +--rw ac-tags + | | | +--rw ac-tags* [ac-tag-type] + | | | | +--rw ac-tag-type identityref + | | | | +--rw value* string + | | | +--rw ac-tag-opaque* [tag-name] + | | | +--rw tag-name string + | | | +--rw value* string + | | +--rw service-match-criteria + | | | +--rw match-criterion* [index] + | | | +--rw index + | | | | uint32 + | | | +--rw match-type + | | | | identityref + | | | +--rw value* + | | | | string + | | | +--rw target-connection-group-id leafref + | | | +--rw connection-group-sdp-role? + | | | | identityref + | | | +--rw target-connectivity-construct-id? leafref + | | +--rw sdp-peering + | | | +--rw protocol* [protocol-type] + | | | | +--rw protocol-type identityref + | | | | +--rw attribute* [attribute-type] + | | | | +--rw attribute-type identityref + | | | | +--rw value* string + | | | +--rw opaque* [attribute-name] + | | | +--rw attribute-name string + | | | +--rw value* string + | | +--rw incoming-rate-limits + | | | +--rw cir? uint64 + | | | +--rw cbs? uint64 + | | | +--rw eir? uint64 + | | | +--rw ebs? uint64 + | | | +--rw pir? uint64 + | | | +--rw pbs? uint64 + | | +--rw outgoing-rate-limits + | | +--rw cir? uint64 + | | +--rw cbs? uint64 + | | +--rw eir? uint64 + | | +--rw ebs? uint64 + | | +--rw pir? uint64 + | | +--rw pbs? uint64 + | +--rw incoming-rate-limits + | | +--rw cir? uint64 + | | +--rw cbs? uint64 + | | +--rw eir? uint64 + | | +--rw ebs? uint64 + | | +--rw pir? uint64 + | | +--rw pbs? uint64 + | +--rw outgoing-rate-limits + | | +--rw cir? uint64 + | | +--rw cbs? uint64 + | | +--rw eir? uint64 + | | +--rw ebs? uint64 + | | +--rw pir? uint64 + | | +--rw pbs? uint64 + | +--rw status + | | +--rw admin-status + | | | +--rw status? identityref + | | | +--rw last-updated? yang:date-and-time + | | +--ro oper-status + | | +--ro status? identityref + | | +--ro last-updated? yang:date-and-time + | +--ro sdp-monitoring + | +--ro incoming-utilized-bandwidth? + | | te-types:te-bandwidth + | +--ro incoming-bw-utilization decimal64 + | +--ro outgoing-utilized-bandwidth? + | | te-types:te-bandwidth + | +--ro outgoing-bw-utilization decimal64 + +--rw connection-groups + +--rw connection-group* [connection-group-id] + +--rw connection-group-id string + +--rw connectivity-type? identityref + +--rw (slo-sle-policy)? + | +--:(standard) + | | +--rw slo-sle-template? leafref + | +--:(custom) + | +--rw service-slo-sle-policy + | +--rw policy-description? string + | +--rw metric-bounds + | | +--rw metric-bound* [metric-type] + | | +--rw metric-type identityref + | | +--rw metric-unit string + | | +--rw value-description? string + | | +--rw bound? uint64 + | +--rw security* identityref + | +--rw isolation? identityref + | +--rw max-occupancy-level? uint8 + | +--rw mtu? uint16 + | +--rw steering-constraints + | +--rw path-constraints + | +--rw service-function + +--rw connectivity-construct* [cc-id] + | +--rw cc-id uint32 + | +--rw (connectivity-construct-type)? + | | +--:(p2p) + | | | +--rw p2p-sender-sdp? + | | | | -> ../../../../sdps/sdp/sdp-id + | | | +--rw p2p-receiver-sdp? + | | | -> ../../../../sdps/sdp/sdp-id + | | +--:(p2mp) + | | | +--rw p2mp-sender-sdp? + | | | | -> ../../../../sdps/sdp/sdp-id + | | | +--rw p2mp-receiver-sdp* + | | | -> ../../../../sdps/sdp/sdp-id + | | +--:(a2a) + | | +--rw a2a-sdp* [sdp-id] + | | +--rw sdp-id + | | | -> ../../../../../sdps/sdp/sdp-id + | | +--rw (slo-sle-policy)? + | | +--:(standard) + | | | +--rw slo-sle-template? leafref + | | +--:(custom) + | | +--rw service-slo-sle-policy + | | +--rw policy-description? + | | | string + | | +--rw metric-bounds + | | | +--rw metric-bound* + | | | [metric-type] + | | | +--rw metric-type + | | | | identityref + | | | +--rw metric-unit + | | | | string + | | | +--rw value-description? + | | | | string + | | | +--rw bound? + | | | uint64 + | | +--rw security* + | | | identityref + | | +--rw isolation? + | | | identityref + | | +--rw max-occupancy-level? + | | | uint8 + | | +--rw mtu? + | | | uint16 + | | +--rw steering-constraints + | | +--rw path-constraints + | | +--rw service-function + | +--rw (slo-sle-policy)? + | | +--:(standard) + | | | +--rw slo-sle-template? leafref + | | +--:(custom) + | | +--rw service-slo-sle-policy + | | +--rw policy-description? string + | | +--rw metric-bounds + | | | +--rw metric-bound* [metric-type] + | | | +--rw metric-type + | | | | identityref + | | | +--rw metric-unit string + | | | +--rw value-description? string + | | | +--rw bound? uint64 + | | +--rw security* identityref + | | +--rw isolation? identityref + | | +--rw max-occupancy-level? uint8 + | | +--rw mtu? uint16 + | | +--rw steering-constraints + | | +--rw path-constraints + | | +--rw service-function + | +--ro connectivity-construct-monitoring + | +--ro one-way-min-delay? uint32 + | +--ro one-way-max-delay? uint32 + | +--ro one-way-delay-variation? uint32 + | +--ro one-way-packet-loss? decimal64 + | +--ro two-way-min-delay? uint32 + | +--ro two-way-max-delay? uint32 + | +--ro two-way-delay-variation? uint32 + | +--ro two-way-packet-loss? decimal64 + +--ro connection-group-monitoring + +--ro one-way-min-delay? uint32 + +--ro one-way-max-delay? uint32 + +--ro one-way-delay-variation? uint32 + +--ro one-way-packet-loss? decimal64 + +--ro two-way-min-delay? uint32 + +--ro two-way-max-delay? uint32 + +--ro two-way-delay-variation? uint32 + +--ro two-way-packet-loss? decimal64 \ No newline at end of file diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py new file mode 100644 index 0000000000000000000000000000000000000000..c38d75d063374b896ce6767c035175df8774c8ff --- /dev/null +++ b/src/compute/service/rest_server/nbi_plugins/ietf_network_slice/ofc23_batch_slices.py @@ -0,0 +1,158 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +import random +import uuid +import sys +import time +import requests + +from bindings.network_slice_services import NetworkSliceServices + + +# R1 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R1_UUID = "ed2388eb-5fb9-5888-a4f4-160267d3e19b" +R1_PORT_13_0_UUID_OPTICAL = "20440915-1a6c-5e7b-a80f-b0e0e51f066d" +R1_PORT_13_1_UUID_COPPER = "ff900d5d-2ac0-576c-9628-a2d016681f9d" + +# R2 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R2_UUID = "49ce0312-1274-523b-97b8-24d0eca2d72d" +R2_PORT_13_0_UUID_OPTICAL = "214618cb-b63b-5e66-84c2-45c1c016e5f0" +R2_PORT_13_1_UUID_COPPER = "4e0f7fb4-5d22-56ad-a00e-20bffb4860f9" + +# R3 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R3_UUID = "3bc8e994-a3b9-5f60-9c77-6608b1d08313" +R3_PORT_13_0_UUID_OPTICAL = "da5196f5-d651-5def-ada6-50ed6430279d" +R3_PORT_13_1_UUID_COPPER = "43d221fa-5701-5740-a129-502131f5bda2" + +# R4 emulated devices +# Port 13-0 is Optical +# Port 13-1 is Copper +R4_UUID = "b43e6361-2573-509d-9a88-1793e751b10d" +R4_PORT_13_0_UUID_OPTICAL = "241b74a7-8677-595c-ad65-cc9093c1e341" +R4_PORT_13_1_UUID_COPPER = "c57abf46-caaf-5954-90cc-1fec0a69330e" + +node_dict = {R1_PORT_13_1_UUID_COPPER: R1_UUID, + R2_PORT_13_1_UUID_COPPER: R2_UUID, + R3_PORT_13_1_UUID_COPPER: R3_UUID, + R4_PORT_13_1_UUID_COPPER: R4_UUID} +list_endpoints = [R1_PORT_13_1_UUID_COPPER, + R2_PORT_13_1_UUID_COPPER, + R3_PORT_13_1_UUID_COPPER, + R4_PORT_13_1_UUID_COPPER] + +list_availability= [99, 99.9, 99.99, 99.999, 99.9999] +list_bw = [10, 40, 50, 100, 150, 200, 400] +list_owner = ["Telefonica", "CTTC", "Telenor", "ADVA", "Ubitech", "ATOS"] + +URL_POST = "/restconf/data/ietf-network-slice-service:ietf-nss/network-slice-services" +URL_DELETE = "/restconf/data/ietf-network-slice-service:ietf-nss/network-slice-services/slice-service=" + +def generate_request(seed: str) -> (dict, str): + + ns = NetworkSliceServices() + + # Slice 1 + suuid = str(uuid.uuid5(uuid.NAMESPACE_DNS, str(seed))) + slice1 = ns.slice_service[suuid] + slice1.service_description = "Test slice for OFC 2023 demo" + slice1.status().admin_status().status = "Planned" # TODO not yet mapped + + ''' + SDPS: + R1 optical to R3 optical + ''' + sdps1 = slice1.sdps().sdp + while True: + ep1_uuid = random.choice(list_endpoints) + ep2_uuid = random.choice(list_endpoints) + if ep1_uuid != ep2_uuid: + break + + sdps1[ep1_uuid].node_id = node_dict.get(ep1_uuid) + sdps1[ep2_uuid].node_id = node_dict.get(ep2_uuid) + + ''' + Connectivity group + Connection construct and 2 sla constrains: + - Bandwidth + - Availability + ''' + cg_uuid = str(uuid.uuid4()) + cg = slice1.connection_groups().connection_group + cg1 = cg[cg_uuid] + + cc1 = cg1.connectivity_construct[0] + cc1.cc_id = 5 + p2p = cc1.connectivity_construct_type.p2p() + p2p.p2p_sender_sdp = ep1_uuid + p2p.p2p_receiver_sdp = ep2_uuid + + slo_custom = cc1.slo_sle_policy.custom() + metric_bounds = slo_custom.service_slo_sle_policy().metric_bounds().metric_bound + + # SLO Bandwidth + slo_bandwidth = metric_bounds["service-slo-two-way-bandwidth"] + slo_bandwidth.value_description = "Guaranteed bandwidth" + slo_bandwidth.bound = int(random.choice(list_bw)) + slo_bandwidth.metric_unit = "Gbps" + + # SLO Availability + slo_availability = metric_bounds["service-slo-availability"] + slo_availability.value_description = "Guaranteed availability" + slo_availability.metric_unit = "percentage" + slo_availability.bound = random.choice(list_availability) + + json_request = {"data": ns.to_json()} + + #Last, add name and owner manually + list_name_owner = [{"tag-type": "owner", "value": random.choice(list_owner)}] + json_request["data"]["ietf-network-slice-service:network-slice-services"]["slice-service"][0]["service-tags"] = list_name_owner + + return (json_request, suuid) + + +if __name__ == "__main__": + print("Generating requests...") + num = int(sys.argv[2]) + ip = str(sys.argv[1]) + list_requests = [] + + for i in range(num): + request = generate_request(i) + list_requests.append(request) + print(f"HTTP.POST={request[0]}-{request[1]}") + time.sleep(2) + requests.post(f"http://{ip}{URL_POST}", auth=("admin", "admin"), json=request[0]) + + print("Slices sent, please press Enter key to delete them...") + input() + + for request,suuid in list_requests: + requests.delete(f"http://{ip}{URL_DELETE}{suuid}", auth=("admin", "admin")) + print(f"HTTP.DELETE={suuid}") + time.sleep(2) + print("All slices deleted!") + + + + + diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Authentication.py b/src/compute/service/rest_server/nbi_plugins/tools/Authentication.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Authentication.py rename to src/compute/service/rest_server/nbi_plugins/tools/Authentication.py diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/HttpStatusCodes.py b/src/compute/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/HttpStatusCodes.py rename to src/compute/service/rest_server/nbi_plugins/tools/HttpStatusCodes.py diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Validator.py b/src/compute/service/rest_server/nbi_plugins/tools/Validator.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/Validator.py rename to src/compute/service/rest_server/nbi_plugins/tools/Validator.py diff --git a/src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/__init__.py b/src/compute/service/rest_server/nbi_plugins/tools/__init__.py similarity index 100% rename from src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/tools/__init__.py rename to src/compute/service/rest_server/nbi_plugins/tools/__init__.py diff --git a/src/context/service/database/ConfigRule.py b/src/context/service/database/ConfigRule.py index dd60441ca70329b9431188e28c21d98d941ada14..09723cc6f6b31e2496bf5ab475f50d0aa58f95c2 100644 --- a/src/context/service/database/ConfigRule.py +++ b/src/context/service/database/ConfigRule.py @@ -80,7 +80,7 @@ def compose_config_rules_data( return dict_config_rules def upsert_config_rules( - session : Session, config_rules : List[Dict], + session : Session, config_rules : List[Dict], is_delete : bool = False, device_uuid : Optional[str] = None, service_uuid : Optional[str] = None, slice_uuid : Optional[str] = None, ) -> bool: uuids_to_delete : Set[str] = set() @@ -89,7 +89,9 @@ def upsert_config_rules( for config_rule in config_rules: configrule_uuid = config_rule['configrule_uuid'] configrule_action = config_rule['action'] - if configrule_action == ORM_ConfigActionEnum.SET: + if is_delete or configrule_action == ORM_ConfigActionEnum.DELETE: + uuids_to_delete.add(configrule_uuid) + elif configrule_action == ORM_ConfigActionEnum.SET: position = uuids_to_upsert.get(configrule_uuid) if position is None: # if not added, add it @@ -98,8 +100,6 @@ def upsert_config_rules( else: # if already added, update occurrence rules_to_upsert[position] = config_rule - elif configrule_action == ORM_ConfigActionEnum.DELETE: - uuids_to_delete.add(configrule_uuid) else: MSG = 'Action for ConfigRule({:s}) is not supported '+\ '(device_uuid={:s}, service_uuid={:s}, slice_uuid={:s})' diff --git a/src/context/service/database/Constraint.py b/src/context/service/database/Constraint.py index 0540841c3a570f9a1e28ec530998b115f73a62a7..3a73f6589f9332aa4c84f8f296f2cb56db3048bf 100644 --- a/src/context/service/database/Constraint.py +++ b/src/context/service/database/Constraint.py @@ -66,7 +66,7 @@ def compose_constraints_data( constraint_name = '{:s}:{:s}:{:s}'.format(parent_kind, kind.value, endpoint_uuid) elif kind in { ConstraintKindEnum.SCHEDULE, ConstraintKindEnum.SLA_CAPACITY, ConstraintKindEnum.SLA_LATENCY, - ConstraintKindEnum.SLA_AVAILABILITY, ConstraintKindEnum.SLA_ISOLATION_LEVEL + ConstraintKindEnum.SLA_AVAILABILITY, ConstraintKindEnum.SLA_ISOLATION }: constraint_name = '{:s}:{:s}:'.format(parent_kind, kind.value) else: @@ -81,7 +81,7 @@ def compose_constraints_data( return dict_constraints def upsert_constraints( - session : Session, constraints : List[Dict], + session : Session, constraints : List[Dict], is_delete : bool = False, service_uuid : Optional[str] = None, slice_uuid : Optional[str] = None ) -> bool: uuids_to_upsert : Dict[str, int] = dict() @@ -107,11 +107,11 @@ def upsert_constraints( #str_stmt = stmt.compile(dialect=postgresql.dialect(), compile_kwargs={"literal_binds": True}) #LOGGER.warning('delete stmt={:s}'.format(str(str_stmt))) constraint_deletes = session.execute(stmt) - LOGGER.warning('constraint_deletes.rowcount={:s}'.format(str(constraint_deletes.rowcount))) + #LOGGER.warning('constraint_deletes.rowcount={:s}'.format(str(constraint_deletes.rowcount))) delete_affected = int(constraint_deletes.rowcount) > 0 upsert_affected = False - if len(constraints) > 0: + if not is_delete and len(constraints) > 0: stmt = insert(ConstraintModel).values(constraints) stmt = stmt.on_conflict_do_update( index_elements=[ConstraintModel.constraint_uuid], diff --git a/src/context/service/database/PolicyRule.py b/src/context/service/database/PolicyRule.py index a100103890f293d418b4c70a7948ad9687ffe5b3..e95cec4ae533795b23b8fd4e2f26ac9000c1bcce 100644 --- a/src/context/service/database/PolicyRule.py +++ b/src/context/service/database/PolicyRule.py @@ -65,7 +65,7 @@ def policyrule_set(db_engine : Engine, request : PolicyRule) -> Tuple[PolicyRule policyrule_kind = PolicyRuleKindEnum._member_map_.get(policyrule_kind.upper()) # pylint: disable=no-member policyrule_state = grpc_to_enum__policyrule_state(policyrule_basic.policyRuleState.policyRuleState) - policyrule_state_message = policyrule_basic.policyRuleState.policyRuleStateMessage + policyrule_state_msg = policyrule_basic.policyRuleState.policyRuleStateMessage json_policyrule_basic = grpc_message_to_json(policyrule_basic) policyrule_eca_data = json.dumps({ @@ -77,15 +77,15 @@ def policyrule_set(db_engine : Engine, request : PolicyRule) -> Tuple[PolicyRule now = datetime.datetime.utcnow() policyrule_data = [{ - 'policyrule_uuid' : policyrule_uuid, - 'policyrule_kind' : policyrule_kind, - 'policyrule_state' : policyrule_state, - 'policyrule_state_message': policyrule_state_message, - 'policyrule_priority' : policyrule_basic.priority, - 'policyrule_eca_data' : policyrule_eca_data, - 'created_at' : now, - 'updated_at' : now, - }] + 'policyrule_uuid' : policyrule_uuid, + 'policyrule_kind' : policyrule_kind, + 'policyrule_state' : policyrule_state, + 'policyrule_state_msg': policyrule_state_msg, + 'policyrule_priority' : policyrule_basic.priority, + 'policyrule_eca_data' : policyrule_eca_data, + 'created_at' : now, + 'updated_at' : now, + }] policyrule_service_uuid = None if policyrule_kind == PolicyRuleKindEnum.SERVICE: @@ -108,11 +108,11 @@ def policyrule_set(db_engine : Engine, request : PolicyRule) -> Tuple[PolicyRule stmt = stmt.on_conflict_do_update( index_elements=[PolicyRuleModel.policyrule_uuid], set_=dict( - policyrule_state = stmt.excluded.policyrule_state, - policyrule_state_message = stmt.excluded.policyrule_state_message, - policyrule_priority = stmt.excluded.policyrule_priority, - policyrule_eca_data = stmt.excluded.policyrule_eca_data, - updated_at = stmt.excluded.updated_at, + policyrule_state = stmt.excluded.policyrule_state, + policyrule_state_msg = stmt.excluded.policyrule_state_msg, + policyrule_priority = stmt.excluded.policyrule_priority, + policyrule_eca_data = stmt.excluded.policyrule_eca_data, + updated_at = stmt.excluded.updated_at, ) ) stmt = stmt.returning(PolicyRuleModel.created_at, PolicyRuleModel.updated_at) diff --git a/src/context/service/database/Service.py b/src/context/service/database/Service.py index 4b63a4ae56fa278679d145f1da2c62e767f73005..a81a80c3c2398fed16842bcc3d8aa16342edb72b 100644 --- a/src/context/service/database/Service.py +++ b/src/context/service/database/Service.py @@ -77,8 +77,11 @@ def service_set(db_engine : Engine, request : Service) -> Tuple[Dict, bool]: service_endpoints_data : List[Dict] = list() for i,endpoint_id in enumerate(request.service_endpoint_ids): endpoint_context_uuid = endpoint_id.topology_id.context_id.context_uuid.uuid - if len(endpoint_context_uuid) == 0: endpoint_context_uuid = context_uuid - if endpoint_context_uuid not in {raw_context_uuid, context_uuid}: + if len(endpoint_context_uuid) == 0: + endpoint_context_uuid = context_get_uuid(request.service_id.context_id, allow_random=False) + else: + endpoint_context_uuid = context_get_uuid(endpoint_id.topology_id.context_id, allow_random=False) + if endpoint_context_uuid != context_uuid: raise InvalidArgumentException( 'request.service_endpoint_ids[{:d}].topology_id.context_id.context_uuid.uuid'.format(i), endpoint_context_uuid, diff --git a/src/context/service/database/Slice.py b/src/context/service/database/Slice.py index 7c291e33d858841054adc59306fbedb2e9a18f79..1d6781d53f7c85d8cb878b1b38b0de65b4ef5726 100644 --- a/src/context/service/database/Slice.py +++ b/src/context/service/database/Slice.py @@ -77,8 +77,11 @@ def slice_set(db_engine : Engine, request : Slice) -> Tuple[Dict, bool]: slice_endpoints_data : List[Dict] = list() for i,endpoint_id in enumerate(request.slice_endpoint_ids): endpoint_context_uuid = endpoint_id.topology_id.context_id.context_uuid.uuid - if len(endpoint_context_uuid) == 0: endpoint_context_uuid = context_uuid - if endpoint_context_uuid not in {raw_context_uuid, context_uuid}: + if len(endpoint_context_uuid) == 0: + endpoint_context_uuid = context_get_uuid(request.slice_id.context_id, allow_random=False) + else: + endpoint_context_uuid = context_get_uuid(endpoint_id.topology_id.context_id, allow_random=False) + if endpoint_context_uuid != context_uuid: raise InvalidArgumentException( 'request.slice_endpoint_ids[{:d}].topology_id.context_id.context_uuid.uuid'.format(i), endpoint_context_uuid, @@ -175,10 +178,6 @@ def slice_unset(db_engine : Engine, request : Slice) -> Tuple[Dict, bool]: slice_name = raw_slice_uuid if len(raw_slice_name) == 0 else raw_slice_name context_uuid,slice_uuid = slice_get_uuid(request.slice_id, slice_name=slice_name, allow_random=False) - if len(request.slice_constraints) > 0: raise NotImplementedError('UnsetSlice: removal of constraints') - if len(request.slice_config.config_rules) > 0: raise NotImplementedError('UnsetSlice: removal of config rules') - if len(request.slice_endpoint_ids) > 0: raise NotImplementedError('UnsetSlice: removal of endpoints') - slice_endpoint_uuids : Set[str] = set() for i,endpoint_id in enumerate(request.slice_endpoint_ids): endpoint_context_uuid = endpoint_id.topology_id.context_id.context_uuid.uuid @@ -200,6 +199,10 @@ def slice_unset(db_engine : Engine, request : Slice) -> Tuple[Dict, bool]: for subslice_id in request.slice_subslice_ids } + now = datetime.datetime.utcnow() + 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) + def callback(session : Session) -> bool: num_deletes = 0 if len(slice_service_uuids) > 0: @@ -210,17 +213,21 @@ def slice_unset(db_engine : Engine, request : Slice) -> Tuple[Dict, bool]: )).delete() if len(slice_subslice_uuids) > 0: num_deletes += session.query(SliceSubSliceModel)\ - .filter_by(and_( + .filter(and_( SliceSubSliceModel.slice_uuid == slice_uuid, SliceSubSliceModel.subslice_uuid.in_(slice_subslice_uuids) )).delete() if len(slice_endpoint_uuids) > 0: num_deletes += session.query(SliceEndPointModel)\ - .filter_by(and_( + .filter(and_( SliceEndPointModel.slice_uuid == slice_uuid, SliceEndPointModel.endpoint_uuid.in_(slice_endpoint_uuids) )).delete() - return num_deletes > 0 + + changed_constraints = upsert_constraints(session, constraints, is_delete=True, slice_uuid=slice_uuid) + changed_config_rules = upsert_config_rules(session, config_rules, is_delete=True, slice_uuid=slice_uuid) + + return num_deletes > 0 or changed_constraints or changed_config_rules updated = run_transaction(sessionmaker(bind=db_engine), callback) return json_slice_id(slice_uuid, json_context_id(context_uuid)),updated diff --git a/src/context/service/database/models/ConfigRuleModel.py b/src/context/service/database/models/ConfigRuleModel.py index 363611105135661ccf3bd001c2e65ab75f9b6a6c..d7bb97cd0fec1037e98c8713b885b2d5141cae63 100644 --- a/src/context/service/database/models/ConfigRuleModel.py +++ b/src/context/service/database/models/ConfigRuleModel.py @@ -28,9 +28,9 @@ class ConfigRuleModel(_Base): __tablename__ = 'configrule' configrule_uuid = Column(UUID(as_uuid=False), primary_key=True) - device_uuid = Column(ForeignKey('device.device_uuid', ondelete='CASCADE'), nullable=True) - service_uuid = Column(ForeignKey('service.service_uuid', ondelete='CASCADE'), nullable=True) - slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE'), nullable=True) + device_uuid = Column(ForeignKey('device.device_uuid', ondelete='CASCADE'), nullable=True, index=True) + service_uuid = Column(ForeignKey('service.service_uuid', ondelete='CASCADE'), nullable=True, index=True) + slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE'), nullable=True, index=True) position = Column(Integer, nullable=False) kind = Column(Enum(ConfigRuleKindEnum), nullable=False) action = Column(Enum(ORM_ConfigActionEnum), nullable=False) diff --git a/src/context/service/database/models/ConnectionModel.py b/src/context/service/database/models/ConnectionModel.py index c2b20de202cbeb065ffd50683d015729c76af9bc..156e33c6bb32e237af241035f1d9672b0b419222 100644 --- a/src/context/service/database/models/ConnectionModel.py +++ b/src/context/service/database/models/ConnectionModel.py @@ -25,7 +25,7 @@ class ConnectionModel(_Base): __tablename__ = 'connection' connection_uuid = Column(UUID(as_uuid=False), primary_key=True) - service_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), nullable=False) + service_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), nullable=False, index=True) settings = Column(String, nullable=False) created_at = Column(DateTime, nullable=False) updated_at = Column(DateTime, nullable=False) @@ -56,7 +56,7 @@ class ConnectionEndPointModel(_Base): __tablename__ = 'connection_endpoint' connection_uuid = Column(ForeignKey('connection.connection_uuid', ondelete='CASCADE' ), primary_key=True) - endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True) + endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) position = Column(Integer, nullable=False) connection = relationship('ConnectionModel', back_populates='connection_endpoints', lazy='joined') @@ -70,7 +70,7 @@ class ConnectionSubServiceModel(_Base): __tablename__ = 'connection_subservice' connection_uuid = Column(ForeignKey('connection.connection_uuid', ondelete='CASCADE' ), primary_key=True) - subservice_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), primary_key=True) + subservice_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), primary_key=True, index=True) connection = relationship('ConnectionModel', back_populates='connection_subservices', lazy='joined') subservice = relationship('ServiceModel', lazy='joined') # back_populates='connection_subservices' diff --git a/src/context/service/database/models/ConstraintModel.py b/src/context/service/database/models/ConstraintModel.py index 01c7bcb76b00ac5d8b49d9f99f010d1ddfd30788..2412080c1a2883e7bed85e6e22f389270b3f73bc 100644 --- a/src/context/service/database/models/ConstraintModel.py +++ b/src/context/service/database/models/ConstraintModel.py @@ -19,22 +19,24 @@ from typing import Dict from ._Base import _Base # Enum values should match name of field in Constraint message +# - enum item name should be Constraint message type in upper case +# - enum item value should be Constraint message type as it is in the proto files class ConstraintKindEnum(enum.Enum): - CUSTOM = 'custom' - SCHEDULE = 'schedule' - ENDPOINT_LOCATION = 'endpoint_location' - ENDPOINT_PRIORITY = 'endpoint_priority' - SLA_CAPACITY = 'sla_capacity' - SLA_LATENCY = 'sla_latency' - SLA_AVAILABILITY = 'sla_availability' - SLA_ISOLATION_LEVEL = 'sla_isolation' + CUSTOM = 'custom' + SCHEDULE = 'schedule' + ENDPOINT_LOCATION = 'endpoint_location' + ENDPOINT_PRIORITY = 'endpoint_priority' + SLA_CAPACITY = 'sla_capacity' + SLA_LATENCY = 'sla_latency' + SLA_AVAILABILITY = 'sla_availability' + SLA_ISOLATION = 'sla_isolation' class ConstraintModel(_Base): __tablename__ = 'constraint' constraint_uuid = Column(UUID(as_uuid=False), primary_key=True) - service_uuid = Column(ForeignKey('service.service_uuid', ondelete='CASCADE'), nullable=True) - slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE'), nullable=True) + service_uuid = Column(ForeignKey('service.service_uuid', ondelete='CASCADE'), nullable=True, index=True) + slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE'), nullable=True, index=True) position = Column(Integer, nullable=False) kind = Column(Enum(ConstraintKindEnum), nullable=False) data = Column(String, nullable=False) diff --git a/src/context/service/database/models/EndPointModel.py b/src/context/service/database/models/EndPointModel.py index e591bc718711c6e0b8219eb60ce68c42f35a800c..12ba7e10e7c3d5789f9bf16ad7b4f50c35a36bf5 100644 --- a/src/context/service/database/models/EndPointModel.py +++ b/src/context/service/database/models/EndPointModel.py @@ -23,8 +23,8 @@ class EndPointModel(_Base): __tablename__ = 'endpoint' endpoint_uuid = Column(UUID(as_uuid=False), primary_key=True) - device_uuid = Column(ForeignKey('device.device_uuid', ondelete='CASCADE' ), nullable=False) - topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), nullable=False) + device_uuid = Column(ForeignKey('device.device_uuid', ondelete='CASCADE' ), nullable=False, index=True) + topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), nullable=False, index=True) name = Column(String, nullable=False) endpoint_type = Column(String, nullable=False) kpi_sample_types = Column(ARRAY(Enum(ORM_KpiSampleTypeEnum), dimensions=1)) diff --git a/src/context/service/database/models/LinkModel.py b/src/context/service/database/models/LinkModel.py index 49c62d376624dc02b51a2b56860b04c322d66934..ee591f5c8404cd7f0f6c97651b5f731a51c43303 100644 --- a/src/context/service/database/models/LinkModel.py +++ b/src/context/service/database/models/LinkModel.py @@ -46,7 +46,7 @@ class LinkEndPointModel(_Base): __tablename__ = 'link_endpoint' link_uuid = Column(ForeignKey('link.link_uuid', ondelete='CASCADE' ), primary_key=True) - endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True) + endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) link = relationship('LinkModel', back_populates='link_endpoints', lazy='joined') endpoint = relationship('EndPointModel', lazy='joined') # back_populates='link_endpoints' diff --git a/src/context/service/database/models/PolicyRuleModel.py b/src/context/service/database/models/PolicyRuleModel.py index 4059991e1f1af7851d9fced17739b92675261227..2f0c8a326a57a05ab1fd623a968dea0bc39d9e76 100644 --- a/src/context/service/database/models/PolicyRuleModel.py +++ b/src/context/service/database/models/PolicyRuleModel.py @@ -28,15 +28,15 @@ class PolicyRuleKindEnum(enum.Enum): class PolicyRuleModel(_Base): __tablename__ = 'policyrule' - policyrule_uuid = Column(UUID(as_uuid=False), primary_key=True) - policyrule_kind = Column(Enum(PolicyRuleKindEnum), nullable=False) - policyrule_state = Column(Enum(ORM_PolicyRuleStateEnum), nullable=False) - policyrule_state_message = Column(String, nullable=False) - policyrule_priority = Column(Integer, nullable=False) - policyrule_service_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), nullable=True) - policyrule_eca_data = Column(String, nullable=False) - created_at = Column(DateTime, nullable=False) - updated_at = Column(DateTime, nullable=False) + policyrule_uuid = Column(UUID(as_uuid=False), primary_key=True) + policyrule_kind = Column(Enum(PolicyRuleKindEnum), nullable=False) + policyrule_state = Column(Enum(ORM_PolicyRuleStateEnum), nullable=False) + policyrule_state_msg = Column(String, nullable=False) + policyrule_priority = Column(Integer, nullable=False) + policyrule_service_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), nullable=True, index=True) + policyrule_eca_data = Column(String, nullable=False) + created_at = Column(DateTime, nullable=False) + updated_at = Column(DateTime, nullable=False) policyrule_service = relationship('ServiceModel') # back_populates='policyrules' policyrule_devices = relationship('PolicyRuleDeviceModel' ) # back_populates='policyrule' @@ -55,7 +55,7 @@ class PolicyRuleModel(_Base): 'policyRuleId': self.dump_id(), 'policyRuleState': { 'policyRuleState': self.policyrule_state.value, - 'policyRuleStateMessage': self.policyrule_state_message, + 'policyRuleStateMessage': self.policyrule_state_msg, }, 'priority': self.policyrule_priority, }) @@ -71,7 +71,7 @@ class PolicyRuleDeviceModel(_Base): __tablename__ = 'policyrule_device' policyrule_uuid = Column(ForeignKey('policyrule.policyrule_uuid', ondelete='RESTRICT'), primary_key=True) - device_uuid = Column(ForeignKey('device.device_uuid', ondelete='RESTRICT'), primary_key=True) + device_uuid = Column(ForeignKey('device.device_uuid', ondelete='RESTRICT'), primary_key=True, index=True) #policyrule = relationship('PolicyRuleModel', lazy='joined') # back_populates='policyrule_devices' device = relationship('DeviceModel', lazy='joined') # back_populates='policyrule_devices' diff --git a/src/context/service/database/models/ServiceModel.py b/src/context/service/database/models/ServiceModel.py index b581bf900a8861d9af199fef62bd218159b1e00e..09ff381b5eb374ea752590bba5403fe816319036 100644 --- a/src/context/service/database/models/ServiceModel.py +++ b/src/context/service/database/models/ServiceModel.py @@ -25,7 +25,7 @@ class ServiceModel(_Base): __tablename__ = 'service' service_uuid = Column(UUID(as_uuid=False), primary_key=True) - context_uuid = Column(ForeignKey('context.context_uuid'), nullable=False) + context_uuid = Column(ForeignKey('context.context_uuid'), nullable=False, index=True) service_name = Column(String, nullable=False) service_type = Column(Enum(ORM_ServiceTypeEnum), nullable=False) service_status = Column(Enum(ORM_ServiceStatusEnum), nullable=False) @@ -67,7 +67,7 @@ class ServiceEndPointModel(_Base): __tablename__ = 'service_endpoint' service_uuid = Column(ForeignKey('service.service_uuid', ondelete='CASCADE' ), primary_key=True) - endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True) + endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) service = relationship('ServiceModel', back_populates='service_endpoints', lazy='joined') endpoint = relationship('EndPointModel', lazy='joined') # back_populates='service_endpoints' diff --git a/src/context/service/database/models/SliceModel.py b/src/context/service/database/models/SliceModel.py index 1a562bcd973cc41d777fdd20e4d42622afeebc44..2d6c884169154fee8d44c26464416c6708c650b1 100644 --- a/src/context/service/database/models/SliceModel.py +++ b/src/context/service/database/models/SliceModel.py @@ -24,7 +24,7 @@ class SliceModel(_Base): __tablename__ = 'slice' slice_uuid = Column(UUID(as_uuid=False), primary_key=True) - context_uuid = Column(ForeignKey('context.context_uuid'), nullable=False) + context_uuid = Column(ForeignKey('context.context_uuid'), nullable=False, index=True) slice_name = Column(String, nullable=True) slice_status = Column(Enum(ORM_SliceStatusEnum), nullable=False) slice_owner_uuid = Column(String, nullable=True) @@ -81,7 +81,7 @@ class SliceEndPointModel(_Base): __tablename__ = 'slice_endpoint' slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE' ), primary_key=True) - endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True) + endpoint_uuid = Column(ForeignKey('endpoint.endpoint_uuid', ondelete='RESTRICT'), primary_key=True, index=True) slice = relationship('SliceModel', back_populates='slice_endpoints', lazy='joined') endpoint = relationship('EndPointModel', lazy='joined') # back_populates='slice_endpoints' @@ -90,7 +90,7 @@ class SliceServiceModel(_Base): __tablename__ = 'slice_service' slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE' ), primary_key=True) - service_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), primary_key=True) + service_uuid = Column(ForeignKey('service.service_uuid', ondelete='RESTRICT'), primary_key=True, index=True) slice = relationship('SliceModel', back_populates='slice_services', lazy='joined') service = relationship('ServiceModel', lazy='joined') # back_populates='slice_services' @@ -98,5 +98,9 @@ class SliceServiceModel(_Base): class SliceSubSliceModel(_Base): __tablename__ = 'slice_subslice' - slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE' ), primary_key=True) - subslice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='RESTRICT'), primary_key=True) + slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE'), primary_key=True, index=True) + subslice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE'), primary_key=True, index=True) + + slice = relationship( + 'SliceModel', foreign_keys='SliceSubSliceModel.slice_uuid', back_populates='slice_subslices', lazy='joined') + subslice = relationship('SliceModel', foreign_keys='SliceSubSliceModel.subslice_uuid', lazy='joined') diff --git a/src/context/service/database/models/TopologyModel.py b/src/context/service/database/models/TopologyModel.py index 92802e5b2ddb4ed57342bbd244255b73b11c6cce..7dc2333f0a9b979f251c173d850a235dcb822d91 100644 --- a/src/context/service/database/models/TopologyModel.py +++ b/src/context/service/database/models/TopologyModel.py @@ -22,7 +22,7 @@ class TopologyModel(_Base): __tablename__ = 'topology' topology_uuid = Column(UUID(as_uuid=False), primary_key=True) - context_uuid = Column(ForeignKey('context.context_uuid'), nullable=False) + context_uuid = Column(ForeignKey('context.context_uuid'), nullable=False, index=True) topology_name = Column(String, nullable=False) created_at = Column(DateTime, nullable=False) updated_at = Column(DateTime, nullable=False) @@ -56,8 +56,8 @@ class TopologyModel(_Base): class TopologyDeviceModel(_Base): __tablename__ = 'topology_device' - topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), primary_key=True) - device_uuid = Column(ForeignKey('device.device_uuid', ondelete='CASCADE' ), primary_key=True) + topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + device_uuid = Column(ForeignKey('device.device_uuid', ondelete='CASCADE' ), primary_key=True, index=True) #topology = relationship('TopologyModel', lazy='joined') # back_populates='topology_devices' device = relationship('DeviceModel', lazy='joined') # back_populates='topology_devices' @@ -65,8 +65,8 @@ class TopologyDeviceModel(_Base): class TopologyLinkModel(_Base): __tablename__ = 'topology_link' - topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), primary_key=True) - link_uuid = Column(ForeignKey('link.link_uuid', ondelete='CASCADE' ), primary_key=True) + topology_uuid = Column(ForeignKey('topology.topology_uuid', ondelete='RESTRICT'), primary_key=True, index=True) + link_uuid = Column(ForeignKey('link.link_uuid', ondelete='CASCADE' ), primary_key=True, index=True) #topology = relationship('TopologyModel', lazy='joined') # back_populates='topology_links' link = relationship('LinkModel', lazy='joined') # back_populates='topology_links' diff --git a/src/context/service/database/models/_Base.py b/src/context/service/database/models/_Base.py index 4323fb7130462b13958627216c62f1fe4edc91c7..a10de60eb8731132ec815de1ff897c06ac12b665 100644 --- a/src/context/service/database/models/_Base.py +++ b/src/context/service/database/models/_Base.py @@ -13,10 +13,60 @@ # limitations under the License. import sqlalchemy -from sqlalchemy.orm import declarative_base +from typing import Any, List +from sqlalchemy.orm import Session, sessionmaker, declarative_base +from sqlalchemy.sql import text +from sqlalchemy_cockroachdb import run_transaction _Base = declarative_base() +def create_performance_enhancers(db_engine : sqlalchemy.engine.Engine) -> None: + def index_storing( + index_name : str, table_name : str, index_fields : List[str], storing_fields : List[str] + ) -> Any: + str_index_fields = ','.join(['"{:s}"'.format(index_field) for index_field in index_fields]) + str_storing_fields = ','.join(['"{:s}"'.format(storing_field) for storing_field in storing_fields]) + INDEX_STORING = 'CREATE INDEX IF NOT EXISTS {:s} ON "{:s}" ({:s}) STORING ({:s});' + return text(INDEX_STORING.format(index_name, table_name, str_index_fields, str_storing_fields)) + + statements = [ + index_storing('configrule_device_uuid_rec_idx', 'configrule', ['device_uuid'], [ + 'service_uuid', 'slice_uuid', 'position', 'kind', 'action', 'data', 'created_at', 'updated_at' + ]), + index_storing('configrule_service_uuid_rec_idx', 'configrule', ['service_uuid'], [ + 'device_uuid', 'slice_uuid', 'position', 'kind', 'action', 'data', 'created_at', 'updated_at' + ]), + index_storing('configrule_slice_uuid_rec_idx', 'configrule', ['slice_uuid'], [ + 'device_uuid', 'service_uuid', 'position', 'kind', 'action', 'data', 'created_at', 'updated_at' + ]), + index_storing('connection_service_uuid_rec_idx', 'connection', ['service_uuid'], [ + 'settings', 'created_at', 'updated_at' + ]), + index_storing('constraint_service_uuid_rec_idx', 'constraint', ['service_uuid'], [ + 'slice_uuid', 'position', 'kind', 'data', 'created_at', 'updated_at' + ]), + index_storing('constraint_slice_uuid_rec_idx', 'constraint', ['slice_uuid'], [ + 'service_uuid', 'position', 'kind', 'data', 'created_at', 'updated_at' + ]), + index_storing('endpoint_device_uuid_rec_idx', 'endpoint', ['device_uuid'], [ + 'topology_uuid', 'name', 'endpoint_type', 'kpi_sample_types', 'created_at', 'updated_at' + ]), + index_storing('service_context_uuid_rec_idx', 'service', ['context_uuid'], [ + 'service_name', 'service_type', 'service_status', 'created_at', 'updated_at' + ]), + index_storing('slice_context_uuid_rec_idx', 'slice', ['context_uuid'], [ + 'slice_name', 'slice_status', 'slice_owner_uuid', 'slice_owner_string', 'created_at', 'updated_at' + ]), + + index_storing('topology_context_uuid_rec_idx', 'topology', ['context_uuid'], [ + 'topology_name', 'created_at', 'updated_at' + ]), + ] + def callback(session : Session) -> bool: + for stmt in statements: session.execute(stmt) + run_transaction(sessionmaker(bind=db_engine), callback) + def rebuild_database(db_engine : sqlalchemy.engine.Engine, drop_if_exists : bool = False): if drop_if_exists: _Base.metadata.drop_all(db_engine) _Base.metadata.create_all(db_engine) + create_performance_enhancers(db_engine) diff --git a/src/context/tests/Objects.py b/src/context/tests/Objects.py index 8634c1f309e0c060654a168a1ad400f1d4722a32..6b52ef4c0f3583de628706ba79efffb9d5709820 100644 --- a/src/context/tests/Objects.py +++ b/src/context/tests/Objects.py @@ -17,7 +17,7 @@ from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.object_factory.ConfigRule import json_config_rule_set from common.tools.object_factory.Connection import json_connection, json_connection_id -from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Constraint import json_constraint_custom, json_constraint_sla_latency from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Device import json_device_id, json_device_packetrouter_disabled from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_id @@ -95,7 +95,7 @@ def compose_service( for device_id, endpoint_name in endpoint_ids ] constraints = [ - json_constraint_custom('latency[ms]', str(latency_ms)), + json_constraint_sla_latency(latency_ms), json_constraint_custom('jitter[us]', str(jitter_us)), ] config_rules = [ @@ -128,7 +128,7 @@ def compose_slice( for device_id, endpoint_name in endpoint_ids ] constraints = [ - json_constraint_custom('latency[ms]', str(latency_ms)), + json_constraint_sla_latency(latency_ms), json_constraint_custom('jitter[us]', str(jitter_us)), ] config_rules = [ diff --git a/src/device/service/drivers/emulated/SyntheticSamplingParameters.py b/src/device/service/drivers/emulated/SyntheticSamplingParameters.py index ea5cf2cb77e34fc4f9e88490ff400b92b1f64e66..5bbbf89e84e764677638b7e4e3f4934336321576 100644 --- a/src/device/service/drivers/emulated/SyntheticSamplingParameters.py +++ b/src/device/service/drivers/emulated/SyntheticSamplingParameters.py @@ -51,7 +51,7 @@ class SyntheticSamplingParameters: metric = match.group(2) metric_sense = metric.lower().replace('packets_', '').replace('bytes_', '') - LOGGER.info(MSG_INFO.format(monitoring_resource_key, endpoint_uuid, metric, metric_sense)) + LOGGER.debug(MSG_INFO.format(monitoring_resource_key, endpoint_uuid, metric, metric_sense)) parameters_key = '{:s}-{:s}'.format(endpoint_uuid, metric_sense) parameters = self.__data.get(parameters_key) diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index ef3d0728d5ed02ea4a15ba0c3ccd6f1428cab7df..ac03527529b603089c4f8233cb185f6427e0c360 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -38,8 +38,6 @@ logging.getLogger('apscheduler.executors.default').setLevel(logging.INFO if DEBU logging.getLogger('apscheduler.scheduler').setLevel(logging.INFO if DEBUG_MODE else logging.ERROR) logging.getLogger('monitoring-client').setLevel(logging.INFO if DEBUG_MODE else logging.ERROR) -LOGGER = logging.getLogger(__name__) - RE_GET_ENDPOINT_FROM_INTERFACE_KEY = re.compile(r'.*interface\[([^\]]+)\].*') RE_GET_ENDPOINT_FROM_INTERFACE_XPATH = re.compile(r".*interface\[oci\:name\='([^\]]+)'\].*") @@ -60,18 +58,18 @@ class NetconfSessionHandler: self.__connected = threading.Event() self.__address = address self.__port = int(port) - self.__username = settings.get('username') - self.__password = settings.get('password') - self.__vendor = settings.get('vendor') - self.__key_filename = settings.get('key_filename') - self.__hostkey_verify = settings.get('hostkey_verify', True) - self.__look_for_keys = settings.get('look_for_keys', True) - self.__allow_agent = settings.get('allow_agent', True) - self.__force_running = settings.get('force_running', False) - self.__commit_per_delete = settings.get('delete_rule', False) - self.__device_params = settings.get('device_params', {}) - self.__manager_params = settings.get('manager_params', {}) - self.__nc_params = settings.get('nc_params', {}) + self.__username = settings.get('username') + self.__password = settings.get('password') + self.__vendor = settings.get('vendor') + self.__key_filename = settings.get('key_filename') + self.__hostkey_verify = settings.get('hostkey_verify', True) + self.__look_for_keys = settings.get('look_for_keys', True) + self.__allow_agent = settings.get('allow_agent', True) + self.__force_running = settings.get('force_running', False) + self.__commit_per_rule = settings.get('commit_per_rule', False) + self.__device_params = settings.get('device_params', {}) + self.__manager_params = settings.get('manager_params', {}) + self.__nc_params = settings.get('nc_params', {}) self.__manager : Manager = None self.__candidate_supported = False @@ -94,7 +92,7 @@ class NetconfSessionHandler: def use_candidate(self): return self.__candidate_supported and not self.__force_running @property - def commit_per_rule(self): return self.__commit_per_delete + def commit_per_rule(self): return self.__commit_per_rule @property def vendor(self): return self.__vendor @@ -141,8 +139,9 @@ def compute_delta_sample(previous_sample, previous_timestamp, current_sample, cu return delta_sample class SamplesCache: - def __init__(self, netconf_handler : NetconfSessionHandler) -> None: + def __init__(self, netconf_handler : NetconfSessionHandler, logger : logging.Logger) -> None: self.__netconf_handler = netconf_handler + self.__logger = logger self.__lock = threading.Lock() self.__timestamp = None self.__absolute_samples = {} @@ -166,7 +165,7 @@ class SamplesCache: self.__absolute_samples[interface] = samples self.__timestamp = now except: # pylint: disable=bare-except - LOGGER.exception('Error collecting samples') + self.__logger.exception('Error collecting samples') def get(self, resource_key : str) -> Tuple[float, Dict]: self._refresh_samples() @@ -176,31 +175,33 @@ class SamplesCache: interface = match.group(1) return self.__timestamp, copy.deepcopy(self.__delta_samples.get(interface, {})) -def do_sampling(samples_cache : SamplesCache, resource_key : str, out_samples : queue.Queue) -> None: +def do_sampling( + samples_cache : SamplesCache, logger : logging.Logger, resource_key : str, out_samples : queue.Queue +) -> None: try: timestamp, samples = samples_cache.get(resource_key) counter_name = resource_key.split('/')[-1].split(':')[-1] value = samples.get(counter_name) if value is None: - LOGGER.warning('[do_sampling] value not found for {:s}'.format(resource_key)) + logger.warning('[do_sampling] value not found for {:s}'.format(resource_key)) return sample = (timestamp, resource_key, value) out_samples.put_nowait(sample) except: # pylint: disable=bare-except - LOGGER.exception('Error retrieving samples') + logger.exception('Error retrieving samples') def edit_config( - netconf_handler : NetconfSessionHandler, resources : List[Tuple[str, Any]], delete=False, commit_per_rule= False, - target='running', default_operation='merge', test_option=None, error_option=None, + netconf_handler : NetconfSessionHandler, logger : logging.Logger, resources : List[Tuple[str, Any]], delete=False, + commit_per_rule=False, target='running', default_operation='merge', test_option=None, error_option=None, format='xml' # pylint: disable=redefined-builtin ): str_method = 'DeleteConfig' if delete else 'SetConfig' - LOGGER.info('[{:s}] resources = {:s}'.format(str_method, str(resources))) + #logger.debug('[{:s}] resources = {:s}'.format(str_method, str(resources))) results = [None for _ in resources] for i,resource in enumerate(resources): str_resource_name = 'resources[#{:d}]'.format(i) try: - LOGGER.info('[{:s}] resource = {:s}'.format(str_method, str(resource))) + logger.debug('[{:s}] resource = {:s}'.format(str_method, str(resource))) chk_type(str_resource_name, resource, (list, tuple)) chk_length(str_resource_name, resource, min_length=2, max_length=2) resource_key,resource_value = resource @@ -208,7 +209,7 @@ def edit_config( str_config_message = compose_config( resource_key, resource_value, delete=delete, vendor=netconf_handler.vendor) if str_config_message is None: raise UnsupportedResourceKeyException(resource_key) - LOGGER.info('[{:s}] str_config_message[{:d}] = {:s}'.format( + logger.debug('[{:s}] str_config_message[{:d}] = {:s}'.format( str_method, len(str_config_message), str(str_config_message))) netconf_handler.edit_config( config=str_config_message, target=target, default_operation=default_operation, @@ -219,8 +220,17 @@ def edit_config( except Exception as e: # pylint: disable=broad-except str_operation = 'preparing' if target == 'candidate' else ('deleting' if delete else 'setting') msg = '[{:s}] Exception {:s} {:s}: {:s}' - LOGGER.exception(msg.format(str_method, str_operation, str_resource_name, str(resource))) + logger.exception(msg.format(str_method, str_operation, str_resource_name, str(resource))) results[i] = e # if validation fails, store the exception + + if not commit_per_rule: + try: + netconf_handler.commit() + except Exception as e: # pylint: disable=broad-except + msg = '[{:s}] Exception committing: {:s}' + str_operation = 'preparing' if target == 'candidate' else ('deleting' if delete else 'setting') + logger.exception(msg.format(str_method, str_operation, str(resources))) + results = [e for _ in resources] # if commit fails, set exception in each resource return results HISTOGRAM_BUCKETS = ( @@ -243,6 +253,7 @@ METRICS_POOL.get_or_create('UnsubscribeState', MetricTypeEnum.HISTOGRAM_DURATION class OpenConfigDriver(_Driver): def __init__(self, address : str, port : int, **settings) -> None: # pylint: disable=super-init-not-called + self.__logger = logging.getLogger('{:s}:[{:s}:{:s}]'.format(str(__name__), str(address), str(port))) self.__lock = threading.Lock() #self.__initial = TreeNode('.') #self.__running = TreeNode('.') @@ -257,7 +268,7 @@ class OpenConfigDriver(_Driver): timezone=pytz.utc) self.__out_samples = queue.Queue() self.__netconf_handler : NetconfSessionHandler = NetconfSessionHandler(address, port, **settings) - self.__samples_cache = SamplesCache(self.__netconf_handler) + self.__samples_cache = SamplesCache(self.__netconf_handler, self.__logger) def Connect(self) -> bool: with self.__lock: @@ -295,13 +306,14 @@ class OpenConfigDriver(_Driver): try: chk_string(str_resource_name, resource_key, allow_empty=False) str_filter = get_filter(resource_key) - LOGGER.info('[GetConfig] str_filter = {:s}'.format(str(str_filter))) + #self.__logger.debug('[GetConfig] str_filter = {:s}'.format(str(str_filter))) if str_filter is None: str_filter = resource_key xml_data = self.__netconf_handler.get(filter=str_filter).data_ele if isinstance(xml_data, Exception): raise xml_data results.extend(parse(resource_key, xml_data)) except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception retrieving {:s}: {:s}'.format(str_resource_name, str(resource_key))) + MSG = 'Exception retrieving {:s}: {:s}' + self.__logger.exception(MSG.format(str_resource_name, str(resource_key))) results.append((resource_key, e)) # if validation fails, store the exception return results @@ -312,17 +324,11 @@ class OpenConfigDriver(_Driver): with self.__lock: if self.__netconf_handler.use_candidate: with self.__netconf_handler.locked(target='candidate'): - if self.__netconf_handler.commit_per_rule: - results = edit_config(self.__netconf_handler, resources, target='candidate', commit_per_rule= True) - else: - results = edit_config(self.__netconf_handler, resources, target='candidate') - try: - self.__netconf_handler.commit() - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('[SetConfig] Exception commiting resources: {:s}'.format(str(resources))) - results = [e for _ in resources] # if commit fails, set exception in each resource + results = edit_config( + self.__netconf_handler, self.__logger, resources, target='candidate', + commit_per_rule=self.__netconf_handler.commit_per_rule) else: - results = edit_config(self.__netconf_handler, resources) + results = edit_config(self.__netconf_handler, self.__logger, resources) return results @metered_subclass_method(METRICS_POOL) @@ -332,17 +338,11 @@ class OpenConfigDriver(_Driver): with self.__lock: if self.__netconf_handler.use_candidate: with self.__netconf_handler.locked(target='candidate'): - if self.__netconf_handler.commit_per_rule: - results = edit_config(self.__netconf_handler, resources, target='candidate', delete=True, commit_per_rule= True) - else: - results = edit_config(self.__netconf_handler, resources, target='candidate', delete=True) - try: - self.__netconf_handler.commit() - except Exception as e: # pylint: disable=broad-except - LOGGER.exception('[DeleteConfig] Exception commiting resources: {:s}'.format(str(resources))) - results = [e for _ in resources] # if commit fails, set exception in each resource + results = edit_config( + self.__netconf_handler, self.__logger, resources, target='candidate', delete=True, + commit_per_rule=self.__netconf_handler.commit_per_rule) else: - results = edit_config(self.__netconf_handler, resources, delete=True) + results = edit_config(self.__netconf_handler, self.__logger, resources, delete=True) return results @metered_subclass_method(METRICS_POOL) @@ -363,7 +363,8 @@ class OpenConfigDriver(_Driver): chk_float(str_subscription_name + '.sampling_duration', sampling_duration, min_value=0) chk_float(str_subscription_name + '.sampling_interval', sampling_interval, min_value=0) except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception validating {:s}: {:s}'.format(str_subscription_name, str(resource_key))) + MSG = 'Exception validating {:s}: {:s}' + self.__logger.exception(MSG.format(str_subscription_name, str(resource_key))) results.append(e) # if validation fails, store the exception continue @@ -374,7 +375,7 @@ class OpenConfigDriver(_Driver): job_id = 'k={:s}/d={:f}/i={:f}'.format(resource_key, sampling_duration, sampling_interval) job = self.__scheduler.add_job( - do_sampling, args=(self.__samples_cache, resource_key, self.__out_samples), + do_sampling, args=(self.__samples_cache, self.__logger, resource_key, self.__out_samples), kwargs={}, id=job_id, trigger='interval', seconds=sampling_interval, start_date=start_date, end_date=end_date, timezone=pytz.utc) @@ -401,7 +402,8 @@ class OpenConfigDriver(_Driver): chk_float(str_subscription_name + '.sampling_duration', sampling_duration, min_value=0) chk_float(str_subscription_name + '.sampling_interval', sampling_interval, min_value=0) except Exception as e: # pylint: disable=broad-except - LOGGER.exception('Exception validating {:s}: {:s}'.format(str_subscription_name, str(resource_key))) + MSG = 'Exception validating {:s}: {:s}' + self.__logger.exception(MSG.format(str_subscription_name, str(resource_key))) results.append(e) # if validation fails, store the exception continue diff --git a/src/device/service/drivers/openconfig/templates/interface/edit_config.xml b/src/device/service/drivers/openconfig/templates/interface/edit_config.xml index 4bc53ff1ddfbebbdcef2a0b4c37770210726676b..220f062b5da09d26ff6ec271491d6d40cfd46669 100644 --- a/src/device/service/drivers/openconfig/templates/interface/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/interface/edit_config.xml @@ -4,6 +4,7 @@ {% if operation is defined and operation != 'delete' %} {{name}} + ianaift:{{type}} {{mtu}} diff --git a/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml b/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml index 1bdb8efbff495f04ee90dadaffaa7412332531b7..e441004006e4cdd445f1d0244a9582b57956af40 100644 --- a/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/interface/subinterface/edit_config.xml @@ -1,7 +1,8 @@ - + {{name}} + {% if operation is defined and operation != 'delete' %} {{name}} ianaift:{{type}} @@ -44,5 +45,6 @@ {% endif %} + {% endif %} diff --git a/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml b/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml index bf8c0c0770f9344fbed16f3a6b09f7fa99a978ef..855f321b4a69ba1e660487c108a05d0ec4b5d475 100644 --- a/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml +++ b/src/device/service/drivers/openconfig/templates/network_instance/interface/edit_config.xml @@ -2,7 +2,7 @@ {{name}} - + {{id}} {{id}} diff --git a/src/device/service/drivers/xr/README_XR.md b/src/device/service/drivers/xr/README_XR.md index 3bfdf5b019b3c36e7ded09d58ac625a48add36a9..fa1bc944035d27769cd9c16e0c29318e554e9489 100644 --- a/src/device/service/drivers/xr/README_XR.md +++ b/src/device/service/drivers/xr/README_XR.md @@ -25,6 +25,19 @@ cd ~/.kube microk8s config > config ``` +Helm 3 is mandatory as of February 2023. Enable it with microk8s command. Then create wrapper shell script to expose it with standard name: + +``` +sudo su - +cat > /usr/bin/helm3 +#!/bin/sh +microk8s.helm3 "$@" +^D +chmod 755 /usr/bin/helm3 +``` + +Using symbolic link does not work, because snap wraps the real binary and won't work if name is different. + Local Docker registry is needed for build results. Use the following command to start local registry (docker will pull necessary images from Internet) ```bash @@ -32,23 +45,33 @@ docker run -d -p 32000:5000 --restart=always --name registry registry:2 ``` Setup mydeploy script outside the git repo. E.g. following will do. SOURCE IT ON ALL SHELLS. - -IMPORTANT: September 2022 version of controller has a bug where any update to device trigger update to device -until GRPC endpoints are so loaded that K8s kills device service. XR does not need automation service, so it can -be left out. +Use https://labs.etsi.org/rep/tfs/controller/-/blob/develop/my_deploy.sh as example. +Script requires more variables than before as of February 2023. ```bash +# See https://labs.etsi.org/rep/tfs/controller/-/blob/develop/my_deploy.sh +# Use docker run -d -p 32000:5000 --restart=always --name registry registry:2 export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" -# Without automation service (see note above) -export TFS_COMPONENTS="context device pathcomp service slice compute monitoring webui" -# Correct setting -# export TFS_COMPONENTS="context device automation pathcomp service slice compute monitoring webui" -# Pre-rebase -#export TFS_COMPONENTS="context device automation service compute monitoring webui" +export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui load_generator" export TFS_IMAGE_TAG="dev" export TFS_K8S_NAMESPACE="tfs" export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" export TFS_GRAFANA_PASSWORD="admin123+" +#export TFS_SKIP_BUILD="" +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="" +export NATS_NAMESPACE="nats" +export NATS_REDEPLOY="" +export QDB_NAMESPACE="qdb" +export QDB_USERNAME="admin" +export QDB_PASSWORD="quest" +export QDB_TABLE="tfs_monitoring" +export QDB_REDEPLOY="" ``` Build is containerized, pytest used for setup is not. Teraflow has some third party venv suggestion in docs. However standard venv works. Create: @@ -114,11 +137,44 @@ Setup service by following commands in src directory. Kubernetes endpoins change python -m pytest --verbose tests/ofc22/tests/test_functional_create_service_xr.py ``` +For topology different than used by the test_functional_create/delete_service_xr.py, one can also +use service-cli.py tool in the xr module directory. It allows creation of ELINE services between +arbitrary endpoints in the topology (with consequent underlying XR service instantiation). Run in +*xr module directory*. Representative examples: +``` + PYTHONPATH=../../../../ ./service-cli.py create 1 R1-EMU 13/1/2 500 2 R3-EMU 13/1/2 500 + PYTHONPATH=../../../../ ./service-cli.py list + PYTHONPATH=../../../../ ./service-cli.py delete 43a8046a-5dec-463d-82f7-7cc3442dbf4f +``` + +It is also possible to create direct XR services without multi-layer services. E.g.: +``` + PYTHONPATH=../../../../ ./service-cli.py create-xr FooService X1-XR-CONSTELLATION "XR HUB 1|XR-T1" "XR LEAF 2|XR-T1" +``` + +Additionally it is possible to list services and endpoints: +``` + PYTHONPATH=../../../../ ./service-cli.py list-endpoints + PYTHONPATH=../../../../ ./service-cli.py delete 43a8046a-5dec-463d-82f7-7cc3442dbf4f +``` + +The PYTHONPATH is mandatory. Suitable topology JSON must have been loaded before. With the +CocroachDB persistence, it is sufficient to load the topology once and it will persist. + Good logs to check are: * kubectl logs service/deviceservice --namespace tfs * kubectl logs service/webuiservice --namespace tfs +New 2.0 version of Teraflow has persistent database. To clean up any failed state +(e.g. from debugging session), set before deploy: + +``` +export CRDB_DROP_DATABASE_IF_EXISTS=YES +``` + +In normal test runs it is not necessary to clear the database. However DO NOT RE-UPLOAD THE TOPOLOGY JSON FILE if DB has not been cleared. + ## Unit Tests Run in src directory (src under repo top level) with command: diff --git a/src/device/service/drivers/xr/XrDriver.py b/src/device/service/drivers/xr/XrDriver.py index 565e3692feb88dd07779bb5f777b0061028f9776..605f4ce8d0f9c875a4b1736ff0aaa02fcb468778 100644 --- a/src/device/service/drivers/xr/XrDriver.py +++ b/src/device/service/drivers/xr/XrDriver.py @@ -106,8 +106,10 @@ class XrDriver(_Driver): def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: LOGGER.info(f"SetConfig[{self}]: {resources=}") # Logged config seems like: + # Pre-February 2023 #[('/service[52ff5f0f-fda4-40bd-a0b1-066f4ff04079:optical]', '{"capacity_unit": "GHz", "capacity_value": 1, "direction": "UNIDIRECTIONAL", "input_sip": "XR HUB 1|XR-T4", "layer_protocol_name": "PHOTONIC_MEDIA", "layer_protocol_qualifier": "tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC", "output_sip": "XR LEAF 1|XR-T1", "uuid": "52ff5f0f-fda4-40bd-a0b1-066f4ff04079:optical"}')] - + # Post February 2023 + #[('/services/service[e1b9184c-767d-44b9-bf83-a1f643d82bef]', '{"capacity_unit": "GHz", "capacity_value": 50.0, "direction": "UNIDIRECTIONAL", "input_sip": "XR LEAF 1|XR-T1", "layer_protocol_name": "PHOTONIC_MEDIA", "layer_protocol_qualifier": "tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC", "output_sip": "XR HUB 1|XR-T4", "uuid": "e1b9184c-767d-44b9-bf83-a1f643d82bef"}')] with self.__lock: if self.__constellation is None: self.__constellation = self.__cm_connection.get_constellation_by_hub_name(self.__hub_module_name) @@ -157,7 +159,7 @@ class XrDriver(_Driver): else: LOGGER.info(f"DeleteConfig: Connection {service_uuid} delete failure (was {str(connection)})") - if self.__constellation.is_vti_mode(): + if connection.is_vti_mode(): active_tc = self.__cm_connection.get_transport_capacity_by_teraflow_uuid(service_uuid) if active_tc is not None: if self.__cm_connection.delete_transport_capacity(active_tc.href): diff --git a/src/device/service/drivers/xr/cm-cli.py b/src/device/service/drivers/xr/cm-cli.py old mode 100644 new mode 100755 diff --git a/src/device/service/drivers/xr/cm/cm_connection.py b/src/device/service/drivers/xr/cm/cm_connection.py index 8ee9ee236c6bcfd504d4044dd023ef3a61fe4802..7128494510f40914917d2c3981158b6dd3571c70 100644 --- a/src/device/service/drivers/xr/cm/cm_connection.py +++ b/src/device/service/drivers/xr/cm/cm_connection.py @@ -241,7 +241,7 @@ class CmConnection: return self.__acquire_access_token() def list_constellations(self) -> List[Constellation]: - r = self.__get("/api/v1/ns/xr-networks?content=expanded") + r = self.__get("/api/v1/xr-networks?content=expanded") if not r.is_valid_json_list_with_status(200): return [] return [Constellation(c) for c in r.json] @@ -252,13 +252,13 @@ class CmConnection: ('content', 'expanded'), ('q', '{"hubModule.state.module.moduleName": "' + hub_module_name + '"}') ] - r = self.__get("/api/v1/ns/xr-networks?content=expanded", params=qparams) + r = self.__get("/api/v1/xr-networks?content=expanded", params=qparams) if not r.is_valid_json_list_with_status(200, 1, 1): return None return Constellation(r.json[0]) def get_transport_capacities(self) -> List[TransportCapacity]: - r= self.__get("/api/v1/ns/transport-capacities?content=expanded") + r= self.__get("/api/v1/transport-capacities?content=expanded") if not r.is_valid_json_list_with_status(200): return [] return [TransportCapacity(from_json=t) for t in r.json] @@ -268,7 +268,7 @@ class CmConnection: ('content', 'expanded'), ('q', '{"state.name": "' + tc_name + '"}') ] - r = self.__get("/api/v1/ns/transport-capacities?content=expanded", params=qparams) + r = self.__get("/api/v1/transport-capacities?content=expanded", params=qparams) if not r.is_valid_json_list_with_status(200, 1, 1): return TransportCapacity(from_json=r.json[0]) else: @@ -280,17 +280,17 @@ class CmConnection: def create_transport_capacity(self, tc: TransportCapacity) -> Optional[str]: # Create wants a list, so wrap connection to list tc_config = [tc.create_config()] - resp = self.__post("/api/v1/ns/transport-capacities", tc_config) + resp = self.__post("/api/v1/transport-capacities", tc_config) if resp.is_valid_json_list_with_status(202, 1, 1) and "href" in resp.json[0]: tc.href = resp.json[0]["href"] LOGGER.info(f"Created transport-capcity {tc}") - #LOGGER.info(self.__get(f"/api/v1/ns/transport-capacities{tc.href}?content=expanded")) + #LOGGER.info(self.__get(f"/api/v1/transport-capacities{tc.href}?content=expanded")) return tc.href else: return None def delete_transport_capacity(self, href: str) -> bool: - resp = self.__delete(f"/api/v1/ns/transport-capacities{href}") + resp = self.__delete(f"/api/v1/transport-capacities{href}") # Returns empty body if resp.is_valid_with_status_ignore_body(202): @@ -399,7 +399,7 @@ class CmConnection: # Create wants a list, so wrap connection to list cfg = [connection.create_config()] - resp = self.__post("/api/v1/ncs/network-connections", cfg) + resp = self.__post("/api/v1/network-connections", cfg) if resp.is_valid_json_list_with_status(202, 1, 1) and "href" in resp.json[0]: connection.href = resp.json[0]["href"] LOGGER.info(f"IPM accepted create request for connection {connection}") @@ -433,7 +433,7 @@ class CmConnection: # Perform deletes for ep_href in ep_deletes: - resp = self.__delete(f"/api/v1/ncs{ep_href}") + resp = self.__delete(f"/api/v1{ep_href}") if resp.is_valid_with_status_ignore_body(202): LOGGER.info(f"update_connection: EP-UPDATE: Deleted connection endpoint {ep_href}") else: @@ -441,21 +441,21 @@ class CmConnection: # Update capacities for otherwise similar endpoints for ep_href, ep_cfg in ep_updates: - resp = self.__put(f"/api/v1/ncs{ep_href}", ep_cfg) + resp = self.__put(f"/api/v1{ep_href}", ep_cfg) if resp.is_valid_with_status_ignore_body(202): LOGGER.info(f"update_connection: EP-UPDATE: Updated connection endpoint {ep_href} with {ep_cfg}") else: LOGGER.info(f"update_connection: EP-UPDATE: Failed to update connection endpoint {ep_href} with {ep_cfg}: {resp}") # Perform adds - resp = self.__post(f"/api/v1/ncs{href}/endpoints", ep_creates) + resp = self.__post(f"/api/v1{href}/endpoints", ep_creates) if resp.is_valid_json_list_with_status(202, 1, 1) and "href" in resp.json[0]: LOGGER.info(f"update_connection: EP-UPDATE: Created connection endpoints {resp.json[0]} with {ep_creates}") else: LOGGER.info(f"update_connection: EP-UPDATE: Failed to create connection endpoints {resp.json[0] if resp.json else None} with {ep_creates}: {resp}") # Connection update (excluding endpoints) - resp = self.__put(f"/api/v1/ncs{href}", cfg) + resp = self.__put(f"/api/v1{href}", cfg) # Returns empty body if resp.is_valid_with_status_ignore_body(202): LOGGER.info(f"update_connection: Updated connection {connection}") @@ -466,7 +466,7 @@ class CmConnection: return None def delete_connection(self, href: str) -> bool: - resp = self.__delete(f"/api/v1/ncs{href}") + resp = self.__delete(f"/api/v1{href}") #print(resp) # Returns empty body if resp.is_valid_with_status_ignore_body(202): @@ -489,7 +489,7 @@ class CmConnection: ('content', 'expanded'), ('q', '{"state.name": "' + connection_name + '"}') ] - r = self.__get("/api/v1/ncs/network-connections", params=qparams) + r = self.__get("/api/v1/network-connections", params=qparams) if r.is_valid_json_list_with_status(200, 1, 1): return Connection(from_json=r.json[0]) else: @@ -499,7 +499,7 @@ class CmConnection: qparams = [ ('content', 'expanded'), ] - r = self.__get(f"/api/v1/ncs{href}", params=qparams) + r = self.__get(f"/api/v1{href}", params=qparams) if r.is_valid_json_obj_with_status(200): return Connection(from_json=r.json) else: @@ -509,14 +509,14 @@ class CmConnection: return self.get_connection_by_name(f"TF:{uuid}") def get_connections(self): - r = self.__get("/api/v1/ncs/network-connections?content=expanded") + r = self.__get("/api/v1/network-connections?content=expanded") if r.is_valid_json_list_with_status(200): return [Connection(from_json=c) for c in r.json] else: return [] def service_uuid(self, key: str) -> Optional[str]: - service = re.match(r"^/service\[(.+)\]$", key) + service = re.match(r"^(?:/services)/service\[(.+)\]$", key) if service: return service.group(1) else: diff --git a/src/device/service/drivers/xr/cm/connection.py b/src/device/service/drivers/xr/cm/connection.py index 98736cce534685189069703d9560b9d34b1d8007..321922b1cb81eb1cedee673f40b232c038abd8af 100644 --- a/src/device/service/drivers/xr/cm/connection.py +++ b/src/device/service/drivers/xr/cm/connection.py @@ -165,6 +165,9 @@ class Connection: endpoints = ", ".join((str(ep) for ep in self.endpoints)) return f"name: {name}, id: {self.href}, service-mode: {self.serviceMode}, end-points: [{endpoints}]" + def is_vti_mode(self) -> bool: + return "XR-VTI-P2P" == self.serviceMode + def __guess_service_mode_from_emulated_enpoints(self): for ep in self.endpoints: if ep.vlan is not None: 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 4f45be686c2c3a0f619d58230b2c52ed66a3eb6f..a7944ed220c6d68aad2f122a0bb0d2c1f83fdd06 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 @@ -59,7 +59,7 @@ def test_cmc_connect(): def test_cmc_get_constellations(): with mock_cm_connectivity() as m: - m.get("https://127.0.0.1:9999/api/v1/ns/xr-networks?content=expanded", text=res_constellations) + m.get("https://127.0.0.1:9999/api/v1/xr-networks?content=expanded", text=res_constellations) cm = CmConnection("127.0.0.1", 9999, "xr-user", "xr-password", tls_verify=False) assert cm.Connect() @@ -73,7 +73,7 @@ def test_cmc_get_constellations(): ['XR HUB 1|XR-T1', 'XR HUB 1|XR-T2', 'XR HUB 1|XR-T3', 'XR HUB 1|XR-T4', 'XR LEAF 1|XR-T1', 'XR LEAF 2|XR-T1']] # Get constellation by hub module name - m.get("https://127.0.0.1:9999/api/v1/ns/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D", text=res_constellation_by_name_hub1) + m.get("https://127.0.0.1:9999/api/v1/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D", text=res_constellation_by_name_hub1) constellation = cm.get_constellation_by_hub_name("XR HUB 1") assert constellation assert constellation.ifnames() == ['XR HUB 1|XR-T1', 'XR HUB 1|XR-T2', 'XR HUB 1|XR-T3', 'XR HUB 1|XR-T4', 'XR LEAF 1|XR-T1', 'XR LEAF 2|XR-T1'] 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 3bfd63def82ae89f53ab6ec3a5fc18bd79ecd38f..e9b16b62034bcd42061907d920b757b59766f562 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 @@ -38,8 +38,8 @@ with open(os.path.join(resources, "connections-expanded.json"), "r", encoding="U def mock_cm(): m = requests_mock.Mocker() m.post('https://127.0.0.1:9999/realms/xr-cm/protocol/openid-connect/token', text=access_token) - m.get("https://127.0.0.1:9999/api/v1/ns/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D", text=res_constellation_by_name_hub1) - m.post("https://127.0.0.1:9999/api/v1/ncs/network-connections", text='[{"href":"/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432","rt":["cm.network-connection"]}]', status_code=202) + m.get("https://127.0.0.1:9999/api/v1/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D", text=res_constellation_by_name_hub1) + m.post("https://127.0.0.1:9999/api/v1/network-connections", text='[{"href":"/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432","rt":["cm.network-connection"]}]', status_code=202) return m uuid = "12345ABCDEFGHIJKLMN" @@ -69,9 +69,9 @@ def test_xr_set_config(): called_mocks = [(r._request.method, r._request.url) for r in m._adapter.request_history] expected_mocks = [ ('POST', 'https://127.0.0.1:9999/realms/xr-cm/protocol/openid-connect/token'), # Authentication - ('GET', 'https://127.0.0.1:9999/api/v1/ns/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D'), # Hub module by name - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create - ('POST', 'https://127.0.0.1:9999/api/v1/ncs/network-connections') # Create + ('GET', 'https://127.0.0.1:9999/api/v1/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D'), # Hub module by name + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create + ('POST', 'https://127.0.0.1:9999/api/v1/network-connections') # Create ] assert called_mocks == expected_mocks @@ -97,7 +97,7 @@ def test_xr_set_config_consistency_lifecycle(): json_non_terminal = copy.deepcopy(json_terminal) json_non_terminal["state"]["lifecycleState"] = "pendingConfiguration" # We go trough 404 and non-terminal lstate first and then terminal state. - m.get("https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", + m.get("https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", [{'text': '', 'status_code': 404}, { 'json': json_non_terminal, 'status_code': 200 }, {'json': json_terminal, 'status_code': 200 }]) @@ -108,19 +108,19 @@ def test_xr_set_config_consistency_lifecycle(): called_mocks = [(r._request.method, r._request.url) for r in m._adapter.request_history] expected_mocks = [ ('POST', 'https://127.0.0.1:9999/realms/xr-cm/protocol/openid-connect/token'), # Authentication - ('GET', 'https://127.0.0.1:9999/api/v1/ns/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D'), # Hub module by name - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create - ('POST', 'https://127.0.0.1:9999/api/v1/ncs/network-connections'), # Create - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> no REST API object - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> non-terminal - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded') # Life cycle state check --> terminal + ('GET', 'https://127.0.0.1:9999/api/v1/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D'), # Hub module by name + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create + ('POST', 'https://127.0.0.1:9999/api/v1/network-connections'), # Create + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> no REST API object + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> non-terminal + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded') # Life cycle state check --> terminal ] assert called_mocks == expected_mocks ################################################################################ # Same as before, but without life cycle progress m.reset_mock() - m.get("https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", + m.get("https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", [{'text': '', 'status_code': 401}, { 'json': json_non_terminal, 'status_code': 200 }]) @@ -129,10 +129,10 @@ def test_xr_set_config_consistency_lifecycle(): called_mocks = [(r._request.method, r._request.url) for r in m._adapter.request_history] expected_mocks_no_connect = [ - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create - ('POST', 'https://127.0.0.1:9999/api/v1/ncs/network-connections'), # Create - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> no REST API object - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> non-terminal + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create + ('POST', 'https://127.0.0.1:9999/api/v1/network-connections'), # Create + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> no REST API object + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432?content=expanded'), # Life cycle state check --> non-terminal ] assert called_mocks == repeat_last_expected(expected_mocks_no_connect, called_mocks) @@ -143,7 +143,7 @@ def test_xr_set_config_consistency_lifecycle(): assert cm.Connect() constellation = cm.get_constellation_by_hub_name("XR HUB 1") assert constellation - m.get("https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", + m.get("https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", [{'text': '', 'status_code': 401}, { 'json': json_non_terminal, 'status_code': 200 }]) result = set_config_for_service(cm, constellation, uuid, config) @@ -158,7 +158,7 @@ def test_xr_set_config_consistency_lifecycle(): assert cm.Connect() constellation = cm.get_constellation_by_hub_name("XR HUB 1") assert constellation - m.get("https://127.0.0.1:9999/api/v1/ncs/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", + m.get("https://127.0.0.1:9999/api/v1/network-connections/c3b31608-0bb7-4a4f-9f9a-88b24a059432", [{'text': '', 'status_code': 401}]) result = set_config_for_service(cm, constellation, uuid, config) _validate_result(result, False) @@ -175,15 +175,15 @@ def test_xr_set_config_update_case(): assert constellation # Fake existing service (--> update path is taken) - m.get("https://127.0.0.1:9999/api/v1/ncs/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D", json=res_connection_by_name_json) + m.get("https://127.0.0.1:9999/api/v1/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D", json=res_connection_by_name_json) # Delete endpoint that is no longer necessary - m.delete("https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388", text="", status_code = 202) + m.delete("https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388", text="", status_code = 202) # Update changed endpoint - m.put("https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/230516d0-7e38-44b1-b174-1ba7d4454ee6", text="", status_code = 202) + m.put("https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/230516d0-7e38-44b1-b174-1ba7d4454ee6", text="", status_code = 202) # Create the newly added endpoint - m.post("https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints", json=[{"href":"/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoint/somethingplausible","rt":["plausible"]}], status_code=202) + m.post("https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints", json=[{"href":"/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoint/somethingplausible","rt":["plausible"]}], status_code=202) # Update the connection itself - m.put("https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03", text="", status_code=202) + m.put("https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03", text="", status_code=202) result = set_config_for_service(cm, constellation, uuid, config) _validate_result(result, True) @@ -191,11 +191,11 @@ def test_xr_set_config_update_case(): called_mocks = [(r._request.method, r._request.url) for r in m._adapter.request_history] expected_mocks = [ ('POST', 'https://127.0.0.1:9999/realms/xr-cm/protocol/openid-connect/token'), # Authentication - ('GET', 'https://127.0.0.1:9999/api/v1/ns/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D'), # Hub module by name - ('GET', 'https://127.0.0.1:9999/api/v1/ncs/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create - ('DELETE', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388'), # Delete unnecessary endpoint - ('PUT', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/230516d0-7e38-44b1-b174-1ba7d4454ee6'), # Update changed endpoint - ('POST', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints'), # Add new endpoint - ('PUT', 'https://127.0.0.1:9999/api/v1/ncs/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03') # Update the connection itself + ('GET', 'https://127.0.0.1:9999/api/v1/xr-networks?content=expanded&content=expanded&q=%7B%22hubModule.state.module.moduleName%22%3A+%22XR+HUB+1%22%7D'), # Hub module by name + ('GET', 'https://127.0.0.1:9999/api/v1/network-connections?content=expanded&q=%7B%22state.name%22%3A+%22TF%3A12345ABCDEFGHIJKLMN%22%7D'), # Get by name, determine update or create + ('DELETE', 'https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/1d58ba8f-4d51-4213-83e1-97a0e0bdd388'), # Delete unnecessary endpoint + ('PUT', 'https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints/230516d0-7e38-44b1-b174-1ba7d4454ee6'), # Update changed endpoint + ('POST', 'https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03/endpoints'), # Add new endpoint + ('PUT', 'https://127.0.0.1:9999/api/v1/network-connections/4505d5d3-b2f3-40b8-8ec2-4a5b28523c03') # Update the connection itself ] assert called_mocks == expected_mocks diff --git a/src/device/service/drivers/xr/service-cli.py b/src/device/service/drivers/xr/service-cli.py new file mode 100755 index 0000000000000000000000000000000000000000..7ab9606cef7bd7d3cca4f414cbd704ab150c8f52 --- /dev/null +++ b/src/device/service/drivers/xr/service-cli.py @@ -0,0 +1,303 @@ +#!/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-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Manage L2 services (with underlying XR connectivity) without need to use unit test +# files or excessive JSON definitions +# +# Run in this directory with PYTHONPATH=../../../../ +# E.g.: +# Create multi-layer service (L2 VPN over XR): +# PYTHONPATH=../../../../ ./service-cli.py create 1 R1-EMU 13/1/2 500 2 R3-EMU 13/1/2 500 +# Single-layer (XR without services on top of it): +# PYTHONPATH=../../../../ ./service-cli.py create-xr FooService X1-XR-CONSTELLATION "XR HUB 1|XR-T1" "XR LEAF 2|XR-T1" +# List services: +# PYTHONPATH=../../../../ ./service-cli.py list +# List possible endpoints: +# PYTHONPATH=../../../../ ./service-cli.py list-endpoints +# Delete service (if multi-layer, always deleter highest layer!) +# PYTHONPATH=../../../../ ./service-cli.py delete 43a8046a-5dec-463d-82f7-7cc3442dbf4f + +import argparse +import logging +from copy import deepcopy +from dataclasses import dataclass, field +from typing import Dict +from contextlib import contextmanager + +from common.Settings import get_setting +from context.client.ContextClient import ContextClient +from service.client.ServiceClient import ServiceClient +from tests.tools.mock_osm.MockOSM import MockOSM +from common.proto.context_pb2 import ContextId, ServiceTypeEnum, ServiceStatusEnum, Service, Empty, ServiceId +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context, json_context_id +from common.tools.object_factory.Topology import json_topology_id +from common.tools.object_factory.ConfigRule import json_config_rule_set + +LOGGER = logging.getLogger(__name__) + +WIM_USERNAME = 'admin' +WIM_PASSWORD = 'admin' + +@contextmanager +def make_context_client(): + try: + _client = ContextClient(get_setting('CONTEXTSERVICE_SERVICE_HOST'), get_setting('CONTEXTSERVICE_SERVICE_PORT_GRPC')) + yield _client + finally: + _client.close() + +@contextmanager +def make_service_client(): + try: + _client = ServiceClient(get_setting('SERVICESERVICE_SERVICE_HOST'), get_setting('SERVICESERVICE_SERVICE_PORT_GRPC')) + yield _client + finally: + _client.close() + +def make_osm_wim(): + wim_url = 'http://{:s}:{:s}'.format( + get_setting('COMPUTESERVICE_SERVICE_HOST'), str(get_setting('COMPUTESERVICE_SERVICE_PORT_HTTP'))) + return MockOSM(wim_url, WIM_MAPPING, WIM_USERNAME, WIM_PASSWORD) + +@dataclass +class DevInfo: + name: str + uuid: str + endpoints: Dict[str, str] = field(default_factory= dict) + endpoints_by_uuid: Dict[str, str] = field(default_factory= dict) + + def get_endpoint_uuid_or_exit(self, ep_name: str) -> str: + if ep_name not in self.endpoints: + print(f"Endpoint {ep_name} does not exist in device {self.name}. See \"service-cli.py list-endpoints\"") + exit(-1) + return self.endpoints[ep_name] + +def get_devices(cc: ContextClient) -> Dict[str, DevInfo]: + r = cc.ListDevices(Empty()) + # print(grpc_message_to_json_string(r)) + + devices = dict() + for dev in r.devices: + di = DevInfo(dev.name, dev.device_id.device_uuid.uuid) + for ep in dev.device_endpoints: + di.endpoints[ep.name] = ep.endpoint_id.endpoint_uuid.uuid + di.endpoints_by_uuid[ep.endpoint_id.endpoint_uuid.uuid] = ep.name + devices[dev.name] = di + return devices + +def get_endpoint_map(devices: Dict[str, DevInfo]): + ep_map = dict() + for dev in devices.values(): + for ep_name, ep_uuid in dev.endpoints.items(): + ep_map[ep_uuid] = (dev.name, ep_name) + return ep_map + +logging.basicConfig(level=logging.ERROR) + +parser = argparse.ArgumentParser(description='TF Service Management Utility') +subparsers = parser.add_subparsers(dest="command") +subparsers.required = True + +create_parser = subparsers.add_parser('create') +create_parser.add_argument('site1', type=int, help='One endpoint of the service, e.g. 1') +create_parser.add_argument('device1', type=str, help='One endpoint of the service, e.g. R1-EMU') +create_parser.add_argument('interface1', type=str, help='One endpoint of the service, e.g. 13/1/2') +create_parser.add_argument('vlan1', type=int, help='VLAN in first endpoint, e.g. 500') + +create_parser.add_argument('site2', type=int, help='One endpoint of the service, e.g. 2') +create_parser.add_argument('device2', type=str, help='One endpoint of the service, e.g. R3-EMU') +create_parser.add_argument('interface2', type=str, help='One endpoint of the service, e.g. 13/1/2') +create_parser.add_argument('vlan2', type=int, help='VLAN in first endpoint, e.g. 500') + +delete_parser = subparsers.add_parser('delete') +delete_parser.add_argument('service_uuid', type=str, help='UUID of the service to be deleted') + +list_parser = subparsers.add_parser('list') +list_parser = subparsers.add_parser('list-endpoints') + +create_xr_parser = subparsers.add_parser('create-xr') +create_xr_parser.add_argument('service_name', type=str, help='Service Name') +create_xr_parser.add_argument('constellation', type=str, help='XR Constellation') +create_xr_parser.add_argument('interface1', type=str, help='One endpoint of the service') +create_xr_parser.add_argument('interface2', type=str, help='Second endpoint of the service') + +args = parser.parse_args() + +WIM_SERVICE_TYPE = 'ELINE' +CONTEXT_ID = {'context_uuid': {'uuid': 'admin'}} + +if args.command == "create": + endpoint1 = f"{args.device1}:{args.interface1}" + endpoint2 = f"{args.device2}:{args.interface2}" + + WIM_MAPPING = [ + {'device-id': args.device1, 'service_endpoint_id': endpoint1, + 'service_mapping_info': {'bearer': {'bearer-reference': endpoint1}, 'site-id': args.site1}}, + {'device-id': args.device2, 'service_endpoint_id': endpoint2, + 'service_mapping_info': {'bearer': {'bearer-reference': endpoint2}, 'site-id': args.site2}}, + ] + WIM_SERVICE_CONNECTION_POINTS = [ + {'service_endpoint_id': endpoint1, + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': args.vlan1}}, + {'service_endpoint_id': endpoint2, + 'service_endpoint_encapsulation_type': 'dot1q', + 'service_endpoint_encapsulation_info': {'vlan': args.vlan2}}, + ] +else: + WIM_MAPPING = [] + WIM_SERVICE_CONNECTION_POINTS = [] + +#print(str(args)) +#print(f"=== WIM_SERVICE_TYPE: {WIM_SERVICE_TYPE}") +#print(f"=== WIM_SERVICE_CONNECTION_POINTS: {WIM_SERVICE_CONNECTION_POINTS}") +#print(f"=== WIM_MAPPING: {WIM_MAPPING}") + +with make_context_client() as client: + # We only permit one context on our demos/testing + response = client.ListContextIds(Empty()) + assert len(response.context_ids) == 1 + context_uuid=json_context_id(response.context_ids[0].context_uuid.uuid) + + osm_wim = make_osm_wim() + + if args.command == "create": + service_uuid = osm_wim.create_connectivity_service(WIM_SERVICE_TYPE, WIM_SERVICE_CONNECTION_POINTS) + print(f"*** Create connectivity service --> {service_uuid}") + status = osm_wim.get_connectivity_service_status(service_uuid) + print(f"*** Get created service status --> {str(status)}") + + elif args.command == "delete": + service_id = { + "context_id": context_uuid, + "service_uuid": { + "uuid": args.service_uuid + } + } + + try: + response = client.GetService(ServiceId(**service_id)) + #print(grpc_message_to_json_string(response)) + + high_level_delete = response.service_type == ServiceTypeEnum.SERVICETYPE_L2NM or response.service_type == ServiceTypeEnum.SERVICETYPE_L3NM + print(f"Deleting service {response.name}, type {ServiceTypeEnum.Name(response.service_type)}, {high_level_delete=}") + + except: + print(f"No service with uuid {args.service_uuid} ({service_id})") + exit(-1) + + if high_level_delete: + osm_wim.wim.check_credentials() + try: + osm_wim.wim.delete_connectivity_service(args.service_uuid) + print(f"*** Service {args.service_uuid} deleted (L2SM/L3SM layer)") + except Exception as e: + print(f"*** Failed to delete service {args.service_uuid}, {e}") + else: + with make_service_client() as service_client: + try: + service_client.DeleteService(ServiceId(**service_id)) + print(f"*** Service {args.service_uuid} deleted (low level)") + except Exception as e: + print(f"*** Failed to delete service {args.service_uuid}, {e}") + + elif args.command == "create-xr": + CONTEXT_NAME = 'admin' + CONTEXT_ID = json_context_id(CONTEXT_NAME) + CONTEXT = json_context(CONTEXT_NAME, name=CONTEXT_NAME) + + json_tapi_settings = { + 'capacity_value' : 50.0, + 'capacity_unit' : 'GHz', + 'layer_proto_name': 'PHOTONIC_MEDIA', + 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', + 'direction' : 'UNIDIRECTIONAL', + } + config_rule = json_config_rule_set('/settings', json_tapi_settings) + + devices = get_devices(client) + if args.constellation not in devices: + print(f"Constellation {args.constellation} does not exist as a device. See \"service-cli.py list-endpoints\"") + exit(-1) + else: + dev_info = devices[args.constellation] + constellation_uuid = dev_info.uuid + + interface1_uuid = dev_info.get_endpoint_uuid_or_exit(args.interface1) + interface2_uuid = dev_info.get_endpoint_uuid_or_exit(args.interface2) + + print(f"Constellation {args.constellation:40}: {constellation_uuid:36}") + print(f"Interface 1 {args.interface1:40}: {interface1_uuid:36}") + print(f"Interface 2 {args.interface2:40}: {interface2_uuid:36}") + + service_request = { + "name": args.service_name, + "service_id": { + "context_id": {"context_uuid": {"uuid": response.context_ids[0].context_uuid.uuid}}, + "service_uuid": {"uuid": args.service_name} + }, + 'service_type' : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, + "service_endpoint_ids": [ + {'device_id': {'device_uuid': {'uuid': constellation_uuid}}, 'endpoint_uuid': {'uuid': interface1_uuid}, 'topology_id': json_topology_id("admin", context_id=context_uuid)}, + {'device_id': {'device_uuid': {'uuid': constellation_uuid}}, 'endpoint_uuid': {'uuid': interface2_uuid}, 'topology_id': json_topology_id("admin", context_id=context_uuid)} + ], + 'service_status' : {'service_status': ServiceStatusEnum.SERVICESTATUS_PLANNED}, + 'service_constraints' : [], + } + + with make_service_client() as service_client: + sr = deepcopy(service_request) + endpoints, sr['service_endpoint_ids'] = sr['service_endpoint_ids'], [] + create_response = service_client.CreateService(Service(**sr)) + print(f'CreateService: {grpc_message_to_json_string(create_response)}') + + sr['service_endpoint_ids'] = endpoints + #sr['service_id']['service_uuid'] = create_response + sr['service_config'] = {'config_rules': [config_rule]} + + update_response = service_client.UpdateService(Service(**sr)) + print(f'UpdateService: {grpc_message_to_json_string(update_response)}') + + elif args.command == "list": + devices = get_devices(client) + ep_map = get_endpoint_map(devices) + + response = client.ListServices(ContextId(**CONTEXT_ID)) + + # print('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + for service in response.services: + scs = "" + + ep_list = [] + for ep in service.service_endpoint_ids: + ep_uuid = ep.endpoint_uuid.uuid + if ep_uuid in ep_map: + dev_name, ep_name = ep_map[ep_uuid] + ep_list.append(f"{dev_name}:{ep_name}") + ep_list.sort() + eps = ", ".join(ep_list) + + #print(f"{service.service_id.service_uuid.uuid:36} {ServiceTypeEnum.Name(service.service_type):40} {service.name:40} {ServiceStatusEnum.Name(service.service_status.service_status)} {scs}") + print(f"{service.service_id.service_uuid.uuid:36} {ServiceTypeEnum.Name(service.service_type):40} {service.name:40} {ServiceStatusEnum.Name(service.service_status.service_status):28} {eps}") + + elif args.command == "list-endpoints": + devices = get_devices(client) + for name in sorted(devices.keys()): + dev = devices[name] + print(f"{name:40} {dev.uuid:36}") + for ep_name in sorted(dev.endpoints.keys()): + print(f" {ep_name:40} {dev.endpoints[ep_name]:36}") diff --git a/src/device/service/drivers/xr/setup_test_env.sh b/src/device/service/drivers/xr/setup_test_env.sh index 92ff4a0312fb8f963f934f4cfd8d18603675aed0..bd5463cd4f9d08c903fc601cfcb7241b672e7681 100755 --- a/src/device/service/drivers/xr/setup_test_env.sh +++ b/src/device/service/drivers/xr/setup_test_env.sh @@ -17,7 +17,11 @@ export CONTEXTSERVICE_SERVICE_HOST=$(kubectl get service/contextservice --namesp export CONTEXTSERVICE_SERVICE_PORT_GRPC=$(kubectl get service/contextservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="grpc")].port}') export COMPUTESERVICE_SERVICE_HOST=$(kubectl get service/computeservice --namespace tfs --template '{{.spec.clusterIP}}') export COMPUTESERVICE_SERVICE_PORT_HTTP=$(kubectl get service/computeservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="http")].port}') +export SERVICESERVICE_SERVICE_HOST=$(kubectl get service/serviceservice --namespace tfs --template '{{.spec.clusterIP}}') +export SERVICESERVICE_SERVICE_PORT_GRPC=$(kubectl get service/serviceservice --namespace tfs -o jsonpath='{.spec.ports[?(@.name=="grpc")].port}') echo "CONTEXTSERVICE_SERVICE_HOST=$CONTEXTSERVICE_SERVICE_HOST" echo "CONTEXTSERVICE_SERVICE_PORT_GRPC=$CONTEXTSERVICE_SERVICE_PORT_GRPC" echo "COMPUTESERVICE_SERVICE_HOST=$COMPUTESERVICE_SERVICE_HOST" echo "COMPUTESERVICE_SERVICE_PORT_HTTP=$COMPUTESERVICE_SERVICE_PORT_HTTP" +echo "SERVICESERVICE_SERVICE_HOST=$SERVICESERVICE_SERVICE_HOST" +echo "SERVICESERVICE_SERVICE_PORT_GRPC=$SERVICESERVICE_SERVICE_PORT_GRPC" diff --git a/src/device/tests/Device_OpenConfig_Template.py b/src/device/tests/Device_OpenConfig_Template.py index 8ab45337514bf354d8b338c8bb97721d099355f4..b9aae79a2b0e5a38a556e50dd2445592caca4daf 100644 --- a/src/device/tests/Device_OpenConfig_Template.py +++ b/src/device/tests/Device_OpenConfig_Template.py @@ -32,7 +32,7 @@ DEVICE_OC_CONNECT_RULES = json_device_connect_rules(DEVICE_OC_ADDRESS, DEVICE_OC 'hostkey_verify' : True, 'look_for_keys' : True, 'allow_agent' : True, - 'delete_rule' : False, + 'commit_per_rule': False, 'device_params' : {'name': 'default'}, 'manager_params' : {'timeout' : DEVICE_OC_TIMEOUT}, }) diff --git a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py index 79646cb0d5feb2ed7c1fc83d1f9d314f130f0342..f611981afcfddef8382a3f7d7cf2c1f71e36a078 100644 --- a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py +++ b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py @@ -93,6 +93,8 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto self.cryptomining_detector_features_metadata = [float(x) for x in self.cryptomining_detector_features_metadata] self.cryptomining_detector_features_metadata.sort() LOGGER.info("Cryptomining Detector Features: " + str(self.cryptomining_detector_features_metadata)) + + LOGGER.info("CHANGE CHECK 2") self.input_name = self.cryptomining_detector_model.get_inputs()[0].name self.label_name = self.cryptomining_detector_model.get_outputs()[0].name diff --git a/src/load_generator/client/LoadGeneratorClient.py b/src/load_generator/client/LoadGeneratorClient.py index 99626bbbb59671af41c11054d34338194f42a6af..2bed40dfdfe13d2920166bcb56237fe84bff8789 100644 --- a/src/load_generator/client/LoadGeneratorClient.py +++ b/src/load_generator/client/LoadGeneratorClient.py @@ -16,6 +16,7 @@ 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 Empty +from common.proto.load_generator_pb2 import Parameters, Status from common.proto.load_generator_pb2_grpc import LoadGeneratorServiceStub from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -46,12 +47,19 @@ class LoadGeneratorClient: self.stub = None @RETRY_DECORATOR - def Start(self, request : Empty) -> Empty: + def Start(self, request : Parameters) -> Empty: LOGGER.debug('Start request: {:s}'.format(grpc_message_to_json_string(request))) response = self.stub.Start(request) LOGGER.debug('Start result: {:s}'.format(grpc_message_to_json_string(response))) return response + @RETRY_DECORATOR + def GetStatus(self, request : Empty) -> Status: + LOGGER.debug('GetStatus request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetStatus(request) + LOGGER.debug('GetStatus result: {:s}'.format(grpc_message_to_json_string(response))) + return response + @RETRY_DECORATOR def Stop(self, request : Empty) -> Empty: LOGGER.debug('Stop request: {:s}'.format(grpc_message_to_json_string(request))) diff --git a/src/load_generator/load_gen/Constants.py b/src/load_generator/load_gen/Constants.py index b71dd9a35329e2aef6ce64739f59103a656b4de3..9ae3cdc1216891ca4dfcf01c1bd49d27bf4ef6f6 100644 --- a/src/load_generator/load_gen/Constants.py +++ b/src/load_generator/load_gen/Constants.py @@ -26,3 +26,5 @@ ENDPOINT_COMPATIBILITY = { 'PHOTONIC_MEDIA:FLEX:G_6_25GHZ:INPUT': 'PHOTONIC_MEDIA:FLEX:G_6_25GHZ:OUTPUT', 'PHOTONIC_MEDIA:DWDM:G_50GHZ:INPUT' : 'PHOTONIC_MEDIA:DWDM:G_50GHZ:OUTPUT', } + +MAX_WORKER_THREADS = 10 \ No newline at end of file diff --git a/src/load_generator/load_gen/RequestGenerator.py b/src/load_generator/load_gen/RequestGenerator.py index 906c26e98a75fe3c8f15d628f863faac4ba2ea16..5c56ea6ec603f4e9bb3fc72d5baa47f05ea0c991 100644 --- a/src/load_generator/load_gen/RequestGenerator.py +++ b/src/load_generator/load_gen/RequestGenerator.py @@ -14,9 +14,11 @@ import logging, json, random, threading from typing import Dict, Optional, Set, Tuple -from common.proto.context_pb2 import Empty, TopologyId +from common.proto.context_pb2 import Empty, IsolationLevelEnum, TopologyId from common.tools.grpc.Tools import grpc_message_to_json -from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Constraint import ( + json_constraint_sla_availability, json_constraint_sla_capacity, json_constraint_sla_isolation, + json_constraint_sla_latency) from common.tools.object_factory.ConfigRule import json_config_rule_set from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.EndPoint import json_endpoint_id @@ -32,11 +34,25 @@ from .Parameters import Parameters LOGGER = logging.getLogger(__name__) +ROUTER_ID = { + 'R149': '5.5.5.5', + 'R155': '5.5.5.1', + 'R199': '5.5.5.6', + +} + +VIRTUAL_CIRCUIT = { + 'R149': '5.5.5.5', + 'R155': '5.5.5.1', + 'R199': '5.5.5.6', + +} + class RequestGenerator: def __init__(self, parameters : Parameters) -> None: self._parameters = parameters self._lock = threading.Lock() - self._num_requests = 0 + self._num_generated = 0 self._available_device_endpoints : Dict[str, Set[str]] = dict() self._used_device_endpoints : Dict[str, Dict[str, str]] = dict() self._endpoint_ids_to_types : Dict[Tuple[str, str], str] = dict() @@ -45,6 +61,12 @@ class RequestGenerator: self._device_data : Dict[str, Dict] = dict() self._device_endpoint_data : Dict[str, Dict[str, Dict]] = dict() + @property + def num_generated(self): return self._num_generated + + @property + def infinite_loop(self): return self._parameters.num_requests == 0 + def initialize(self) -> None: with self._lock: self._available_device_endpoints.clear() @@ -96,17 +118,14 @@ class RequestGenerator: if self._parameters.record_to_dlt: record_link_to_dlt(dlt_connector_client, dlt_domain_id, link.link_id) - @property - def num_requests_generated(self): return self._num_requests - def dump_state(self) -> None: with self._lock: _endpoints = { device_uuid:[endpoint_uuid for endpoint_uuid in endpoint_uuids] for device_uuid,endpoint_uuids in self._available_device_endpoints.items() } - LOGGER.info('[dump_state] available_device_endpoints = {:s}'.format(json.dumps(_endpoints))) - LOGGER.info('[dump_state] used_device_endpoints = {:s}'.format(json.dumps(self._used_device_endpoints))) + LOGGER.debug('[dump_state] available_device_endpoints = {:s}'.format(json.dumps(_endpoints))) + LOGGER.debug('[dump_state] used_device_endpoints = {:s}'.format(json.dumps(self._used_device_endpoints))) def _use_device_endpoint( self, service_uuid : str, request_type : RequestType, endpoint_types : Optional[Set[str]] = None, @@ -167,10 +186,13 @@ class RequestGenerator: self._used_device_endpoints.setdefault(device_uuid, dict()).pop(endpoint_uuid, None) self._available_device_endpoints.setdefault(device_uuid, set()).add(endpoint_uuid) - def compose_request(self) -> Optional[Dict]: + def compose_request(self) -> Tuple[bool, Optional[Dict]]: # completed, request with self._lock: - self._num_requests += 1 - num_request = self._num_requests + if not self.infinite_loop and (self._num_generated >= self._parameters.num_requests): + LOGGER.info('Generation Done!') + return True, None # completed + self._num_generated += 1 + num_request = self._num_generated #request_uuid = str(uuid.uuid4()) request_uuid = 'svc_{:d}'.format(num_request) @@ -181,9 +203,9 @@ class RequestGenerator: if request_type in { RequestType.SERVICE_L2NM, RequestType.SERVICE_L3NM, RequestType.SERVICE_TAPI, RequestType.SERVICE_MW }: - return self._compose_service(num_request, request_uuid, request_type) + return False, self._compose_service(num_request, request_uuid, request_type) elif request_type in {RequestType.SLICE_L2NM, RequestType.SLICE_L3NM}: - return self._compose_slice(num_request, request_uuid, request_type) + return False, self._compose_slice(num_request, request_uuid, request_type) def _compose_service(self, num_request : int, request_uuid : str, request_type : str) -> Optional[Dict]: # choose source endpoint @@ -222,86 +244,116 @@ class RequestGenerator: ] if request_type == RequestType.SERVICE_L2NM: + availability = round(random.uniform(0.0, 99.9999), ndigits=5) + capacity_gbps = round(random.uniform(0.1, 100.00), ndigits=2) + e2e_latency_ms = round(random.uniform(5.0, 100.00), ndigits=2) + constraints = [ - json_constraint_custom('bandwidth[gbps]', '10.0'), - json_constraint_custom('latency[ms]', '20.0'), + json_constraint_sla_availability(1, True, availability), + json_constraint_sla_capacity(capacity_gbps), + json_constraint_sla_isolation([IsolationLevelEnum.NO_ISOLATION]), + json_constraint_sla_latency(e2e_latency_ms), ] + vlan_id = num_request % 1000 - circuit_id = '{:03d}'.format(vlan_id) + circuit_id = '{:03d}'.format(vlan_id + 100) src_device_name = self._device_data[src_device_uuid]['name'] - src_router_id = '10.0.0.{:d}'.format(int(src_device_name.replace('R', ''))) + src_endpoint_name = self._device_endpoint_data[src_device_uuid][src_endpoint_uuid]['name'] + src_router_id = ROUTER_ID.get(src_device_name) + src_router_num = int(src_device_name.replace('R', '')) + if src_router_id is None: src_router_id = '10.0.0.{:d}'.format(src_router_num) dst_device_name = self._device_data[dst_device_uuid]['name'] - dst_router_id = '10.0.0.{:d}'.format(int(dst_device_name.replace('R', ''))) + dst_endpoint_name = self._device_endpoint_data[dst_device_uuid][dst_endpoint_uuid]['name'] + dst_router_num = int(dst_device_name.replace('R', '')) + dst_router_id = ROUTER_ID.get(dst_device_name) + if dst_router_id is None: dst_router_id = '10.0.0.{:d}'.format(dst_router_num) config_rules = [ json_config_rule_set('/settings', { 'mtu': 1512 }), json_config_rule_set( - '/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_uuid, src_endpoint_uuid), { - 'router_id': src_router_id, - 'sub_interface_index': vlan_id, + '/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_name, src_endpoint_name), { + 'sub_interface_index': 0, 'vlan_id': vlan_id, 'remote_router': dst_router_id, 'circuit_id': circuit_id, - }), + }), json_config_rule_set( - '/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_uuid, dst_endpoint_uuid), { - 'router_id': dst_router_id, - 'sub_interface_index': vlan_id, + '/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_name, dst_endpoint_name), { + 'sub_interface_index': 0, 'vlan_id': vlan_id, 'remote_router': src_router_id, 'circuit_id': circuit_id, - }), + }), ] return json_service_l2nm_planned( request_uuid, endpoint_ids=endpoint_ids, constraints=constraints, config_rules=config_rules) elif request_type == RequestType.SERVICE_L3NM: + availability = round(random.uniform(0.0, 99.9999), ndigits=5) + capacity_gbps = round(random.uniform(0.1, 100.00), ndigits=2) + e2e_latency_ms = round(random.uniform(5.0, 100.00), ndigits=2) + constraints = [ - json_constraint_custom('bandwidth[gbps]', '10.0'), - json_constraint_custom('latency[ms]', '20.0'), + json_constraint_sla_availability(1, True, availability), + json_constraint_sla_capacity(capacity_gbps), + json_constraint_sla_isolation([IsolationLevelEnum.NO_ISOLATION]), + json_constraint_sla_latency(e2e_latency_ms), ] - vlan_id = num_request % 1000 - bgp_as = 60000 + (num_request % 10000) - bgp_route_target = '{:5d}:{:03d}'.format(bgp_as, 333) + + bgp_as = 65000 + (num_request % 10000) + + vlan_id = num_request % 100 +100 + x = num_request % 255 + y = num_request % 25 * num_request % 10 route_distinguisher = '{:5d}:{:03d}'.format(bgp_as, vlan_id) src_device_name = self._device_data[src_device_uuid]['name'] src_endpoint_name = self._device_endpoint_data[src_device_uuid][src_endpoint_uuid]['name'] - src_router_id = '10.0.0.{:d}'.format(int(src_device_name.replace('R', ''))) - src_address_ip = '.'.join([src_device_name.replace('R', ''), '0'] + src_endpoint_name.split('/')) + src_router_id = ROUTER_ID.get(src_device_name) + src_router_num = int(src_device_name.replace('R', '')) + if src_router_id is None: src_router_id = '10.0.0.{:d}'.format(src_router_num) + src_address_ip = '10.{:d}.{:d}.{:d}'.format(x, y, src_router_num) dst_device_name = self._device_data[dst_device_uuid]['name'] dst_endpoint_name = self._device_endpoint_data[dst_device_uuid][dst_endpoint_uuid]['name'] - dst_router_id = '10.0.0.{:d}'.format(int(dst_device_name.replace('R', ''))) - dst_address_ip = '.'.join([dst_device_name.replace('R', ''), '0'] + dst_endpoint_name.split('/')) + dst_router_num = int(dst_device_name.replace('R', '')) + dst_router_id = ROUTER_ID.get(dst_device_name) + if dst_router_id is None: dst_router_id = '10.0.0.{:d}'.format(dst_router_num) + dst_address_ip = '10.{:d}.{:d}.{:d}'.format(y, x, dst_router_num) + + policy_AZ = 'srv_{:d}_a'.format(vlan_id) + policy_ZA = 'srv_{:d}_b'.format(vlan_id) config_rules = [ json_config_rule_set('/settings', { - 'mtu' : 1512, 'bgp_as' : bgp_as, - 'bgp_route_target': bgp_route_target, + 'route_distinguisher': route_distinguisher, }), json_config_rule_set( - '/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_uuid, src_endpoint_uuid), { + '/device[{:s}]/endpoint[{:s}]/settings'.format(src_device_name, src_endpoint_name), { 'router_id' : src_router_id, 'route_distinguisher': route_distinguisher, - 'sub_interface_index': vlan_id, + 'sub_interface_index': 0, 'vlan_id' : vlan_id, 'address_ip' : src_address_ip, 'address_prefix' : 16, + 'policy_AZ' : policy_AZ, + 'policy_ZA' : policy_ZA, }), json_config_rule_set( - '/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_uuid, dst_endpoint_uuid), { + '/device[{:s}]/endpoint[{:s}]/settings'.format(dst_device_name, dst_endpoint_name), { 'router_id' : dst_router_id, 'route_distinguisher': route_distinguisher, - 'sub_interface_index': vlan_id, + 'sub_interface_index': 0, 'vlan_id' : vlan_id, 'address_ip' : dst_address_ip, 'address_prefix' : 16, + 'policy_ZA' : policy_AZ, + 'policy_AZ' : policy_ZA, }), ] return json_service_l3nm_planned( @@ -357,9 +409,15 @@ class RequestGenerator: json_endpoint_id(json_device_id(src_device_uuid), src_endpoint_uuid), json_endpoint_id(json_device_id(dst_device_uuid), dst_endpoint_uuid), ] + + availability = round(random.uniform(0.0, 99.9999), ndigits=5) + capacity_gbps = round(random.uniform(0.1, 100.00), ndigits=2) + e2e_latency_ms = round(random.uniform(5.0, 100.00), ndigits=2) constraints = [ - json_constraint_custom('bandwidth[gbps]', '10.0'), - json_constraint_custom('latency[ms]', '20.0'), + json_constraint_sla_availability(1, True, availability), + json_constraint_sla_capacity(capacity_gbps), + json_constraint_sla_isolation([IsolationLevelEnum.NO_ISOLATION]), + json_constraint_sla_latency(e2e_latency_ms), ] if request_type == RequestType.SLICE_L2NM: diff --git a/src/load_generator/load_gen/RequestScheduler.py b/src/load_generator/load_gen/RequestScheduler.py index 775da1580a2a6521dbdc8fe32236c1f2adb4b3a7..773a37eac258f8b3c16c966464ced124d3c77c85 100644 --- a/src/load_generator/load_gen/RequestScheduler.py +++ b/src/load_generator/load_gen/RequestScheduler.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, logging, pytz, random +import copy, logging, pytz, random, threading from apscheduler.executors.pool import ThreadPoolExecutor from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.schedulers.blocking import BlockingScheduler @@ -21,6 +21,7 @@ from typing import Dict, Optional from common.proto.context_pb2 import Service, ServiceId, Slice, SliceId from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient +from .Constants import MAX_WORKER_THREADS from .DltTools import explore_entities_to_record, record_entities from .Parameters import Parameters from .RequestGenerator import RequestGenerator @@ -37,7 +38,7 @@ class RequestScheduler: self._scheduler = scheduler_class() self._scheduler.configure( jobstores = {'default': MemoryJobStore()}, - executors = {'default': ThreadPoolExecutor(max_workers=10)}, + executors = {'default': ThreadPoolExecutor(max_workers=MAX_WORKER_THREADS)}, job_defaults = { 'coalesce': False, 'max_instances': 100, @@ -46,14 +47,18 @@ class RequestScheduler: timezone=pytz.utc) self._parameters = parameters self._generator = generator + self._running = threading.Event() + + @property + def num_generated(self): return min(self._generator.num_generated, self._parameters.num_requests) + + @property + def infinite_loop(self): return self._generator.infinite_loop + + @property + def running(self): return self._running.is_set() def _schedule_request_setup(self) -> None: - infinite_loop = self._parameters.num_requests == 0 - num_requests_generated = self._generator.num_requests_generated - 1 # because it first increases, then checks - if not infinite_loop and (num_requests_generated >= self._parameters.num_requests): - LOGGER.info('Generation Done!') - #self._scheduler.shutdown() - return iat = random.expovariate(1.0 / self._parameters.inter_arrival_time) run_date = datetime.utcnow() + timedelta(seconds=iat) self._scheduler.add_job( @@ -66,16 +71,24 @@ class RequestScheduler: self._request_teardown, args=(request,), trigger='date', run_date=run_date, timezone=pytz.utc) def start(self): + self._running.set() self._schedule_request_setup() self._scheduler.start() def stop(self): self._scheduler.shutdown() + self._running.clear() def _request_setup(self) -> None: - self._schedule_request_setup() + completed,request = self._generator.compose_request() + if completed: + LOGGER.info('Generation Done!') + #self._scheduler.shutdown() + self._running.clear() + return + else: + self._schedule_request_setup() - request = self._generator.compose_request() if request is None: LOGGER.warning('No resources available to compose new request') return diff --git a/src/load_generator/service/Constants.py b/src/load_generator/service/Constants.py new file mode 100644 index 0000000000000000000000000000000000000000..6c339877c70363e874df278d6b5d29cc47a3be0f --- /dev/null +++ b/src/load_generator/service/Constants.py @@ -0,0 +1,27 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from common.proto.load_generator_pb2 import RequestTypeEnum +from load_generator.load_gen.Constants import RequestType + +REQUEST_TYPE_MAP = { + RequestTypeEnum.REQUESTTYPE_SERVICE_L2NM : RequestType.SERVICE_L2NM, + RequestTypeEnum.REQUESTTYPE_SERVICE_L3NM : RequestType.SERVICE_L3NM, + RequestTypeEnum.REQUESTTYPE_SERVICE_MW : RequestType.SERVICE_MW, + RequestTypeEnum.REQUESTTYPE_SERVICE_TAPI : RequestType.SERVICE_TAPI, + RequestTypeEnum.REQUESTTYPE_SLICE_L2NM : RequestType.SLICE_L2NM, + RequestTypeEnum.REQUESTTYPE_SLICE_L3NM : RequestType.SLICE_L3NM, +} + +REQUEST_TYPE_REVERSE_MAP = {v:k for k,v in REQUEST_TYPE_MAP.items()} diff --git a/src/load_generator/service/LoadGeneratorServiceServicerImpl.py b/src/load_generator/service/LoadGeneratorServiceServicerImpl.py index c280581ddfab488249ff249e60118ec3030e0447..d66b0b2c10c5228e0c3d15759fc46b2c0770154d 100644 --- a/src/load_generator/service/LoadGeneratorServiceServicerImpl.py +++ b/src/load_generator/service/LoadGeneratorServiceServicerImpl.py @@ -12,43 +12,39 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional import grpc, logging +from typing import Optional from apscheduler.schedulers.background import BackgroundScheduler from common.proto.context_pb2 import Empty +from common.proto.load_generator_pb2 import Parameters, Status from common.proto.load_generator_pb2_grpc import LoadGeneratorServiceServicer -from load_generator.load_gen.Constants import RequestType -from load_generator.load_gen.Parameters import Parameters +from load_generator.load_gen.Parameters import Parameters as LoadGen_Parameters from load_generator.load_gen.RequestGenerator import RequestGenerator from load_generator.load_gen.RequestScheduler import RequestScheduler +from .Constants import REQUEST_TYPE_MAP, REQUEST_TYPE_REVERSE_MAP LOGGER = logging.getLogger(__name__) class LoadGeneratorServiceServicerImpl(LoadGeneratorServiceServicer): def __init__(self): LOGGER.debug('Creating Servicer...') - self._parameters = Parameters( - num_requests = 100, - request_types = [ - RequestType.SERVICE_L2NM, - RequestType.SERVICE_L3NM, - #RequestType.SERVICE_MW, - #RequestType.SERVICE_TAPI, - RequestType.SLICE_L2NM, - RequestType.SLICE_L3NM, - ], - offered_load = 50, - holding_time = 10, - do_teardown = True, - dry_mode = False, # in dry mode, no request is sent to TeraFlowSDN - record_to_dlt = False, # if record_to_dlt, changes in device/link/service/slice are uploaded to DLT - dlt_domain_id = 'dlt-perf-eval', # domain used to uploaded entities, ignored when record_to_dlt = False - ) self._generator : Optional[RequestGenerator] = None self._scheduler : Optional[RequestScheduler] = None LOGGER.debug('Servicer Created') - def Start(self, request : Empty, context : grpc.ServicerContext) -> Empty: + def Start(self, request : Parameters, context : grpc.ServicerContext) -> Empty: + self._parameters = LoadGen_Parameters( + num_requests = request.num_requests, + request_types = [REQUEST_TYPE_MAP[rt] for rt in request.request_types], + offered_load = request.offered_load if request.offered_load > 1.e-12 else None, + holding_time = request.holding_time if request.holding_time > 1.e-12 else None, + inter_arrival_time = request.inter_arrival_time if request.inter_arrival_time > 1.e-12 else None, + do_teardown = request.do_teardown, # if set, schedule tear down of requests + dry_mode = request.dry_mode, # in dry mode, no request is sent to TeraFlowSDN + record_to_dlt = request.record_to_dlt, # if set, upload changes to DLT + dlt_domain_id = request.dlt_domain_id, # domain used to uploaded entities (when record_to_dlt = True) + ) + LOGGER.info('Initializing Generator...') self._generator = RequestGenerator(self._parameters) self._generator.initialize() @@ -58,6 +54,33 @@ class LoadGeneratorServiceServicerImpl(LoadGeneratorServiceServicer): self._scheduler.start() return Empty() + def GetStatus(self, request : Empty, context : grpc.ServicerContext) -> Status: + if self._scheduler is None: + # not started + status = Status() + status.num_generated = 0 + status.infinite_loop = False + status.running = False + return status + + params = self._scheduler._parameters + request_types = [REQUEST_TYPE_REVERSE_MAP[rt] for rt in params.request_types] + + status = Status() + status.num_generated = self._scheduler.num_generated + status.infinite_loop = self._scheduler.infinite_loop + status.running = self._scheduler.running + status.parameters.num_requests = params.num_requests # pylint: disable=no-member + status.parameters.offered_load = params.offered_load # pylint: disable=no-member + status.parameters.holding_time = params.holding_time # pylint: disable=no-member + status.parameters.inter_arrival_time = params.inter_arrival_time # pylint: disable=no-member + status.parameters.do_teardown = params.do_teardown # pylint: disable=no-member + status.parameters.dry_mode = params.dry_mode # pylint: disable=no-member + status.parameters.record_to_dlt = params.record_to_dlt # pylint: disable=no-member + status.parameters.dlt_domain_id = params.dlt_domain_id # pylint: disable=no-member + status.parameters.request_types.extend(request_types) # pylint: disable=no-member + return status + def Stop(self, request : Empty, context : grpc.ServicerContext) -> Empty: if self._scheduler is not None: self._scheduler.stop() diff --git a/src/monitoring/.gitlab-ci.yml b/src/monitoring/.gitlab-ci.yml index ff620c53425f8f447dcb00ea03bc4c9f8ce4c5e9..7c3a14975d9c7bf7d5d46be917203338bea7f1f9 100644 --- a/src/monitoring/.gitlab-ci.yml +++ b/src/monitoring/.gitlab-ci.yml @@ -56,7 +56,7 @@ unit_test monitoring: - docker pull questdb/questdb - docker run --name questdb -d -p 9000:9000 -p 9009:9009 -p 8812:8812 -p 9003:9003 -e QDB_CAIRO_COMMIT_LAG=1000 -e QDB_CAIRO_MAX_UNCOMMITTED_ROWS=100000 --network=teraflowbridge --rm questdb/questdb - sleep 10 - - docker run --name $IMAGE_NAME -d -p 7070:7070 --env METRICSDB_HOSTNAME=questdb --env METRICSDB_ILP_PORT=9009 --env METRICSDB_REST_PORT=9000 --env METRICSDB_TABLE=monitoring -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - docker run --name $IMAGE_NAME -d -p 7070:7070 --env METRICSDB_HOSTNAME=questdb --env METRICSDB_ILP_PORT=9009 --env METRICSDB_REST_PORT=9000 --env METRICSDB_TABLE_MONITORING_KPIS=tfs_monitoring_kpis -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 30 - docker ps -a - docker logs $IMAGE_NAME diff --git a/src/monitoring/service/MonitoringServiceServicerImpl.py b/src/monitoring/service/MonitoringServiceServicerImpl.py index 0bbce15094b87a17e332aad21bf34a565e8dd087..f408734df40c1bc5c16b7e108e3ce5a211165f71 100644 --- a/src/monitoring/service/MonitoringServiceServicerImpl.py +++ b/src/monitoring/service/MonitoringServiceServicerImpl.py @@ -47,7 +47,7 @@ MONITORING_INCLUDEKPI_COUNTER = Counter('monitoring_includekpi_counter', 'Monito METRICSDB_HOSTNAME = os.environ.get("METRICSDB_HOSTNAME") METRICSDB_ILP_PORT = os.environ.get("METRICSDB_ILP_PORT") METRICSDB_REST_PORT = os.environ.get("METRICSDB_REST_PORT") -METRICSDB_TABLE = os.environ.get("METRICSDB_TABLE") +METRICSDB_TABLE_MONITORING_KPIS = os.environ.get("METRICSDB_TABLE_MONITORING_KPIS") class MonitoringServiceServicerImpl(MonitoringServiceServicer): def __init__(self, name_mapping : NameMapping): @@ -57,7 +57,7 @@ class MonitoringServiceServicerImpl(MonitoringServiceServicer): self.management_db = ManagementDBTools.ManagementDB('monitoring.db') self.deviceClient = DeviceClient() self.metrics_db = MetricsDBTools.MetricsDB( - METRICSDB_HOSTNAME, name_mapping, METRICSDB_ILP_PORT, METRICSDB_REST_PORT, METRICSDB_TABLE) + METRICSDB_HOSTNAME, name_mapping, METRICSDB_ILP_PORT, METRICSDB_REST_PORT, METRICSDB_TABLE_MONITORING_KPIS) self.subs_manager = SubscriptionManager(self.metrics_db) self.alarm_manager = AlarmManager(self.metrics_db) LOGGER.info('MetricsDB initialized') @@ -592,8 +592,8 @@ class MonitoringServiceServicerImpl(MonitoringServiceServicer): LOGGER.info('GetInstantKpi error: KpiID({:s}): not found in database'.format(str(kpi_id))) response.kpi_id.kpi_id.uuid = "NoID" else: - query = f"SELECT kpi_id, timestamp, kpi_value FROM {METRICSDB_TABLE} WHERE kpi_id = '{kpi_id}' " \ - f"LATEST ON timestamp PARTITION BY kpi_id" + query = f"SELECT kpi_id, timestamp, kpi_value FROM {METRICSDB_TABLE_MONITORING_KPIS} " \ + f"WHERE kpi_id = '{kpi_id}' LATEST ON timestamp PARTITION BY kpi_id" data = self.metrics_db.run_query(query) LOGGER.debug(data) if len(data) == 0: diff --git a/src/monitoring/service/__main__.py b/src/monitoring/service/__main__.py index fc460151b370c0eb5335787ed4677f7008881ad2..14f5609602c90eb9f54462e423af100997cf00d2 100644 --- a/src/monitoring/service/__main__.py +++ b/src/monitoring/service/__main__.py @@ -69,6 +69,8 @@ def main(): wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), ]) signal.signal(signal.SIGINT, signal_handler) diff --git a/src/monitoring/tests/test_unitary.py b/src/monitoring/tests/test_unitary.py index 1428b0ed56dbb24a24af8fde42e4d073a48c931d..c883f9d141fc28645761641b0ccd10294b538bd2 100644 --- a/src/monitoring/tests/test_unitary.py +++ b/src/monitoring/tests/test_unitary.py @@ -75,7 +75,7 @@ os.environ[get_env_var_name(ServiceNameEnum.MONITORING, ENVVAR_SUFIX_SERVICE_POR METRICSDB_HOSTNAME = os.environ.get('METRICSDB_HOSTNAME') METRICSDB_ILP_PORT = os.environ.get('METRICSDB_ILP_PORT') METRICSDB_REST_PORT = os.environ.get('METRICSDB_REST_PORT') -METRICSDB_TABLE = os.environ.get('METRICSDB_TABLE') +METRICSDB_TABLE_MONITORING_KPIS = os.environ.get('METRICSDB_TABLE_MONITORING_KPIS') LOGGER = logging.getLogger(__name__) @@ -193,7 +193,7 @@ def management_db(): def metrics_db(monitoring_service : MonitoringService): # pylint: disable=redefined-outer-name return monitoring_service.monitoring_servicer.metrics_db #_metrics_db = MetricsDBTools.MetricsDB( - # METRICSDB_HOSTNAME, METRICSDB_ILP_PORT, METRICSDB_REST_PORT, METRICSDB_TABLE) + # METRICSDB_HOSTNAME, METRICSDB_ILP_PORT, METRICSDB_REST_PORT, METRICSDB_TABLE_MONITORING_KPIS) #return _metrics_db @pytest.fixture(scope='session') diff --git a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py index a9fc4fa3d499f634f021d9ebbb4a749b4f8715c7..a6d39ee36949e075323613fceb71da5c77354fe5 100644 --- a/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py +++ b/src/pathcomp/frontend/service/algorithms/KDisjointPathAlgorithm.py @@ -54,13 +54,15 @@ class KDisjointPathAlgorithm(_Algorithm): self.services_details.setdefault(service_key, service_details) for constraint in service.service_constraints: - if constraint.WhichOneof('constraint') == 'custom': + kind = constraint.WhichOneof('constraint') + + if kind == 'custom': constraint_type = constraint.custom.constraint_type if constraint_type not in CUSTOM_CONSTRAINTS: continue constraint_value = constraint.custom.constraint_value constraints[constraint_type] = constraint_value - if constraint.WhichOneof('constraint') == 'endpoint_location': + elif kind == 'endpoint_location': endpoint_id = constraint.endpoint_location.endpoint_id device_uuid = endpoint_id.device_id.device_uuid.uuid device_uuid = self.device_name_mapping.get(device_uuid, device_uuid) @@ -73,7 +75,7 @@ class KDisjointPathAlgorithm(_Algorithm): site_id = constraint.endpoint_location.location.region endpoints.setdefault((device_uuid, endpoint_uuid), dict())['site_id'] = site_id - if constraint.WhichOneof('constraint') == 'endpoint_priority': + elif kind == 'endpoint_priority': endpoint_id = constraint.endpoint_priority.endpoint_id device_uuid = endpoint_id.device_id.device_uuid.uuid device_uuid = self.device_name_mapping.get(device_uuid, device_uuid) @@ -82,9 +84,18 @@ class KDisjointPathAlgorithm(_Algorithm): priority = constraint.endpoint_priority.priority endpoints.setdefault((device_uuid, endpoint_uuid), dict())['priority'] = priority + elif kind == 'sla_capacity': + capacity_gbps = constraint.sla_capacity.capacity_gbps + constraints['bandwidth[gbps]'] = str(capacity_gbps) + + elif kind == 'sla_latency': + e2e_latency_ms = constraint.sla_latency.e2e_latency_ms + constraints['latency[ms]'] = str(e2e_latency_ms) + # TODO: ensure these constraints are provided in the request if 'bandwidth[gbps]' not in constraints: constraints['bandwidth[gbps]'] = '20.0' if 'latency[ms]' not in constraints: constraints['latency[ms]'] = '20.0' + #if 'jitter[us]' not in constraints: constraints['jitter[us]'] = '50.0' def get_link_from_endpoint(self, endpoint : Dict) -> Tuple[Dict, Link]: device_uuid = endpoint['device_id'] diff --git a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py index bfb4da05fb57bef03fb94fc8973271ceb45f619a..ee85f0bb083500c655e78798bbcd2bd00e8a4501 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ComposeRequest.py @@ -73,17 +73,22 @@ def compose_latency_characteristics(fixed_latency_characteristic : str) -> Dict: return {'fixed-latency-characteristic': fixed_latency_characteristic} def compose_constraint(constraint : Constraint) -> Dict: - if constraint.WhichOneof('constraint') != 'custom': - str_constraint = grpc_message_to_json_string(constraint) - LOGGER.warning('Ignoring unsupported Constraint({:s})'.format(str_constraint)) - return None - constraint_type = constraint.custom.constraint_type - if constraint_type in {'diversity'}: - str_constraint = grpc_message_to_json_string(constraint) - LOGGER.warning('Ignoring unsupported Constraint({:s})'.format(str_constraint)) - return None - constraint_value = constraint.custom.constraint_value - return {'constraint_type': constraint_type, 'constraint_value': constraint_value} + kind = constraint.WhichOneof('constraint') + if kind == 'custom': + constraint_type = constraint.custom.constraint_type + if constraint_type in {'bandwidth[gbps]', 'latency[ms]', 'jitter[us]'}: + constraint_value = constraint.custom.constraint_value + return {'constraint_type': constraint_type, 'constraint_value': constraint_value} + elif kind == 'sla_capacity': + capacity_gbps = constraint.sla_capacity.capacity_gbps + return {'constraint_type': 'bandwidth[gbps]', 'constraint_value': str(capacity_gbps)} + elif kind == 'sla_latency': + e2e_latency_ms = constraint.sla_latency.e2e_latency_ms + return {'constraint_type': 'latency[ms]', 'constraint_value': str(e2e_latency_ms)} + + str_constraint = grpc_message_to_json_string(constraint) + LOGGER.warning('Ignoring unsupported Constraint({:s})'.format(str_constraint)) + return None def compose_device(grpc_device : Device) -> Dict: device_uuid = grpc_device.device_id.device_uuid.uuid @@ -144,6 +149,8 @@ def compose_service(grpc_service : Service) -> Dict: constraints.append({'constraint_type': 'bandwidth[gbps]', 'constraint_value': '20.0'}) if 'latency[ms]' not in constraint_types: constraints.append({'constraint_type': 'latency[ms]', 'constraint_value': '20.0'}) + #if 'jitter[us]' not in constraint_types: + # constraints.append({'constraint_type': 'jitter[us]', 'constraint_value': '50.0'}) return { 'serviceId': service_id, diff --git a/src/pathcomp/frontend/tests/Objects_A_B_C.py b/src/pathcomp/frontend/tests/Objects_A_B_C.py index ca9764a34ef0550351c4a0ebcdbd041805c49dde..f26d74ce4c665663735bae69dcfb5a4e14311bfa 100644 --- a/src/pathcomp/frontend/tests/Objects_A_B_C.py +++ b/src/pathcomp/frontend/tests/Objects_A_B_C.py @@ -13,7 +13,7 @@ # limitations under the License. from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Constraint import json_constraint_sla_capacity, json_constraint_sla_latency from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Device import json_device_emulated_packet_router_disabled, json_device_id from common.tools.object_factory.EndPoint import json_endpoints @@ -97,8 +97,8 @@ LINK_C2_C3_ID, LINK_C2_C3 = compose_link(DEVICE_C2_ENDPOINTS[1], DEVICE_C3_ENDPO # ----- Service -------------------------------------------------------------------------------------------------------- SERVICE_A1_B1 = compose_service(DEVICE_A1_ENDPOINTS[2], DEVICE_B1_ENDPOINTS[2], constraints=[ - json_constraint_custom('bandwidth[gbps]', 10.0), - json_constraint_custom('latency[ms]', 12.0), + json_constraint_sla_capacity(10.0), + json_constraint_sla_latency(12.0), ]) # ----- Containers ----------------------------------------------------------------------------------------------------- diff --git a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py index 1d057c10edcea30e1bf38f63d8a1ad0c6a0a4d46..9ee784e1f76026416bca9824aa8e54e2c4f874f2 100644 --- a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py +++ b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN.py @@ -13,7 +13,7 @@ # limitations under the License. from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Constraint import json_constraint_sla_capacity, json_constraint_sla_latency from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Device import ( json_device_emulated_connect_rules, json_device_emulated_datacenter_disabled, @@ -139,8 +139,8 @@ LINK_TNR2_TNR4_ID, LINK_TNR2_TNR4 = compose_link(DEV_TNR2_EPS[4], DEV_TNR4_EPS[4 # ----- Service -------------------------------------------------------------------------------------------------------- SERVICE_DC1GW_DC2GW = compose_service(DEV_DC1GW_EPS[2], DEV_DC2GW_EPS[2], constraints=[ - json_constraint_custom('bandwidth[gbps]', 10.0), - json_constraint_custom('latency[ms]', 20.0), + json_constraint_sla_capacity(10.0), + json_constraint_sla_latency(20.0), ]) # ----- Containers ----------------------------------------------------------------------------------------------------- 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 8f6e88719f4019edbeea36c7b4a641fbd7abbea4..71510d088746bd791e4671686dd5114874dd5a2a 100644 --- a/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py +++ b/src/pathcomp/frontend/tests/Objects_DC_CSGW_TN_OLS.py @@ -14,7 +14,7 @@ import uuid from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME -from common.tools.object_factory.Constraint import json_constraint_custom +from common.tools.object_factory.Constraint import json_constraint_sla_capacity, json_constraint_sla_latency from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Device import ( json_device_emulated_connect_rules, json_device_emulated_datacenter_disabled, @@ -149,8 +149,8 @@ LINK_TNR4_TOLS_ID, LINK_TNR4_TOLS = compose_link(DEV_TNR4_EPS[2], DEV_TOLS_EPS[3 # ----- Service -------------------------------------------------------------------------------------------------------- SERVICE_DC1GW_DC2GW = compose_service(DEV_DC1GW_EPS[2], DEV_DC2GW_EPS[2], constraints=[ - json_constraint_custom('bandwidth[gbps]', 10.0), - json_constraint_custom('latency[ms]', 20.0), + json_constraint_sla_capacity(10.0), + json_constraint_sla_latency(20.0), ]) # ----- Containers ----------------------------------------------------------------------------------------------------- diff --git a/src/pathcomp/frontend/tests/test_unitary.py b/src/pathcomp/frontend/tests/test_unitary.py index fd14c8a7aed4ec6e1a1c73aaa9425008abe7db60..8088259b80b8ade2669568b74f004dcfa631dd9c 100644 --- a/src/pathcomp/frontend/tests/test_unitary.py +++ b/src/pathcomp/frontend/tests/test_unitary.py @@ -18,12 +18,11 @@ from common.proto.pathcomp_pb2 import PathCompRequest from common.tools.grpc.Tools import grpc_message_to_json from common.tools.object_factory.Constraint import ( json_constraint_custom, json_constraint_endpoint_location_region, json_constraint_endpoint_priority, - json_constraint_sla_availability) + json_constraint_sla_availability, json_constraint_sla_capacity, json_constraint_sla_latency) from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.EndPoint import json_endpoint_id from common.tools.object_factory.Service import json_service_l3nm_planned from context.client.ContextClient import ContextClient -from device.client.DeviceClient import DeviceClient from pathcomp.frontend.client.PathCompClient import PathCompClient # Scenarios: @@ -90,8 +89,8 @@ def test_request_service_shortestpath( request_services = copy.deepcopy(SERVICES) #request_services[0]['service_constraints'] = [ - # json_constraint_custom('bandwidth[gbps]', 1000.0), - # json_constraint_custom('latency[ms]', 1200.0), + # json_constraint_sla_capacity(1000.0), + # json_constraint_sla_latency(1200.0), #] pathcomp_request = PathCompRequest(services=request_services) pathcomp_request.shortest_path.Clear() # hack to select the shortest path algorithm that has no attributes @@ -202,9 +201,9 @@ def test_request_service_kdisjointpath( ] endpoint_ids, constraints = [], [ - json_constraint_custom('bandwidth[gbps]', 10.0), - json_constraint_custom('latency[ms]', 12.0), - json_constraint_sla_availability(2, True), + json_constraint_sla_capacity(10.0), + json_constraint_sla_latency(12.0), + json_constraint_sla_availability(2, True, 50.0), json_constraint_custom('diversity', {'end-to-end-diverse': 'all-other-accesses'}), ] diff --git a/src/pathcomp/misc/example-results-kdisjointpaths.json b/src/pathcomp/misc/example-results-kdisjointpaths.json index 9eda25d484e45db53471ea3f655d511cbcc42c18..c1dbf3a3c7bc6335f0d0c765b6622ce070b7774e 100644 --- a/src/pathcomp/misc/example-results-kdisjointpaths.json +++ b/src/pathcomp/misc/example-results-kdisjointpaths.json @@ -64,8 +64,8 @@ ], "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, "service_constraints": [ - {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "10.0"}}, - {"custom": {"constraint_type": "latency[ms]", "constraint_value": "12.0"}} + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 12.0}} ], "service_config": {"config_rules": []} } diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 622abeee860cdb6ce8153b7def9fb91ea1117277..0b2e0760161c109a2ba6a5feecc931e8bcf5c14f 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -38,8 +38,6 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def CreateService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: - LOGGER.info('[CreateService] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) - if len(request.service_endpoint_ids) > 0: unexpected_endpoints = [] for service_endpoint_id in request.service_endpoint_ids: @@ -85,8 +83,6 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def UpdateService(self, request : Service, context : grpc.ServicerContext) -> ServiceId: - LOGGER.info('[UpdateService] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) - # Set service status to "SERVICESTATUS_PLANNED" to ensure rest of components are aware the service is # being modified. context_client = ContextClient() @@ -112,27 +108,30 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): service_id_with_uuids = context_client.SetService(service) service_with_uuids = context_client.GetService(service_id_with_uuids) - num_disjoint_paths = None + num_disjoint_paths = 0 for constraint in request.service_constraints: if constraint.WhichOneof('constraint') == 'sla_availability': num_disjoint_paths = constraint.sla_availability.num_disjoint_paths break + num_disjoint_paths = 1 if num_disjoint_paths is None or num_disjoint_paths == 0 else num_disjoint_paths + num_expected_endpoints = num_disjoint_paths * 2 + tasks_scheduler = TasksScheduler(self.service_handler_factory) - if len(service_with_uuids.service_endpoint_ids) >= (2 if num_disjoint_paths is None else 4): + if len(service_with_uuids.service_endpoint_ids) >= num_expected_endpoints: pathcomp_request = PathCompRequest() pathcomp_request.services.append(service_with_uuids) # pylint: disable=no-member - if num_disjoint_paths is None: + if num_disjoint_paths is None or num_disjoint_paths in {0, 1}: pathcomp_request.shortest_path.Clear() # pylint: disable=no-member else: pathcomp_request.k_disjoint_path.num_disjoint = num_disjoint_paths # pylint: disable=no-member - LOGGER.info('pathcomp_request={:s}'.format(grpc_message_to_json_string(pathcomp_request))) + LOGGER.debug('pathcomp_request={:s}'.format(grpc_message_to_json_string(pathcomp_request))) pathcomp = PathCompClient() pathcomp_reply = pathcomp.Compute(pathcomp_request) pathcomp.close() - LOGGER.info('pathcomp_reply={:s}'.format(grpc_message_to_json_string(pathcomp_reply))) + LOGGER.debug('pathcomp_reply={:s}'.format(grpc_message_to_json_string(pathcomp_reply))) # Feed TaskScheduler with this path computation reply. TaskScheduler identifies inter-dependencies among # the services and connections retrieved and produces a schedule of tasks (an ordered list of tasks to be @@ -144,8 +143,6 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def DeleteService(self, request : ServiceId, context : grpc.ServicerContext) -> Empty: - LOGGER.info('[DeleteService] begin ; request = {:s}'.format(grpc_message_to_json_string(request))) - context_client = ContextClient() # Set service status to "SERVICESTATUS_PENDING_REMOVAL" to ensure rest of components are aware the service is diff --git a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py index c2ea6e213ee8d18b4507089fb2762c913e03039a..07e78d73631342d101d77697098e83961c7dcf26 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l2nm_openconfig/ConfigRules.py @@ -20,58 +20,64 @@ 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 json_settings : Dict = {} if service_settings is None else service_settings.value json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value - mtu = json_settings.get('mtu', 1450 ) # 1512 + #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' + #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 - remote_router = json_endpoint_settings.get('remote_router', '0.0.0.0') # '5.5.5.5' - circuit_id = json_endpoint_settings.get('circuit_id', '000' ) # '111' + remote_router = json_endpoint_settings.get('remote_router', '5.5.5.5') # '5.5.5.5' + circuit_id = json_endpoint_settings.get('circuit_id', '111' ) # '111' + if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id)) network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) connection_point_id = 'VC-1' json_config_rules = [ - json_config_rule_set( - '/network_instance[default]', - {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), - - json_config_rule_set( - '/network_instance[default]/protocols[OSPF]', - {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), - - json_config_rule_set( - '/network_instance[default]/protocols[STATIC]', - {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), - + json_config_rule_set( '/network_instance[{:s}]'.format(network_instance_name), - {'name': network_instance_name, 'type': 'L2VSI'}), + {'name': network_instance_name, + 'type': 'L2VSI'}), json_config_rule_set( - '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), - {'name': if_cirid_name, 'type': 'l2vlan', 'index': sub_interface_index, 'vlan_id': vlan_id}), + '/interface[{:s}]/subinterface[0]'.format(if_cirid_name), + {'name': if_cirid_name, + 'type': 'l2vlan', + 'index': sub_interface_index, + 'vlan_id': vlan_id}), json_config_rule_set( '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), - {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, - 'subinterface': sub_interface_index}), + {'name': network_instance_name, + 'id': if_cirid_name, + 'interface': if_cirid_name, + 'subinterface': 0 + }), json_config_rule_set( '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), - {'name': network_instance_name, 'connection_point': connection_point_id, 'VC_ID': circuit_id, - 'remote_system': remote_router}), + {'name': network_instance_name, + 'connection_point': connection_point_id, + 'VC_ID': circuit_id, + 'remote_system': remote_router + }), ] return json_config_rules @@ -88,9 +94,9 @@ def teardown_config_rules( #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' + #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 + #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 @@ -99,36 +105,17 @@ def teardown_config_rules( if_cirid_name = '{:s}.{:s}'.format(endpoint_name, str(circuit_id)) network_instance_name = 'ELAN-AC:{:s}'.format(str(circuit_id)) - connection_point_id = 'VC-1' + #connection_point_id = 'VC-1' json_config_rules = [ - json_config_rule_delete( - '/network_instance[{:s}]/connection_point[{:s}]'.format(network_instance_name, connection_point_id), - {'name': network_instance_name, 'connection_point': connection_point_id}), - - json_config_rule_delete( - '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_cirid_name), - {'name': network_instance_name, 'id': if_cirid_name, 'interface': if_cirid_name, - 'subinterface': sub_interface_index}), - - json_config_rule_delete( - '/interface[{:s}]/subinterface[{:d}]'.format(if_cirid_name, sub_interface_index), - {'name': if_cirid_name, 'index': sub_interface_index}), - json_config_rule_delete( '/network_instance[{:s}]'.format(network_instance_name), {'name': network_instance_name}), - - json_config_rule_delete( - '/network_instance[default]/protocols[STATIC]', - {'name': 'default', 'identifier': 'STATIC', 'protocol_name': 'STATIC'}), - - json_config_rule_delete( - '/network_instance[default]/protocols[OSPF]', - {'name': 'default', 'identifier': 'OSPF', 'protocol_name': 'OSPF'}), - + json_config_rule_delete( - '/network_instance[default]', - {'name': 'default', 'type': 'DEFAULT_INSTANCE', 'router_id': router_id}), + '/interface[{:s}]/subinterface[0]'.format(if_cirid_name),{ + 'name': if_cirid_name, + }), + ] return json_config_rules diff --git a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py index 6eb139dbd03b4dff781a08548c03627512501ab5..d511c8947ecb43052fd154ab3ce3293a468b4263 100644 --- a/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l2nm_openconfig/L2NMOpenConfigServiceHandler.py @@ -75,10 +75,12 @@ class L2NMOpenConfigServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - 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 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) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to SetEndpoint({:s})'.format(str(endpoint))) @@ -110,10 +112,12 @@ class L2NMOpenConfigServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - 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 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) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) diff --git a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py index 903ad8cd5ae442a03d54fb49083f3837a3c8187c..ef93dcdda8145cab15ff21c24b6318e9eb00e098 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py +++ b/src/service/service/service_handlers/l3nm_openconfig/ConfigRules.py @@ -21,120 +21,162 @@ def setup_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: - json_settings : Dict = {} if service_settings is None else service_settings.value - json_endpoint_settings : Dict = {} if endpoint_settings is None else endpoint_settings.value + 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' + mtu = json_settings.get('mtu', 1450 ) # 1512 + #address_families = json_settings.get('address_families', [] ) # ['IPV4'] + bgp_as = json_settings.get('bgp_as', 65000 ) # 65000 + route_distinguisher = json_settings.get('route_distinguisher', '0:0' ) # '60001:801' sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 + router_id = json_endpoint_settings.get('router_id', '0.0.0.0') # '10.95.0.10' 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 + policy_import = json_endpoint_settings.get('policy_AZ', '2' ) # 2 + policy_export = json_endpoint_settings.get('policy_ZA', '7' ) # 30 + if_subif_name = '{:s}.{:d}'.format(endpoint_name, vlan_id) json_config_rules = [ + # Configure Interface (not used) + #json_config_rule_set( + # '/interface[{:s}]'.format(endpoint_name), { + # 'name': endpoint_name, 'description': network_interface_desc, 'mtu': mtu, + #}), + + #Create network instance json_config_rule_set( '/network_instance[{:s}]'.format(network_instance_name), { - 'name': network_instance_name, 'description': network_interface_desc, 'type': 'L3VRF', + '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, + #'router_id': router_id, + #'address_families': address_families, }), + + #Add BGP protocol to network instance 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, + 'name': network_instance_name, + 'protocol_name': 'BGP', + 'identifier': 'BGP', + 'as': bgp_as, + 'router_id': router_id, }), + + #Add DIRECTLY CONNECTED protocol to network instance 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', + '/network_instance[{:s}]/protocols[DIRECTLY_CONNECTED]'.format(network_instance_name), { + 'name': network_instance_name, + 'identifier': 'DIRECTLY_CONNECTED', + 'protocol_name': 'DIRECTLY_CONNECTED', }), + + + #Add STATIC protocol to network instance 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', + '/network_instance[{:s}]/protocols[STATIC]'.format(network_instance_name), { + 'name': network_instance_name, + 'identifier': 'STATIC', + 'protocol_name': 'STATIC', }), + + #Create interface with subinterface 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), + '/interface[{:s}]/subinterface[{:d}]'.format(if_subif_name, sub_interface_index), { + 'name' : if_subif_name, + 'type' :'l3ipvlan', + 'mtu' : mtu, + 'index' : sub_interface_index, + 'description' : network_subinterface_desc, + 'vlan_id' : vlan_id, + 'address_ip' : address_ip, + 'address_prefix': address_prefix, }), + + #Associate interface to network instance 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), - }), + '/network_instance[{:s}]/interface[{:s}]'.format(network_instance_name, if_subif_name), { + 'name' : network_instance_name, + 'id' : if_subif_name, + 'interface' : if_subif_name, + 'subinterface': sub_interface_index, + }), + + #Create routing policy json_config_rule_set( - '/routing_policy/policy_definition[{:s}_import]'.format(network_instance_name), { - 'policy_name': '{:s}_import'.format(network_instance_name), + '/routing_policy/bgp_defined_set[{:s}_rt_import][{:s}]'.format(policy_import,route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_import), + 'ext_community_member' : route_distinguisher, }), 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', + # pylint: disable=duplicate-string-formatting-argument + '/routing_policy/policy_definition[{:s}_import]/statement[{:s}]'.format(policy_import, policy_import), { + 'policy_name' : policy_import, + 'statement_name' : 'stm_{:s}'.format(policy_import), + 'ext_community_set_name': 'set_{:s}'.format(policy_import), + 'policy_result' : 'ACCEPT_ROUTE', }), + + #Associate routing policy to network instance 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), + '/network_instance[{:s}]/inter_instance_policies[{:s}]'.format(network_instance_name, policy_import), { + 'name' : network_instance_name, + 'import_policy': policy_import, }), + + #Create routing policy 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), + '/routing_policy/bgp_defined_set[{:s}_rt_export][{:s}]'.format(policy_export, route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_export), + 'ext_community_member' : route_distinguisher, }), 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), + # pylint: disable=duplicate-string-formatting-argument + '/routing_policy/policy_definition[{:s}_export]/statement[{:s}]'.format(policy_export, policy_export), { + 'policy_name' : policy_export, + 'statement_name' : 'stm_{:s}'.format(policy_export), + 'ext_community_set_name': 'set_{:s}'.format(policy_export), + 'policy_result' : 'ACCEPT_ROUTE', }), + + #Associate routing policy to network instance json_config_rule_set( - '/routing_policy/policy_definition[{:s}_export]'.format(network_instance_name), { - 'policy_name': '{:s}_export'.format(network_instance_name), + '/network_instance[{:s}]/inter_instance_policies[{:s}]'.format(network_instance_name, policy_export),{ + 'name' : network_instance_name, + 'export_policy': policy_export, }), + + #Create table connections 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', + '/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': '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), + '/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': 'ACCEPT_ROUTE', }), - ] + ] return json_config_rules def teardown_config_rules( @@ -142,108 +184,86 @@ def teardown_config_rules( service_settings : TreeNode, endpoint_settings : TreeNode ) -> List[Dict]: + if service_settings is None: return [] + if endpoint_settings is None: return [] + json_settings : Dict = {} if service_settings is None else service_settings.value json_endpoint_settings : Dict = {} if endpoint_settings is None else 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 + 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', 65000 ) # 65000 + route_distinguisher = json_settings.get('route_distinguisher', '0:0' ) # '60001:801' + #sub_interface_index = json_endpoint_settings.get('sub_interface_index', 0 ) # 1 #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 + policy_import = json_endpoint_settings.get('policy_AZ', '2' ) # 2 + policy_export = json_endpoint_settings.get('policy_ZA', '7' ) # 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 = [ + #Delete table connections 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', + '/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', + 'name' : network_instance_name, + 'src_protocol' : 'STATIC', + 'dst_protocol' : 'BGP', 'address_family': 'IPV4', }), + + #Delete export routing policy + 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, + '/routing_policy/policy_definition[{:s}_export]'.format(network_instance_name), { + 'policy_name': '{:s}_export'.format(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', + '/routing_policy/bgp_defined_set[{:s}_rt_export][{:s}]'.format(policy_export, route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_export), }), + + #Delete import routing policy + 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', + '/routing_policy/bgp_defined_set[{:s}_rt_import][{:s}]'.format(policy_import, route_distinguisher), { + 'ext_community_set_name': 'set_{:s}'.format(policy_import), }), - 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), + + #Delete interface; automatically deletes: + # - /interface[]/subinterface[] + json_config_rule_delete('/interface[{:s}]/subinterface[0]'.format(if_subif_name), + { + 'name': if_subif_name, }), - json_config_rule_delete( - '/network_instance[{:s}]'.format(network_instance_name), { - 'name': network_instance_name + + #Delete network instance; automatically deletes: + # - /network_instance[]/interface[] + # - /network_instance[]/protocols[] + # - /network_instance[]/inter_instance_policies[] + 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/l3nm_openconfig/L3NMOpenConfigServiceHandler.py b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py index e3af6302dc996bb1582f2c339b3296800aa9d655..b2639ddad58e4c453f1b1e2dc87fce8861ad79a2 100644 --- a/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py +++ b/src/service/service/service_handlers/l3nm_openconfig/L3NMOpenConfigServiceHandler.py @@ -75,10 +75,12 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - 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 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) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to SetEndpoint({:s})'.format(str(endpoint))) @@ -110,10 +112,12 @@ class L3NMOpenConfigServiceHandler(_ServiceHandler): service_uuid, connection_uuid, device_uuid, endpoint_uuid, endpoint_name, settings, endpoint_settings) - 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 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) + results.append(True) except Exception as e: # pylint: disable=broad-except LOGGER.exception('Unable to DeleteEndpoint({:s})'.format(str(endpoint))) 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 500c50378401c016a6cf30c73c78149e2097d2b8..6f2cfb5a9bc4dac991eecd14ba7b6eb1218bdaa2 100644 --- a/src/service/service/service_handlers/p4/p4_service_handler.py +++ b/src/service/service/service_handlers/p4/p4_service_handler.py @@ -47,7 +47,7 @@ def create_rule_set(endpoint_a, endpoint_b): } ] } -) + ) def create_rule_del(endpoint_a, endpoint_b): return json_config_rule_delete( @@ -68,7 +68,17 @@ def create_rule_del(endpoint_a, endpoint_b): } ] } -) + ) + +def find_names(uuid_a, uuid_b, device_endpoints): + endpoint_a, endpoint_b = None, None + for endpoint in device_endpoints: + if endpoint.endpoint_id.endpoint_uuid.uuid == uuid_a: + endpoint_a = endpoint.name + elif endpoint.endpoint_id.endpoint_uuid.uuid == uuid_b: + endpoint_b = endpoint.name + + return (endpoint_a, endpoint_b) class P4ServiceHandler(_ServiceHandler): def __init__(self, @@ -127,12 +137,21 @@ class P4ServiceHandler(_ServiceHandler): device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) del device.device_config.config_rules[:] + + # Find names from uuids + (endpoint_a, endpoint_b) = find_names(matched_endpoint_uuid, endpoint_uuid, device.device_endpoints) + if endpoint_a is None: + LOGGER.exception('Unable to find name of endpoint({:s})'.format(str(matched_endpoint_uuid))) + raise Exception('Unable to find name of endpoint({:s})'.format(str(matched_endpoint_uuid))) + if endpoint_b is None: + LOGGER.exception('Unable to find name of endpoint({:s})'.format(str(endpoint_uuid))) + raise Exception('Unable to find name of endpoint({:s})'.format(str(endpoint_uuid))) # One way - rule = create_rule_set(matched_endpoint_uuid, endpoint_uuid) + rule = create_rule_set(endpoint_a, endpoint_b) device.device_config.config_rules.append(ConfigRule(**rule)) # The other way - rule = create_rule_set(endpoint_uuid, matched_endpoint_uuid) + rule = create_rule_set(endpoint_b, endpoint_a) device.device_config.config_rules.append(ConfigRule(**rule)) self.__task_executor.configure_device(device) @@ -189,11 +208,20 @@ class P4ServiceHandler(_ServiceHandler): del device.device_config.config_rules[:] + # Find names from uuids + (endpoint_a, endpoint_b) = find_names(matched_endpoint_uuid, endpoint_uuid, device.device_endpoints) + if endpoint_a is None: + LOGGER.exception('Unable to find name of endpoint({:s})'.format(str(matched_endpoint_uuid))) + raise Exception('Unable to find name of endpoint({:s})'.format(str(matched_endpoint_uuid))) + if endpoint_b is None: + LOGGER.exception('Unable to find name of endpoint({:s})'.format(str(endpoint_uuid))) + raise Exception('Unable to find name of endpoint({:s})'.format(str(endpoint_uuid))) + # One way - rule = create_rule_del(matched_endpoint_uuid, endpoint_uuid) + rule = create_rule_del(endpoint_a, endpoint_b) device.device_config.config_rules.append(ConfigRule(**rule)) # The other way - rule = create_rule_del(endpoint_uuid, matched_endpoint_uuid) + rule = create_rule_del(endpoint_b, endpoint_a) device.device_config.config_rules.append(ConfigRule(**rule)) self.__task_executor.configure_device(device) diff --git a/src/service/service/task_scheduler/TaskScheduler.py b/src/service/service/task_scheduler/TaskScheduler.py index f55527e4756022fc4941605f54ab82b74c0937f0..fbc554aa261cbc68009258d322aa01d52bfe760d 100644 --- a/src/service/service/task_scheduler/TaskScheduler.py +++ b/src/service/service/task_scheduler/TaskScheduler.py @@ -130,7 +130,7 @@ class TasksScheduler: self._dag.add(connection_key, service_key_done) t1 = time.time() - LOGGER.info('[compose_from_pathcompreply] elapsed_time: {:f} sec'.format(t1-t0)) + LOGGER.debug('[compose_from_pathcompreply] elapsed_time: {:f} sec'.format(t1-t0)) def compose_from_service(self, service : Service, is_delete : bool = False) -> None: t0 = time.time() @@ -196,11 +196,11 @@ class TasksScheduler: raise Exception(MSG.format(type(item).__name__, grpc_message_to_json_string(item))) t1 = time.time() - LOGGER.info('[compose_from_service] elapsed_time: {:f} sec'.format(t1-t0)) + LOGGER.debug('[compose_from_service] elapsed_time: {:f} sec'.format(t1-t0)) def execute_all(self, dry_run : bool = False) -> None: ordered_task_keys = list(self._dag.static_order()) - LOGGER.info('[execute_all] ordered_task_keys={:s}'.format(str(ordered_task_keys))) + LOGGER.debug('[execute_all] ordered_task_keys={:s}'.format(str(ordered_task_keys))) results = [] for task_key in ordered_task_keys: @@ -208,5 +208,5 @@ class TasksScheduler: succeeded = True if dry_run else task.execute() results.append(succeeded) - LOGGER.info('[execute_all] results={:s}'.format(str(results))) + LOGGER.debug('[execute_all] results={:s}'.format(str(results))) return zip(ordered_task_keys, results) diff --git a/src/slice/client/SliceClient.py b/src/slice/client/SliceClient.py index a3e5d649032bbf939f9ba6d812b270ca3384cc06..792a2037f0a7cb47d6f0c2e7969708425b57b3a6 100644 --- a/src/slice/client/SliceClient.py +++ b/src/slice/client/SliceClient.py @@ -65,3 +65,17 @@ class SliceClient: response = self.stub.DeleteSlice(request) LOGGER.debug('DeleteSlice result: {:s}'.format(grpc_message_to_json_string(response))) return response + + @RETRY_DECORATOR + def OrderSliceWithSLA(self, request : Slice) -> SliceId: + LOGGER.debug('OrderSliceWithSLA request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.OrderSliceWithSLA(request) + LOGGER.debug('OrderSliceWithSLA result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def RunSliceGrouping(self, request : Empty) -> Empty: + LOGGER.debug('RunSliceGrouping request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.RunSliceGrouping(request) + LOGGER.debug('RunSliceGrouping result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/slice/requirements.in b/src/slice/requirements.in index daef740da4729659fb3117eadff31994acdf5746..854c71a5948e91077fba4561f961083ed90b0861 100644 --- a/src/slice/requirements.in +++ b/src/slice/requirements.in @@ -12,5 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. - #deepdiff==5.8.* +numpy==1.23.* +pandas==1.5.* +questdb==1.0.1 +requests==2.27.* +scikit-learn==1.1.* diff --git a/src/slice/service/SliceServiceServicerImpl.py b/src/slice/service/SliceServiceServicerImpl.py index 21d820089aad9531834187e129d893e90f3c93a8..acec3ae303266714ae7f50c5c0d78fc41d350ea1 100644 --- a/src/slice/service/SliceServiceServicerImpl.py +++ b/src/slice/service/SliceServiceServicerImpl.py @@ -24,10 +24,11 @@ from common.tools.grpc.ConfigRules import copy_config_rules from common.tools.grpc.Constraints import copy_constraints from common.tools.grpc.EndPointIds import copy_endpoint_ids from common.tools.grpc.ServiceIds import update_service_ids -from common.tools.grpc.Tools import grpc_message_to_json_string +#from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient from interdomain.client.InterdomainClient import InterdomainClient from service.client.ServiceClient import ServiceClient +from .slice_grouper.SliceGrouper import SliceGrouper LOGGER = logging.getLogger(__name__) @@ -36,6 +37,7 @@ METRICS_POOL = MetricsPool('Slice', 'RPC') class SliceServiceServicerImpl(SliceServiceServicer): def __init__(self): LOGGER.debug('Creating Servicer...') + self._slice_grouper = SliceGrouper() LOGGER.debug('Servicer Created') def create_update(self, request : Slice) -> SliceId: @@ -62,7 +64,9 @@ class SliceServiceServicerImpl(SliceServiceServicer): # unable to identify the kind of slice; just update endpoints, constraints and config rules # update the slice in database, and return # pylint: disable=no-member - return context_client.SetSlice(slice_rw) + reply = context_client.SetSlice(slice_rw) + context_client.close() + return reply slice_with_uuids = context_client.GetSlice(slice_id_with_uuids) @@ -80,8 +84,13 @@ class SliceServiceServicerImpl(SliceServiceServicer): slice_active.CopyFrom(slice_) slice_active.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_ACTIVE # pylint: disable=no-member context_client.SetSlice(slice_active) + interdomain_client.close() + context_client.close() return slice_id + if self._slice_grouper.is_enabled: + grouped = self._slice_grouper.group(slice_with_uuids) # pylint: disable=unused-variable + # Local domain slice service_id = ServiceId() # pylint: disable=no-member @@ -109,13 +118,13 @@ class SliceServiceServicerImpl(SliceServiceServicer): service_request.service_type = ServiceTypeEnum.SERVICETYPE_UNKNOWN for config_rule in request.slice_config.config_rules: - LOGGER.info('config_rule: {:s}'.format(grpc_message_to_json_string(config_rule))) + #LOGGER.debug('config_rule: {:s}'.format(grpc_message_to_json_string(config_rule))) config_rule_kind = config_rule.WhichOneof('config_rule') - LOGGER.info('config_rule_kind: {:s}'.format(str(config_rule_kind))) + #LOGGER.debug('config_rule_kind: {:s}'.format(str(config_rule_kind))) if config_rule_kind != 'custom': continue custom = config_rule.custom resource_key = custom.resource_key - LOGGER.info('resource_key: {:s}'.format(str(resource_key))) + #LOGGER.debug('resource_key: {:s}'.format(str(resource_key))) # TODO: parse resource key with regular expression, e.g.: # m = re.match('\/device\[[^\]]\]\/endpoint\[[^\]]\]\/settings', s) @@ -123,21 +132,21 @@ class SliceServiceServicerImpl(SliceServiceServicer): if not resource_key.endswith('/settings'): continue resource_value = json.loads(custom.resource_value) - LOGGER.info('resource_value: {:s}'.format(str(resource_value))) + #LOGGER.debug('resource_value: {:s}'.format(str(resource_value))) if service_request.service_type == ServiceTypeEnum.SERVICETYPE_UNKNOWN: if (resource_value.get('address_ip') is not None and \ resource_value.get('address_prefix') is not None): service_request.service_type = ServiceTypeEnum.SERVICETYPE_L3NM - LOGGER.info('is L3') + #LOGGER.debug('is L3') else: service_request.service_type = ServiceTypeEnum.SERVICETYPE_L2NM - LOGGER.info('is L2') + #LOGGER.debug('is L2') break if service_request.service_type == ServiceTypeEnum.SERVICETYPE_UNKNOWN: service_request.service_type = ServiceTypeEnum.SERVICETYPE_L2NM - LOGGER.info('assume L2') + #LOGGER.debug('assume L2') service_client.UpdateService(service_request) @@ -154,6 +163,9 @@ class SliceServiceServicerImpl(SliceServiceServicer): slice_active.CopyFrom(slice_) slice_active.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_ACTIVE # pylint: disable=no-member context_client.SetSlice(slice_active) + + service_client.close() + context_client.close() return slice_id @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) @@ -190,6 +202,7 @@ class SliceServiceServicerImpl(SliceServiceServicer): try: _slice = context_client.GetSlice(request) except: # pylint: disable=bare-except + context_client.close() return Empty() if is_multi_domain(context_client, _slice.slice_endpoint_ids): @@ -202,6 +215,9 @@ class SliceServiceServicerImpl(SliceServiceServicer): current_slice.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_DEINIT # pylint: disable=no-member context_client.SetSlice(current_slice) + if self._slice_grouper.is_enabled: + ungrouped = self._slice_grouper.ungroup(current_slice) # pylint: disable=unused-variable + service_client = ServiceClient() for service_id in _slice.slice_service_ids: current_slice = Slice() @@ -211,6 +227,8 @@ class SliceServiceServicerImpl(SliceServiceServicer): context_client.UnsetSlice(current_slice) service_client.DeleteService(service_id) + service_client.close() context_client.RemoveSlice(request) + context_client.close() return Empty() diff --git a/src/slice/service/slice_grouper/Constants.py b/src/slice/service/slice_grouper/Constants.py new file mode 100644 index 0000000000000000000000000000000000000000..2edd853a2202fc64f107ea8c6688d19d6ab2692e --- /dev/null +++ b/src/slice/service/slice_grouper/Constants.py @@ -0,0 +1,22 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# TODO: define by means of settings +SLICE_GROUPS = [ + ('bronze', 10.0, 10.0), # Bronze (10%, 10Gb/s) + ('silver', 30.0, 40.0), # Silver (30%, 40Gb/s) + ('gold', 70.0, 50.0), # Gold (70%, 50Gb/s) + ('platinum', 99.0, 100.0), # Platinum (99%, 100Gb/s) +] +SLICE_GROUP_NAMES = {slice_group[0] for slice_group in SLICE_GROUPS} diff --git a/src/slice/service/slice_grouper/MetricsExporter.py b/src/slice/service/slice_grouper/MetricsExporter.py new file mode 100644 index 0000000000000000000000000000000000000000..3708641eef64e100fae18e875a4fbc4896357057 --- /dev/null +++ b/src/slice/service/slice_grouper/MetricsExporter.py @@ -0,0 +1,126 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import datetime, logging, os, requests +from typing import Any, Literal, Union +from questdb.ingress import Sender, IngressError # pylint: disable=no-name-in-module + +LOGGER = logging.getLogger(__name__) + +MAX_RETRIES = 10 +DELAY_RETRIES = 0.5 + +MSG_EXPORT_EXECUTED = '[rest_request] Export(timestamp={:s}, symbols={:s}, columns={:s}) executed' +MSG_EXPORT_FAILED = '[rest_request] Export(timestamp={:s}, symbols={:s}, columns={:s}) failed, retry={:d}/{:d}...' +MSG_REST_BAD_STATUS = '[rest_request] Bad Reply url="{:s}" params="{:s}": status_code={:d} content={:s}' +MSG_REST_EXECUTED = '[rest_request] Query({:s}) executed, result: {:s}' +MSG_REST_FAILED = '[rest_request] Query({:s}) failed, retry={:d}/{:d}...' +MSG_ERROR_MAX_RETRIES = 'Maximum number of retries achieved: {:d}' + +METRICSDB_HOSTNAME = os.environ.get('METRICSDB_HOSTNAME') +METRICSDB_ILP_PORT = int(os.environ.get('METRICSDB_ILP_PORT')) +METRICSDB_REST_PORT = int(os.environ.get('METRICSDB_REST_PORT')) +METRICSDB_TABLE_SLICE_GROUPS = os.environ.get('METRICSDB_TABLE_SLICE_GROUPS') + +COLORS = { + 'platinum': '#E5E4E2', + 'gold' : '#FFD700', + 'silver' : '#808080', + 'bronze' : '#CD7F32', +} +DEFAULT_COLOR = '#000000' # black + +SQL_MARK_DELETED = "UPDATE {:s} SET is_deleted='true' WHERE slice_uuid='{:s}';" + +class MetricsExporter(): + def create_table(self) -> None: + sql_query = ' '.join([ + 'CREATE TABLE IF NOT EXISTS {:s} ('.format(str(METRICSDB_TABLE_SLICE_GROUPS)), + ','.join([ + 'timestamp TIMESTAMP', + 'slice_uuid SYMBOL', + 'slice_group SYMBOL', + 'slice_color SYMBOL', + 'is_deleted SYMBOL', + 'slice_availability DOUBLE', + 'slice_capacity_center DOUBLE', + 'slice_capacity DOUBLE', + ]), + ') TIMESTAMP(timestamp);' + ]) + try: + result = self.rest_request(sql_query) + if not result: raise Exception + LOGGER.info('Table {:s} created'.format(str(METRICSDB_TABLE_SLICE_GROUPS))) + except Exception as e: + LOGGER.warning('Table {:s} cannot be created. {:s}'.format(str(METRICSDB_TABLE_SLICE_GROUPS), str(e))) + raise + + def export_point( + self, slice_uuid : str, slice_group : str, slice_availability : float, slice_capacity : float, + is_center : bool = False + ) -> None: + dt_timestamp = datetime.datetime.utcnow() + slice_color = COLORS.get(slice_group, DEFAULT_COLOR) + symbols = dict(slice_uuid=slice_uuid, slice_group=slice_group, slice_color=slice_color, is_deleted='false') + columns = dict(slice_availability=slice_availability) + columns['slice_capacity_center' if is_center else 'slice_capacity'] = slice_capacity + + for retry in range(MAX_RETRIES): + try: + with Sender(METRICSDB_HOSTNAME, METRICSDB_ILP_PORT) as sender: + sender.row(METRICSDB_TABLE_SLICE_GROUPS, symbols=symbols, columns=columns, at=dt_timestamp) + sender.flush() + LOGGER.debug(MSG_EXPORT_EXECUTED.format(str(dt_timestamp), str(symbols), str(columns))) + return + except (Exception, IngressError): # pylint: disable=broad-except + LOGGER.exception(MSG_EXPORT_FAILED.format( + str(dt_timestamp), str(symbols), str(columns), retry+1, MAX_RETRIES)) + + raise Exception(MSG_ERROR_MAX_RETRIES.format(MAX_RETRIES)) + + def delete_point(self, slice_uuid : str) -> None: + sql_query = SQL_MARK_DELETED.format(str(METRICSDB_TABLE_SLICE_GROUPS), slice_uuid) + try: + result = self.rest_request(sql_query) + if not result: raise Exception + LOGGER.debug('Point {:s} deleted'.format(str(slice_uuid))) + except Exception as e: + LOGGER.warning('Point {:s} cannot be deleted. {:s}'.format(str(slice_uuid), str(e))) + raise + + def rest_request(self, rest_query : str) -> Union[Any, Literal[True]]: + url = 'http://{:s}:{:d}/exec'.format(METRICSDB_HOSTNAME, METRICSDB_REST_PORT) + params = {'query': rest_query, 'fmt': 'json'} + + for retry in range(MAX_RETRIES): + try: + response = requests.get(url, params=params) + status_code = response.status_code + if status_code not in {200}: + str_content = response.content.decode('UTF-8') + raise Exception(MSG_REST_BAD_STATUS.format(str(url), str(params), status_code, str_content)) + + json_response = response.json() + if 'ddl' in json_response: + LOGGER.debug(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['ddl']))) + return True + elif 'dataset' in json_response: + LOGGER.debug(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['dataset']))) + return json_response['dataset'] + + except Exception: # pylint: disable=broad-except + LOGGER.exception(MSG_REST_FAILED.format(str(rest_query), retry+1, MAX_RETRIES)) + + raise Exception(MSG_ERROR_MAX_RETRIES.format(MAX_RETRIES)) diff --git a/src/slice/service/slice_grouper/SliceGrouper.py b/src/slice/service/slice_grouper/SliceGrouper.py new file mode 100644 index 0000000000000000000000000000000000000000..735d028993eb11e83138caebde1e32ebc830093f --- /dev/null +++ b/src/slice/service/slice_grouper/SliceGrouper.py @@ -0,0 +1,94 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, pandas, threading +from typing import Dict, Optional, Tuple +from sklearn.cluster import KMeans +from common.proto.context_pb2 import Slice +from common.tools.grpc.Tools import grpc_message_to_json_string +from .Constants import SLICE_GROUPS +from .MetricsExporter import MetricsExporter +from .Tools import ( + add_slice_to_group, create_slice_groups, get_slice_grouping_parameters, is_slice_grouping_enabled, + remove_slice_from_group) + +LOGGER = logging.getLogger(__name__) + +class SliceGrouper: + def __init__(self) -> None: + self._lock = threading.Lock() + self._is_enabled = is_slice_grouping_enabled() + if not self._is_enabled: return + + metrics_exporter = MetricsExporter() + metrics_exporter.create_table() + + self._slice_groups = create_slice_groups(SLICE_GROUPS) + + # Initialize and fit K-Means with the pre-defined clusters we want, i.e., one per slice group + df_groups = pandas.DataFrame(SLICE_GROUPS, columns=['name', 'availability', 'capacity_gbps']) + k_means = KMeans(n_clusters=df_groups.shape[0]) + k_means.fit(df_groups[['availability', 'capacity_gbps']]) + df_groups['label'] = k_means.predict(df_groups[['availability', 'capacity_gbps']]) + self._k_means = k_means + self._df_groups = df_groups + + self._group_mapping : Dict[str, Dict] = { + group['name']:{k:v for k,v in group.items() if k != 'name'} + for group in list(df_groups.to_dict('records')) + } + + label_to_group = {} + for group_name,group_attrs in self._group_mapping.items(): + label = group_attrs['label'] + availability = group_attrs['availability'] + capacity_gbps = group_attrs['capacity_gbps'] + metrics_exporter.export_point( + group_name, group_name, availability, capacity_gbps, is_center=True) + label_to_group[label] = group_name + self._label_to_group = label_to_group + + def _select_group(self, slice_obj : Slice) -> Optional[Tuple[str, float, float]]: + with self._lock: + grouping_parameters = get_slice_grouping_parameters(slice_obj) + LOGGER.debug('[_select_group] grouping_parameters={:s}'.format(str(grouping_parameters))) + if grouping_parameters is None: return None + + sample = pandas.DataFrame([grouping_parameters], columns=['availability', 'capacity_gbps']) + sample['label'] = self._k_means.predict(sample) + sample = sample.to_dict('records')[0] # pylint: disable=unsubscriptable-object + LOGGER.debug('[_select_group] sample={:s}'.format(str(sample))) + label = sample['label'] + availability = sample['availability'] + capacity_gbps = sample['capacity_gbps'] + group_name = self._label_to_group[label] + LOGGER.debug('[_select_group] group_name={:s}'.format(str(group_name))) + return group_name, availability, capacity_gbps + + @property + def is_enabled(self): return self._is_enabled + + def group(self, slice_obj : Slice) -> bool: + LOGGER.debug('[group] slice_obj={:s}'.format(grpc_message_to_json_string(slice_obj))) + selected_group = self._select_group(slice_obj) + LOGGER.debug('[group] selected_group={:s}'.format(str(selected_group))) + if selected_group is None: return False + return add_slice_to_group(slice_obj, selected_group) + + def ungroup(self, slice_obj : Slice) -> bool: + LOGGER.debug('[ungroup] slice_obj={:s}'.format(grpc_message_to_json_string(slice_obj))) + selected_group = self._select_group(slice_obj) + LOGGER.debug('[ungroup] selected_group={:s}'.format(str(selected_group))) + if selected_group is None: return False + return remove_slice_from_group(slice_obj, selected_group) diff --git a/src/slice/service/slice_grouper/Tools.py b/src/slice/service/slice_grouper/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..ca957f3c7760eb65b649d22ecb5b57dee3e08dab --- /dev/null +++ b/src/slice/service/slice_grouper/Tools.py @@ -0,0 +1,177 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Dict, List, Optional, Set, Tuple +from common.Constants import DEFAULT_CONTEXT_NAME +from common.Settings import get_setting +from common.method_wrappers.ServiceExceptions import NotFoundException +from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum +from common.tools.context_queries.Context import create_context +from common.tools.context_queries.Slice import get_slice +from context.client.ContextClient import ContextClient +from slice.service.slice_grouper.MetricsExporter import MetricsExporter + +SETTING_NAME_SLICE_GROUPING = 'SLICE_GROUPING' +TRUE_VALUES = {'Y', 'YES', 'TRUE', 'T', 'E', 'ENABLE', 'ENABLED'} + +NO_ISOLATION = IsolationLevelEnum.NO_ISOLATION + +def is_slice_grouping_enabled() -> bool: + is_enabled = get_setting(SETTING_NAME_SLICE_GROUPING, default=None) + if is_enabled is None: return False + str_is_enabled = str(is_enabled).upper() + return str_is_enabled in TRUE_VALUES + +def create_slice_group( + context_uuid : str, slice_name : str, capacity_gbps : float, availability : float +) -> Slice: + slice_group_obj = Slice() + slice_group_obj.slice_id.context_id.context_uuid.uuid = context_uuid # pylint: disable=no-member + slice_group_obj.slice_id.slice_uuid.uuid = slice_name # pylint: disable=no-member + slice_group_obj.name = slice_name + slice_group_obj.slice_status.slice_status = SliceStatusEnum.SLICESTATUS_ACTIVE # pylint: disable=no-member + #del slice_group_obj.slice_endpoint_ids[:] # no endpoints initially + #del slice_group_obj.slice_service_ids[:] # no sub-services + #del slice_group_obj.slice_subslice_ids[:] # no sub-slices + #del slice_group_obj.slice_config.config_rules[:] # no config rules + slice_group_obj.slice_owner.owner_uuid.uuid = 'TeraFlowSDN' # pylint: disable=no-member + slice_group_obj.slice_owner.owner_string = 'TeraFlowSDN' # pylint: disable=no-member + + constraint_sla_capacity = slice_group_obj.slice_constraints.add() # pylint: disable=no-member + constraint_sla_capacity.sla_capacity.capacity_gbps = capacity_gbps + + constraint_sla_availability = slice_group_obj.slice_constraints.add() # pylint: disable=no-member + constraint_sla_availability.sla_availability.num_disjoint_paths = 1 + constraint_sla_availability.sla_availability.all_active = True + constraint_sla_availability.sla_availability.availability = availability + + constraint_sla_isolation = slice_group_obj.slice_constraints.add() # pylint: disable=no-member + constraint_sla_isolation.sla_isolation.isolation_level.append(NO_ISOLATION) + + return slice_group_obj + +def create_slice_groups( + slice_groups : List[Tuple[str, float, float]], context_uuid : str = DEFAULT_CONTEXT_NAME +) -> Dict[str, SliceId]: + context_client = ContextClient() + create_context(context_client, context_uuid) + + slice_group_ids : Dict[str, SliceId] = dict() + for slice_group in slice_groups: + slice_group_name = slice_group[0] + slice_group_obj = get_slice(context_client, slice_group_name, DEFAULT_CONTEXT_NAME) + if slice_group_obj is None: + slice_group_obj = create_slice_group( + DEFAULT_CONTEXT_NAME, slice_group_name, slice_group[2], slice_group[1]) + slice_group_id = context_client.SetSlice(slice_group_obj) + slice_group_ids[slice_group_name] = slice_group_id + else: + slice_group_ids[slice_group_name] = slice_group_obj.slice_id + + return slice_group_ids + +def get_slice_grouping_parameters(slice_obj : Slice) -> Optional[Tuple[float, float]]: + isolation_levels : Set[int] = set() + availability : Optional[float] = None + capacity_gbps : Optional[float] = None + + for constraint in slice_obj.slice_constraints: + kind = constraint.WhichOneof('constraint') + if kind == 'sla_isolation': + isolation_levels.update(constraint.sla_isolation.isolation_level) + elif kind == 'sla_capacity': + capacity_gbps = constraint.sla_capacity.capacity_gbps + elif kind == 'sla_availability': + availability = constraint.sla_availability.availability + else: + continue + + no_isolation_level = len(isolation_levels) == 0 + single_isolation_level = len(isolation_levels) == 1 + has_no_isolation_level = NO_ISOLATION in isolation_levels + can_be_grouped = no_isolation_level or (single_isolation_level and has_no_isolation_level) + if not can_be_grouped: return None + if availability is None: return None + if capacity_gbps is None: return None + return availability, capacity_gbps + +def add_slice_to_group(slice_obj : Slice, selected_group : Tuple[str, float, float]) -> bool: + group_name, availability, capacity_gbps = selected_group + slice_uuid = slice_obj.slice_id.slice_uuid.uuid + + context_client = ContextClient() + slice_group_obj = get_slice(context_client, group_name, DEFAULT_CONTEXT_NAME, rw_copy=True) + if slice_group_obj is None: + raise NotFoundException('Slice', group_name, extra_details='while adding to group') + + del slice_group_obj.slice_endpoint_ids[:] + for endpoint_id in slice_obj.slice_endpoint_ids: + slice_group_obj.slice_endpoint_ids.add().CopyFrom(endpoint_id) + + del slice_group_obj.slice_constraints[:] + del slice_group_obj.slice_service_ids[:] + + del slice_group_obj.slice_subslice_ids[:] + slice_group_obj.slice_subslice_ids.add().CopyFrom(slice_obj.slice_id) + + del slice_group_obj.slice_config.config_rules[:] + for config_rule in slice_obj.slice_config.config_rules: + group_config_rule = slice_group_obj.slice_config.config_rules.add() + group_config_rule.CopyFrom(config_rule) + if config_rule.WhichOneof('config_rule') != 'custom': continue + TEMPLATE = '/subslice[{:s}]{:s}' + slice_resource_key = config_rule.custom.resource_key + group_resource_key = TEMPLATE.format(slice_uuid, slice_resource_key) + group_config_rule.custom.resource_key = group_resource_key + + context_client.SetSlice(slice_group_obj) + + metrics_exporter = MetricsExporter() + metrics_exporter.export_point( + slice_uuid, group_name, availability, capacity_gbps, is_center=False) + + return True + +def remove_slice_from_group(slice_obj : Slice, selected_group : Tuple[str, float, float]) -> bool: + group_name, _, _ = selected_group + slice_uuid = slice_obj.slice_id.slice_uuid.uuid + + context_client = ContextClient() + slice_group_obj = get_slice(context_client, group_name, DEFAULT_CONTEXT_NAME, rw_copy=True) + if slice_group_obj is None: + raise NotFoundException('Slice', group_name, extra_details='while removing from group') + + if slice_obj.slice_id in slice_group_obj.slice_subslice_ids: + tmp_slice_group_obj = Slice() + tmp_slice_group_obj.slice_id.CopyFrom(slice_group_obj.slice_id) # pylint: disable=no-member + + tmp_slice_group_obj.slice_subslice_ids.add().CopyFrom(slice_obj.slice_id) # pylint: disable=no-member + + for endpoint_id in slice_obj.slice_endpoint_ids: + tmp_slice_group_obj.slice_endpoint_ids.add().CopyFrom(endpoint_id) # pylint: disable=no-member + + for config_rule in slice_obj.slice_config.config_rules: + group_config_rule = tmp_slice_group_obj.slice_config.config_rules.add() # pylint: disable=no-member + group_config_rule.CopyFrom(config_rule) + if group_config_rule.WhichOneof('config_rule') != 'custom': continue + TEMPLATE = '/subslice[{:s}]{:s}' + slice_resource_key = group_config_rule.custom.resource_key + group_resource_key = TEMPLATE.format(slice_uuid, slice_resource_key) + group_config_rule.custom.resource_key = group_resource_key + + context_client.UnsetSlice(tmp_slice_group_obj) + + metrics_exporter = MetricsExporter() + metrics_exporter.delete_point(slice_uuid) + return True diff --git a/src/slice/service/slice_grouper/__init__.py b/src/slice/service/slice_grouper/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612 --- /dev/null +++ b/src/slice/service/slice_grouper/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/slice/tests/old/Main.py b/src/slice/tests/old/Main.py new file mode 100644 index 0000000000000000000000000000000000000000..0924f1c646e9722bf23354d0787786375663e85f --- /dev/null +++ b/src/slice/tests/old/Main.py @@ -0,0 +1,98 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, os, pandas, random, sys, time +#from matplotlib import pyplot as plt +from sklearn.cluster import KMeans +from typing import Dict, List, Tuple + +os.environ['METRICSDB_HOSTNAME' ] = '127.0.0.1' #'questdb-public.qdb.svc.cluster.local' +os.environ['METRICSDB_ILP_PORT' ] = '9009' +os.environ['METRICSDB_REST_PORT'] = '9000' + +from .MetricsExporter import MetricsExporter # pylint: disable=wrong-import-position + +logging.basicConfig(level=logging.DEBUG) +LOGGER : logging.Logger = logging.getLogger(__name__) + +def get_random_slices(count : int) -> List[Tuple[str, float, float]]: + slices = list() + for i in range(count): + slice_name = 'slice-{:03d}'.format(i) + slice_availability = random.uniform(00.0, 99.99) + slice_capacity_gbps = random.uniform(0.1, 100.0) + slices.append((slice_name, slice_availability, slice_capacity_gbps)) + return slices + +def init_kmeans() -> Tuple[KMeans, Dict[str, int]]: + groups = [ + # Name, avail[0..100], bw_gbps[0..100] + ('bronze', 10.0, 10.0), # ('silver', 25.0, 25.0), + ('silver', 30.0, 40.0), # ('silver', 25.0, 25.0), + ('gold', 70.0, 50.0), # ('gold', 90.0, 50.0), + ('platinum', 99.0, 100.0), + ] + df_groups = pandas.DataFrame(groups, columns=['name', 'availability', 'capacity']) + + num_clusters = len(groups) + k_means = KMeans(n_clusters=num_clusters) + k_means.fit(df_groups[['availability', 'capacity']]) + + df_groups['label'] = k_means.predict(df_groups[['availability', 'capacity']]) + mapping = { + group['name']:{k:v for k,v in group.items() if k != 'name'} + for group in list(df_groups.to_dict('records')) + } + + return k_means, mapping + +def main(): + LOGGER.info('Starting...') + metrics_exporter = MetricsExporter() + metrics_exporter.create_table() + + k_means, mapping = init_kmeans() + label_to_group = {} + for group_name,group_attrs in mapping.items(): + label = group_attrs['label'] + availability = group_attrs['availability'] + capacity = group_attrs['capacity'] + metrics_exporter.export_point(group_name, group_name, availability, capacity, is_center=True) + label_to_group[label] = group_name + + slices = get_random_slices(10000) + for slice_ in slices: + sample = pandas.DataFrame([slice_[1:3]], columns=['availability', 'capacity']) + sample['label'] = k_means.predict(sample) + sample = sample.to_dict('records')[0] + label = sample['label'] + availability = sample['availability'] + capacity = sample['capacity'] + group_name = label_to_group[label] + metrics_exporter.export_point(slice_[0], group_name, availability, capacity, is_center=False) + time.sleep(0.01) + + #df_silver = df_slices[df_slices['group']==mapping['silver']] + #df_gold = df_slices[df_slices['group']==mapping['gold']] + #df_platinum = df_slices[df_slices['group']==mapping['platinum']] + #plt.scatter(df_silver.availability, df_silver.capacity, s=25, c='black' ) + #plt.scatter(df_gold.availability, df_gold.capacity, s=25, c='gold' ) + #plt.scatter(df_platinum.availability, df_platinum.capacity, s=25, c='silver') + #plt.scatter(k_means.cluster_centers_[:, 0], k_means.cluster_centers_[:, 1], s=100, c='red' ) + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/slice/tests/old/MetricsExporter.py b/src/slice/tests/old/MetricsExporter.py new file mode 100644 index 0000000000000000000000000000000000000000..3c04cb9fcb1c7ab05c5274fb8e2a934a39b4cfdd --- /dev/null +++ b/src/slice/tests/old/MetricsExporter.py @@ -0,0 +1,116 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import datetime, logging, os, requests +from typing import Any, Literal, Union +from questdb.ingress import Sender, IngressError # pylint: disable=no-name-in-module + +LOGGER = logging.getLogger(__name__) + +MAX_RETRIES = 10 +DELAY_RETRIES = 0.5 + +MSG_EXPORT_EXECUTED = '[rest_request] Export(timestamp={:s}, symbols={:s}, columns={:s}) executed' +MSG_EXPORT_FAILED = '[rest_request] Export(timestamp={:s}, symbols={:s}, columns={:s}) failed, retry={:d}/{:d}...' +MSG_REST_BAD_STATUS = '[rest_request] Bad Reply url="{:s}" params="{:s}": status_code={:d} content={:s}' +MSG_REST_EXECUTED = '[rest_request] Query({:s}) executed, result: {:s}' +MSG_REST_FAILED = '[rest_request] Query({:s}) failed, retry={:d}/{:d}...' +MSG_ERROR_MAX_RETRIES = 'Maximum number of retries achieved: {:d}' + +METRICSDB_HOSTNAME = os.environ.get('METRICSDB_HOSTNAME') +METRICSDB_ILP_PORT = int(os.environ.get('METRICSDB_ILP_PORT')) +METRICSDB_REST_PORT = int(os.environ.get('METRICSDB_REST_PORT')) +METRICSDB_TABLE_SLICE_GROUPS = 'slice_groups' + +COLORS = { + 'platinum': '#E5E4E2', + 'gold' : '#FFD700', + 'silver' : '#808080', + 'bronze' : '#CD7F32', +} +DEFAULT_COLOR = '#000000' # black + +class MetricsExporter(): + def __init__(self) -> None: + pass + + def create_table(self) -> None: + sql_query = ' '.join([ + 'CREATE TABLE IF NOT EXISTS {:s} ('.format(str(METRICSDB_TABLE_SLICE_GROUPS)), + ','.join([ + 'timestamp TIMESTAMP', + 'slice_uuid SYMBOL', + 'slice_group SYMBOL', + 'slice_color SYMBOL', + 'slice_availability DOUBLE', + 'slice_capacity_center DOUBLE', + 'slice_capacity DOUBLE', + ]), + ') TIMESTAMP(timestamp);' + ]) + try: + result = self.rest_request(sql_query) + if not result: raise Exception + LOGGER.info('Table {:s} created'.format(str(METRICSDB_TABLE_SLICE_GROUPS))) + except Exception as e: + LOGGER.warning('Table {:s} cannot be created. {:s}'.format(str(METRICSDB_TABLE_SLICE_GROUPS), str(e))) + raise + + def export_point( + self, slice_uuid : str, slice_group : str, slice_availability : float, slice_capacity : float, + is_center : bool = False + ) -> None: + dt_timestamp = datetime.datetime.utcnow() + slice_color = COLORS.get(slice_group, DEFAULT_COLOR) + symbols = dict(slice_uuid=slice_uuid, slice_group=slice_group, slice_color=slice_color) + columns = dict(slice_availability=slice_availability) + columns['slice_capacity_center' if is_center else 'slice_capacity'] = slice_capacity + + for retry in range(MAX_RETRIES): + try: + with Sender(METRICSDB_HOSTNAME, METRICSDB_ILP_PORT) as sender: + sender.row(METRICSDB_TABLE_SLICE_GROUPS, symbols=symbols, columns=columns, at=dt_timestamp) + sender.flush() + LOGGER.info(MSG_EXPORT_EXECUTED.format(str(dt_timestamp), str(symbols), str(columns))) + return + except (Exception, IngressError): # pylint: disable=broad-except + LOGGER.exception(MSG_EXPORT_FAILED.format( + str(dt_timestamp), str(symbols), str(columns), retry+1, MAX_RETRIES)) + + raise Exception(MSG_ERROR_MAX_RETRIES.format(MAX_RETRIES)) + + def rest_request(self, rest_query : str) -> Union[Any, Literal[True]]: + url = 'http://{:s}:{:d}/exec'.format(METRICSDB_HOSTNAME, METRICSDB_REST_PORT) + params = {'query': rest_query, 'fmt': 'json'} + + for retry in range(MAX_RETRIES): + try: + response = requests.get(url, params=params) + status_code = response.status_code + if status_code not in {200}: + str_content = response.content.decode('UTF-8') + raise Exception(MSG_REST_BAD_STATUS.format(str(url), str(params), status_code, str_content)) + + json_response = response.json() + if 'ddl' in json_response: + LOGGER.info(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['ddl']))) + return True + elif 'dataset' in json_response: + LOGGER.info(MSG_REST_EXECUTED.format(str(rest_query), str(json_response['dataset']))) + return json_response['dataset'] + + except Exception: # pylint: disable=broad-except + LOGGER.exception(MSG_REST_FAILED.format(str(rest_query), retry+1, MAX_RETRIES)) + + raise Exception(MSG_ERROR_MAX_RETRIES.format(MAX_RETRIES)) diff --git a/src/slice/tests/old/test_kmeans.py b/src/slice/tests/old/test_kmeans.py new file mode 100644 index 0000000000000000000000000000000000000000..3f54621c57c3bfcc1741591e5d0a87781e640420 --- /dev/null +++ b/src/slice/tests/old/test_kmeans.py @@ -0,0 +1,77 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import pandas, random, sys +from matplotlib import pyplot as plt +from sklearn.cluster import KMeans +from typing import Dict, List, Tuple + +def get_random_slices(count : int) -> List[Tuple[str, float, float]]: + slices = list() + for i in range(count): + slice_name = 'slice-{:03d}'.format(i) + slice_availability = random.uniform(00.0, 99.99) + slice_capacity_gbps = random.uniform(0.1, 100.0) + slices.append((slice_name, slice_availability, slice_capacity_gbps)) + return slices + +def init_kmeans() -> Tuple[KMeans, Dict[str, int]]: + groups = [ + # Name, avail[0..100], bw_gbps[0..100] + ('silver', 25.0, 50.0), # ('silver', 25.0, 25.0), + ('gold', 90.0, 10.0), # ('gold', 90.0, 50.0), + ('platinum', 99.0, 100.0), + ] + df_groups = pandas.DataFrame(groups, columns=['name', 'availability', 'capacity']) + + num_clusters = len(groups) + k_means = KMeans(n_clusters=num_clusters) + k_means.fit(df_groups[['availability', 'capacity']]) + + df_groups['label'] = k_means.predict(df_groups[['availability', 'capacity']]) + mapping = {group['name']:group['label'] for group in list(df_groups.to_dict('records'))} + + return k_means, mapping + +def main(): + k_means, mapping = init_kmeans() + slices = get_random_slices(500) + df_slices = pandas.DataFrame(slices, columns=['slice_uuid', 'availability', 'capacity']) + + # predict one + #sample = df_slices[['availability', 'capacity']].iloc[[0]] + #y_predicted = k_means.predict(sample) + #y_predicted + + df_slices['group'] = k_means.predict(df_slices[['availability', 'capacity']]) + + df_silver = df_slices[df_slices['group']==mapping['silver']] + df_gold = df_slices[df_slices['group']==mapping['gold']] + df_platinum = df_slices[df_slices['group']==mapping['platinum']] + + plt.scatter(df_silver.availability, df_silver.capacity, s=25, c='black' ) + plt.scatter(df_gold.availability, df_gold.capacity, s=25, c='gold' ) + plt.scatter(df_platinum.availability, df_platinum.capacity, s=25, c='silver') + plt.scatter(k_means.cluster_centers_[:, 0], k_means.cluster_centers_[:, 1], s=100, c='red' ) + plt.xlabel('service-slo-availability') + plt.ylabel('service-slo-one-way-bandwidth') + #ax = plt.subplot(1, 1, 1) + #ax.set_ylim(bottom=0., top=1.) + #ax.set_xlim(left=0.) + plt.savefig('slice_grouping.png') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/slice/tests/old/test_subslices.py b/src/slice/tests/old/test_subslices.py new file mode 100644 index 0000000000000000000000000000000000000000..39ee235df0e9d263244fa14436f609397bcea84f --- /dev/null +++ b/src/slice/tests/old/test_subslices.py @@ -0,0 +1,96 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import sqlalchemy, sys +from sqlalchemy import Column, ForeignKey, String, event, insert +from sqlalchemy.orm import Session, declarative_base, relationship +from typing import Dict + +def _fk_pragma_on_connect(dbapi_con, con_record): + dbapi_con.execute('pragma foreign_keys=ON') + +_Base = declarative_base() + +class SliceModel(_Base): + __tablename__ = 'slice' + + slice_uuid = Column(String, primary_key=True) + + slice_subslices = relationship( + 'SliceSubSliceModel', primaryjoin='slice.c.slice_uuid == slice_subslice.c.slice_uuid') + + def dump_id(self) -> Dict: + return {'uuid': self.slice_uuid} + + def dump(self) -> Dict: + return { + 'slice_id': self.dump_id(), + 'slice_subslice_ids': [ + slice_subslice.subslice.dump_id() + for slice_subslice in self.slice_subslices + ] + } + +class SliceSubSliceModel(_Base): + __tablename__ = 'slice_subslice' + + slice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='CASCADE' ), primary_key=True) + subslice_uuid = Column(ForeignKey('slice.slice_uuid', ondelete='RESTRICT'), primary_key=True) + + slice = relationship('SliceModel', foreign_keys='SliceSubSliceModel.slice_uuid', back_populates='slice_subslices', lazy='joined') + subslice = relationship('SliceModel', foreign_keys='SliceSubSliceModel.subslice_uuid', lazy='joined') + +def main(): + engine = sqlalchemy.create_engine('sqlite:///:memory:', echo=False, future=True) + event.listen(engine, 'connect', _fk_pragma_on_connect) + + _Base.metadata.create_all(engine) + + slice_data = [ + {'slice_uuid': 'slice-01'}, + {'slice_uuid': 'slice-01-01'}, + {'slice_uuid': 'slice-01-02'}, + ] + + slice_subslices_data = [ + {'slice_uuid': 'slice-01', 'subslice_uuid': 'slice-01-01'}, + {'slice_uuid': 'slice-01', 'subslice_uuid': 'slice-01-02'}, + ] + + # insert + with engine.connect() as conn: + conn.execute(insert(SliceModel).values(slice_data)) + conn.execute(insert(SliceSubSliceModel).values(slice_subslices_data)) + conn.commit() + + # read + with Session(engine) as session: + obj_list = session.query(SliceModel).all() + print([obj.dump() for obj in obj_list]) + session.commit() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + +[ + {'slice_id': {'uuid': 'slice-01'}, 'slice_subslice_ids': [ + {'uuid': 'slice-01-01'}, + {'uuid': 'slice-01-02'} + ]}, + {'slice_id': {'uuid': 'slice-01-01'}, 'slice_subslice_ids': []}, + {'slice_id': {'uuid': 'slice-01-02'}, 'slice_subslice_ids': []} +] diff --git a/src/tests/benchmark/policy/deploy_specs.sh b/src/tests/benchmark/policy/deploy_specs.sh index 12a45ef92a538ff48682fe45172a27d77b2800a0..7d408f003ce411566b9bf2435d89c72ff5db1459 100755 --- a/src/tests/benchmark/policy/deploy_specs.sh +++ b/src/tests/benchmark/policy/deploy_specs.sh @@ -4,7 +4,7 @@ # 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 +# 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, @@ -12,21 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Set the URL of your local Docker registry where the images will be uploaded to. -export TFS_REGISTRY_IMAGE="http://localhost:32000/tfs/" + +# ----- 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. -# Supported components are: -# context device automation policy service compute monitoring webui -# interdomain slice pathcomp dlt -# dbscanserving opticalattackmitigator opticalattackdetector -# l3_attackmitigator l3_centralizedattackdetector l3_distributedattackdetector export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui" # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" -# Set the name of the Kubernetes namespace to deploy to. +# 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 @@ -35,6 +33,60 @@ export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" # Set the new Grafana admin password export TFS_GRAFANA_PASSWORD="admin123+" -# If not already set, disable skip-build flag. -# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used. -export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-""} +# 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 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 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" + +# Disable flag for dropping database, if it exists. +export CRDB_DROP_DATABASE_IF_EXISTS="" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# 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 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" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" diff --git a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py index 65c46b4eb5aea8d5762484d1558c14745acf83ed..ca1882aaa22ff1ac20d0b1927199a6594a6c441a 100644 --- a/src/tests/benchmark/policy/tests/test_functional_bootstrap.py +++ b/src/tests/benchmark/policy/tests/test_functional_bootstrap.py @@ -13,10 +13,10 @@ # limitations under the License. import logging, time +from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId, Empty from common.proto.monitoring_pb2 import KpiDescriptorList -from common.tests.LoadScenario import load_scenario_from_descriptor -from common.tools.grpc.Tools import grpc_message_to_json_string +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 @@ -27,44 +27,25 @@ LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_scenario_bootstrap( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name ) -> None: - # ----- List entities - Ensure database is empty ------------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == 0 + validate_empty_scenario(context_client) - response = context_client.ListDevices(Empty()) - assert len(response.devices) == 0 - - response = context_client.ListLinks(Empty()) - assert len(response.links) == 0 - - - # ----- Load Scenario ---------------------------------------------------------------------------------------------- - descriptor_loader = load_scenario_from_descriptor( - DESCRIPTOR_FILE, context_client, device_client, None, None) - - - # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices + 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() - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links + # 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 - for context_uuid, _ in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 def test_scenario_kpis_created( context_client : ContextClient, # pylint: disable=redefined-outer-name diff --git a/src/tests/benchmark/policy/tests/test_functional_cleanup.py b/src/tests/benchmark/policy/tests/test_functional_cleanup.py index e00c5ceeea6c59bf11bd2961802a9a3b805c5d2c..122526840796310519f8fe0feb8921e51467b21f 100644 --- a/src/tests/benchmark/policy/tests/test_functional_cleanup.py +++ b/src/tests/benchmark/policy/tests/test_functional_cleanup.py @@ -13,9 +13,10 @@ # limitations under the License. import logging -from common.tools.descriptor.Loader import DescriptorLoader +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 common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from tests.Fixtures import context_client, device_client # pylint: disable=unused-import @@ -24,57 +25,20 @@ LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) - -def test_services_removed( +def test_scenario_cleanup( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name ) -> None: - # ----- List entities - Ensure service is removed ------------------------------------------------------------------ - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, _ in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 - - - # ----- Delete Links, Devices, Topologies, Contexts ---------------------------------------------------------------- - for link in descriptor_loader.links: - context_client.RemoveLink(LinkId(**link['link_id'])) - - for device in descriptor_loader.devices: - device_client .DeleteDevice(DeviceId(**device['device_id'])) - - for context_uuid, topology_list in descriptor_loader.topologies.items(): - for topology in topology_list: - context_client.RemoveTopology(TopologyId(**topology['topology_id'])) - - for context in descriptor_loader.contexts: - context_client.RemoveContext(ContextId(**context['context_id'])) - - - # ----- List entities - Ensure database is empty again ------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == 0 - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == 0 - - response = context_client.ListLinks(Empty()) - assert len(response.links) == 0 + # 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/benchmark/policy/tests/test_functional_create_service.py b/src/tests/benchmark/policy/tests/test_functional_create_service.py index 919f81979305831b69a82f13fbe4b70bd20ea70f..dd7761f3871db48752f313dc53e8b7d2e2c38489 100644 --- a/src/tests/benchmark/policy/tests/test_functional_create_service.py +++ b/src/tests/benchmark/policy/tests/test_functional_create_service.py @@ -13,83 +13,61 @@ # limitations under the License. import logging, random -from common.DeviceTypes import DeviceTypeEnum -from common.proto.context_pb2 import ContextId, Empty +from common.Constants import DEFAULT_CONTEXT_NAME +from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.descriptor.Loader import DescriptorLoader 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 monitoring.client.MonitoringClient import MonitoringClient -from tests.Fixtures import context_client, device_client, monitoring_client # pylint: disable=unused-import +from tests.Fixtures import context_client, monitoring_client # pylint: disable=unused-import from tests.tools.mock_osm.MockOSM import MockOSM -from .Fixtures import osm_wim # pylint: disable=unused-import +from .Fixtures import osm_wim # pylint: disable=unused-import from .Objects import WIM_SERVICE_CONNECTION_POINTS, WIM_SERVICE_TYPE LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DEVTYPE_EMU_PR = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value -DEVTYPE_EMU_OLS = DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value - DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name - # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + 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 - # ----- Create Service --------------------------------------------------------------------------------------------- + # Create Connectivity Service service_uuid = osm_wim.create_connectivity_service(WIM_SERVICE_TYPE, WIM_SERVICE_CONNECTION_POINTS) osm_wim.get_connectivity_service_status(service_uuid) - - # ----- List entities - Ensure service is created ------------------------------------------------------------------ - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) - assert len(response.services) == 2*num_services # OLS & L3NM => (L3NM + TAPI) - - for service in response.services: - service_id = service.service_id - response = context_client.ListConnections(service_id) - LOGGER.info(' 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 # one connection per service + # Ensure slices and services are created + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.info('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 1 # OSM slice + + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 2 # 1xL3NM + 1xTAPI + + for service in response.services: + service_id = service.service_id + response = context_client.ListConnections(service_id) + LOGGER.info(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) + + if service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM: + assert len(response.connections) == 1 # 1 connection per service + elif service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: + assert len(response.connections) == 1 # 1 connection per service + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) def test_scenario_kpi_values_created( 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 6f6ca602980fb05ffafd17f44a5bc64671c4c7b0..4fffc115e6c0ea881dea637dd741f99715d28c6a 100644 --- a/src/tests/benchmark/policy/tests/test_functional_delete_service.py +++ b/src/tests/benchmark/policy/tests/test_functional_delete_service.py @@ -14,86 +14,61 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.DeviceTypes import DeviceTypeEnum -from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum +from common.proto.context_pb2 import ContextId, ServiceTypeEnum from common.tools.descriptor.Loader import DescriptorLoader -from common.tools.object_factory.Context import json_context_id 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 tests.Fixtures import context_client # pylint: disable=unused-import from tests.tools.mock_osm.MockOSM import MockOSM -from .Fixtures import osm_wim # pylint: disable=unused-import - +from .Fixtures import osm_wim # pylint: disable=unused-import LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) -DEVTYPE_EMU_PR = DeviceTypeEnum.EMULATED_PACKET_ROUTER.value -DEVTYPE_EMU_OLS = DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value - DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' - +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name - # ----- List entities - Ensure service is created ------------------------------------------------------------------ - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() + # Ensure slices and services are created + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.info('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 1 # OSM slice - descriptor_loader = DescriptorLoader(descriptors) + response = context_client.ListServices(ADMIN_CONTEXT_ID) + LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) + assert len(response.services) == 2 # 1xL3NM + 1xTAPI - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - l3nm_service_uuids = set() - response = context_client.ListServices(ContextId(**json_context_id(DEFAULT_CONTEXT_NAME))) - assert len(response.services) == 2 # OLS & L3NM => (L3NM + TAPI) + service_uuids = set() for service in response.services: service_id = service.service_id + response = context_client.ListConnections(service_id) + LOGGER.info(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( + grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) if service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM: + assert len(response.connections) == 1 # 1 connection per service service_uuid = service_id.service_uuid.uuid - l3nm_service_uuids.add(service_uuid) + service_uuids.add(service_uuid) osm_wim.conn_info[service_uuid] = {} - - response = context_client.ListConnections(service_id) - LOGGER.info(' 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 # one connection per service + elif service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: + assert len(response.connections) == 1 # 1 connection per service + else: + str_service = grpc_message_to_json_string(service) + raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) # Identify service to delete - assert len(l3nm_service_uuids) == 1 # assume a single L3NM service has been created - l3nm_service_uuid = set(l3nm_service_uuids).pop() - - - # ----- Delete Service --------------------------------------------------------------------------------------------- - osm_wim.delete_connectivity_service(l3nm_service_uuid) - - - # ----- List entities - Ensure service is removed ------------------------------------------------------------------ - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies + assert len(service_uuids) == 1 # assume a single L3NM service has been created + service_uuid = set(service_uuids).pop() - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices + # Delete Connectivity Service + osm_wim.delete_connectivity_service(service_uuid) - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links + # 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 - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() diff --git a/src/tests/ecoc22/deploy_specs.sh b/src/tests/ecoc22/deploy_specs.sh index 874774e1ca50830832e842e49b6fff1114cb85d8..6c3d9db662a8232f1fcccf3835b98d69571b6337 100755 --- a/src/tests/ecoc22/deploy_specs.sh +++ b/src/tests/ecoc22/deploy_specs.sh @@ -20,7 +20,6 @@ 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 automation monitoring pathcomp service slice compute webui load_generator" export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui" # Set the tag you want to use for your images. @@ -57,7 +56,7 @@ export CRDB_DATABASE="tfs" # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" -# Disable flag for dropping database, if exists. +# Disable flag for dropping database, if it exists. export CRDB_DROP_DATABASE_IF_EXISTS="" # Disable flag for re-deploying CockroachDB from scratch. @@ -75,20 +74,20 @@ export NATS_REDEPLOY="" # ----- QuestDB ---------------------------------------------------------------- -# If not already set, set the namespace where QuestDB will be deployed. +# Set the namespace where QuestDB will be deployed. export QDB_NAMESPACE="qdb" -# If not already set, set the database username to be used by Monitoring. +# Set the database username to be used for QuestDB. export QDB_USERNAME="admin" -# If not already set, set the database user's password to be used by Monitoring. +# Set the database user's password to be used for QuestDB. export QDB_PASSWORD="quest" -# If not already set, set the table name to be used by Monitoring. -export QDB_TABLE="tfs_monitoring" +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" -## If not already set, disable flag for dropping table if exists. -#export QDB_DROP_TABLE_IF_EXISTS="" +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="" -# If not already set, disable flag for re-deploying QuestDB from scratch. +# Disable flag for re-deploying QuestDB from scratch. export QDB_REDEPLOY="" diff --git a/src/tests/ecoc22/tests/test_functional_bootstrap.py b/src/tests/ecoc22/tests/test_functional_bootstrap.py index 3b7b5009c0dbe9d95b4ee8e2cdbe33d39008a7a1..05691d0b274df019a87bd870fec2b9ffa3245612 100644 --- a/src/tests/ecoc22/tests/test_functional_bootstrap.py +++ b/src/tests/ecoc22/tests/test_functional_bootstrap.py @@ -14,8 +14,8 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, Empty -from common.tests.LoadScenario import load_scenario_from_descriptor +from common.proto.context_pb2 import ContextId +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 @@ -31,45 +31,15 @@ def test_scenario_bootstrap( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name ) -> None: - # ----- List entities - Ensure database is empty ------------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == 0 + validate_empty_scenario(context_client) - response = context_client.ListDevices(Empty()) - assert len(response.devices) == 0 + 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() - response = context_client.ListLinks(Empty()) - assert len(response.links) == 0 - - - # ----- Load Scenario ---------------------------------------------------------------------------------------------- - descriptor_loader = load_scenario_from_descriptor( - DESCRIPTOR_FILE, context_client, device_client, None, None) - - - # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, _ in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 - - for context_uuid, _ in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == 0 - - # This scenario assumes no services are created beforehand + # 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/ecoc22/tests/test_functional_cleanup.py b/src/tests/ecoc22/tests/test_functional_cleanup.py index 3e8b5ea65fe8249102ba17b9d4ce3f2cf2296dda..088c19799615169bf8c60ae5a9226fe02ec0e4ff 100644 --- a/src/tests/ecoc22/tests/test_functional_cleanup.py +++ b/src/tests/ecoc22/tests/test_functional_cleanup.py @@ -14,8 +14,8 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId -from common.tools.descriptor.Loader import DescriptorLoader +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 @@ -27,64 +27,18 @@ LOGGER.setLevel(logging.DEBUG) DESCRIPTOR_FILE = 'ecoc22/descriptors_emulated.json' ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) -def test_services_removed( +def test_scenario_cleanup( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name ) -> None: - # ----- List entities - Ensure service is removed ------------------------------------------------------------------ - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, _ in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 - - for context_uuid, _ in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == 0 - - # This scenario assumes no services are created beforehand + # 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 - - # ----- Delete Links, Devices, Topologies, Contexts ---------------------------------------------------------------- - for link in descriptor_loader.links: - context_client.RemoveLink(LinkId(**link['link_id'])) - - for device in descriptor_loader.devices: - device_client .DeleteDevice(DeviceId(**device['device_id'])) - - for context_uuid, topology_list in descriptor_loader.topologies.items(): - for topology in topology_list: - context_client.RemoveTopology(TopologyId(**topology['topology_id'])) - - for context in descriptor_loader.contexts: - context_client.RemoveContext(ContextId(**context['context_id'])) - - - # ----- List entities - Ensure database is empty again ------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == 0 - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == 0 - - response = context_client.ListLinks(Empty()) - assert len(response.links) == 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/ecoc22/tests/test_functional_create_service.py b/src/tests/ecoc22/tests/test_functional_create_service.py index 6dd4eb827c0fbafdf0bce81c7702af5fd5fe007b..dab9c7eb131434a16dad01be4fb8cd6b6b322515 100644 --- a/src/tests/ecoc22/tests/test_functional_create_service.py +++ b/src/tests/ecoc22/tests/test_functional_create_service.py @@ -14,7 +14,7 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum +from common.proto.context_pb2 import ContextId, ServiceTypeEnum from common.tools.descriptor.Loader import DescriptorLoader from common.tools.grpc.Tools import grpc_message_to_json_string from common.tools.object_factory.Context import json_context_id @@ -31,57 +31,23 @@ DESCRIPTOR_FILE = 'ecoc22/descriptors_emulated.json' ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name - # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == num_services - - for context_uuid, num_slices in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == num_slices - - # This scenario assumes no services are created beforehand + # 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 - - # ----- Create Service --------------------------------------------------------------------------------------------- + # Create Connectivity Service service_uuid = osm_wim.create_connectivity_service(WIM_SERVICE_TYPE, WIM_SERVICE_CONNECTION_POINTS) osm_wim.get_connectivity_service_status(service_uuid) - - # ----- List entities - Ensure service is created ------------------------------------------------------------------ - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links + # Ensure slices and services are created + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.info('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 1 # OSM slice response = context_client.ListServices(ADMIN_CONTEXT_ID) LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) diff --git a/src/tests/ecoc22/tests/test_functional_delete_service.py b/src/tests/ecoc22/tests/test_functional_delete_service.py index 5cfdc34733d8ddc6927b52131a187fb097b36d9d..710e1a817f00f0b1664439d1c816195202a69a9d 100644 --- a/src/tests/ecoc22/tests/test_functional_delete_service.py +++ b/src/tests/ecoc22/tests/test_functional_delete_service.py @@ -14,14 +14,14 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum +from common.proto.context_pb2 import ContextId, ServiceTypeEnum from common.tools.descriptor.Loader import DescriptorLoader -from common.tools.object_factory.Context import json_context_id 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 tests.Fixtures import context_client # pylint: disable=unused-import +from tests.Fixtures import context_client # pylint: disable=unused-import from tests.tools.mock_osm.MockOSM import MockOSM -from .Fixtures import osm_wim # pylint: disable=unused-import +from .Fixtures import osm_wim # pylint: disable=unused-import LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -30,44 +30,27 @@ DESCRIPTOR_FILE = 'ecoc22/descriptors_emulated.json' ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name - # ----- List entities - Ensure service is created ------------------------------------------------------------------ - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links + # Ensure slices and services are created + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.info('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 1 # OSM slice - service_uuids = set() response = context_client.ListServices(ADMIN_CONTEXT_ID) LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) assert len(response.services) == 3 # 1xL2NM + 2xTAPI + service_uuids = set() for service in response.services: service_id = service.service_id - - if service.service_type == ServiceTypeEnum.SERVICETYPE_L2NM: - service_uuid = service_id.service_uuid.uuid - service_uuids.add(service_uuid) - osm_wim.conn_info[service_uuid] = {} - response = context_client.ListConnections(service_id) LOGGER.info(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) if service.service_type == ServiceTypeEnum.SERVICETYPE_L2NM: assert len(response.connections) == 2 # 2 connections per service (primary + backup) + service_uuid = service_id.service_uuid.uuid + service_uuids.add(service_uuid) + osm_wim.conn_info[service_uuid] = {} elif service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: assert len(response.connections) == 1 # 1 connection per service else: @@ -78,34 +61,14 @@ def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # p assert len(service_uuids) == 1 # assume a single L2NM service has been created service_uuid = set(service_uuids).pop() - - # ----- Delete Service --------------------------------------------------------------------------------------------- + # Delete Connectivity Service osm_wim.delete_connectivity_service(service_uuid) - - # ----- List entities - Ensure service is removed ------------------------------------------------------------------ - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == num_services - - for context_uuid, num_slices in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == num_slices - - # This scenario assumes no services are created beforehand + # 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) + descriptor_loader.validate() diff --git a/src/tests/ofc22/deploy_specs.sh b/src/tests/ofc22/deploy_specs.sh index 874774e1ca50830832e842e49b6fff1114cb85d8..6c3d9db662a8232f1fcccf3835b98d69571b6337 100755 --- a/src/tests/ofc22/deploy_specs.sh +++ b/src/tests/ofc22/deploy_specs.sh @@ -20,7 +20,6 @@ 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 automation monitoring pathcomp service slice compute webui load_generator" export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui" # Set the tag you want to use for your images. @@ -57,7 +56,7 @@ export CRDB_DATABASE="tfs" # See ./deploy/all.sh or ./deploy/crdb.sh for additional details export CRDB_DEPLOY_MODE="single" -# Disable flag for dropping database, if exists. +# Disable flag for dropping database, if it exists. export CRDB_DROP_DATABASE_IF_EXISTS="" # Disable flag for re-deploying CockroachDB from scratch. @@ -75,20 +74,20 @@ export NATS_REDEPLOY="" # ----- QuestDB ---------------------------------------------------------------- -# If not already set, set the namespace where QuestDB will be deployed. +# Set the namespace where QuestDB will be deployed. export QDB_NAMESPACE="qdb" -# If not already set, set the database username to be used by Monitoring. +# Set the database username to be used for QuestDB. export QDB_USERNAME="admin" -# If not already set, set the database user's password to be used by Monitoring. +# Set the database user's password to be used for QuestDB. export QDB_PASSWORD="quest" -# If not already set, set the table name to be used by Monitoring. -export QDB_TABLE="tfs_monitoring" +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" -## If not already set, disable flag for dropping table if exists. -#export QDB_DROP_TABLE_IF_EXISTS="" +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="" -# If not already set, disable flag for re-deploying QuestDB from scratch. +# Disable flag for re-deploying QuestDB from scratch. export QDB_REDEPLOY="" diff --git a/src/tests/ofc22/descriptors_emulated_xr.json b/src/tests/ofc22/descriptors_emulated_xr.json index d6a2f023422902bfc3d216771092f6081d8cf6b5..b873d31143406a5f6cedbf19c1b357f2223d42d9 100644 --- a/src/tests/ofc22/descriptors_emulated_xr.json +++ b/src/tests/ofc22/descriptors_emulated_xr.json @@ -31,7 +31,10 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"endpoints\": [{\"sample_types\": [], \"type\": \"optical\", \"uuid\": \"13/0/0\"}, {\"sample_types\": [101, 102, 201, 202], \"type\": \"copper\", \"uuid\": \"13/1/2\"}]}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} ]}, "device_operational_status": 1, "device_drivers": [0], @@ -43,7 +46,10 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"endpoints\": [{\"sample_types\": [], \"type\": \"optical\", \"uuid\": \"13/0/0\"}, {\"sample_types\": [101, 102, 201, 202], \"type\": \"copper\", \"uuid\": \"13/1/2\"}]}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} ]}, "device_operational_status": 1, "device_drivers": [0], @@ -55,7 +61,10 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"endpoints\": [{\"sample_types\": [], \"type\": \"optical\", \"uuid\": \"13/0/0\"}, {\"sample_types\": [101, 102, 201, 202], \"type\": \"copper\", \"uuid\": \"13/1/2\"}]}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} ]}, "device_operational_status": 1, "device_drivers": [0], @@ -67,7 +76,10 @@ "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"endpoints\": [{\"sample_types\": [], \"type\": \"optical\", \"uuid\": \"13/0/0\"}, {\"sample_types\": [101, 102, 201, 202], \"type\": \"copper\", \"uuid\": \"13/1/2\"}]}"}} + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "13/0/0", "type": "optical", "sample_types": []}, + {"uuid": "13/1/2", "type": "copper", "sample_types": [101, 102, 201, 202]} + ]}}} ]}, "device_operational_status": 1, "device_drivers": [0], @@ -84,6 +96,18 @@ "device_operational_status": 1, "device_drivers": [6], "device_endpoints": [] + }, + { + "device_id": {"device_uuid": {"uuid": "X2-XR-CONSTELLATION"}}, + "device_type": "xr-constellation", + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.19.219.44"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "443"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": "{\"username\": \"xr-user-1\", \"password\": \"xr-user-1\", \"hub_module_name\": \"XR HUB 2\", \"consistency-mode\": \"lifecycle\"}"}} + ]}, + "device_operational_status": 1, + "device_drivers": [6], + "device_endpoints": [] } ], "links": [ diff --git a/src/tests/ofc22/tests/test_functional_bootstrap.py b/src/tests/ofc22/tests/test_functional_bootstrap.py index ad2d5703a931c933a9ab4e7162dd1985e5a33d9d..ca1882aaa22ff1ac20d0b1927199a6594a6c441a 100644 --- a/src/tests/ofc22/tests/test_functional_bootstrap.py +++ b/src/tests/ofc22/tests/test_functional_bootstrap.py @@ -16,7 +16,7 @@ import logging, time from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId, Empty from common.proto.monitoring_pb2 import KpiDescriptorList -from common.tests.LoadScenario import load_scenario_from_descriptor +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 @@ -33,45 +33,15 @@ def test_scenario_bootstrap( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name ) -> None: - # ----- List entities - Ensure database is empty ------------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == 0 + validate_empty_scenario(context_client) - response = context_client.ListDevices(Empty()) - assert len(response.devices) == 0 - - response = context_client.ListLinks(Empty()) - assert len(response.links) == 0 - - - # ----- Load Scenario ---------------------------------------------------------------------------------------------- - descriptor_loader = load_scenario_from_descriptor( - DESCRIPTOR_FILE, context_client, device_client, None, None) - - - # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, _ in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 - - for context_uuid, _ in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == 0 + 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() - # This scenario assumes no services are created beforehand + # 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/ofc22/tests/test_functional_cleanup.py b/src/tests/ofc22/tests/test_functional_cleanup.py index d38b653b226639d5c8c831872a64ea1f9140ef8f..122526840796310519f8fe0feb8921e51467b21f 100644 --- a/src/tests/ofc22/tests/test_functional_cleanup.py +++ b/src/tests/ofc22/tests/test_functional_cleanup.py @@ -14,8 +14,8 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, DeviceId, Empty, LinkId, TopologyId -from common.tools.descriptor.Loader import DescriptorLoader +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 @@ -27,64 +27,18 @@ LOGGER.setLevel(logging.DEBUG) DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) -def test_services_removed( +def test_scenario_cleanup( context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name ) -> None: - # ----- List entities - Ensure service is removed ------------------------------------------------------------------ - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, _ in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == 0 - - for context_uuid, _ in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == 0 - - # This scenario assumes no services are created beforehand + # 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 - - # ----- Delete Links, Devices, Topologies, Contexts ---------------------------------------------------------------- - for link in descriptor_loader.links: - context_client.RemoveLink(LinkId(**link['link_id'])) - - for device in descriptor_loader.devices: - device_client .DeleteDevice(DeviceId(**device['device_id'])) - - for context_uuid, topology_list in descriptor_loader.topologies.items(): - for topology in topology_list: - context_client.RemoveTopology(TopologyId(**topology['topology_id'])) - - for context in descriptor_loader.contexts: - context_client.RemoveContext(ContextId(**context['context_id'])) - - - # ----- List entities - Ensure database is empty again ------------------------------------------------------------- - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == 0 - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == 0 - - response = context_client.ListLinks(Empty()) - assert len(response.links) == 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/ofc22/tests/test_functional_create_service.py b/src/tests/ofc22/tests/test_functional_create_service.py index 92e0a74f9d291ea49422580fbdfad2c354aeeee2..dd7761f3871db48752f313dc53e8b7d2e2c38489 100644 --- a/src/tests/ofc22/tests/test_functional_create_service.py +++ b/src/tests/ofc22/tests/test_functional_create_service.py @@ -21,7 +21,7 @@ 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 monitoring.client.MonitoringClient import MonitoringClient -from tests.Fixtures import context_client, device_client, monitoring_client # pylint: disable=unused-import +from tests.Fixtures import context_client, monitoring_client # pylint: disable=unused-import from tests.tools.mock_osm.MockOSM import MockOSM from .Fixtures import osm_wim # pylint: disable=unused-import from .Objects import WIM_SERVICE_CONNECTION_POINTS, WIM_SERVICE_TYPE @@ -33,61 +33,27 @@ DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name - # ----- List entities - Ensure scenario is ready ------------------------------------------------------------------- - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() + # Load descriptors and validate the base scenario + descriptor_loader = DescriptorLoader(descriptors_file=DESCRIPTOR_FILE, context_client=context_client) + descriptor_loader.validate() - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == num_services - - for context_uuid, num_slices in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == num_slices - - # This scenario assumes no services are created beforehand + # 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 - - # ----- Create Service --------------------------------------------------------------------------------------------- + # Create Connectivity Service service_uuid = osm_wim.create_connectivity_service(WIM_SERVICE_TYPE, WIM_SERVICE_CONNECTION_POINTS) osm_wim.get_connectivity_service_status(service_uuid) - - # ----- List entities - Ensure service is created ------------------------------------------------------------------ - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links + # Ensure slices and services are created + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.info('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 1 # OSM slice response = context_client.ListServices(ADMIN_CONTEXT_ID) LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) - assert len(response.services) == 2 # OLS & L3NM => (L3NM + TAPI) + assert len(response.services) == 2 # 1xL3NM + 1xTAPI for service in response.services: service_id = service.service_id @@ -104,7 +70,6 @@ def test_service_creation(context_client : ContextClient, osm_wim : MockOSM): # raise Exception('Unexpected ServiceType: {:s}'.format(str_service)) - def test_scenario_kpi_values_created( monitoring_client: MonitoringClient, # pylint: disable=redefined-outer-name ) -> None: diff --git a/src/tests/ofc22/tests/test_functional_delete_service.py b/src/tests/ofc22/tests/test_functional_delete_service.py index 1811f219acf13b5cc17daf39f1931a6f630f997b..4fffc115e6c0ea881dea637dd741f99715d28c6a 100644 --- a/src/tests/ofc22/tests/test_functional_delete_service.py +++ b/src/tests/ofc22/tests/test_functional_delete_service.py @@ -14,10 +14,10 @@ import logging from common.Constants import DEFAULT_CONTEXT_NAME -from common.proto.context_pb2 import ContextId, Empty, ServiceTypeEnum +from common.proto.context_pb2 import ContextId, ServiceTypeEnum from common.tools.descriptor.Loader import DescriptorLoader -from common.tools.object_factory.Context import json_context_id 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 tests.Fixtures import context_client # pylint: disable=unused-import from tests.tools.mock_osm.MockOSM import MockOSM @@ -30,44 +30,27 @@ DESCRIPTOR_FILE = 'ofc22/descriptors_emulated.json' ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # pylint: disable=redefined-outer-name - # ----- List entities - Ensure service is created ------------------------------------------------------------------ - with open(DESCRIPTOR_FILE, 'r', encoding='UTF-8') as f: - descriptors = f.read() - - descriptor_loader = DescriptorLoader(descriptors) - - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links + # Ensure slices and services are created + response = context_client.ListSlices(ADMIN_CONTEXT_ID) + LOGGER.info('Slices[{:d}] = {:s}'.format(len(response.slices), grpc_message_to_json_string(response))) + assert len(response.slices) == 1 # OSM slice - service_uuids = set() response = context_client.ListServices(ADMIN_CONTEXT_ID) LOGGER.info('Services[{:d}] = {:s}'.format(len(response.services), grpc_message_to_json_string(response))) - assert len(response.services) == 2 # OLS & L3NM => (L3NM + TAPI) + assert len(response.services) == 2 # 1xL3NM + 1xTAPI + service_uuids = set() for service in response.services: service_id = service.service_id - - if service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM: - service_uuid = service_id.service_uuid.uuid - service_uuids.add(service_uuid) - osm_wim.conn_info[service_uuid] = {} - response = context_client.ListConnections(service_id) LOGGER.info(' ServiceId[{:s}] => Connections[{:d}] = {:s}'.format( grpc_message_to_json_string(service_id), len(response.connections), grpc_message_to_json_string(response))) if service.service_type == ServiceTypeEnum.SERVICETYPE_L3NM: assert len(response.connections) == 1 # 1 connection per service + service_uuid = service_id.service_uuid.uuid + service_uuids.add(service_uuid) + osm_wim.conn_info[service_uuid] = {} elif service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: assert len(response.connections) == 1 # 1 connection per service else: @@ -78,34 +61,14 @@ def test_service_removal(context_client : ContextClient, osm_wim : MockOSM): # p assert len(service_uuids) == 1 # assume a single L3NM service has been created service_uuid = set(service_uuids).pop() - - # ----- Delete Service --------------------------------------------------------------------------------------------- + # Delete Connectivity Service osm_wim.delete_connectivity_service(service_uuid) - - # ----- List entities - Ensure service is removed ------------------------------------------------------------------ - response = context_client.ListContexts(Empty()) - assert len(response.contexts) == descriptor_loader.num_contexts - - for context_uuid, num_topologies in descriptor_loader.num_topologies.items(): - response = context_client.ListTopologies(ContextId(**json_context_id(context_uuid))) - assert len(response.topologies) == num_topologies - - response = context_client.ListDevices(Empty()) - assert len(response.devices) == descriptor_loader.num_devices - - response = context_client.ListLinks(Empty()) - assert len(response.links) == descriptor_loader.num_links - - for context_uuid, num_services in descriptor_loader.num_services.items(): - response = context_client.ListServices(ContextId(**json_context_id(context_uuid))) - assert len(response.services) == num_services - - for context_uuid, num_slices in descriptor_loader.num_slices.items(): - response = context_client.ListSlices(ContextId(**json_context_id(context_uuid))) - assert len(response.slices) == num_slices - - # This scenario assumes no services are created beforehand + # 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) + descriptor_loader.validate() diff --git a/src/tests/p4/tests/test_functional_bootstrap.py b/src/tests/p4/tests/test_functional_bootstrap.py index 11b24adf137f0b06d1176b440a7fd93b5ad24e80..97269217336986a6a143a4a7ef94bd8b0710e9b0 100644 --- a/src/tests/p4/tests/test_functional_bootstrap.py +++ b/src/tests/p4/tests/test_functional_bootstrap.py @@ -25,6 +25,10 @@ from common.proto.context_pb2 import ConfigActionEnum, Context, ContextId, Devic from device.client.DeviceClient import DeviceClient from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES +from common.tools.object_factory.ConfigRule import ( + json_config_rule_set, json_config_rule_delete) + + LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -48,15 +52,18 @@ def test_prepare_scenario(context_client : ContextClient): # pylint: disable=re context_uuid = context['context_id']['context_uuid']['uuid'] LOGGER.info('Adding Context {:s}'.format(context_uuid)) response = context_client.SetContext(Context(**context)) - assert response.context_uuid.uuid == context_uuid + context_data = context_client.GetContext(response) + assert context_data.name == context_uuid for topology in TOPOLOGIES: context_uuid = topology['topology_id']['context_id']['context_uuid']['uuid'] topology_uuid = topology['topology_id']['topology_uuid']['uuid'] LOGGER.info('Adding Topology {:s}/{:s}'.format(context_uuid, topology_uuid)) response = context_client.SetTopology(Topology(**topology)) - assert response.context_id.context_uuid.uuid == context_uuid - assert response.topology_uuid.uuid == topology_uuid +# assert response.context_id.context_uuid.uuid == context_uuid + + topology_data = context_client.GetTopology(response) + assert topology_data.name == topology_uuid context_id = json_context_id(context_uuid) @@ -81,19 +88,24 @@ def test_devices_bootstraping( device_p4_with_connect_rules = copy.deepcopy(device) device_p4_with_connect_rules['device_config']['config_rules'].extend(connect_rules) + device_p4_with_connect_rules['device_operational_status'] = \ + DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED response = device_client.AddDevice(Device(**device_p4_with_connect_rules)) - assert response.device_uuid.uuid == device_uuid + LOGGER.info('Adding Device {:s}'.format(device_uuid)) device_p4_with_endpoints = copy.deepcopy(device) + device_p4_with_endpoints['device_id']['device_uuid']['uuid'] = response.device_uuid.uuid device_p4_with_endpoints['device_endpoints'].extend(endpoints) + for i in device_p4_with_endpoints['device_endpoints']: + i['endpoint_id']['device_id']['device_uuid']['uuid'] = response.device_uuid.uuid + + LOGGER.info('Adding Endpoints {:s}'.format(device_uuid)) device_client.ConfigureDevice(Device(**device_p4_with_endpoints)) for link in LINKS: link_uuid = link['link_id']['link_uuid']['uuid'] LOGGER.info('Adding Link {:s}'.format(link_uuid)) response = context_client.SetLink(Link(**link)) - assert response.link_uuid.uuid == link_uuid - context_client.SetLink(Link(**link)) def test_devices_bootstrapped(context_client : ContextClient): # pylint: disable=redefined-outer-name # ----- List entities - Ensure bevices are created ----------------------------------------------------------------- diff --git a/src/tests/p4/tests/test_functional_cleanup.py b/src/tests/p4/tests/test_functional_cleanup.py index 852f2a655dd5ba6cc80902a09d3b118b34d8da47..aad56a2104797ed7238241c4d3eda8eab3c1a907 100644 --- a/src/tests/p4/tests/test_functional_cleanup.py +++ b/src/tests/p4/tests/test_functional_cleanup.py @@ -58,7 +58,6 @@ def test_scenario_cleanup( device_uuid = device_id['device_uuid']['uuid'] LOGGER.info('Deleting Device {:s}'.format(device_uuid)) device_client.DeleteDevice(DeviceId(**device_id)) - #expected_events.append(('DeviceEvent', EVENT_REMOVE, json_device_id(device_uuid))) response = context_client.ListDevices(Empty()) assert len(response.devices) == 0 @@ -72,7 +71,6 @@ def test_scenario_cleanup( LOGGER.info('Deleting Topology {:s}/{:s}'.format(context_uuid, topology_uuid)) context_client.RemoveTopology(TopologyId(**topology_id)) context_id = json_context_id(context_uuid) - #expected_events.append(('TopologyEvent', EVENT_REMOVE, json_topology_id(topology_uuid, context_id=context_id))) # ----- Delete Contexts and Validate Collected Events -------------------------------------------------------------- for context in CONTEXTS: @@ -80,4 +78,3 @@ def test_scenario_cleanup( context_uuid = context_id['context_uuid']['uuid'] LOGGER.info('Deleting Context {:s}'.format(context_uuid)) context_client.RemoveContext(ContextId(**context_id)) - #expected_events.append(('ContextEvent', EVENT_REMOVE, json_context_id(context_uuid))) diff --git a/src/tests/p4/tests/test_functional_create_service.py b/src/tests/p4/tests/test_functional_create_service.py index f160d3c6fbe4d560f821d0d70e90a2b3e44e4e8b..76a681eeaff30434663a2391509c3f266e89ecb0 100644 --- a/src/tests/p4/tests/test_functional_create_service.py +++ b/src/tests/p4/tests/test_functional_create_service.py @@ -54,15 +54,6 @@ def service_client(): def test_rules_entry( context_client : ContextClient, device_client : DeviceClient, service_client : ServiceClient): # pylint: disable=redefined-outer-name - - - for device, _, __ in DEVICES: - # Enable device - device_p4_with_operational_status = copy.deepcopy(device) - device_p4_with_operational_status['device_operational_status'] = \ - DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED - device_client.ConfigureDevice(Device(**device_p4_with_operational_status)) - # ----- Create Services --------------------------------------------------------------- for service, endpoints in SERVICES: # Insert Service (table entries) @@ -72,22 +63,3 @@ def test_rules_entry( service_client.CreateService(Service(**service_p4)) service_p4['service_endpoint_ids'].extend(endpoints) service_client.UpdateService(Service(**service_p4)) - - - -""" -con_cl = ContextClient(get_setting('CONTEXTSERVICE_SERVICE_HOST'), get_setting('CONTEXTSERVICE_SERVICE_PORT_GRPC')) -dev_cl = DeviceClient(get_setting('DEVICESERVICE_SERVICE_HOST'), get_setting('DEVICESERVICE_SERVICE_PORT_GRPC')) -srv_cl = ServiceClient(get_setting('SERVICESERVICE_SERVICE_HOST'), get_setting('SERVICESERVICE_SERVICE_PORT_GRPC')) - -for service, endpoints in SERVICES: - service_uuid = service['service_id']['service_uuid']['uuid'] - print('Creating Service {:s}'.format(service_uuid)) - service_p4 = copy.deepcopy(service) - srv_cl.CreateService(Service(**service_p4)) - #service_data = con_cl.GetService(ServiceId(**json_service_id('svc1'))) - #print('service_data = {:s}'.format(grpc_message_to_json_string(service_data))) - service_p4 = copy.deepcopy(service) - service_p4['service_endpoint_ids'].extend(endpoints) - srv_cl.UpdateService(Service(**service_p4)) -""" \ No newline at end of file diff --git a/src/tests/p4/tests/test_functional_delete_service.py b/src/tests/p4/tests/test_functional_delete_service.py index 4d637cf88d840a20f38855beb7839e2b704016d4..c5821df4ccc1caa2a1d72ed98dbfcb82e9db21b1 100644 --- a/src/tests/p4/tests/test_functional_delete_service.py +++ b/src/tests/p4/tests/test_functional_delete_service.py @@ -60,10 +60,3 @@ def test_rules_delete( print('Deleting Service {:s}'.format(service_uuid)) service_p4 = copy.deepcopy(service) response = service_client.DeleteService(ServiceId(**json_service_id(service_uuid, CONTEXT_ID))) - - # ----- Disable Devices --------------------------------------------------------------- - for device, _, _ in DEVICES: - device_p4_with_operational_status = copy.deepcopy(device) - device_p4_with_operational_status['device_operational_status'] = \ - DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED - device_client.ConfigureDevice(Device(**device_p4_with_operational_status)) diff --git a/src/tests/scenario2/deploy_all.sh b/src/tests/scenario2/deploy_all.sh index 19ea0e6db16af66c716927074112da6f18e83b01..541612db431fd73e58fd7c1699df97342c11ea70 100755 --- a/src/tests/scenario2/deploy_all.sh +++ b/src/tests/scenario2/deploy_all.sh @@ -37,20 +37,20 @@ kubectl apply -f nfvsdn22/nginx-ingress-controller-dom4.yaml # Deploy TFS for Domain 1 source nfvsdn22/deploy_specs_dom1.sh -./deploy.sh +./deploy/all.sh mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_dom1.sh # Deploy TFS for Domain 2 source nfvsdn22/deploy_specs_dom2.sh -./deploy.sh +./deploy/all.sh mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_dom2.sh # Deploy TFS for Domain 3 source nfvsdn22/deploy_specs_dom3.sh -./deploy.sh +./deploy/all.sh mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_dom3.sh # Deploy TFS for Domain 4 source nfvsdn22/deploy_specs_dom4.sh -./deploy.sh +./deploy/all.sh mv tfs_runtime_env_vars.sh tfs_runtime_env_vars_dom4.sh diff --git a/src/tests/tools/load_scenario/__main__.py b/src/tests/tools/load_scenario/__main__.py index 3559f778d7cf850c3bbb4f2d516f45f18423d28c..df1d5d8bf3d729a459ab6570e81e6ea05f47c981 100644 --- a/src/tests/tools/load_scenario/__main__.py +++ b/src/tests/tools/load_scenario/__main__.py @@ -13,7 +13,7 @@ # limitations under the License. import logging, sys -from common.tests.LoadScenario import load_scenario_from_descriptor +from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient @@ -29,7 +29,12 @@ def main(): slice_client = SliceClient() LOGGER.info('Loading scenario...') - load_scenario_from_descriptor(sys.argv[1], context_client, device_client, service_client, slice_client) + descriptor_loader = DescriptorLoader( + descriptors_file=sys.argv[1], context_client=context_client, device_client=device_client, + service_client=service_client, slice_client=slice_client) + results = descriptor_loader.process() + check_descriptor_load_results(results, descriptor_loader) + descriptor_loader.validate() LOGGER.info('Done!') return 0 diff --git a/src/tests/tools/mock_sdn_ctrl/service_descriptor.json b/src/tests/tools/mock_sdn_ctrl/service_descriptor.json index a4109bc7b18d2855f97f5bb329d4354a04b31607..2d4ed3eaf1834f24ba966fbcaac523ca9a3afb9a 100644 --- a/src/tests/tools/mock_sdn_ctrl/service_descriptor.json +++ b/src/tests/tools/mock_sdn_ctrl/service_descriptor.json @@ -12,8 +12,8 @@ {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "EXT"}} ], "service_constraints": [ - {"custom": {"constraint_type": "bandwidth[gbps]", "constraint_value": "10.0"}}, - {"custom": {"constraint_type": "latency[ms]", "constraint_value": "15.2"}} + {"sla_capacity": {"capacity_gbps": 10.0}}, + {"sla_latency": {"e2e_latency_ms": 15.2}} ], "service_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "/settings", "resource_value": { diff --git a/src/webui/grafana_dashboard_psql.json b/src/webui/grafana_db_mon_kpis_psql.json similarity index 91% rename from src/webui/grafana_dashboard_psql.json rename to src/webui/grafana_db_mon_kpis_psql.json index ec89c1647cc1086140b0bbd35354546c405ce910..750e5254ea1e4e689d92fc39cedd22a5ee619e03 100644 --- a/src/webui/grafana_dashboard_psql.json +++ b/src/webui/grafana_db_mon_kpis_psql.json @@ -33,7 +33,7 @@ { "datasource": { "type": "postgres", - "uid": "questdb" + "uid": "questdb-mon-kpi" }, "fieldConfig": { "defaults": { @@ -162,14 +162,14 @@ { "datasource": { "type": "postgres", - "uid": "questdb" + "uid": "questdb-mon-kpi" }, "format": "time_series", "group": [], "hide": false, "metricColumn": "kpi_value", "rawQuery": true, - "rawSql": "SELECT\r\n $__time(timestamp), kpi_value AS metric, device_name, endpoint_name, kpi_sample_type\r\nFROM\r\n tfs_monitoring\r\nWHERE\r\n $__timeFilter(timestamp) AND device_name IN (${device_name}) AND endpoint_name IN (${endpoint_name}) AND kpi_sample_type IN (${kpi_sample_type})\r\nGROUP BY\r\n device_name, endpoint_name, kpi_sample_type\r\nORDER BY\r\n timestamp", + "rawSql": "SELECT\r\n $__time(timestamp), kpi_value AS metric, device_name, endpoint_name, kpi_sample_type\r\nFROM\r\n tfs_monitoring_kpis\r\nWHERE\r\n $__timeFilter(timestamp) AND device_name IN (${device_name}) AND endpoint_name IN (${endpoint_name}) AND kpi_sample_type IN (${kpi_sample_type})\r\nGROUP BY\r\n device_name, endpoint_name, kpi_sample_type\r\nORDER BY\r\n timestamp", "refId": "A", "select": [ [ @@ -181,7 +181,7 @@ } ] ], - "table": "monitoring", + "table": "tfs_monitoring_kpis", "timeColumn": "timestamp", "where": [ { @@ -227,16 +227,16 @@ }, "datasource": { "type": "postgres", - "uid": "questdb" + "uid": "questdb-mon-kpi" }, - "definition": "SELECT DISTINCT device_name FROM tfs_monitoring;", + "definition": "SELECT DISTINCT device_name FROM tfs_monitoring_kpis;", "hide": 0, "includeAll": true, "label": "Device", "multi": true, "name": "device_name", "options": [], - "query": "SELECT DISTINCT device_name FROM tfs_monitoring;", + "query": "SELECT DISTINCT device_name FROM tfs_monitoring_kpis;", "refresh": 2, "regex": "", "skipUrlSync": false, @@ -255,16 +255,16 @@ }, "datasource": { "type": "postgres", - "uid": "questdb" + "uid": "questdb-mon-kpi" }, - "definition": "SELECT DISTINCT endpoint_name FROM tfs_monitoring WHERE device_name IN (${device_name})", + "definition": "SELECT DISTINCT endpoint_name FROM tfs_monitoring_kpis WHERE device_name IN (${device_name})", "hide": 0, "includeAll": true, "label": "EndPoint", "multi": true, "name": "endpoint_name", "options": [], - "query": "SELECT DISTINCT endpoint_name FROM tfs_monitoring WHERE device_name IN (${device_name})", + "query": "SELECT DISTINCT endpoint_name FROM tfs_monitoring_kpis WHERE device_name IN (${device_name})", "refresh": 2, "regex": "", "skipUrlSync": false, @@ -283,16 +283,16 @@ }, "datasource": { "type": "postgres", - "uid": "questdb" + "uid": "questdb-mon-kpi" }, - "definition": "SELECT DISTINCT kpi_sample_type FROM tfs_monitoring;", + "definition": "SELECT DISTINCT kpi_sample_type FROM tfs_monitoring_kpis;", "hide": 0, "includeAll": true, "label": "Kpi Sample Type", "multi": true, "name": "kpi_sample_type", "options": [], - "query": "SELECT DISTINCT kpi_sample_type FROM tfs_monitoring;", + "query": "SELECT DISTINCT kpi_sample_type FROM tfs_monitoring_kpis;", "refresh": 2, "regex": "", "skipUrlSync": false, @@ -308,7 +308,7 @@ "timepicker": {}, "timezone": "utc", "title": "L3 Monitoring", - "uid": "tf-l3-monit", + "uid": "tfs-l3-monit", "version": 6, "weekStart": "" } diff --git a/src/webui/grafana_db_slc_grps_psql.json b/src/webui/grafana_db_slc_grps_psql.json new file mode 100644 index 0000000000000000000000000000000000000000..6aa7a478b6a19a83fa1677579163859eca6dd348 --- /dev/null +++ b/src/webui/grafana_db_slc_grps_psql.json @@ -0,0 +1,176 @@ +{"overwrite": true, "folderId": 0, "dashboard": + { + "id": null, + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "questdb-slc-grp" + }, + "gridPos": { + "h": 21, + "w": 11, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "ReferenceLines": [], + "border": { + "color": "yellow", + "size": 0 + }, + "fieldSets": [ + { + "col": 6, + "color": "#C4162A", + "colorCol": 3, + "dotSize": 2, + "hidden": false, + "lineSize": 1, + "lineType": "none", + "polynomialOrder": 3, + "sizeCol": -7 + }, + { + "col": 5, + "color": "#edcd7d", + "colorCol": 3, + "dotSize": 2, + "hidden": false, + "lineSize": 1, + "lineType": "none", + "polynomialOrder": 3, + "sizeCol": -2 + } + ], + "grid": { + "color": "gray" + }, + "label": { + "col": -1, + "color": "#CCC", + "textSize": 2 + }, + "legend": { + "show": false, + "size": 0 + }, + "xAxis": { + "col": 4, + "inverted": false + }, + "xAxisExtents": { + "min": 0, + "max": 100 + }, + "xAxisTitle": { + "text": "Availability %", + "color": "white", + "textSize": 2, + "rotated": false, + "logScale": false, + "fontSize": 4, + "fontColor": "white" + }, + "xMargins": { + "lower": 30, + "upper": 10 + }, + "yAxisExtents": { + "min": 0, + "max": 100 + }, + "yAxisTitle": { + "text": "Capacity Gb/s", + "color": "#ccccdc", + "textSize": 2, + "rotated": true, + "logScale": false, + "fontSize": 4, + "fontColor": "white" + }, + "yMargins": { + "lower": 20, + "upper": 20 + } + }, + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "questdb-slc-grp" + }, + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT timestamp as \"time\", slice_uuid, slice_group, slice_color, slice_availability, slice_capacity, slice_capacity_center, is_deleted\nFROM tfs_slice_groups\nWHERE $__timeFilter(timestamp) AND is_deleted <> 'true';", + "refId": "A", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "column" + } + ] + ], + "table": "tfs_slice_groups", + "timeColumn": "timestamp", + "where": [] + } + ], + "title": "Slice Groups", + "transformations": [], + "type": "michaeldmoore-scatter-panel" + } + ], + "refresh": "5s", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Slice Grouping", + "uid": "tfs-slice-grps", + "version": 2, + "weekStart": "" + } +} diff --git a/src/webui/grafana_backup_dashboard.json b/src/webui/old/grafana_backup_dashboard.json similarity index 100% rename from src/webui/grafana_backup_dashboard.json rename to src/webui/old/grafana_backup_dashboard.json diff --git a/src/webui/grafana_dashboard.json b/src/webui/old/grafana_dashboard.json similarity index 100% rename from src/webui/grafana_dashboard.json rename to src/webui/old/grafana_dashboard.json diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py index d5b40b486dd7772cea29fd7d71db949b2954155c..fca1071419b3b2b61739c2a0d1d8bfa45aba5119 100644 --- a/src/webui/service/__init__.py +++ b/src/webui/service/__init__.py @@ -96,7 +96,9 @@ def create_app(use_config=None, web_app_root=None): app.register_blueprint(link) app.jinja_env.globals.update({ # pylint: disable=no-member + 'enumerate' : enumerate, 'json_to_list' : json_to_list, + 'round' : round, 'get_working_context' : get_working_context, 'get_working_topology': get_working_topology, }) diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index e496c4d432c7c9d02227141ea6d618984378c185..c6bacac9bc1723a020f3057fad9c9e8306c9dbca 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -12,21 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -# external imports from flask_wtf import FlaskForm -from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, Form -from wtforms.validators import DataRequired, Length, NumberRange, Regexp, ValidationError +from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField +from wtforms.validators import DataRequired, Length, NumberRange, ValidationError from common.proto.context_pb2 import DeviceOperationalStatusEnum -from webui.utils.form_validators import key_value_validator class AddDeviceForm(FlaskForm): device_id = StringField('ID', validators=[DataRequired(), Length(min=5)]) - device_type = SelectField('Type', choices = []) - operational_status = SelectField('Operational Status', - # choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')], - coerce=int, - validators=[NumberRange(min=0)]) + device_type = SelectField('Type') + operational_status = SelectField('Operational Status', coerce=int, validators=[NumberRange(min=0)]) device_drivers_undefined = BooleanField('UNDEFINED / EMULATED') device_drivers_openconfig = BooleanField('OPENCONFIG') device_drivers_transport_api = BooleanField('TRANSPORT_API') diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index ce3edcfda45859c3e5db83c62fd328ee546762a5..ebf77a35ffdf9c2546ddbdd1bac0c8c1f54a2b56 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -14,16 +14,14 @@ import json 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, TopologyId) -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Topology import json_topology_id + 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 from device.client.DeviceClient import DeviceClient -from webui.service.device.forms import AddDeviceForm -from common.DeviceTypes import DeviceTypeEnum -from webui.service.device.forms import ConfigForm -from webui.service.device.forms import UpdateDeviceForm +from webui.service.device.forms import AddDeviceForm, ConfigForm, UpdateDeviceForm device = Blueprint('device', __name__, url_prefix='/device') context_client = ContextClient() @@ -39,17 +37,19 @@ def home(): topology_uuid = session['topology_uuid'] context_client.connect() - json_topo_id = json_topology_id(topology_uuid, context_id=json_context_id(context_uuid)) - grpc_topology = context_client.GetTopology(TopologyId(**json_topo_id)) - topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} - grpc_devices: DeviceList = context_client.ListDevices(Empty()) + 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') + devices = [] + else: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + grpc_devices: DeviceList = context_client.ListDevices(Empty()) + devices = [ + device for device in grpc_devices.devices + if device.device_id.device_uuid.uuid in topo_device_uuids + ] context_client.close() - devices = [ - device for device in grpc_devices.devices - if device.device_id.device_uuid.uuid in topo_device_uuids - ] - return render_template( 'device/home.html', devices=devices, dde=DeviceDriverEnum, dose=DeviceOperationalStatusEnum) @@ -71,23 +71,23 @@ def add(): if form.validate_on_submit(): device_obj = Device() # Device UUID: - device_obj.device_id.device_uuid.uuid = form.device_id.data + device_obj.device_id.device_uuid.uuid = form.device_id.data # pylint: disable=no-member # Device type: device_obj.device_type = str(form.device_type.data) # Device configurations: - config_rule = device_obj.device_config.config_rules.add() + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member config_rule.action = ConfigActionEnum.CONFIGACTION_SET config_rule.custom.resource_key = '_connect/address' config_rule.custom.resource_value = form.device_config_address.data - config_rule = device_obj.device_config.config_rules.add() + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member config_rule.action = ConfigActionEnum.CONFIGACTION_SET config_rule.custom.resource_key = '_connect/port' config_rule.custom.resource_value = form.device_config_port.data - config_rule = device_obj.device_config.config_rules.add() + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member config_rule.action = ConfigActionEnum.CONFIGACTION_SET config_rule.custom.resource_key = '_connect/settings' @@ -105,20 +105,22 @@ def add(): device_obj.device_operational_status = form.operational_status.data # Device drivers: + device_drivers = list() if form.device_drivers_undefined.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_UNDEFINED) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_UNDEFINED) if form.device_drivers_openconfig.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG) if form.device_drivers_transport_api.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API) if form.device_drivers_p4.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4) if form.device_drivers_ietf_network_topology.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY) if form.device_drivers_onf_tr_352.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352) if form.device_drivers_xr.data: - device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR) + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR) + device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: device_client.connect() @@ -126,7 +128,7 @@ def add(): device_client.close() flash(f'New device was created with ID "{response.device_uuid.uuid}".', 'success') return redirect(url_for('device.home')) - except Exception as e: + except Exception as e: # pylint: disable=broad-except flash(f'Problem adding the device. {e.details()}', 'danger') return render_template('device/add.html', form=form, @@ -134,14 +136,15 @@ def add(): @device.route('detail/', methods=['GET', 'POST']) def detail(device_uuid: str): - request = DeviceId() - request.device_uuid.uuid = device_uuid context_client.connect() - response = context_client.GetDevice(request) + device_obj = get_device(context_client, device_uuid, rw_copy=False) + if device_obj is None: + flash('Device({:s}) not found'.format(str(device_uuid)), 'danger') + device_obj = Device() context_client.close() - return render_template('device/detail.html', device=response, - dde=DeviceDriverEnum, - dose=DeviceOperationalStatusEnum) + + return render_template( + 'device/detail.html', device=device_obj, dde=DeviceDriverEnum, dose=DeviceOperationalStatusEnum) @device.get('/delete') def delete(device_uuid): @@ -154,13 +157,13 @@ def delete(device_uuid): # TODO: finalize implementation request = DeviceId() - request.device_uuid.uuid = device_uuid + request.device_uuid.uuid = device_uuid # pylint: disable=no-member device_client.connect() - response = device_client.DeleteDevice(request) + device_client.DeleteDevice(request) device_client.close() flash(f'Device "{device_uuid}" deleted successfully!', 'success') - except Exception as e: + except Exception as e: # pylint: disable=broad-except flash(f'Problem deleting device "{device_uuid}": {e.details()}', 'danger') current_app.logger.exception(e) return redirect(url_for('device.home')) @@ -169,25 +172,25 @@ def delete(device_uuid): def addconfig(device_uuid): form = ConfigForm() request = DeviceId() - request.device_uuid.uuid = device_uuid + request.device_uuid.uuid = device_uuid # pylint: disable=no-member context_client.connect() response = context_client.GetDevice(request) context_client.close() if form.validate_on_submit(): - device = Device() - device.CopyFrom(response) - config_rule = device.device_config.config_rules.add() + device_obj = Device() + device_obj.CopyFrom(response) + config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member config_rule.action = ConfigActionEnum.CONFIGACTION_SET config_rule.custom.resource_key = form.device_key_config.data config_rule.custom.resource_value = form.device_value_config.data try: device_client.connect() - response: DeviceId = device_client.ConfigureDevice(device) + response: DeviceId = device_client.ConfigureDevice(device_obj) device_client.close() flash(f'New configuration was created with ID "{response.device_uuid.uuid}".', 'success') return redirect(url_for('device.home')) - except Exception as e: + except Exception as e: # pylint: disable=broad-except flash(f'Problem adding the device. {e.details()}', 'danger') return render_template('device/addconfig.html', form=form, submit_text='Add New Configuration') @@ -203,28 +206,29 @@ def updateconfig(): def update(device_uuid): form = UpdateDeviceForm() request = DeviceId() - request.device_uuid.uuid = device_uuid + request.device_uuid.uuid = device_uuid # pylint: disable=no-member context_client.connect() response = context_client.GetDevice(request) context_client.close() # listing enum values form.update_operational_status.choices = [] - for key, value in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items(): - form.update_operational_status.choices.append((DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', ''))) + for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items(): + item = (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', '')) + form.update_operational_status.choices.append(item) form.update_operational_status.default = response.device_operational_status if form.validate_on_submit(): - device = Device() - device.CopyFrom(response) - device.device_operational_status = form.update_operational_status.data + device_obj = Device() + device_obj.CopyFrom(response) + device_obj.device_operational_status = form.update_operational_status.data try: device_client.connect() - response: DeviceId = device_client.ConfigureDevice(device) + response: DeviceId = device_client.ConfigureDevice(device_obj) device_client.close() flash(f'Status of device with ID "{response.device_uuid.uuid}" was updated.', 'success') return redirect(url_for('device.home')) - except Exception as e: + except Exception as e: # pylint: disable=broad-except flash(f'Problem updating the device. {e.details()}', 'danger') return render_template('device/update.html', device=response, form=form, submit_text='Update Device') diff --git a/src/webui/service/link/routes.py b/src/webui/service/link/routes.py index 9324ad0be6d9e72dfd3413863f0590f6ec595c3b..0fda8958e2ab2609969d2c1f68aaae61b7360b68 100644 --- a/src/webui/service/link/routes.py +++ b/src/webui/service/link/routes.py @@ -14,10 +14,10 @@ from flask import render_template, Blueprint, flash, session, redirect, url_for -from common.proto.context_pb2 import Empty, LinkId, LinkList, TopologyId +from common.proto.context_pb2 import Empty, Link, LinkList from common.tools.context_queries.EndPoint import get_endpoint_names -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.Topology import json_topology_id +from common.tools.context_queries.Link import get_link +from common.tools.context_queries.Topology import get_topology from context.client.ContextClient import ContextClient @@ -33,20 +33,21 @@ def 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() - json_topo_id = json_topology_id(topology_uuid, context_id=json_context_id(context_uuid)) - grpc_topology = context_client.GetTopology(TopologyId(**json_topo_id)) - topo_link_uuids = {link_id.link_uuid.uuid for link_id in grpc_topology.link_ids} - grpc_links: LinkList = context_client.ListLinks(Empty()) - - endpoint_ids = [] - links = [] - for link_ in grpc_links.links: - if link_.link_id.link_uuid.uuid not in topo_link_uuids: continue - links.append(link_) - endpoint_ids.extend(link_.link_endpoint_ids) - - device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + 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: + topo_link_uuids = {link_id.link_uuid.uuid for link_id in grpc_topology.link_ids} + grpc_links: LinkList = context_client.ListLinks(Empty()) + for link_ in grpc_links.links: + if link_.link_id.link_uuid.uuid not in topo_link_uuids: continue + 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('link/home.html', links=links, device_names=device_names, endpoints_data=endpoints_data) @@ -54,10 +55,13 @@ def home(): @link.route('detail/', methods=('GET', 'POST')) def detail(link_uuid: str): - request = LinkId() - request.link_uuid.uuid = link_uuid # pylint: disable=no-member context_client.connect() - response = context_client.GetLink(request) - device_names, endpoints_data = get_endpoint_names(context_client, response.link_endpoint_ids) + link_obj = get_link(context_client, link_uuid, rw_copy=False) + if link_obj is None: + flash('Link({:s}) not found'.format(str(link_uuid)), 'danger') + link_obj = Link() + device_names, endpoints_data = dict(), dict() + 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=response, 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) diff --git a/src/webui/service/load_gen/forms.py b/src/webui/service/load_gen/forms.py new file mode 100644 index 0000000000000000000000000000000000000000..4e0020b04f33152de382f5b93af9735f8d737f92 --- /dev/null +++ b/src/webui/service/load_gen/forms.py @@ -0,0 +1,42 @@ +# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from flask_wtf import FlaskForm +from wtforms import BooleanField, FloatField, IntegerField, StringField, SubmitField +from wtforms.validators import DataRequired, NumberRange + +class LoadGenForm(FlaskForm): + num_requests = IntegerField('Num Requests', default=100, validators=[DataRequired(), NumberRange(min=0)]) + num_generated = IntegerField('Num Generated', default=0, render_kw={'readonly': True}) + + request_type_service_l2nm = BooleanField('Service L2NM', default=False) + request_type_service_l3nm = BooleanField('Service L3NM', default=False) + request_type_service_mw = BooleanField('Service MW', default=False) + request_type_service_tapi = BooleanField('Service TAPI', default=False) + request_type_slice_l2nm = BooleanField('Slice L2NM', default=True) + request_type_slice_l3nm = BooleanField('Slice L3NM', default=False) + + offered_load = FloatField('Offered Load [Erlang]', default=50, validators=[NumberRange(min=0.0)]) + holding_time = FloatField('Holding Time [seconds]', default=10, validators=[NumberRange(min=0.0)]) + inter_arrival_time = FloatField('Inter Arrival Time [seconds]', default=0, validators=[NumberRange(min=0.0)]) + + do_teardown = BooleanField('Do Teardown', default=True) + + record_to_dlt = BooleanField('Record to DLT', default=False) + dlt_domain_id = StringField('DLT Domain Id', default='') + + infinite_loop = BooleanField('Infinite Loop', default=False, render_kw={'disabled': True}) + running = BooleanField('Running', default=False, render_kw={'disabled': True}) + + submit = SubmitField('Start/Stop') diff --git a/src/webui/service/load_gen/routes.py b/src/webui/service/load_gen/routes.py index 3118b6de0e061adac65be178163623cd2d1d8fff..5f47f06b0ff59ad1383aab94caa41adc08440c87 100644 --- a/src/webui/service/load_gen/routes.py +++ b/src/webui/service/load_gen/routes.py @@ -12,34 +12,115 @@ # See the License for the specific language governing permissions and # limitations under the License. -from flask import render_template, Blueprint, flash +from typing import Any, Optional +from flask import redirect, render_template, Blueprint, flash, url_for from common.proto.context_pb2 import Empty +from common.proto.load_generator_pb2 import Parameters, RequestTypeEnum from load_generator.client.LoadGeneratorClient import LoadGeneratorClient +from .forms import LoadGenForm load_gen = Blueprint('load_gen', __name__, url_prefix='/load_gen') -@load_gen.route('start', methods=['GET']) -def start(): +def set_properties(field, data : Any, readonly : Optional[bool] = None, disabled : Optional[bool] = None) -> None: + if not hasattr(field, 'render_kw'): + field.render_kw = dict() + elif field.render_kw is None: + field.render_kw = dict() + + if readonly is not None: + field.render_kw['readonly'] = readonly + if disabled is not None: + field.render_kw['disabled'] = disabled + + if (readonly is not None and readonly) or (disabled is not None and disabled): + field.data = data + +@load_gen.route('home', methods=['GET']) +def home(): load_gen_client = LoadGeneratorClient() - try: - load_gen_client.connect() - load_gen_client.Start(Empty()) - load_gen_client.close() - flash('Load Generator Started.', 'success') - except Exception as e: # pylint: disable=broad-except - flash('Problem starting Load Generator. {:s}'.format(str(e)), 'danger') - return render_template('main/debug.html') + load_gen_client.connect() + status = load_gen_client.GetStatus(Empty()) + load_gen_client.close() + + request_types = status.parameters.request_types + _request_type_service_l2nm = RequestTypeEnum.REQUESTTYPE_SERVICE_L2NM in request_types + _request_type_service_l3nm = RequestTypeEnum.REQUESTTYPE_SERVICE_L3NM in request_types + _request_type_service_mw = RequestTypeEnum.REQUESTTYPE_SERVICE_MW in request_types + _request_type_service_tapi = RequestTypeEnum.REQUESTTYPE_SERVICE_TAPI in request_types + _request_type_slice_l2nm = RequestTypeEnum.REQUESTTYPE_SLICE_L2NM in request_types + _request_type_slice_l3nm = RequestTypeEnum.REQUESTTYPE_SLICE_L3NM in request_types + + _offered_load = round(status.parameters.offered_load , ndigits=4) + _holding_time = round(status.parameters.holding_time , ndigits=4) + _inter_arrival_time = round(status.parameters.inter_arrival_time , ndigits=4) + + form = LoadGenForm() + set_properties(form.num_requests , status.parameters.num_requests , readonly=status.running) + set_properties(form.offered_load , _offered_load , readonly=status.running) + set_properties(form.holding_time , _holding_time , readonly=status.running) + set_properties(form.inter_arrival_time , _inter_arrival_time , readonly=status.running) + set_properties(form.do_teardown , status.parameters.do_teardown , disabled=status.running) + set_properties(form.record_to_dlt , status.parameters.record_to_dlt, disabled=status.running) + set_properties(form.dlt_domain_id , status.parameters.dlt_domain_id, readonly=status.running) + set_properties(form.request_type_service_l2nm, _request_type_service_l2nm , disabled=status.running) + set_properties(form.request_type_service_l3nm, _request_type_service_l3nm , disabled=status.running) + set_properties(form.request_type_service_mw , _request_type_service_mw , disabled=status.running) + set_properties(form.request_type_service_tapi, _request_type_service_tapi , disabled=status.running) + set_properties(form.request_type_slice_l2nm , _request_type_slice_l2nm , disabled=status.running) + set_properties(form.request_type_slice_l3nm , _request_type_slice_l3nm , disabled=status.running) + set_properties(form.num_generated , status.num_generated , disabled=True) + set_properties(form.infinite_loop , status.infinite_loop , disabled=True) + set_properties(form.running , status.running , disabled=True) -@load_gen.route('stop', methods=['GET']) + form.submit.label.text = 'Stop' if status.running else 'Start' + form_action = url_for('load_gen.stop') if status.running else url_for('load_gen.start') + return render_template('load_gen/home.html', form=form, form_action=form_action) + +@load_gen.route('start', methods=['POST']) +def start(): + form = LoadGenForm() + if form.validate_on_submit(): + try: + load_gen_params = Parameters() + load_gen_params.num_requests = form.num_requests.data + load_gen_params.offered_load = form.offered_load.data + load_gen_params.holding_time = form.holding_time.data + load_gen_params.inter_arrival_time = form.inter_arrival_time.data + load_gen_params.do_teardown = form.do_teardown.data + load_gen_params.dry_mode = False + load_gen_params.record_to_dlt = form.record_to_dlt.data + load_gen_params.dlt_domain_id = form.dlt_domain_id.data + + del load_gen_params.request_types[:] # pylint: disable=no-member + request_types = list() + if form.request_type_service_l2nm.data: request_types.append(RequestTypeEnum.REQUESTTYPE_SERVICE_L2NM) + if form.request_type_service_l3nm.data: request_types.append(RequestTypeEnum.REQUESTTYPE_SERVICE_L3NM) + if form.request_type_service_mw .data: request_types.append(RequestTypeEnum.REQUESTTYPE_SERVICE_MW ) + if form.request_type_service_tapi.data: request_types.append(RequestTypeEnum.REQUESTTYPE_SERVICE_TAPI) + if form.request_type_slice_l2nm .data: request_types.append(RequestTypeEnum.REQUESTTYPE_SLICE_L2NM ) + if form.request_type_slice_l3nm .data: request_types.append(RequestTypeEnum.REQUESTTYPE_SLICE_L3NM ) + load_gen_params.request_types.extend(request_types) # pylint: disable=no-member + + load_gen_client = LoadGeneratorClient() + load_gen_client.connect() + load_gen_client.Start(load_gen_params) + load_gen_client.close() + flash('Load Generator Started.', 'success') + except Exception as e: # pylint: disable=broad-except + flash('Problem starting Load Generator. {:s}'.format(str(e)), 'danger') + return redirect(url_for('load_gen.home')) + +@load_gen.route('stop', methods=['POST']) def stop(): - load_gen_client = LoadGeneratorClient() - try: - load_gen_client.connect() - load_gen_client.Stop(Empty()) - load_gen_client.close() - flash('Load Generator Stoped.', 'success') - except Exception as e: # pylint: disable=broad-except - flash('Problem stopping Load Generator. {:s}'.format(str(e)), 'danger') - - return render_template('main/debug.html') + form = LoadGenForm() + if form.validate_on_submit(): + try: + load_gen_client = LoadGeneratorClient() + load_gen_client.connect() + load_gen_client.Stop(Empty()) + load_gen_client.close() + flash('Load Generator Stopped.', 'success') + except Exception as e: # pylint: disable=broad-except + flash('Problem stopping Load Generator. {:s}'.format(str(e)), 'danger') + return redirect(url_for('load_gen.home')) diff --git a/src/webui/service/main/routes.py b/src/webui/service/main/routes.py index 38d13aad562f3e55490952db84ef784f87697739..32cefddf3b2a8251623b60fd9fc039588cd6b9bb 100644 --- a/src/webui/service/main/routes.py +++ b/src/webui/service/main/routes.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import base64, json, logging, re +import base64, json, logging #, re from flask import jsonify, redirect, render_template, Blueprint, flash, session, url_for, request from common.proto.context_pb2 import ContextList, Empty, TopologyId, TopologyList from common.tools.descriptor.Loader import DescriptorLoader, compose_notifications @@ -34,6 +34,8 @@ slice_client = SliceClient() LOGGER = logging.getLogger(__name__) +DESCRIPTOR_LOADER_NUM_WORKERS = 10 + def process_descriptors(descriptors): try: descriptors_file = request.files[descriptors.name] @@ -43,7 +45,7 @@ def process_descriptors(descriptors): flash(f'Unable to load descriptor file: {str(e)}', 'danger') return - descriptor_loader = DescriptorLoader(descriptors) + descriptor_loader = DescriptorLoader(descriptors, num_workers=DESCRIPTOR_LOADER_NUM_WORKERS) results = descriptor_loader.process() for message,level in compose_notifications(results): if level == 'error': LOGGER.warning('ERROR message={:s}'.format(str(message))) @@ -53,7 +55,7 @@ def process_descriptors(descriptors): def home(): context_client.connect() device_client.connect() - context_topology_form: ContextTopologyForm = ContextTopologyForm() + context_topology_form = ContextTopologyForm() context_topology_form.context_topology.choices.append(('', 'Select...')) contexts : ContextList = context_client.ListContexts(Empty()) @@ -85,6 +87,10 @@ def home(): #session['topology_name'] = topology_name MSG = f'Context({context_name})/Topology({topology_name}) successfully selected.' flash(MSG, 'success') + + context_client.close() + device_client.close() + return redirect(url_for('main.home')) #match = re.match('ctx\[([^\]]+)\]\/topo\[([^\]]+)\]', context_topology_uuid) @@ -99,7 +105,7 @@ def home(): if 'context_topology_uuid' in session: context_topology_form.context_topology.data = session['context_topology_uuid'] - descriptor_form: DescriptorForm = DescriptorForm() + descriptor_form = DescriptorForm() try: if descriptor_form.validate_on_submit(): process_descriptors(descriptor_form.descriptors) diff --git a/src/webui/service/service/routes.py b/src/webui/service/service/routes.py index ee9b092ae6828d7e2a82c66b1461c2f90853a803..70a5b5bad41df6520cb2facdad94cfee04f726cd 100644 --- a/src/webui/service/service/routes.py +++ b/src/webui/service/service/routes.py @@ -12,107 +12,287 @@ # See the License for the specific language governing permissions and # limitations under the License. +from contextlib import contextmanager +import json import grpc -from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for -from common.proto.context_pb2 import ContextId, Service, ServiceId, ServiceTypeEnum, ServiceStatusEnum, Connection +from collections import defaultdict +from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for, request +from common.proto.context_pb2 import ( + IsolationLevelEnum, Service, ServiceId, ServiceTypeEnum, ServiceStatusEnum, Connection, Empty, DeviceDriverEnum, ConfigActionEnum, Device, DeviceList) +from common.tools.context_queries.Context import get_context +from common.tools.context_queries.Topology import get_topology from common.tools.context_queries.EndPoint import get_endpoint_names +from common.tools.context_queries.Service import get_service from context.client.ContextClient import ContextClient from service.client.ServiceClient import ServiceClient +from typing import Optional, Set +from common.tools.object_factory.Topology import json_topology_id +from common.tools.object_factory.ConfigRule import json_config_rule_set +from common.tools.object_factory.Context import json_context_id service = Blueprint('service', __name__, url_prefix='/service') context_client = ContextClient() service_client = ServiceClient() +@contextmanager +def connected_client(c): + try: + c.connect() + yield c + finally: + c.close() + +# Context client must be in connected state when calling this function +def get_device_drivers_in_use(topology_uuid: str, context_uuid: str) -> Set[str]: + active_drivers = set() + grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + grpc_devices: DeviceList = context_client.ListDevices(Empty()) + for device in grpc_devices.devices: + if device.device_id.device_uuid.uuid in topo_device_uuids: + for driver in device.device_drivers: + active_drivers.add(DeviceDriverEnum.Name(driver)) + return active_drivers + @service.get('/') def home(): - # flash('This is an info message', 'info') - # flash('This is a danger message', 'danger') - - context_uuid = session.get('context_uuid', '-') - if context_uuid == "-": + if 'context_uuid' not in session or 'topology_uuid' not in session: flash("Please select a context!", "warning") return redirect(url_for("main.home")) - request = ContextId() - request.context_uuid.uuid = context_uuid + context_uuid = session['context_uuid'] + topology_uuid = session['topology_uuid'] + context_client.connect() - try: - service_list = context_client.ListServices(request) - # print(service_list) - services = service_list.services - context_found = True - except grpc.RpcError as e: - if e.code() != grpc.StatusCode.NOT_FOUND: raise - if e.details() != 'Context({:s}) not found'.format(context_uuid): raise - services = [] - context_found = False - - if context_found: - endpoint_ids = [] - for service_ in services: - endpoint_ids.extend(service_.service_endpoint_ids) - device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + + context_obj = get_context(context_client, context_uuid, rw_copy=False) + if context_obj is None: + flash('Context({:s}) not found'.format(str(context_uuid)), 'danger') + services, device_names, endpoints_data = list(), list(), list() else: - device_names, endpoints_data = [],[] + try: + services = context_client.ListServices(context_obj.context_id) + services = services.services + active_drivers = get_device_drivers_in_use(topology_uuid, context_uuid) + except grpc.RpcError as e: + if e.code() != grpc.StatusCode.NOT_FOUND: raise + if e.details() != 'Context({:s}) not found'.format(context_uuid): raise + services, device_names, endpoints_data = list(), dict(), dict() + active_drivers = set() + else: + endpoint_ids = list() + for service_ in services: + endpoint_ids.extend(service_.service_endpoint_ids) + device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) context_client.close() return render_template( 'service/home.html', services=services, device_names=device_names, endpoints_data=endpoints_data, - context_not_found=not context_found, ste=ServiceTypeEnum, sse=ServiceStatusEnum) + ste=ServiceTypeEnum, sse=ServiceStatusEnum, active_drivers=active_drivers) @service.route('add', methods=['GET', 'POST']) def add(): flash('Add service route called', 'danger') raise NotImplementedError() - return render_template('service/home.html') + #return render_template('service/home.html') + + +def get_hub_module_name(dev: Device) -> Optional[str]: + for cr in dev.device_config.config_rules: + if cr.action == ConfigActionEnum.CONFIGACTION_SET and cr.custom and cr.custom.resource_key == "_connect/settings": + try: + cr_dict = json.loads(cr.custom.resource_value) + if "hub_module_name" in cr_dict: + return cr_dict["hub_module_name"] + except json.JSONDecodeError: + pass + return None + +@service.route('add-xr', methods=['GET', 'POST']) +def add_xr(): + ### FIXME: copypaste + 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() + 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') + return redirect(url_for("main.home")) + else: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + grpc_devices= context_client.ListDevices(Empty()) + devices = [ + device for device in grpc_devices.devices + if device.device_id.device_uuid.uuid in topo_device_uuids and DeviceDriverEnum.DEVICEDRIVER_XR in device.device_drivers + ] + devices.sort(key=lambda dev: dev.name) + hub_interfaces_by_device = defaultdict(list) + leaf_interfaces_by_device = defaultdict(list) + constellation_name_to_uuid = {} + dev_ep_to_uuid = {} + ep_uuid_to_name = {} + for d in devices: + constellation_name_to_uuid[d.name] = d.device_id.device_uuid.uuid + hm_name = get_hub_module_name(d) + if hm_name is not None: + hm_if_prefix= hm_name + "|" + for ep in d.device_endpoints: + dev_ep_to_uuid[(d.name, ep.name)] = ep.endpoint_id.endpoint_uuid.uuid + if ep.name.startswith(hm_if_prefix): + hub_interfaces_by_device[d.name].append(ep.name) + else: + leaf_interfaces_by_device[d.name].append(ep.name) + ep_uuid_to_name[ep.endpoint_id.endpoint_uuid.uuid] = (d.name, ep.name) + hub_interfaces_by_device[d.name].sort() + leaf_interfaces_by_device[d.name].sort() + + # Find out what endpoints are already used so that they can be disabled + # in the create screen + context_obj = get_context(context_client, context_uuid, rw_copy=False) + if context_obj is None: + flash('Context({:s}) not found'.format(str(context_uuid)), 'danger') + return redirect(request.url) + + services = context_client.ListServices(context_obj.context_id) + ep_used_by={} + for service in services.services: + if service.service_type == ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE: + for ep in service.service_endpoint_ids: + ep_uuid = ep.endpoint_uuid.uuid + if ep_uuid in ep_uuid_to_name: + dev_name, ep_name = ep_uuid_to_name[ep_uuid] + ep_used_by[f"{ep_name}@{dev_name}"] = service.name + + context_client.close() + + if request.method != 'POST': + return render_template('service/add-xr.html', devices=devices, hub_if=hub_interfaces_by_device, leaf_if=leaf_interfaces_by_device, ep_used_by=ep_used_by) + else: + service_name = request.form["service_name"] + if service_name == "": + flash(f"Service name must be specified", 'danger') + + constellation = request.form["constellation"] + constellation_uuid = constellation_name_to_uuid.get(constellation, None) + if constellation_uuid is None: + flash(f"Invalid constellation \"{constellation}\"", 'danger') + + hub_if = request.form["hubif"] + hub_if_uuid = dev_ep_to_uuid.get((constellation, hub_if), None) + if hub_if_uuid is None: + flash(f"Invalid hub interface \"{hub_if}\"", 'danger') + + leaf_if = request.form["leafif"] + leaf_if_uuid = dev_ep_to_uuid.get((constellation, leaf_if), None) + if leaf_if_uuid is None: + flash(f"Invalid leaf interface \"{leaf_if}\"", 'danger') + + if service_name == "" or constellation_uuid is None or hub_if_uuid is None or leaf_if_uuid is None: + return redirect(request.url) + + + json_context_uuid=json_context_id(context_uuid) + sr = { + "name": service_name, + "service_id": { + "context_id": {"context_uuid": {"uuid": context_uuid}}, + "service_uuid": {"uuid": service_name} + }, + 'service_type' : ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, + "service_endpoint_ids": [ + {'device_id': {'device_uuid': {'uuid': constellation_uuid}}, 'endpoint_uuid': {'uuid': hub_if_uuid}, 'topology_id': json_topology_id("admin", context_id=json_context_uuid)}, + {'device_id': {'device_uuid': {'uuid': constellation_uuid}}, 'endpoint_uuid': {'uuid': leaf_if_uuid}, 'topology_id': json_topology_id("admin", context_id=json_context_uuid)} + ], + 'service_status' : {'service_status': ServiceStatusEnum.SERVICESTATUS_PLANNED}, + 'service_constraints' : [], + } + + json_tapi_settings = { + 'capacity_value' : 50.0, + 'capacity_unit' : 'GHz', + 'layer_proto_name': 'PHOTONIC_MEDIA', + 'layer_proto_qual': 'tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC', + 'direction' : 'UNIDIRECTIONAL', + } + config_rule = json_config_rule_set('/settings', json_tapi_settings) + + with connected_client(service_client) as sc: + endpoints, sr['service_endpoint_ids'] = sr['service_endpoint_ids'], [] + try: + create_response = sc.CreateService(Service(**sr)) + except Exception as e: + flash(f'Failure to update service name {service_name} with endpoints and configuration, exception {str(e)}', 'danger') + return redirect(request.url) + + sr['service_endpoint_ids'] = endpoints + sr['service_config'] = {'config_rules': [config_rule]} + + try: + update_response = sc.UpdateService(Service(**sr)) + flash(f'Created service {update_response.service_uuid.uuid}', 'success') + except Exception as e: + flash(f'Failure to update service {create_response.service_uuid.uuid} with endpoints and configuration, exception {str(e)}', 'danger') + return redirect(request.url) + + return redirect(url_for('service.home')) @service.get('/detail') def detail(service_uuid: str): - context_uuid = session.get('context_uuid', '-') - if context_uuid == "-": + if 'context_uuid' not in session or 'topology_uuid' not in session: flash("Please select a context!", "warning") return redirect(url_for("main.home")) - - request: ServiceId = ServiceId() - request.service_uuid.uuid = service_uuid - request.context_id.context_uuid.uuid = context_uuid + context_uuid = session['context_uuid'] + try: context_client.connect() - response: Service = context_client.GetService(request) - connections: Connection = context_client.ListConnections(request) - connections = connections.connections - endpoint_ids = [] - endpoint_ids.extend(response.service_endpoint_ids) - for connection in connections: - endpoint_ids.extend(connection.path_hops_endpoint_ids) - device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + endpoint_ids = list() + service_obj = get_service(context_client, service_uuid, rw_copy=False) + if service_obj is None: + flash('Context({:s})/Service({:s}) not found'.format(str(context_uuid), str(service_uuid)), 'danger') + service_obj = Service() + else: + endpoint_ids.extend(service_obj.service_endpoint_ids) + connections: Connection = context_client.ListConnections(service_obj.service_id) + connections = connections.connections + for connection in connections: endpoint_ids.extend(connection.path_hops_endpoint_ids) + + if len(endpoint_ids) > 0: + device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + else: + device_names, endpoints_data = dict(), dict() context_client.close() + + return render_template( + 'service/detail.html', service=service_obj, connections=connections, device_names=device_names, + endpoints_data=endpoints_data, ste=ServiceTypeEnum, sse=ServiceStatusEnum, ile=IsolationLevelEnum) except Exception as e: flash('The system encountered an error and cannot show the details of this service.', 'warning') current_app.logger.exception(e) return redirect(url_for('service.home')) - return render_template( - 'service/detail.html', service=response, connections=connections, device_names=device_names, - endpoints_data=endpoints_data, ste=ServiceTypeEnum, sse=ServiceStatusEnum) @service.get('/delete') def delete(service_uuid: str): - context_uuid = session.get('context_uuid', '-') - if context_uuid == "-": + 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'] try: request = ServiceId() request.service_uuid.uuid = service_uuid request.context_id.context_uuid.uuid = context_uuid service_client.connect() - response = service_client.DeleteService(request) + service_client.DeleteService(request) service_client.close() flash('Service "{:s}" deleted successfully!'.format(service_uuid), 'success') diff --git a/src/webui/service/slice/routes.py b/src/webui/service/slice/routes.py index 222508418a187bcab18f7d44fccf896c917c6821..cd1b672d5c1014b0e8aa301ed7b5a1f6d910f6df 100644 --- a/src/webui/service/slice/routes.py +++ b/src/webui/service/slice/routes.py @@ -11,11 +11,13 @@ # 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 grpc from flask import current_app, redirect, render_template, Blueprint, flash, session, url_for -from common.proto.context_pb2 import ContextId, Slice, SliceId, SliceStatusEnum +from common.proto.context_pb2 import IsolationLevelEnum, Slice, SliceId, SliceStatusEnum +from common.tools.context_queries.Context import get_context from common.tools.context_queries.EndPoint import get_endpoint_names +from common.tools.context_queries.Slice import get_slice from context.client.ContextClient import ContextClient from slice.client.SliceClient import SliceClient @@ -26,92 +28,88 @@ slice_client = SliceClient() @slice.get('/') def home(): - context_uuid = session.get('context_uuid', '-') - if context_uuid == "-": + if 'context_uuid' not in session or 'topology_uuid' not in session: flash("Please select a context!", "warning") return redirect(url_for("main.home")) - request = ContextId() - request.context_uuid.uuid = context_uuid + context_uuid = session['context_uuid'] + context_client.connect() - try: - slice_list = context_client.ListSlices(request) - slices = slice_list.slices - context_found = True - except grpc.RpcError as e: - if e.code() != grpc.StatusCode.NOT_FOUND: raise - if e.details() != 'Context({:s}) not found'.format(context_uuid): raise - slices = [] - context_found = False - - if context_found: - endpoint_ids = [] - for slice_ in slices: - endpoint_ids.extend(slice_.slice_endpoint_ids) - device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + + context_obj = get_context(context_client, context_uuid, rw_copy=False) + if context_obj is None: + flash('Context({:s}) not found'.format(str(context_uuid)), 'danger') + device_names, endpoints_data = list(), list() else: - device_names, endpoints_data = [],[] + try: + slices = context_client.ListSlices(context_obj.context_id) + slices = slices.slices + except grpc.RpcError as e: + if e.code() != grpc.StatusCode.NOT_FOUND: raise + if e.details() != 'Context({:s}) not found'.format(context_uuid): raise + slices, device_names, endpoints_data = list(), dict(), dict() + else: + endpoint_ids = list() + for slice_ in slices: + endpoint_ids.extend(slice_.slice_endpoint_ids) + device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) context_client.close() - return render_template( 'slice/home.html', slices=slices, device_names=device_names, endpoints_data=endpoints_data, - context_not_found=not context_found, sse=SliceStatusEnum) + sse=SliceStatusEnum) @slice.route('add', methods=['GET', 'POST']) def add(): flash('Add slice route called', 'danger') raise NotImplementedError() - return render_template('slice/home.html') + #return render_template('slice/home.html') @slice.get('/detail') def detail(slice_uuid: str): - context_uuid = session.get('context_uuid', '-') - if context_uuid == "-": + if 'context_uuid' not in session or 'topology_uuid' not in session: flash("Please select a context!", "warning") return redirect(url_for("main.home")) - - request: SliceId = SliceId() - request.slice_uuid.uuid = slice_uuid - request.context_id.context_uuid.uuid = context_uuid - req = ContextId() - req.context_uuid.uuid = context_uuid + context_uuid = session['context_uuid'] + try: context_client.connect() - response: Slice = context_client.GetSlice(request) - services = context_client.ListServices(req) - endpoint_ids = [] - endpoint_ids.extend(response.slice_endpoint_ids) - device_names, endpoints_data = get_endpoint_names(context_client, endpoint_ids) + slice_obj = get_slice(context_client, slice_uuid, rw_copy=False) + if slice_obj is None: + flash('Context({:s})/Slice({:s}) not found'.format(str(context_uuid), str(slice_uuid)), 'danger') + slice_obj = Slice() + else: + device_names, endpoints_data = get_endpoint_names(context_client, slice_obj.slice_endpoint_ids) context_client.close() + + return render_template( + 'slice/detail.html', slice=slice_obj, device_names=device_names, endpoints_data=endpoints_data, + sse=SliceStatusEnum, ile=IsolationLevelEnum) except Exception as e: flash('The system encountered an error and cannot show the details of this slice.', 'warning') current_app.logger.exception(e) return redirect(url_for('slice.home')) - return render_template( - 'slice/detail.html', slice=response, device_names=device_names, endpoints_data=endpoints_data, - sse=SliceStatusEnum, services=services) - -#@slice.get('/delete') -#def delete(slice_uuid: str): -# context_uuid = session.get('context_uuid', '-') -# if context_uuid == "-": -# flash("Please select a context!", "warning") -# return redirect(url_for("main.home")) -# -# try: -# request = SliceId() -# request.slice_uuid.uuid = slice_uuid -# request.context_id.context_uuid.uuid = context_uuid -# slice_client.connect() -# response = slice_client.DeleteSlice(request) -# slice_client.close() -# -# flash('Slice "{:s}" deleted successfully!'.format(slice_uuid), 'success') -# except Exception as e: -# flash('Problem deleting slice "{:s}": {:s}'.format(slice_uuid, str(e.details())), 'danger') -# current_app.logger.exception(e) -# return redirect(url_for('slice.home')) + +@slice.get('/delete') +def delete(slice_uuid: str): + 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'] + + try: + request = SliceId() + request.slice_uuid.uuid = slice_uuid + request.context_id.context_uuid.uuid = context_uuid + slice_client.connect() + slice_client.DeleteSlice(request) + slice_client.close() + + flash('Slice "{:s}" deleted successfully!'.format(slice_uuid), 'success') + except Exception as e: + flash('Problem deleting slice "{:s}": {:s}'.format(slice_uuid, str(e.details())), 'danger') + current_app.logger.exception(e) + return redirect(url_for('slice.home')) diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index 0aa022f1453eaa33a67212174cf9687a942b10f0..1dfa3687198d8a33db346ba2bbcd2989f6f109bb 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -86,10 +86,16 @@ - + diff --git a/src/webui/service/templates/load_gen/home.html b/src/webui/service/templates/load_gen/home.html new file mode 100644 index 0000000000000000000000000000000000000000..d58f42601925ca438ab9d9f20b32f94960b5cada --- /dev/null +++ b/src/webui/service/templates/load_gen/home.html @@ -0,0 +1,155 @@ + + +{% extends 'base.html' %} + +{% block content %} +

Load Generator

+
+ +
+ {{ form.hidden_tag() }} +
+
+ {{ form.num_requests.label(class="col-sm-2 col-form-label") }} +
+ {% if form.num_requests.errors %} + {{ form.num_requests(class="form-control is-invalid") }} +
+ {% for error in form.num_requests.errors %}{{ error }}{% endfor %} +
+ {% else %} + {{ form.num_requests(class="form-control") }} + {% endif %} +
+
+
+ +
+ {{ form.num_generated.label(class="col-sm-2 col-form-label") }} +
+ {% if form.num_generated.errors %} + {{ form.num_generated(class="form-control is-invalid") }} +
+ {% for error in form.num_generated.errors %}{{ error }}{% endfor %} +
+ {% else %} + {{ form.num_generated(class="form-control") }} + {% endif %} +
+
+
+ +
+
Service Types:
+
+ {{ form.request_type_slice_l2nm }} {{ form.request_type_slice_l2nm .label(class="col-sm-3 col-form-label") }} + {{ form.request_type_slice_l3nm }} {{ form.request_type_slice_l3nm .label(class="col-sm-3 col-form-label") }} +
+ {{ form.request_type_service_l2nm }} {{ form.request_type_service_l2nm.label(class="col-sm-3 col-form-label") }} + {{ form.request_type_service_l3nm }} {{ form.request_type_service_l3nm.label(class="col-sm-3 col-form-label") }} +
+ {{ form.request_type_service_mw }} {{ form.request_type_service_mw .label(class="col-sm-3 col-form-label") }} + {{ form.request_type_service_tapi }} {{ form.request_type_service_tapi.label(class="col-sm-3 col-form-label") }} +
+
+
+ +
+ {{ form.offered_load.label(class="col-sm-2 col-form-label") }} +
+ {% if form.offered_load.errors %} + {{ form.offered_load(class="form-control is-invalid") }} +
+ {% for error in form.offered_load.errors %}{{ error }}{% endfor %} +
+ {% else %} + {{ form.offered_load(class="form-control") }} + {% endif %} +
+
+
+ +
+ {{ form.holding_time.label(class="col-sm-2 col-form-label") }} +
+ {% if form.holding_time.errors %} + {{ form.holding_time(class="form-control is-invalid") }} +
+ {% for error in form.holding_time.errors %}{{ error }}{% endfor %} +
+ {% else %} + {{ form.holding_time(class="form-control") }} + {% endif %} +
+
+
+ +
+ {{ form.inter_arrival_time.label(class="col-sm-2 col-form-label") }} +
+ {% if form.inter_arrival_time.errors %} + {{ form.inter_arrival_time(class="form-control is-invalid") }} +
+ {% for error in form.inter_arrival_time.errors %}{{ error }}{% endfor %} +
+ {% else %} + {{ form.inter_arrival_time(class="form-control") }} + {% endif %} +
+
+
+ +
+
+ {{ form.do_teardown }} {{ form.do_teardown.label(class="col-sm-3 col-form-label") }}
+
+
+
+ +
+
DLT Settings:
+
+ {{ form.record_to_dlt }} {{ form.record_to_dlt.label(class="col-sm-3 col-form-label") }}
+ {{ form.dlt_domain_id.label(class="col-sm-2 col-form-label") }} + {% if form.dlt_domain_id.errors %} + {{ form.dlt_domain_id(class="form-control is-invalid") }} +
+ {% for error in form.dlt_domain_id.errors %}{{ error }}{% endfor %} +
+ {% else %} + {{ form.dlt_domain_id(class="form-control") }} + {% endif %} +
+
+
+ +
+
Status:
+
+ {{ form.infinite_loop }} {{ form.infinite_loop.label(class="col-sm-3 col-form-label") }} + {{ form.running }} {{ form.running.label(class="col-sm-3 col-form-label") }} +
+
+
+ +
+ {{ form.submit(class="btn btn-primary") }} +
+
+
+ +{% endblock %} diff --git a/src/webui/service/templates/main/debug.html b/src/webui/service/templates/main/debug.html index 11a868fdff9f5ee1bcbf22936ae0283d4ccc5715..eef42ae9a9f4cf386d26da0449681bab75f33b41 100644 --- a/src/webui/service/templates/main/debug.html +++ b/src/webui/service/templates/main/debug.html @@ -17,26 +17,12 @@ {% extends 'base.html' %} {% block content %} -

Debug

+

Debug API

- - -

Load Generator:

- Start - Stop + {% endblock %} diff --git a/src/webui/service/templates/service/add-xr.html b/src/webui/service/templates/service/add-xr.html new file mode 100644 index 0000000000000000000000000000000000000000..36fe132caa7df1e3c72fa09ff2c39e2a92a7a357 --- /dev/null +++ b/src/webui/service/templates/service/add-xr.html @@ -0,0 +1,105 @@ + + +{% extends 'base.html' %} + +{% block content %} + + +

Add XR Service

+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+{% endblock %} diff --git a/src/webui/service/templates/service/detail.html b/src/webui/service/templates/service/detail.html index b2160695173064b9863834a4d42c60a69cc913ba..bee2e93c53896a8eeac826703a60afe02a5aa825 100644 --- a/src/webui/service/templates/service/detail.html +++ b/src/webui/service/templates/service/detail.html @@ -36,7 +36,8 @@
@@ -87,7 +88,7 @@ Kind - Type + Key/Type Value @@ -135,15 +136,43 @@ {{ constraint.endpoint_priority.priority }} + {% elif constraint.WhichOneof('constraint')=='sla_capacity' %} + + SLA Capacity + - + + {{ round(constraint.sla_capacity.capacity_gbps, ndigits=2) }} Gbps + + + {% elif constraint.WhichOneof('constraint')=='sla_latency' %} + + SLA E2E Latency + - + + {{ round(constraint.sla_latency.e2e_latency_ms, ndigits=2) }} ms + + {% elif constraint.WhichOneof('constraint')=='sla_availability' %} SLA Availability - + {{ round(constraint.sla_availability.availability, ndigits=5) }} %; {{ constraint.sla_availability.num_disjoint_paths }} disjoint paths; {% if constraint.sla_availability.all_active %}all{% else %}single{% endif %}-active + {% elif constraint.WhichOneof('constraint')=='sla_isolation' %} + + SLA Isolation + - + + {% for i,isolation_level in enumerate(constraint.sla_isolation.isolation_level) %} + {% if i > 0 %}, {% endif %} + {{ ile.Name(isolation_level) }} + {% endfor %} + + {% else %} - @@ -185,34 +214,12 @@ {% endfor %} - - - - + @@ -258,8 +265,26 @@
Connection IdSub-serviceSub-Service Path
+ + - - - -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/webui/service/templates/service/home.html b/src/webui/service/templates/service/home.html index 79b55c962dcdd0af4a380928c180f6c9def75ba7..00feaff59128dd026ab2bdb369229a9d0aaae805 100644 --- a/src/webui/service/templates/service/home.html +++ b/src/webui/service/templates/service/home.html @@ -26,6 +26,18 @@ Add New Service --> + + + {% if "DEVICEDRIVER_XR" in active_drivers %} + + {% endif %} +
{{ services | length }} services found in context {{ session['context_uuid'] }}
diff --git a/src/webui/service/templates/slice/detail.html b/src/webui/service/templates/slice/detail.html index 390f882d7058b825ecf9d2bce5689585f99b80aa..8f223e44deda37b177a360a51b1e366f680fac27 100644 --- a/src/webui/service/templates/slice/detail.html +++ b/src/webui/service/templates/slice/detail.html @@ -32,14 +32,14 @@ Update - -
--> +
--> +
-
@@ -88,7 +88,7 @@ Kind - Type + Key/Type Value @@ -136,15 +136,43 @@ {{ constraint.endpoint_priority.priority }} + {% elif constraint.WhichOneof('constraint')=='sla_capacity' %} + + SLA Capacity + - + + {{ round(constraint.sla_capacity.capacity_gbps, ndigits=2) }} Gbps + + + {% elif constraint.WhichOneof('constraint')=='sla_latency' %} + + SLA E2E Latency + - + + {{ round(constraint.sla_latency.e2e_latency_ms, ndigits=2) }} ms + + {% elif constraint.WhichOneof('constraint')=='sla_availability' %} SLA Availability - + {{ round(constraint.sla_availability.availability, ndigits=5) }} %; {{ constraint.sla_availability.num_disjoint_paths }} disjoint paths; {% if constraint.sla_availability.all_active %}all{% else %}single{% endif %}-active + {% elif constraint.WhichOneof('constraint')=='sla_isolation' %} + + SLA Isolation + - + + {% for i,isolation_level in enumerate(constraint.sla_isolation.isolation_level) %} + {% if i > 0 %}, {% endif %} + {{ ile.Name(isolation_level) }} + {% endfor %} + + {% else %} - @@ -191,7 +219,7 @@ - + @@ -219,7 +247,7 @@
Service IdSub-Services
- + @@ -244,4 +272,27 @@
Sub-slicesSub-Slices
-{% endblock %} \ No newline at end of file + + + + +{% endblock %}