Skip to content
Snippets Groups Projects
Commit 59aa12ab authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Hackfest:

- Reorganized Hackfest#1 descriptors to new sub-folder
- Added descriptors for Hackfest#2
- Minor corrections in
parent caffd193
No related branches found
No related tags found
3 merge requests!142Release TeraFlowSDN 2.1,!132NetSoft Hackfest extensions, gNMI Driver, gNMI L3NM Service Handler, multiple fixes,!113Draft: NetSoft Hackfest extensions
......@@ -24,12 +24,38 @@ $ sudo containerlab deploy --topo tfs-scenario.clab.yml
## Access SR Bash
$ docker exec -it clab-tfs-scenario-srl1 bash
## Acess SR CLI
## 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)"
......@@ -52,13 +78,6 @@ $ gnmic -a clab-srlinux-srl1 -u admin -p NokiaSrl1! --skip-verify -e json_ietf s
$ssh admin@clab-srlinux-srl1
## 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
# Check configurations done:
......@@ -76,18 +95,5 @@ gnmic -a 172.100.100.102 -u admin -p NokiaSrl1! --skip-verify -e json_ietf set -
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 driver in standalone mode
# Run gNMI Driver in standalone mode (advanced)
PYTHONPATH=./src python -m src.device.tests.test_gnmi
# Configure 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
{
"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
}}}
]}
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment