diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-09-12 21:24:54 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-12-09 14:39:18 -0500 | 
| commit | 4d12b27efea6b4462029bf4478f2d4d681c25548 (patch) | |
| tree | 52572f4ebfc86933a12af060b4daeed986c14f6a /yang/frr-vrrpd.yang | |
| parent | 2ea09c73796c607c424e09058bac58fb609be760 (diff) | |
yang: add v2 support to vrrp yang model
This adds support for VRRPv2 to the VRRP YANG model, which entails the
following changes:
- Add a version leaf with a default of 3
- Split v4 and v6 vritual addresses into separate lists, with
  constraints on v6 addresses to only exist when the version is 3
General improvements:
- Remove unused config groupings
- Add administrative shutdown leaf
- Split state reporting into v4 and v6 blocks, since these are
  considered separate virtual routers
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'yang/frr-vrrpd.yang')
| -rw-r--r-- | yang/frr-vrrpd.yang | 62 | 
1 files changed, 48 insertions, 14 deletions
diff --git a/yang/frr-vrrpd.yang b/yang/frr-vrrpd.yang index 4089d9309d..d9e0d2c9b4 100644 --- a/yang/frr-vrrpd.yang +++ b/yang/frr-vrrpd.yang @@ -16,10 +16,9 @@ module frr-vrrpd {        "Initial revision.";    } -  grouping ip-vrrp-ipv6-config { +  grouping ip-vrrp-ipv6-state {      description -      "IPv6-specific configuration data for VRRP on IPv6 -       interfaces"; +      "IPv6-specific operational state for VRRP on IPv6 interfaces";      leaf virtual-link-local {        type inet:ip-address;        description @@ -28,12 +27,6 @@ module frr-vrrpd {      }    } -  grouping ip-vrrp-ipv6-state { -    description -      "IPv6-specific operational state for VRRP on IPv6 interfaces"; -    uses ip-vrrp-ipv6-config; -  } -    grouping ip-vrrp-tracking-config {      description        "Configuration data for tracking interfaces @@ -104,10 +97,34 @@ module frr-vrrpd {           generated for the VRRP group";      } -    leaf-list virtual-address { -      type inet:ip-address; +    leaf version { +      type enumeration { +        enum "2" { +          value 2; +          description +            "VRRP version 2."; +        } +        enum "3" { +          value 3; +          description +            "VRRP version 3."; +        } +      } +      default "3"; +    } + +    leaf-list ipv4-virtual-address { +      type inet:ipv4-address;        description -        "Configure one or more virtual addresses for the +        "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";      } @@ -152,6 +169,13 @@ module frr-vrrpd {           1 second. Several implementation express this in units of           seconds";      } + +    leaf shutdown { +      type boolean; +      default "false"; +      description +        "Administrative shutdown for this VRRP group."; +    }    }    grouping ip-vrrp-state { @@ -180,9 +204,19 @@ module frr-vrrpd {          key "virtual-router-id";          description            "List of VRRP groups, keyed by virtual router id"; -          uses ip-vrrp-config; -        uses ip-vrrp-state; + +        container v4 { +          config false; +          uses ip-vrrp-state; +        } + +        container v6 { +          config false; +          uses ip-vrrp-state; + +          uses ip-vrrp-ipv6-state; +        }        }      }    }  | 
