Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tfs/controller
1 result
Show changes
Commits on Source (87)
Showing
with 565 additions and 14 deletions
......@@ -5,13 +5,12 @@
coverage/
data/
deploy/
manifests/
hackfest/
scripts/
tmp/
ecoc22/
hackfest/
manifests/
nfvsdn22/
oeccpsc22/
ofc22/
ofc23/
scripts/
tmp/
......@@ -337,8 +337,8 @@ $ python3 connectionServiceWithNotif_client.py
$ sudo bash -c "$(curl -sL https://get.containerlab.dev)"
## Deploy proposed two SR node scenario
$ cd tfs-ctrl/hackfest/gnmi
$ sudo containerlab deploy -t srlinux.clab.yml
$ cd ~/tfs-ctrl/hackfest/gnmi
$ sudo containerlab deploy --topo srlinux.clab.yml
## Access SR Bash
$ docker exec -it clab-srlinux-srl1 bash
......
clab-tfs-scenario
.tfs-scenario.clab.yml.bak
############
# ContainerLab
############
Refs:
https://documentation.nokia.com/srlinux/22-6/SR_Linux_Book_Files/SysMgmt_Guide/data-models.html#openconfig-ov
https://documentation.nokia.com/srlinux/SR_Linux_HTML_R21-11/SysMgmt_Guide/gnmi-interface.html#ai9ersv4qe
https://github.com/openconfig/kne/blob/v0.1.9/examples/nokia/srlinux-services/srl-openconfig.cfg.json
https://containerlab.dev/manual/kinds/srl/#default-node-configuration
https://learn.srlinux.dev/tutorials/infrastructure/kne/srl-with-oc-services/
https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md
https://gnmic.kmrd.dev/cmd/get/
IMPORTANT: for Nokia SR Linux, use kind "srl" and type "ixr6"
## Download and install the latest release
$ sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.42.0
## Deploy proposed two SR node scenario
$ cd ~/tfs-ctrl/hackfest/containerlab
$ sudo containerlab deploy --topo tfs-scenario.clab.yml
## Access SR Bash
$ docker exec -it clab-tfs-scenario-srl1 bash
## Access SR CLI
$ docker exec -it clab-tfs-scenario-srl1 sr_cli
## Destroy scenario
$ sudo containerlab destroy --topo tfs-scenario.clab.yml
## Enable OpenConfig data models and set as default:
$ docker exec -it clab-tfs-scenario-srl1 sr_cli
# enter candidate
# system management openconfig admin-state enable
# system gnmi-server network-instance mgmt yang-models openconfig
# commit stay
# quit
# Configure containerlab clients
docker exec -it clab-tfs-scenario-client1 bash
ip address add 172.16.1.10/24 dev eth1
ip route add 172.16.2.0/24 via 172.16.1.1
ping 172.16.2.1 or 172.16.2.10
docker exec -it clab-tfs-scenario-client2 bash
ip address add 172.16.2.10/24 dev eth1
ip route add 172.16.1.0/24 via 172.16.2.1
ping 172.16.1.1 or 172.16.1.10
## Install gNMIc
$ sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)"
## gNMI Capabilities request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify capabilities
## gNMI Get request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /interface[name=mgmt0]
## gNMI Set request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --update-path /system/name/host-name --update-value slr11
(we check the changed value)
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path /system/name/host-name
## Subscribe request
$ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf subscribe --path /interface[name=mgmt0]/statistics
(In another terminal, you can generate traffic)
$ssh admin@clab-srlinux-srl1
# Check configurations done:
gnmic -a 172.100.100.101 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path '/network-instances' > srl1-nis.json
gnmic -a 172.100.100.101 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path '/interfaces' > srl1-ifs.json
gnmic -a 172.100.100.102 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path '/network-instances' > srl2-nis.json
gnmic -a 172.100.100.102 -u admin -p NokiaSrl1! --skip-verify -e json_ietf get --path '/interfaces' > srl2-ifs.json
# Delete elements:
gnmic -a 172.100.100.101 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --delete '/network-instances/network-instance[name=b19229e8]'
gnmic -a 172.100.100.101 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]'
gnmic -a 172.100.100.101 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]'
gnmic -a 172.100.100.102 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --delete '/network-instances/network-instance[name=b19229e8]'
gnmic -a 172.100.100.102 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]'
gnmic -a 172.100.100.102 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]'
# Run gNMI Driver in standalone mode (advanced)
PYTHONPATH=./src python -m src.device.tests.test_gnmi
{
"services": [
{
"service_id": {
"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc-2-dc-l3-svc"}
},
"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"}}
],
"service_constraints": [],
"service_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "/device[SRL1]/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": {
"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": {
"ipv4_address": "172.16.1.1", "ipv4_prefix": 24, "sub_interface_index": 0
}}},
{"action": 1, "custom": {"resource_key": "/device[SRL2]/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": {
"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": {
"ipv4_address": "172.16.2.1", "ipv4_prefix": 24, "sub_interface_index": 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": "SRL1"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.100.100.101"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "NokiaSrl1!", "use_tls": true
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "SRL2"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.100.100.102"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "NokiaSrl1!", "use_tls": true
}}}
]}
}
],
"links": [
{
"link_id": {"link_uuid": {"uuid": "DC1/eth1==SRL1/ethernet-1/2"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}},
{"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "SRL1/ethernet-1/2==DC1/eth1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}},
{"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "SRL1/ethernet-1/1==SRL2/ethernet-1/1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}},
{"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "SRL2/ethernet-1/1==SRL1/ethernet-1/1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}},
{"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "DC2/eth1==SRL2/ethernet-1/2"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}},
{"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "SRL2/ethernet-1/2==DC2/eth1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}},
{"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}
]
}
]
}
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Example based on clos01 example (http://containerlab.dev/lab-examples/min-clos/)
# TFS 2 Nokia SR Linux nodes + 2 Linux clients
name: tfs-scenario
mgmt:
network: mgmt-net
ipv4-subnet: 172.100.100.0/24
topology:
kinds:
srl:
image: ghcr.io/nokia/srlinux:23.3.1
linux:
image: ghcr.io/hellt/network-multitool
nodes:
srl1:
kind: srl
type: ixr6
cpu: 0.5
memory: 1GB
mgmt-ipv4: 172.100.100.101
#startup-config: srl1.cli
srl2:
kind: srl
type: ixr6
cpu: 0.5
memory: 1GB
mgmt-ipv4: 172.100.100.102
#startup-config: srl2.cli
client1:
kind: linux
cpu: 0.1
memory: 100MB
mgmt-ipv4: 172.100.100.201
client2:
kind: linux
cpu: 0.1
memory: 100MB
mgmt-ipv4: 172.100.100.202
links:
- endpoints: ["srl1:e1-1", "srl2:e1-1"]
- endpoints: ["client1:eth1", "srl1:e1-2"]
- endpoints: ["client2:eth1", "srl2:e1-2"]
{
"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": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0],
"device_endpoints": [], "device_operational_status": 1, "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": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/4"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/5"},
{"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/6"}
]}}}
]}
}
],
"links": [
{"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}
]},
{"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}},
{"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}},
{"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}},
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}
]},
{"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}},
{"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}
]},
{"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}},
{"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}
]},
{"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}},
{"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}
]},
{"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}},
{"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}
]},
{"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}},
{"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}
]},
{"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}
]},
{"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}},
{"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}
]},
{"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}},
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}
]},
{"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}},
{"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}
]},
{"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}},
{"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}
]}
]
}
hackfest/tfs-descriptors/hackfest2/emulated-topology.png

