module: frr-vrf
+--rw lib
+--rw vrf* [name]
+--rw name string
+--ro id? uint32
+--ro active? boolean <false>
+--rw netns {netns}?
+--rw name? string
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
--- /dev/null
+module frr-vrf {
+ yang-version 1.1;
+ namespace "http://frrouting.org/yang/vrf";
+ prefix frr-vrf;
+
+ organization
+ "Free Range Routing";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org>
+ FRR Development List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module defines a model for managing FRR VRF.";
+
+ revision 2019-12-06 {
+ description
+ "Initial revision.";
+ }
+
+ /*
+ * Network namespace feature
+ */
+ feature netns {
+ description "Abstracts network namespace as VRF.";
+ }
+
+ container lib {
+ list vrf {
+ key "name";
+ description
+ "VRF.";
+ leaf name {
+ type string {
+ length "1..36";
+ }
+ description
+ "VRF name.";
+ }
+
+ leaf id {
+ type uint32 {
+ range "0..4294967295";
+ }
+ config false;
+ description
+ "VRF Id.";
+ }
+
+ leaf active {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "VRF active in kernel.";
+ }
+
+ container netns {
+ if-feature "netns";
+ leaf name {
+ type string;
+ description
+ "Namespace name.";
+ }
+ }
+ }
+ }
+
+ typedef vrf-ref {
+ type leafref {
+ require-instance false;
+ path "/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name";
+ }
+ description
+ "Reference to a VRF";
+ }
+}