summaryrefslogtreecommitdiffstats
path: root/yang/frr-vrrpd.yang
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-09-18 17:55:23 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-12-09 20:39:18 +0100
commite6a70ae8f108c7c82cf3d0e0937c3e76c0310e1e (patch)
tree1d358a70ac6c92060dd3abeb4baebdb00f897c62 /yang/frr-vrrpd.yang
parentyang: add v2 support to vrrp yang model (diff)
downloadfrr-e6a70ae8f108c7c82cf3d0e0937c3e76c0310e1e.tar.xz
frr-e6a70ae8f108c7c82cf3d0e0937c3e76c0310e1e.zip
yang: add opderdata & slight reorg for vrrp
- Move virtual address configs to be under the version specific (v4/v6) nodes - Add lots of operdata Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'yang/frr-vrrpd.yang')
-rw-r--r--yang/frr-vrrpd.yang146
1 files changed, 113 insertions, 33 deletions
diff --git a/yang/frr-vrrpd.yang b/yang/frr-vrrpd.yang
index d9e0d2c9b..1c75d460b 100644
--- a/yang/frr-vrrpd.yang
+++ b/yang/frr-vrrpd.yang
@@ -7,6 +7,10 @@ module frr-vrrpd {
prefix inet;
}
+ import ietf-yang-types {
+ prefix yang;
+ }
+
import frr-interface {
prefix frr-interface;
}
@@ -16,17 +20,6 @@ module frr-vrrpd {
"Initial revision.";
}
- grouping ip-vrrp-ipv6-state {
- description
- "IPv6-specific operational state for VRRP on IPv6 interfaces";
- leaf virtual-link-local {
- type inet:ip-address;
- description
- "For VRRP on IPv6 interfaces, sets the virtual link local
- address";
- }
- }
-
grouping ip-vrrp-tracking-config {
description
"Configuration data for tracking interfaces
@@ -113,21 +106,6 @@ module frr-vrrpd {
default "3";
}
- leaf-list ipv4-virtual-address {
- type inet:ipv4-address;
- description
- "Configure one or more IPv4 virtual addresses for the
- VRRP group";
- }
-
- leaf-list ipv6-virtual-address {
- when "../version = 3";
- type inet:ipv6-address;
- description
- "Configure one or more IPv6 virtual addresses for the
- VRRP group";
- }
-
leaf priority {
type uint8 {
range "1..254";
@@ -180,13 +158,88 @@ module frr-vrrpd {
grouping ip-vrrp-state {
description
- "Operational state data for VRRP on IP interfaces";
+ "Grouping for operational state data for a virtual router";
leaf current-priority {
type uint8;
config false;
description
"Operational value of the priority for the
- interface in the VRRP group";
+ interface in the VRRP group.";
+ }
+
+ leaf vrrp-interface {
+ type frr-interface:interface-ref;
+ config false;
+ description
+ "The interface used to transmit VRRP traffic.";
+ }
+
+ leaf source-address {
+ type inet:ip-address;
+ config false;
+ description
+ "The source IP address used for VRRP advertisements.";
+ }
+
+ leaf state {
+ type enumeration {
+ enum "Initialize" {
+ description
+ "State when virtual router is waiting for a Startup event.";
+ }
+ enum "Master" {
+ description
+ "State when virtual router is functioning as the forwarding router
+ for the virtual addresses.";
+ }
+ enum "Backup" {
+ description
+ "State when virtual router is monitoring the availability and state
+ of the Master router.";
+ }
+ }
+ config false;
+ }
+
+ leaf master-advertisement-interval {
+ type uint16 {
+ range "0..4095";
+ }
+ config false;
+ description
+ "Advertisement interval contained in advertisements received from the Master, in milliseconds.";
+ }
+
+ leaf skew-time {
+ type uint16;
+ config false;
+ description
+ "Time to skew Master_Down_Interval, in milliseconds.";
+ }
+
+ container counter {
+ config false;
+ leaf state-transition {
+ type yang:zero-based-counter32;
+ description
+ "Number of state transitions the virtual router has experienced.";
+ }
+
+ container tx {
+ leaf advertisement {
+ type yang:zero-based-counter32;
+ description
+ "Number of sent VRRP advertisements.";
+ }
+ }
+
+ container rx {
+ leaf advertisement {
+ type yang:zero-based-counter32;
+ description
+ "Number of received VRRP advertisements.";
+ }
+ }
}
}
@@ -207,15 +260,42 @@ module frr-vrrpd {
uses ip-vrrp-config;
container v4 {
- config false;
- uses ip-vrrp-state;
+ leaf-list virtual-address {
+ type inet:ipv4-address;
+ description
+ "Configure one or more IPv4 virtual addresses for the
+ VRRP group";
+ }
+
+ uses ip-vrrp-state {
+ augment "./counter/tx" {
+ leaf gratuitous-arp {
+ type yang:zero-based-counter32;
+ description
+ "Number of sent gratuitous ARP requests.";
+ }
+ }
+ }
}
container v6 {
- config false;
- uses ip-vrrp-state;
+ when "../version = 3";
+ leaf-list virtual-address {
+ type inet:ipv6-address;
+ description
+ "Configure one or more IPv6 virtual addresses for the
+ VRRP group";
+ }
- uses ip-vrrp-ipv6-state;
+ uses ip-vrrp-state {
+ augment "./counter/tx" {
+ leaf neighbor-advertisement {
+ type yang:zero-based-counter32;
+ description
+ "Number of sent unsolicited Neighbor Advertisements.";
+ }
+ }
+ }
}
}
}