Skip to content

Commit

Permalink
[ssip]: Add YANG UTs.
Browse files Browse the repository at this point in the history
Signed-off-by: Nazarii Hnydyn <[email protected]>
  • Loading branch information
nazariig committed Jun 17, 2022
1 parent 1e4781c commit 956301a
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/sonic-yang-models/tests/yang_model_tests/tests/syslog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
{
"SYSLOG_SERVER_VALID": {
"desc": "Configure SYSLOG_SERVER."
},
"SYSLOG_SERVER_INVALID_SOURCE": {
"desc": "Configure invalid SOURCE in SYSLOG_SERVER.",
"eStrKey": "InvalidValue"
},
"SYSLOG_SERVER_INVALID_PORT": {
"desc": "Configure invalid PORT in SYSLOG_SERVER.",
"eStrKey": "InvalidValue"
},
"SYSLOG_SERVER_INVALID_VRF": {
"desc": "Configure invalid VRF in SYSLOG_SERVER.",
"eStrKey": "InvalidValue"
},
"SYSLOG_SERVER_TEST": {
"desc": "Load syslog server table with ipv4 address as syslog servers."
},
Expand All @@ -14,5 +29,4 @@
"desc": "Load syslog server table with invalid ipv6 address as syslog server.",
"eStrKey": "InvalidValue"
}

}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,75 @@
{
"SYSLOG_SERVER_VALID": {
"sonic-syslog:sonic-syslog": {
"sonic-syslog:SYSLOG_SERVER": {
"SYSLOG_SERVER_LIST": [
{
"server_address": "100.0.0.1",
"source": "1.1.1.1",
"port": "514",
"vrf": "default"
},
{
"server_address": "200.0.0.1",
"source": "1.1.1.1",
"port": "514",
"vrf": "mgmt"
},
{
"server_address" : "2000::1",
"source": "1111::1111",
"port": "514",
"vrf": "Vrf-Data"
}
]
}
},
"sonic-vrf:sonic-vrf": {
"sonic-vrf:VRF": {
"VRF_LIST": [
{
"name": "Vrf-Data"
}
]
}
}
},
"SYSLOG_SERVER_INVALID_SOURCE": {
"sonic-syslog:sonic-syslog": {
"sonic-syslog:SYSLOG_SERVER": {
"SYSLOG_SERVER_LIST": [
{
"server_address": "100.0.0.1",
"source": "invalid_value"
}
]
}
}
},
"SYSLOG_SERVER_INVALID_PORT": {
"sonic-syslog:sonic-syslog": {
"sonic-syslog:SYSLOG_SERVER": {
"SYSLOG_SERVER_LIST": [
{
"server_address": "100.0.0.1",
"port": "65536"
}
]
}
}
},
"SYSLOG_SERVER_INVALID_VRF": {
"sonic-syslog:sonic-syslog": {
"sonic-syslog:SYSLOG_SERVER": {
"SYSLOG_SERVER_LIST": [
{
"server_address": "100.0.0.1",
"vrf": "invalid_value"
}
]
}
}
},
"SYSLOG_SERVER_TEST": {
"sonic-syslog:sonic-syslog": {
"sonic-syslog:SYSLOG_SERVER": {
Expand Down

0 comments on commit 956301a

Please sign in to comment.