From 5696254239b649a49c6155a618f7b54a928c786f Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Fri, 1 Mar 2024 18:27:51 +0000 Subject: [PATCH] Dataplane-in-a-box: - Updated ContainerLab scenario - Updated TFS descriptors - Updated scripts - Updated README.md --- dataplane-in-a-box/README.md | 6 + dataplane-in-a-box/arista.clab.yml | 26 +++- dataplane-in-a-box/clab-cli-dc1.sh | 3 + dataplane-in-a-box/clab-cli-dc2.sh | 3 + .../{ceos-cli-wan1.sh => clab-cli-wan1.sh} | 0 .../{ceos-cli-wan2.sh => clab-cli-wan2.sh} | 0 dataplane-in-a-box/clab-cli-wan3.sh | 3 + dataplane-in-a-box/clab-load-image.sh | 19 --- dataplane-in-a-box/clab-pull-images.sh | 18 --- dataplane-in-a-box/links.json | 136 ------------------ .../{topology.json => tfs-01-topo-nodes.json} | 59 ++------ dataplane-in-a-box/tfs-02-topo-links.json | 63 ++++++++ dataplane-in-a-box/tfs-03-dc2dc-l2svc.json | 17 +++ ...3-service.json => tfs-04-dc2dc-l3svc.json} | 18 +-- 14 files changed, 139 insertions(+), 232 deletions(-) create mode 100755 dataplane-in-a-box/clab-cli-dc1.sh create mode 100755 dataplane-in-a-box/clab-cli-dc2.sh rename dataplane-in-a-box/{ceos-cli-wan1.sh => clab-cli-wan1.sh} (100%) rename dataplane-in-a-box/{ceos-cli-wan2.sh => clab-cli-wan2.sh} (100%) create mode 100755 dataplane-in-a-box/clab-cli-wan3.sh delete mode 100755 dataplane-in-a-box/clab-load-image.sh delete mode 100755 dataplane-in-a-box/clab-pull-images.sh delete mode 100644 dataplane-in-a-box/links.json rename dataplane-in-a-box/{topology.json => tfs-01-topo-nodes.json} (50%) create mode 100644 dataplane-in-a-box/tfs-02-topo-links.json create mode 100644 dataplane-in-a-box/tfs-03-dc2dc-l2svc.json rename dataplane-in-a-box/{dc-2-dc-l3-service.json => tfs-04-dc2dc-l3svc.json} (72%) diff --git a/dataplane-in-a-box/README.md b/dataplane-in-a-box/README.md index 603b24114..4dd22dec3 100644 --- a/dataplane-in-a-box/README.md +++ b/dataplane-in-a-box/README.md @@ -19,6 +19,12 @@ source dataplane-in-a-box/deploy_specs.sh sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.48.4 ``` +## Download Arista cEOS image and create Docker image +```bash +cd ~/tfs-ctrl/dataplane-in-a-box +docker import arista/cEOS64-lab-4.31.2F.tar ceos:4.31.2F +``` + ## Deploy scenario ```bash cd ~/tfs-ctrl/dataplane-in-a-box diff --git a/dataplane-in-a-box/arista.clab.yml b/dataplane-in-a-box/arista.clab.yml index 3a92c7e9b..2865100bd 100644 --- a/dataplane-in-a-box/arista.clab.yml +++ b/dataplane-in-a-box/arista.clab.yml @@ -35,21 +35,37 @@ topology: kind: arista_ceos mgmt-ipv4: 172.20.20.101 ports: [6001:6030] + wan2: kind: arista_ceos mgmt-ipv4: 172.20.20.102 ports: [6002:6030] - client1: + wan3: + kind: arista_ceos + mgmt-ipv4: 172.20.20.103 + ports: [6003:6030] + + dc1: kind: linux mgmt-ipv4: 172.20.20.201 ports: [2201:22] - client2: + exec: + - ip link set address 00:c1:ab:00:00:01 dev eth1 + - ip address add 192.168.1.10/24 dev eth1 + - ip route add 192.168.2.0/24 via 192.168.1.1 + + dc2: kind: linux mgmt-ipv4: 172.20.20.202 ports: [2202:22] + exec: + - ip link set address 00:c1:ab:00:00:02 dev eth1 + - ip address add 192.168.2.10/24 dev eth1 + - ip route add 192.168.1.0/24 via 192.168.2.1 links: - - endpoints: ["wan1:eth1", "wan2:eth1"] - - endpoints: ["client1:eth1", "wan1:eth10"] - - endpoints: ["client2:eth1", "wan2:eth10"] + - endpoints: ["wan1:eth2", "wan2:eth1"] + - endpoints: ["wan2:eth3", "wan3:eth2"] + - endpoints: ["wan1:eth10", "dc1:eth1"] + - endpoints: ["wan3:eth10", "dc2:eth1"] diff --git a/dataplane-in-a-box/clab-cli-dc1.sh b/dataplane-in-a-box/clab-cli-dc1.sh new file mode 100755 index 000000000..7d793f035 --- /dev/null +++ b/dataplane-in-a-box/clab-cli-dc1.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it clab-arista-dc1 bash diff --git a/dataplane-in-a-box/clab-cli-dc2.sh b/dataplane-in-a-box/clab-cli-dc2.sh new file mode 100755 index 000000000..311d6dae5 --- /dev/null +++ b/dataplane-in-a-box/clab-cli-dc2.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it clab-arista-dc2 bash diff --git a/dataplane-in-a-box/ceos-cli-wan1.sh b/dataplane-in-a-box/clab-cli-wan1.sh similarity index 100% rename from dataplane-in-a-box/ceos-cli-wan1.sh rename to dataplane-in-a-box/clab-cli-wan1.sh diff --git a/dataplane-in-a-box/ceos-cli-wan2.sh b/dataplane-in-a-box/clab-cli-wan2.sh similarity index 100% rename from dataplane-in-a-box/ceos-cli-wan2.sh rename to dataplane-in-a-box/clab-cli-wan2.sh diff --git a/dataplane-in-a-box/clab-cli-wan3.sh b/dataplane-in-a-box/clab-cli-wan3.sh new file mode 100755 index 000000000..c931ac940 --- /dev/null +++ b/dataplane-in-a-box/clab-cli-wan3.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it clab-arista-wan2 Cli diff --git a/dataplane-in-a-box/clab-load-image.sh b/dataplane-in-a-box/clab-load-image.sh deleted file mode 100755 index 87e666422..000000000 --- a/dataplane-in-a-box/clab-load-image.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/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. - -# Download image from Arista account > software downloads - -cd /home/tfs/tfs-ctrl/dataplane-in-a-box -docker import cEOS64-lab-4.30.4M.tar ceos:4.30.4M diff --git a/dataplane-in-a-box/clab-pull-images.sh b/dataplane-in-a-box/clab-pull-images.sh deleted file mode 100755 index 8f2805c6b..000000000 --- a/dataplane-in-a-box/clab-pull-images.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/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. - -docker pull ghcr.io/hellt/network-multitool:latest -#docker pull ghcr.io/nokia/srlinux:23.7.2 -#docker pull netreplica/docker-sonic-vs:20220111 diff --git a/dataplane-in-a-box/links.json b/dataplane-in-a-box/links.json deleted file mode 100644 index 832a24fdd..000000000 --- a/dataplane-in-a-box/links.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "contexts": [ - {"context_id": {"context_uuid": {"uuid": "admin"}}} - ], - "topologies": [ - {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} - ], - "devices": [ - { - "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} - ]}}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} - ]}}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "DC3"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} - ]}}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "DC4"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} - ]}}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6001"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "username": "admin", "password": "admin", "use_tls": true - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6002"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "username": "admin", "password": "admin", "use_tls": true - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6003"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "username": "admin", "password": "admin", "use_tls": true - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6004"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "username": "admin", "password": "admin", "use_tls": true - }}} - ]} - } - ], - "links": [ - { - "link_id": {"link_uuid": {"uuid": "DC1/eth1==WAN1/ethernet-1/2"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} - ] - }, - { - "link_id": {"link_uuid": {"uuid": "WAN1/ethernet-1/2==DC1/eth1"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, - {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} - ] - }, - - { - "link_id": {"link_uuid": {"uuid": "WAN1/ethernet-1/1==WAN2/ethernet-1/1"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, - {"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} - ] - }, - { - "link_id": {"link_uuid": {"uuid": "WAN2/ethernet-1/1==WAN1/ethernet-1/1"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, - {"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} - ] - }, - - { - "link_id": {"link_uuid": {"uuid": "DC2/eth1==WAN2/ethernet-1/2"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} - ] - }, - { - "link_id": {"link_uuid": {"uuid": "WAN2/ethernet-1/2==DC2/eth1"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, - {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} - ] - } - ] -} diff --git a/dataplane-in-a-box/topology.json b/dataplane-in-a-box/tfs-01-topo-nodes.json similarity index 50% rename from dataplane-in-a-box/topology.json rename to dataplane-in-a-box/tfs-01-topo-nodes.json index 42752235d..3b5e42b99 100644 --- a/dataplane-in-a-box/topology.json +++ b/dataplane-in-a-box/tfs-01-topo-nodes.json @@ -7,85 +7,54 @@ ], "devices": [ { - "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_id": {"device_uuid": {"uuid": "dc1"}}, "device_type": "emu-datacenter", "device_drivers": [0], "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_id": {"device_uuid": {"uuid": "dc2"}}, "device_type": "emu-datacenter", "device_drivers": [0], "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} + {"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"} ]}}} ]} }, { - "device_id": {"device_uuid": {"uuid": "DC3"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_id": {"device_uuid": {"uuid": "wan1"}}, "device_type": "packet-router", "device_drivers": [8], "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} - ]}}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "DC4"}}, "device_type": "emu-datacenter", "device_drivers": [0], - "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": [ - {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} - ]}}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6001"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "username": "admin", "password": "admin", "use_tls": false - }}} - ]} - }, - { - "device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6002"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "use_tls": false }}} ]} }, { - "device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8], + "device_id": {"device_uuid": {"uuid": "wan2"}}, "device_type": "packet-router", "device_drivers": [8], "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6003"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "use_tls": false }}} ]} }, { - "device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8], + "device_id": {"device_uuid": {"uuid": "wan3"}}, "device_type": "packet-router", "device_drivers": [8], "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6004"}}, + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.103"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { "username": "admin", "password": "admin", "use_tls": false }}} ]} } - ], - "links": [] + ] } diff --git a/dataplane-in-a-box/tfs-02-topo-links.json b/dataplane-in-a-box/tfs-02-topo-links.json new file mode 100644 index 000000000..b9070dd9d --- /dev/null +++ b/dataplane-in-a-box/tfs-02-topo-links.json @@ -0,0 +1,63 @@ +{ + "links": [ + { + "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/2==wan2/ethernet-1/1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "wan2/ethernet-1/1==wan1/ethernet-1/2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "wan2/ethernet-1/3==wan3/ethernet-1/2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}}, + {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "wan3/ethernet-1/2==wan2/ethernet-1/3"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "dc1/eth1==wan1/ethernet-1/10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/10==dc1/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}}, + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "dc2/eth1==wan3/ethernet-1/10"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "wan3/ethernet-1/10==dc2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + } + ] +} diff --git a/dataplane-in-a-box/tfs-03-dc2dc-l2svc.json b/dataplane-in-a-box/tfs-03-dc2dc-l2svc.json new file mode 100644 index 000000000..8d10e5f4b --- /dev/null +++ b/dataplane-in-a-box/tfs-03-dc2dc-l2svc.json @@ -0,0 +1,17 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc2dc-l2svc"} + }, + "service_type": 2, + "service_status": {"service_status": 1}, + "service_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "int"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "int"}} + ], + "service_constraints": [], + "service_config": {"config_rules": []} + } + ] +} diff --git a/dataplane-in-a-box/dc-2-dc-l3-service.json b/dataplane-in-a-box/tfs-04-dc2dc-l3svc.json similarity index 72% rename from dataplane-in-a-box/dc-2-dc-l3-service.json rename to dataplane-in-a-box/tfs-04-dc2dc-l3svc.json index cb9ef972e..b21cba0da 100644 --- a/dataplane-in-a-box/dc-2-dc-l3-service.json +++ b/dataplane-in-a-box/tfs-04-dc2dc-l3svc.json @@ -2,33 +2,33 @@ "services": [ { "service_id": { - "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc-2-dc-l3-svc"} + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc2dc-l3svc"} }, "service_type": 1, "service_status": {"service_status": 1}, "service_endpoint_ids": [ - {"device_id":{"device_uuid":{"uuid":"DC1"}},"endpoint_uuid":{"uuid":"int"}}, - {"device_id":{"device_uuid":{"uuid":"DC2"}},"endpoint_uuid":{"uuid":"int"}} + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "int"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "int"}} ], "service_constraints": [], "service_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "/device[SRL1]/settings", "resource_value": { + {"action": 1, "custom": {"resource_key": "/device[wan1]/settings", "resource_value": { "static_routes": [{"prefix": "172.16.2.0/24", "next_hop": "172.0.0.2"}] }}}, - {"action": 1, "custom": {"resource_key": "/device[SRL1]/endpoint[ethernet-1/1]/settings", "resource_value": { + {"action": 1, "custom": {"resource_key": "/device[wan1]/endpoint[ethernet-1/1]/settings", "resource_value": { "ipv4_address": "172.0.0.1", "ipv4_prefix": 30, "sub_interface_index": 0 }}}, - {"action": 1, "custom": {"resource_key": "/device[SRL1]/endpoint[ethernet-1/2]/settings", "resource_value": { + {"action": 1, "custom": {"resource_key": "/device[wan1]/endpoint[ethernet-1/2]/settings", "resource_value": { "ipv4_address": "172.16.1.1", "ipv4_prefix": 24, "sub_interface_index": 0 }}}, - {"action": 1, "custom": {"resource_key": "/device[SRL2]/settings", "resource_value": { + {"action": 1, "custom": {"resource_key": "/device[wan3]/settings", "resource_value": { "static_routes": [{"prefix": "172.16.1.0/24", "next_hop": "172.0.0.1"}] }}}, - {"action": 1, "custom": {"resource_key": "/device[SRL2]/endpoint[ethernet-1/1]/settings", "resource_value": { + {"action": 1, "custom": {"resource_key": "/device[wan3]/endpoint[ethernet-1/1]/settings", "resource_value": { "ipv4_address": "172.0.0.2", "ipv4_prefix": 30, "sub_interface_index": 0 }}}, - {"action": 1, "custom": {"resource_key": "/device[SRL2]/endpoint[ethernet-1/2]/settings", "resource_value": { + {"action": 1, "custom": {"resource_key": "/device[wan3]/endpoint[ethernet-1/2]/settings", "resource_value": { "ipv4_address": "172.16.2.1", "ipv4_prefix": 24, "sub_interface_index": 0 }}} ]} -- GitLab