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
Replaceoperation to set the value of/system/dns/config/searchto["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
Updateoperation to add"youtube.com"to the existing leaf-list. -
Final Validation: It verifies that the leaf-list at
/system/dns/state/searchnow 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