sonic-buildimage/src/sonic-yang-models/yang-models/sonic-bgp-monitor.yang
ganglv dde5f37496
[yang]: Add Yang models for BGP monitor (#9752)
Why I did it
end2end test is blocked by Yang model for BGP monitor.

How I did it
Create new yang files for BGP monitor, and add UT.

How to verify it
Follow the steps in #9711.
Run UT for sonic-yang-models.

Signed-off-by: Gang Lv ganglv@microsoft.com
2022-01-20 08:51:12 +08:00

54 lines
1.2 KiB
YANG

module sonic-bgp-monitor {
namespace "http://github.com/Azure/sonic-bgp-monitor";
prefix bgpmon;
yang-version 1.1;
import ietf-inet-types {
prefix inet;
}
import sonic-types {
prefix stypes;
}
import sonic-bgp-common {
prefix bgpcmn;
}
organization
"SONiC";
contact
"SONiC";
description
"SONIC BGP Monitor";
revision 2022-01-11 {
description
"Initial revision.";
}
container sonic-bgp-monitor {
container BGP_MONITORS {
list BGP_MONITORS_LIST {
description "This list is to support BGP monitor configuration handled by bgpcfgd";
key "addr";
leaf addr {
type inet:ip-address;
description "BGP monitor address";
}
uses bgpcmn:sonic-bgp-cmn-neigh {
refine name {
must "current() = 'BGPMonitor'" {
error-message "Invalid BGP monitor name";
}
}
}
}
}
}
}