Hi,
I have a module that adds some configuration to interfaces (the specific
feature being configured isn't important here, so I'll just call it "feature").
I want to implement this module, but the device I'm working on only supports
the feature on some kinds of interfaces.
So I want to add a "when" constraint in a deviation module that says the
feature configuration is only available for these kinds of interfaces.
However, I found that "when" statements are not allowed to be affected by
deviations (according to the RFC and according to confdc).
Is there a reason for this? It seems like an oversight.
Example:
module feature-module {
// ... prefix, imports, etc ...
import ietf-interfaces {prefix if;}
augment /if:interfaces/if:interface {
container feature {
leaf enabled {
type boolean;
description "Enables the feature";
}
}
}
}
module feature-module-deviations {
// ... prefix, imports, etc ...
import feature-module {prefix fm;}
import iana-if-types {prefix ianaift;}
deviation /if:interfaces/if:interface/fm:feature {
deviate add {
// parsing fails here; "when" is not allowed as a child of
"deviate"
when "../if:type = 'ianaift:ethernetCsmacd' or ../if:type =
'ianaift:ieee8023adLag'";
}
}
}
Alex
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod