Hi,
In my module I have the following definition:
container private-as-handling {
must "../../peer-group[peer-group-name=current()]/peer-parameters/peer-type ='EXTERNAL'";
description "private AS in AS_PATH treatment: replacing,removing or doing nothing";
leaf enable {
description "enable or disable handling of private AS";
type boolean;
default false;
}
leaf remove-private-as {
type eci-bgp-types:remove-private-as-option;
description
"Remove or replace private AS numbers from updates sent to peers.";
}
}
leaf minimum-advertisement-interval {
type int32 {
range "1..3600";
}
must "../../peer-group[peer-group-name=current()]/peer-parameters/peer-type ='EXTERNAL'";
default 30;
I don’t set the container private-as-handling nor the leaf minimum-advertisement-interval and I am using peer-type == INTERNAL.
I suspect that the problem is that confd sets these container & leaf by default to default values and therefore the must statement fails:
Aborted: ‘routing control-plane-protocols control-plane-protocol bgp master bgp peer-groups peer-group ibgp minimum-advertisement-interval’ (value “30”): the ‘must’ expression “…/…/peer-group[peer-group-name=current()]/peer-parameters/peer-type =‘EXTERNAL’” failed
Is there any solution for that?
Thanks,
Evyatar Wiesel