leaflist_update_test - openconfig/featureprofiles GitHub Wiki
This test validates the behavior of gNMI Replace
and Update
operations on a leaf-list field in the OpenConfig model. The test specifically targets the /system/dns/config/search
path.
The test follows these steps:
-
Initial Replace: It uses a gNMI
Replace
operation to set the value of/system/dns/config/search
to["google.com"]
. -
Validation: It verifies that the DUT successfully updated the path and that the new value is
["google.com"]
. -
Update: It then uses a gNMI
Update
operation to add"youtube.com"
to the existing leaf-list. -
Final Validation: It verifies that the leaf-list at
/system/dns/state/search
now contains both"google.com"
and"youtube.com"
.
The test will fail if the values at any stage do not match the expected results.
{
"system": {
"dns": {
"config": {
"search": [
"google.com",
"youtube.com"
]
}
}
}
}
The below yaml defines the OC paths intended to be covered by this test.
paths:
/system/dns/config/search:
/system/dns/state/search:
rpcs:
gnmi:
gNMI.Set:
gNMI.Subscribe:
vRX - virtual router device