Adding OpenConfig YANG models.
Change-Id: I0a2fdd5826e80933cf4b9ae939ff3051acec02aa
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft.yang b/models/openconfig/src/main/yang/aft/openconfig-aft.yang
new file mode 100644
index 0000000..98b9362
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft.yang
@@ -0,0 +1,136 @@
+module openconfig-aft {
+
+ yang-version "1";
+
+ namespace "http://openconfig.net/yang/aft";
+
+ prefix "oc-aft";
+
+ import openconfig-extensions { prefix "oc-ext"; }
+
+ // Include IPv4 AFT submodule.
+ include openconfig-aft-ipv4;
+ // Include IPv6 AFT submodule.
+ include openconfig-aft-ipv6;
+ // Include MPLS AFT submodule.
+ include openconfig-aft-mpls;
+ // Include policy forwarding AFT submodule.
+ include openconfig-aft-pf;
+ // Include the ethernet AFT submodule.
+ include openconfig-aft-ethernet;
+ // Include the common cross-AFT entities.
+ include openconfig-aft-common;
+
+ organization
+ "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "A model describing the forwarding entries installed on a network
+ element. It should be noted that this model is not expected to
+ align 1:1 with the underlying structure used directly by a
+ forwarding element (e.g., linecard), but rather provide an
+ abstraction that can be consumed by an NMS to observe, and in some
+ cases manipulate, the internal forwarding database in a simplified
+ manner. Since the underlying model of the forwarding table is not
+ expected to align with this model, the structure described herein
+ is referred to as an Abstract Forwarding Table (AFT), rather than
+ the FIB.";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision 2017-05-10 {
+ description
+ "Refactor to provide concretised per-AF schemas per AFT.";
+ reference "0.3.0";
+ }
+
+ // config + state groupings
+
+ // structural groupings
+
+ grouping aft-top {
+ description
+ "Top-level grouping allowing per-protocol instantiation of the
+ AFT.";
+
+ container afts {
+ description
+ "The abstract forwarding tables (AFTs) that are associated
+ with the network instance. An AFT is instantiated per-protocol
+ running within the network-instance - such that one exists for
+ IPv4 Unicast, IPv6 Unicast, MPLS, L2 forwarding entries, etc.
+ A forwarding entry within the FIB has a set of next-hops,
+ which may be a reference to an entry within another table -
+ e.g., where a Layer 3 next-hop has an associated Layer 2
+ forwarding entry.";
+
+ container ipv4-unicast {
+ description
+
+ "The abstract forwarding table for IPv4 unicast. Entries
+ within this table are uniquely keyed on the IPv4 unicast
+ destination prefix which is matched by ingress packets.
+
+ The data set represented by the IPv4 Unicast AFT is the set
+ of entries from the IPv4 unicast RIB that have been selected
+ for installation into the FIB of the device exporting the
+ data structure.";
+
+ uses aft-ipv4-unicast-structural;
+ }
+
+ container ipv6-unicast {
+ description
+ "The abstract forwarding table for IPv6 unicast. Entries
+ within this table are uniquely keyed on the IPv6 unicast
+ destination prefix which is matched by ingress packets.
+
+ The data set represented by the IPv6 Unicast AFTis the set
+ of entries within the IPv6 RIB that ";
+
+ uses aft-ipv6-unicast-structural;
+
+ }
+
+ container policy-forwarding {
+ description
+ "The abstract forwarding table for policy-based forwarding
+ entries. Since multiple match criteria can be utilised
+ within a policy-based forwarding rule, this AFT provides a
+ flexible match criteria, and is indexed based on an
+ arbitrary 64-bit index. Entries within the AFT may match on
+ multiple field types (e.g., L4 header fields, as well as L2
+ fields).
+
+ Examples of entries within this table are:
+ - IPv4 policy-based routing based on DSCP.
+ - MPLS policy-based forwarding entries.";
+
+ uses aft-pf-structural;
+ }
+
+ container mpls {
+ description
+ "The abstract forwarding table for MPLS label based
+ forwarding entries. Entries within the table are keyed based
+ on the top-most MPLS label in the stack on the ingress
+ packet.";
+
+ uses aft-mpls-structural;
+ }
+
+ container ethernet {
+ description
+ "The abstract forwarding table for Ethernet based forwarding
+ entries. Entries within the table are keyed based on the
+ destination MAC address on the ingress packet.";
+
+ uses aft-ethernet-structural;
+ }
+ }
+ }
+}