diff --git a/src/tests/sns4sns24/01-tfs-topology.json b/src/tests/sns4sns24/01-tfs-topology.json new file mode 100644 index 0000000000000000000000000000000000000000..c3b95a69b7a8e5138a0cc3889d218bfdfde4f11b --- /dev/null +++ b/src/tests/sns4sns24/01-tfs-topology.json @@ -0,0 +1,102 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "core-net"}}, "device_type": "network", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "int", "type": "copper"}, + {"uuid": "eth1", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "edge-net"}}, "device_type": "network", + "device_drivers": ["DEVICEDRIVER_UNDEFINED"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "int", "type": "copper"}, + {"uuid": "eth1", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router", + "device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"], + "device_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, + {"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "use_tls": false + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==core-net/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "core-net/eth1==r1/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet10==edge-net/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "edge-net/eth1==r2/Ethernet10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + } + ] +} diff --git a/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json b/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json new file mode 100644 index 0000000000000000000000000000000000000000..31d7e0a6d1636af4572b10dd07cecc9a2aedeb9d --- /dev/null +++ b/src/tests/sns4sns24/02-ietf-l3vpn-nbi.json @@ -0,0 +1,83 @@ +{ + "ietf-l3vpn-svc:l3vpn-svc": { + "vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-edge-core"}]}, + "sites": { + "site": [ + { + "site-id": "site_core-net", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "core-net"}]}, + "devices": {"device": [{"device-id": "core-net", "location": "core-net"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "int", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "core-net", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:spoke-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "10.10.10.229", + "customer-address": "10.10.10.0", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + }, + { + "site-id": "site_edge-net", + "management": {"type": "ietf-l3vpn-svc:provider-managed"}, + "locations": {"location": [{"location-id": "edge-net"}]}, + "devices": {"device": [{"device-id": "edge-net", "location": "edge-net"}]}, + "site-network-accesses": { + "site-network-access": [ + { + "site-network-access-id": "int", + "site-network-access-type": "ietf-l3vpn-svc:multipoint", + "device-reference": "edge-net", + "vpn-attachment": {"vpn-id": "ietf-l3vpn-edge-core", "site-role": "ietf-l3vpn-svc:hub-role"}, + "ip-connection": { + "ipv4": { + "address-allocation-type": "ietf-l3vpn-svc:static-address", + "addresses": { + "provider-address": "10.158.72.229", + "customer-address": "10.158.72.0", + "prefix-length": 24 + } + } + }, + "service": { + "svc-mtu": 1500, + "svc-input-bandwidth": 1000000000, + "svc-output-bandwidth": 1000000000, + "qos": {"qos-profile": {"classes": {"class": [{ + "class-id": "qos-realtime", + "direction": "ietf-l3vpn-svc:both", + "latency": {"latency-boundary": 10}, + "bandwidth": {"guaranteed-bw-percent": 100} + }]}}} + } + } + ] + } + } + ] + } + } +} diff --git a/src/tests/sns4sns24/02-tfs-l3-service.json b/src/tests/sns4sns24/02-tfs-l3-service.json new file mode 100644 index 0000000000000000000000000000000000000000..1fcd0267b8279a218fea0cded4263323577fec1c --- /dev/null +++ b/src/tests/sns4sns24/02-tfs-l3-service.json @@ -0,0 +1,34 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "core-to-edge-l2svc"} + }, + "service_type": "SERVICETYPE_L3NM", + "service_status": {"service_status": "SERVICESTATUS_PLANNED"}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "core-net"}}, "endpoint_uuid": {"uuid": "int"}}, + {"device_id": {"device_uuid": {"uuid": "edge-net"}}, "endpoint_uuid": {"uuid": "int"}} + ], + "service_constraints": [], + "service_config": {"config_rules": [ + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[core-net]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "10.10.10.0", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[r1]/endpoint[Ethernet10]/settings", + "resource_value": {"address_ip": "10.10.10.229", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[r2]/endpoint[Ethernet10]/settings", + "resource_value": {"address_ip": "10.158.72.229", "address_prefix": 24, "index": 0} + }}, + {"action": "CONFIGACTION_SET", "custom": { + "resource_key": "/device[edge-net]/endpoint[eth1]/settings", + "resource_value": {"address_ip": "10.158.72.0", "address_prefix": 24, "index": 0} + }} + ]} + } + ] +} diff --git a/src/tests/sns4sns24/clab-cli-r1.sh b/src/tests/sns4sns24/clab-cli-r1.sh new file mode 100755 index 0000000000000000000000000000000000000000..2a88706341ddbfcac028c0183e88ee39c3c4e375 --- /dev/null +++ b/src/tests/sns4sns24/clab-cli-r1.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker exec -it clab-sns4sns-r1 Cli diff --git a/src/tests/sns4sns24/clab-cli-r2.sh b/src/tests/sns4sns24/clab-cli-r2.sh new file mode 100755 index 0000000000000000000000000000000000000000..a24aa63b0be30cc1a3900deb9f605606197f85ab --- /dev/null +++ b/src/tests/sns4sns24/clab-cli-r2.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker exec -it clab-sns4sns-r2 Cli diff --git a/src/tests/sns4sns24/clab-deploy.sh b/src/tests/sns4sns24/clab-deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..510b34cc0ff8b7ab0f7be54706a2c34bc981cb93 --- /dev/null +++ b/src/tests/sns4sns24/clab-deploy.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd /home/$USER/tfs-ctrl/src/tests/sns4sns/ +sudo containerlab deploy --topo sns4sns.clab.yml diff --git a/src/tests/sns4sns24/clab-destroy.sh b/src/tests/sns4sns24/clab-destroy.sh new file mode 100755 index 0000000000000000000000000000000000000000..9272c581b50c0fe8dde2753fd838dd4afd6c1f78 --- /dev/null +++ b/src/tests/sns4sns24/clab-destroy.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd /home/$USER/tfs-ctrl/src/tests/sns4sns/ +sudo containerlab destroy --topo sns4sns.clab.yml +sudo rm -rf clab-sns4sns/ .sns4sns.clab.yml.bak diff --git a/src/tests/sns4sns24/clab-inspect.sh b/src/tests/sns4sns24/clab-inspect.sh new file mode 100755 index 0000000000000000000000000000000000000000..30a05f575f4c5d8a433b1d3eedd4bd9aad9b0c8f --- /dev/null +++ b/src/tests/sns4sns24/clab-inspect.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd /home/$USER/tfs-ctrl/src/tests/sns4sns/ +sudo containerlab inspect --topo sns4sns.clab.yml diff --git a/src/tests/sns4sns24/deploy_specs.sh b/src/tests/sns4sns24/deploy_specs.sh new file mode 100755 index 0000000000000000000000000000000000000000..86f3d87111c0ddb738644313e179372b58bf048f --- /dev/null +++ b/src/tests/sns4sns24/deploy_specs.sh @@ -0,0 +1,154 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ----- TeraFlowSDN ------------------------------------------------------------ + +# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to. +export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" + +# Set the list of components, separated by spaces, you want to build images for, and deploy. +#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator" +export TFS_COMPONENTS="context device pathcomp service slice nbi webui" + +# Uncomment to activate Monitoring +export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" + +# Uncomment to activate ZTP +#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" + +# Uncomment to activate Policy Manager +#export TFS_COMPONENTS="${TFS_COMPONENTS} policy" + +# Uncomment to activate Optical CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager" + +# Uncomment to activate L3 CyberSecurity +#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector" + +# Uncomment to activate TE +#export TFS_COMPONENTS="${TFS_COMPONENTS} te" + +# Uncomment to activate Forecaster +#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster" + +# Set the tag you want to use for your images. +export TFS_IMAGE_TAG="dev" + +# Set the name of the Kubernetes namespace to deploy TFS to. +export TFS_K8S_NAMESPACE="tfs" + +# Set additional manifest files to be applied after the deployment +export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml" + +# Uncomment to monitor performance of components +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml" + +# Uncomment when deploying Optical CyberSecurity +#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml" + +# Set the new Grafana admin password +export TFS_GRAFANA_PASSWORD="admin123+" + +# Disable skip-build flag to rebuild the Docker images. +export TFS_SKIP_BUILD="" + + +# ----- CockroachDB ------------------------------------------------------------ + +# Set the namespace where CockroackDB will be deployed. +export CRDB_NAMESPACE="crdb" + +# Set the external port CockroackDB Postgre SQL interface will be exposed to. +export CRDB_EXT_PORT_SQL="26257" + +# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to. +export CRDB_EXT_PORT_HTTP="8081" + +# Set the database username to be used by Context. +export CRDB_USERNAME="tfs" + +# Set the database user's password to be used by Context. +export CRDB_PASSWORD="tfs123" + +# Set 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="YES" + +# Disable flag for re-deploying CockroachDB from scratch. +export CRDB_REDEPLOY="" + + +# ----- NATS ------------------------------------------------------------------- + +# Set the namespace where NATS will be deployed. +export NATS_NAMESPACE="nats" + +# Set the external port NATS Client interface will be exposed to. +export NATS_EXT_PORT_CLIENT="4222" + +# Set the external port NATS HTTP Mgmt GUI interface will be exposed to. +export NATS_EXT_PORT_HTTP="8222" + +# Disable flag for re-deploying NATS from scratch. +export NATS_REDEPLOY="" + + +# ----- QuestDB ---------------------------------------------------------------- + +# Set the namespace where QuestDB will be deployed. +export QDB_NAMESPACE="qdb" + +# Set the external port QuestDB Postgre SQL interface will be exposed to. +export QDB_EXT_PORT_SQL="8812" + +# Set the external port QuestDB Influx Line Protocol interface will be exposed to. +export QDB_EXT_PORT_ILP="9009" + +# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to. +export QDB_EXT_PORT_HTTP="9000" + +# Set the database username to be used for QuestDB. +export QDB_USERNAME="admin" + +# Set the database user's password to be used for QuestDB. +export QDB_PASSWORD="quest" + +# Set the table name to be used by Monitoring for KPIs. +export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis" + +# Set the table name to be used by Slice for plotting groups. +export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups" + +# Disable flag for dropping tables if they exist. +export QDB_DROP_TABLES_IF_EXIST="YES" + +# Disable flag for re-deploying QuestDB from scratch. +export QDB_REDEPLOY="" + + +# ----- K8s Observability ------------------------------------------------------ + +# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to. +export PROM_EXT_PORT_HTTP="9090" + +# Set the external port Grafana HTTP Dashboards will be exposed to. +export GRAF_EXT_PORT_HTTP="3000" diff --git a/src/tests/sns4sns24/ietf-create.sh b/src/tests/sns4sns24/ietf-create.sh new file mode 100755 index 0000000000000000000000000000000000000000..335a6d6a7d1aca0d88cef7a14debc8df2867019b --- /dev/null +++ b/src/tests/sns4sns24/ietf-create.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +curl -X POST \ + --header "Content-Type: application/json" \ + --data @02-ietf-l3vpn-nbi.json \ + --user "admin:admin" \ + http://10.10.10.41/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services diff --git a/src/tests/sns4sns24/ietf-delete.sh b/src/tests/sns4sns24/ietf-delete.sh new file mode 100755 index 0000000000000000000000000000000000000000..352704213691dcb52d298e53cdcd8761c6bcbeb4 --- /dev/null +++ b/src/tests/sns4sns24/ietf-delete.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +curl -X DELETE \ + --user "admin:admin" \ + http://10.10.10.41/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-edge-core/ diff --git a/src/tests/sns4sns24/ietf-get.sh b/src/tests/sns4sns24/ietf-get.sh new file mode 100755 index 0000000000000000000000000000000000000000..0fcfe7f5c45f837fd1234fa298caf8c64c0fb109 --- /dev/null +++ b/src/tests/sns4sns24/ietf-get.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +curl --user "admin:admin" \ + http://10.10.10.41/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-edge-core/ diff --git a/src/tests/sns4sns24/sns4sns.clab.yml b/src/tests/sns4sns24/sns4sns.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..ad45ee6af885e3f58798654e51e004423369d7fa --- /dev/null +++ b/src/tests/sns4sns24/sns4sns.clab.yml @@ -0,0 +1,47 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Ref: https://containerlab.dev/manual/network/#macvlan-links +# Ref: https://containerlab.dev/manual/network/#host-links + + +# ETSI SNS4SNS OSL+TFS Integration (Static configuration) + +name: sns4sns-static + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + mtu: 1400 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + image: ceos:4.31.2F + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r1:eth10", "macvlan:enp0s3"] # connect to core domain virtual network + - endpoints: ["r2:eth10", "macvlan:enp0s5"] # connect to shared virtual network with edge domain diff --git a/src/tests/sns4sns24/static_setup/r1-static.cfg b/src/tests/sns4sns24/static_setup/r1-static.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f225a9c5c5273beb65844612e1975a7e516f46d1 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/r1-static.cfg @@ -0,0 +1,45 @@ +! Startup-config last modified at Tue Oct 15 12:24:02 2024 by root +! device: r1 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$WlffHUsmnrG2WVRf$cfZfWFJtrnv9wuGlkyMHRS66VQeA8bOjxM0jSXTB1deScpsqz0I3oVEcvrR6IMrqVOsXANKmoghcZvcDbC4Ry/ +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r1 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet2 + no switchport + ip address 10.254.254.1/30 +! +interface Ethernet10 + no switchport + ip address 10.10.10.229/24 +! +interface Management0 + ip address 172.20.20.101/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +ip route 10.158.72.0/24 10.254.254.2 +! +end diff --git a/src/tests/sns4sns24/static_setup/r2-static.cfg b/src/tests/sns4sns24/static_setup/r2-static.cfg new file mode 100644 index 0000000000000000000000000000000000000000..2bbd8f80fbb2a6b083dd9b3862db93dd0d41a8f5 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/r2-static.cfg @@ -0,0 +1,45 @@ +! Startup-config last modified at Tue Oct 15 12:23:41 2024 by root +! device: r2 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build)) +! +no aaa root +! +username admin privilege 15 role network-admin secret sha512 $6$3nmPs7/wiY.aN139$BrgG79cp9R5bd.bQST4LnQB6wq6GLuIHKdbafZkcVH2R5D.v771gZNgeQSILN6ubz1.j29Wy5UmavY9Pavsoy0 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname r2 +! +spanning-tree mode mstp +! +system l1 + unsupported speed action error + unsupported error-correction action error +! +management api http-commands + no shutdown +! +management api gnmi + transport grpc default +! +management api netconf + transport ssh default +! +interface Ethernet1 + no switchport + ip address 10.254.254.2/30 +! +interface Ethernet10 + no switchport + ip address 10.158.72.229/24 +! +interface Management0 + ip address 172.20.20.102/24 +! +ip routing +! +ip route 0.0.0.0/0 172.20.20.1 +ip route 10.10.10.0/24 10.254.254.1 +! +end diff --git a/src/tests/sns4sns24/static_setup/sns4sns.clab.yml b/src/tests/sns4sns24/static_setup/sns4sns.clab.yml new file mode 100644 index 0000000000000000000000000000000000000000..d0c19e0c63644574c96da350b8a0ba2912ad9d79 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/sns4sns.clab.yml @@ -0,0 +1,49 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Ref: https://containerlab.dev/manual/network/#macvlan-links +# Ref: https://containerlab.dev/manual/network/#host-links + + +# ETSI SNS4SNS OSL+TFS Integration (Static configuration) + +name: sns4sns-static + +mgmt: + network: mgmt-net + ipv4-subnet: 172.20.20.0/24 + mtu: 1400 + +topology: + kinds: + arista_ceos: + kind: arista_ceos + #image: ceos:4.30.4M + image: ceos:4.31.2F + + nodes: + r1: + kind: arista_ceos + mgmt-ipv4: 172.20.20.101 + startup-config: r1-static.cfg + + r2: + kind: arista_ceos + mgmt-ipv4: 172.20.20.102 + startup-config: r2-static.cfg + + links: + - endpoints: ["r1:eth2", "r2:eth1"] + - endpoints: ["r1:eth10", "macvlan:enp0s3"] # connect to core domain virtual network + - endpoints: ["r2:eth10", "macvlan:enp0s5"] # connect to shared virtual network with edge domain diff --git a/src/tests/sns4sns24/static_setup/static-setup.txt b/src/tests/sns4sns24/static_setup/static-setup.txt new file mode 100644 index 0000000000000000000000000000000000000000..5cbd7d2cfb3b9000ce585983ac3c304317155439 --- /dev/null +++ b/src/tests/sns4sns24/static_setup/static-setup.txt @@ -0,0 +1,39 @@ + | 10.10.10.229/24 (eth10) ++--+--+ +| R1 | ++--+--+ + | .1 (eth2) + | + | 10.254.254.0/30 + | + | .2 (eth1) ++--+--+ +| R2 | ++--+--+ + | 10.158.72.11/24 (eth10) + + +r1(config)#show running-config +interface Ethernet2 + no switchport + ip address 10.254.254.1/30 + +interface Ethernet10 + no switchport + ip address 10.10.10.229/24 + +ip routing +ip route 10.158.72.0/24 10.254.254.2 + + +r2(config)#show running-config +interface Ethernet1 + no switchport + ip address 10.254.254.2/30 + +interface Ethernet10 + no switchport + ip address 10.158.72.11/24 + +ip routing +ip route 10.10.10.0/24 10.254.254.1