Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SONiC Configuration Database Manual


**Table of Contents**

* [Introduction](#introduction)
Expand Down Expand Up @@ -92,6 +93,7 @@
* [RADIUS](#radius)
* [Static DNS](#static-dns)
* [ASIC_SENSORS](#asic_sensors)
* [SRv6](#srv6)
* [For Developers](#for-developers)
* [Generating Application Config by Jinja2 Template](#generating-application-config-by-jinja2-template)
* [Incremental Configuration by Subscribing to ConfigDB](#incremental-configuration-by-subscribing-to-configdb)
Expand Down Expand Up @@ -2884,6 +2886,30 @@ The DNS_NAMESERVER table introduces static DNS nameservers configuration.
}
```

### SRv6

The **SRV6_MY_SIDS** and **SRV6_MY_LOCATORS** tables introduce Segment Routing over IPv6 configuration.
An example is as follows:
```
{
"SRV6_MY_LOCATORS" : {
"loc1" : {
"prefix" : "FCBB:BBBB:20::"
}
}
"SRV6_MY_SIDS" : {
"loc1|FCBB:BBBB:20::" : {
"action": "uN"
},
"loc1|FCBB:BBBB:20:F1::" : {
"action": "uDT46",
"decap_vrf": "default",
"decap_dscp_mode": "pipe"
}
}
}
```

### FIPS

The FIPS table introduces FIPS configuration.
Expand Down
36 changes: 36 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/srv6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"SRV6_VALID": {
"desc": "Valid config"
},
"SRV6_MY_LOCATOR_INVALID_FUNC_LEN": {
"desc": "A locator configured with invalid func_len",
"eStrKey" : "Must"
},
"SRV6_MY_LOCATOR_INVALID_VRF": {
"desc": "A locator configured with an invalid VRF name",
"eStrKey" : "InvalidValue",
"eStr": ["vrf"]
},
"SRV6_MY_SID_INVALID_LOCATOR": {
"desc": "A SID configured with invalid locator identifier",
"eStrKey" : "LeafRef"
},
"SRV6_MY_SID_INVALID_IP_ADDR": {
"desc": "A SID configured with invalid IPv6 address",
"eStrKey" : "Pattern"
},
"SRV6_MY_SID_UNMATCHED_IP_ADDR": {
"desc": "A SID configured with an IPv6 Address that does not match with the prefix of the locator",
"eStrKey" : "Must"
},
"SRV6_MY_SID_INVALID_ACTION": {
"desc": "A SID configured with invalid action",
"eStrKey" : "InvalidValue",
"eStr": ["action"]
},
"SRV6_MY_SID_DSCP_MODE_WITH_UN": {
"desc": "A SID configured with dscp_mode and uN action",
"eStrKey" : "When",
"eStr": ["action"]
}
}
213 changes: 213 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests_config/srv6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
{
"SRV6_VALID": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:20::",
"locator": "MAIN",
"action": "uN"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_LOCATOR_INVALID_FUNC_LEN": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::",
"func_len": 127
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:20::",
"locator": "MAIN",
"action": "uN"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_LOCATOR_INVALID_VRF": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::",
"vrf": "Vrf1"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:20::",
"locator": "MAIN",
"action": "uN"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_SID_INVALID_LOCATOR": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:20::",
"locator": "None",
"action": "uN"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_SID_INVALID_IP_ADDR": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:200001::",
"locator": "MAIN",
"action": "uN"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_SID_UNMATCHED_IP_ADDR": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:21::",
"locator": "MAIN",
"action": "uN"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_SID_INVALID_ACTION": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:20::",
"locator": "MAIN",
"action": "uA"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
},
"SRV6_MY_SID_DSCP_MODE_WITH_UN": {
"sonic-srv6:sonic-srv6": {
"sonic-srv6:SRV6_MY_LOCATORS": {
"SRV6_MY_LOCATORS_LIST": [
{
"locator_name": "MAIN",
"prefix": "FCBB:BBBB:20::"
}
]
},
"sonic-srv6:SRV6_MY_SIDS": {
"SRV6_MY_SIDS_LIST": [
{
"ip_address": "FCBB:BBBB:20::",
"locator": "MAIN",
"action": "uN",
"decap_dscp_mode": "uniform"
},
{
"ip_address": "FCBB:BBBB:20:F1::",
"locator": "MAIN",
"action": "uDT46"
}
]
}
}
}
}
Loading