I want to create test coverage for my service packages in NSO, and my approach involves scripting inputs to test expected outputs. Consider having an input file, and the service package generates a result similar to the example below on the resource side.
route-policy quickstart-med
if med eq 127 then
set community (123:456) additive
elseif med eq 63 then
set community (123:789) additive
else
delete community in (123:123)
endif
pass
end-policy
Is it possible to write such cases in Python and how? if not then What would be the preferred method for writing such cases ?