Hi All,
Yang 1:
list card {
leaf type {
type string; //ABC-T1,ABC-T2, BCD-A2, BCD-A4
}
}
Yang 2:
list interfaces {
leaf name {
type string; // ocb-1/1/0/a<1-8>
}
}
Yang 3:
list mgmt {
list intferface {
key "name";
leaf naem {
type string; // dab-1/1/0/a<1-8>
}
leaf status {
type enum; // 0, 1, 2
}
}
I have 3 yang as above:
I need to check the following
- In yang 1, I need to check if the last digit is even.
- Then when I configure yang2, if I configure ocb-1/1/0/a1, I need to check if dab-1/1/0/a<1-8> in yang 3 is configured with enum 1 and 2. If configured error must be thrown.
- reverese case after step 1): when I configure yang3, if I configure dab-1/1/0/a1 with enum 1 and 2, I need to check if ocb-1/1/0/a<1-8> is configured. If configured error must be thrown.
Kindly let know is it possible to do in annotation yang.