40.6 KiB

{
"services": [
{
"service_id": {
"context_id": {"context_uuid": {"uuid": "admin"}},
"service_uuid": {"uuid": "l3-service"}
},
"service_type": 1,
"service_status": {"service_status": 1},
"service_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "1/2"}},
{"device_id": {"device_uuid": {"uuid": "R4"}}, "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"}}
],
"service_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "/settings", "resource_value": {
"address_families": ["IPV4"],
"bgp_as": 65000,
"bgp_route_target": "65000:333",
"mtu": 1512
}}},
{"action": 1, "custom": {"resource_key": "/device[R1]/endpoint[1/2]/settings", "resource_value": {
"address_ip": "3.3.2.1",
"address_prefix": 24,
"route_distinguisher": "65000:123",
"router_id": "10.10.10.1",
"sub_interface_index": 400,
"vlan_id": 400
}}},
{"action": 1, "custom": {"resource_key": "/device[R4]/endpoint[1/2]/settings", "resource_value": {
"address_ip": "3.3.1.1",
"address_prefix": 24,
"route_distinguisher": "65000:123",
"router_id": "20.20.20.1",
"sub_interface_index": 400,
"vlan_id": 500
}}}
]}
}
]
}
......@@ -40,6 +40,11 @@ spec:
env:
- name: LOG_LEVEL
value: "INFO"
startupProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:2020"]
failureThreshold: 30
periodSeconds: 10
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:2020"]
......
......@@ -48,11 +48,11 @@ spec:
command: ["/bin/grpc_health_probe", "-addr=:7070"]
resources:
requests:
cpu: 50m
memory: 64Mi
cpu: 250m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
kind: Service
......
......@@ -36,7 +36,7 @@ spec:
- containerPort: 9192
env:
- name: LOG_LEVEL
value: "DEBUG"
value: "INFO"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:10020"]
......@@ -69,10 +69,10 @@ spec:
# timeoutSeconds: 5
resources:
requests:
cpu: 100m
cpu: 250m
memory: 256Mi
limits:
cpu: 700m
cpu: 1000m
memory: 1024Mi
---
apiVersion: v1
......