Adding OpenConfig YANG models.

Change-Id: I0a2fdd5826e80933cf4b9ae939ff3051acec02aa
diff --git a/models/openconfig/BUCK b/models/openconfig/BUCK
new file mode 100644
index 0000000..d724f04
--- /dev/null
+++ b/models/openconfig/BUCK
@@ -0,0 +1,5 @@
+
+yang_model(
+  app_name = 'org.onosproject.models.openconfig',
+  title = 'OpenConfig YANG Models',
+)
\ No newline at end of file
diff --git a/models/openconfig/pom.xml b/models/openconfig/pom.xml
new file mode 100644
index 0000000..2e768d9
--- /dev/null
+++ b/models/openconfig/pom.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2017-present Open Networking Foundation
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.onosproject</groupId>
+        <artifactId>onos-models</artifactId>
+        <version>1.12.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-models-openconfig</artifactId>
+    <packaging>bundle</packaging>
+    <description>OpenConfig YANG models</description>
+
+    <properties>
+        <onos.app.name>org.onosproject.models.openconfig</onos.app.name>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-yang-model</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-apps-yang</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions combine.children="append">
+                        <Include-Resource>yang/resources/YangMetaData.ser=target/classes/yang/resources/YangMetaData.ser</Include-Resource>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-yang-compiler-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                  <execution>
+                    <id>add-source</id>
+                    <phase>generate-sources</phase>
+                    <goals>
+                      <goal>add-source</goal>
+                    </goals>
+                    <configuration>
+                      <sources>
+                        <source>${project.build.directory}/generated-sources</source>
+                      </sources>
+                    </configuration>
+                  </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>onos-yang-plugin-workaround</id>
+                        <!-- yang plugin cannot handle non-clean compilation -->
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                        <configuration>
+                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
+                            <filesets>
+                                <fileset>
+                                    <directory>target/generated-sources</directory>
+                                </fileset>
+                            </filesets>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.apache.maven.plugins
+                                        </groupId>
+                                        <artifactId>
+                                            maven-clean-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [3.0.0,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>clean</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+</project>
diff --git a/models/openconfig/src/main/yang/acl/openconfig-acl.yang b/models/openconfig/src/main/yang/acl/openconfig-acl.yang
new file mode 100644
index 0000000..aee9e80
--- /dev/null
+++ b/models/openconfig/src/main/yang/acl/openconfig-acl.yang
@@ -0,0 +1,830 @@
+module openconfig-acl {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/acl";
+
+  prefix "oc-acl";
+
+  import openconfig-packet-match { prefix oc-match; }
+  import openconfig-interfaces { prefix oc-if; }
+  import openconfig-yang-types { prefix oc-yang; }
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module defines configuration and operational state
+    data for network access control lists (i.e., filters, rules,
+    etc.).  ACLs are organized into ACL sets, with each set
+    containing one or more ACL entries.  ACL sets are identified
+    by a unique name, while each entry within a set is assigned
+    a sequence-id that determines the order in which the ACL
+    rules are applied to a packet.
+
+    Individual ACL rules specify match criteria based on fields in
+    the packet, along with an action that defines how matching
+    packets should be handled. Entries have a type that indicates
+    the type of match criteria, e.g., MAC layer, IPv4, IPv6, etc.";
+
+  oc-ext:openconfig-version "1.0.0";
+
+  revision "2017-05-26" {
+    description
+      "Separated ACL entries by type";
+    reference "1.0.0";
+  }
+
+  revision "2016-08-08" {
+    description
+      "OpenConfig public release";
+    reference "0.2.0";
+  }
+
+  revision "2016-01-22" {
+    description
+      "Initial revision";
+    reference "TBD";
+  }
+
+
+  identity ACL_TYPE {
+    description
+      "Base identity for types of ACL sets";
+  }
+
+  identity ACL_IPV4 {
+    base ACL_TYPE;
+    description
+      "IP-layer ACLs with IPv4 addresses";
+  }
+
+  identity ACL_IPV6 {
+    base ACL_TYPE;
+    description
+      "IP-layer ACLs with IPv6 addresses";
+  }
+
+  identity ACL_L2 {
+    base ACL_TYPE;
+    description
+      "MAC-layer ACLs";
+  }
+
+  identity ACL_MIXED {
+    base ACL_TYPE;
+    description
+      "Mixed-mode ACL that specifies L2 and L3 protocol
+      fields.  This ACL type is not implemented by many
+      routing/switching devices.";
+  }
+
+  // ACL action type
+
+  identity FORWARDING_ACTION {
+    description
+      "Base identity for actions in the forwarding category";
+  }
+
+  identity ACCEPT {
+    base FORWARDING_ACTION;
+    description
+      "Accept the packet";
+  }
+
+  identity DROP {
+    base FORWARDING_ACTION;
+    description
+      "Drop packet without sending any ICMP error message";
+  }
+
+  identity REJECT {
+    base FORWARDING_ACTION;
+    description
+      "Drop the packet and send an ICMP error message to the source";
+  }
+
+  identity LOG_ACTION {
+    description
+      "Base identity for defining the destination for logging
+      actions";
+  }
+
+  identity LOG_SYSLOG {
+    base LOG_ACTION;
+    description
+      "Log the packet in Syslog";
+  }
+
+  identity LOG_NONE {
+    base LOG_ACTION;
+    description
+      "No logging";
+  }
+
+  identity ACL_COUNTER_CAPABILITY {
+    description
+      "Base identity for system to indicate how it is able to report
+      counters";
+  }
+
+  identity INTERFACE_ONLY {
+    base ACL_COUNTER_CAPABILITY;
+    description
+      "ACL counters are available and reported only per interface";
+  }
+
+  identity AGGREGATE_ONLY {
+    base ACL_COUNTER_CAPABILITY;
+    description
+      "ACL counters are aggregated over all interfaces, and reported
+      only per ACL entry";
+  }
+
+  identity INTERFACE_AGGREGATE {
+    base ACL_COUNTER_CAPABILITY;
+    description
+      "ACL counters are reported per interface, and also aggregated
+      and reported per ACL entry.";
+  }
+
+  // grouping statements
+
+  // input interface
+  grouping input-interface-config {
+    description
+      "Config of interface";
+
+  }
+
+  grouping input-interface-state {
+    description
+      "State information of interface";
+  }
+
+  grouping input-interface-top {
+    description
+      "Input interface top level container";
+
+    container input-interface {
+      description
+        "Input interface container";
+
+      container config {
+        description
+          "Config data";
+        uses input-interface-config;
+      }
+
+      container state {
+        config false;
+        description
+          "State information";
+        uses input-interface-config;
+        uses input-interface-state;
+      }
+
+      uses oc-if:interface-ref;
+
+    }
+  }
+
+  // Action Type
+  grouping action-config {
+    description
+      "Config of action type";
+
+
+    leaf forwarding-action {
+      type identityref {
+        base FORWARDING_ACTION;
+      }
+      mandatory true;
+      description
+        "Specifies the forwarding action.  One forwarding action
+        must be specified for each ACL entry";
+    }
+
+    leaf log-action {
+      type identityref {
+        base LOG_ACTION;
+      }
+      default LOG_NONE;
+      description
+        "Specifies the log action and destination for
+        matched packets.  The default is not to log the
+        packet.";
+    }
+
+
+  }
+
+  grouping action-state {
+    description
+      "State information of action type";
+
+  }
+
+  grouping action-top {
+    description
+      "ACL action type top level container";
+
+    container actions {
+      description
+        "Enclosing container for list of ACL actions associated
+        with an entry";
+
+      container config {
+        description
+          "Config data for ACL actions";
+        uses action-config;
+      }
+
+      container state {
+        config false;
+        description
+          "State information for ACL actions";
+        uses action-config;
+        uses action-state;
+      }
+    }
+  }
+
+  grouping acl-counters-state {
+    description
+      "Common grouping for ACL counters";
+
+    leaf matched-packets {
+      type oc-yang:counter64;
+      description
+        "Count of the number of packets matching the current ACL
+        entry.
+
+        An implementation should provide this counter on a
+        per-interface per-ACL-entry if possible.
+
+        If an implementation only supports ACL counters per entry
+        (i.e., not broken out per interface), then the value
+        should be equal to the aggregate count across all interfaces.
+
+        An implementation that provides counters per entry per
+        interface is not required to also provide an aggregate count,
+        e.g., per entry -- the user is expected to be able implement
+        the required aggregation if such a count is needed.";
+    }
+
+    leaf matched-octets {
+      type oc-yang:counter64;
+      description
+        "Count of the number of octets (bytes) matching the current
+        ACL entry.
+
+        An implementation should provide this counter on a
+        per-interface per-ACL-entry if possible.
+
+        If an implementation only supports ACL counters per entry
+        (i.e., not broken out per interface), then the value
+        should be equal to the aggregate count across all interfaces.
+
+        An implementation that provides counters per entry per
+        interface is not required to also provide an aggregate count,
+        e.g., per entry -- the user is expected to be able implement
+        the required aggregation if such a count is needed.";
+    }
+
+  }
+
+  // Access List Entries
+  grouping access-list-entries-config {
+    description
+      "Access List Entries (ACE) config.";
+
+    leaf sequence-id {
+      type uint32;
+      description
+        "The sequence id determines the order in which ACL entries
+        are applied.  The sequence id must be unique for each entry
+        in an ACL set.  Target devices should apply the ACL entry
+        rules in the order determined by sequence id, rather than
+        the relying only on order in the list.";
+    }
+
+    leaf description {
+      type string;
+      description
+        "A user-defined description, or comment, for this Access List
+        Entry.";
+    }
+
+  }
+
+  grouping access-list-entries-state {
+    description
+      "Access List Entries state.";
+
+    uses acl-counters-state;
+
+  }
+
+  grouping access-list-entries-top {
+    description
+      "Access list entries to level container";
+
+    container acl-entries {
+      description
+        "Access list entries container";
+
+      list acl-entry {
+        key "sequence-id";
+        description
+          "List of ACL entries comprising an ACL set";
+
+        leaf sequence-id {
+          type leafref {
+            path "../config/sequence-id";
+          }
+          description
+            "references the list key";
+        }
+
+        container config {
+          description
+            "Access list entries config";
+          uses access-list-entries-config;
+        }
+
+        container state {
+          config false;
+          description
+            "State information for ACL entries";
+          uses access-list-entries-config;
+          uses access-list-entries-state;
+        }
+
+        uses oc-match:ethernet-header-top {
+          when "../../config/type='ACL_L2'" {
+            description
+              "MAC-layer fields are valid when the ACL type is L2";
+          }
+        }
+        uses oc-match:ipv4-protocol-fields-top {
+          when "../../config/type='ACL_IPV4'" {
+            description
+              "IPv4-layer fields are valid when the ACL type is
+              IPv4";
+          }
+        }
+        uses oc-match:ipv6-protocol-fields-top {
+          when "../../config/type='ACL_IPV6'" {
+            description
+              "IPv6-layer fields are valid when the ACL type is
+              IPv6";
+          }
+        }
+        uses oc-match:transport-fields-top {
+          when "../../config/type='ACL_IPV6' or " +
+            "../../config/type='ACL_IPV4'" {
+            description
+              "Transport-layer fields are valid when specifying
+              L3 ACL types";
+          }
+        }
+        uses input-interface-top;
+
+        uses action-top;
+      }
+    }
+  }
+
+  grouping acl-set-config {
+    description
+      "Access Control List config";
+
+    leaf name {
+      type string;
+      description
+        "The name of the access-list set";
+    }
+
+    leaf type {
+      type identityref {
+        base ACL_TYPE;
+      }
+      description
+        "The type determines the fields allowed in the ACL entries
+        belonging to the ACL set (e.g., IPv4, IPv6, etc.)";
+    }
+
+    leaf description {
+      type string;
+      description
+        "Description, or comment, for the ACL set";
+    }
+
+  }
+
+  grouping acl-set-state {
+    description
+      "Access Control List state";
+  }
+
+  grouping acl-set-top {
+    description
+      "Access list entries variables top level container";
+
+    container acl-sets {
+      description
+        "Access list entries variables enclosing container";
+
+      list acl-set {
+        key "name type";
+        description
+          "List of ACL sets, each comprising of a list of ACL
+          entries";
+
+        leaf name {
+          type leafref {
+            path "../config/name";
+          }
+          description
+            "Reference to the name list key";
+        }
+
+        leaf type {
+          type leafref {
+            path "../config/type";
+          }
+          description
+            "Reference to the type list key";
+        }
+
+        container config {
+          description
+            "Access list config";
+          uses acl-set-config;
+        }
+
+        container state {
+          config false;
+          description
+            "Access list state information";
+          uses acl-set-config;
+          uses acl-set-state;
+        }
+        uses access-list-entries-top;
+      }
+    }
+  }
+
+  grouping interface-acl-entries-config {
+    description
+      "Configuration data for per-interface ACLs";
+
+  }
+
+  grouping interface-acl-entries-state {
+    description
+      "Operational state data for per-interface ACL entries";
+
+    leaf sequence-id {
+      type leafref {
+        path "/acl/acl-sets/" +
+          "acl-set[name=current()/../../../../set-name]" +
+          "[type=current()/../../../../type]/" +
+          "acl-entries/acl-entry/sequence-id";
+      }
+      description
+        "Reference to an entry in the ACL set applied to an
+        interface";
+    }
+
+    uses acl-counters-state;
+
+  }
+
+  grouping interface-acl-entries-top {
+    description
+      "Top-level grouping for per-interface ACL entries";
+
+    container acl-entries {
+      config false;
+      description
+        "Enclosing container for list of references to ACLs";
+
+      list acl-entry {
+        key "sequence-id";
+        description
+          "List of ACL entries assigned to an interface";
+
+        leaf sequence-id {
+          type leafref {
+            path "../state/sequence-id";
+          }
+          description
+            "Reference to per-interface acl entry key";
+        }
+
+        // no config container since the enclosing container is
+        // read-only
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for per-interface ACL entries";
+
+          uses interface-acl-entries-config;
+          uses interface-acl-entries-state;
+        }
+      }
+    }
+  }
+
+  grouping interface-ingress-acl-config {
+    description
+      "Configuration data for per-interface ingress ACLs";
+
+    leaf set-name {
+      type leafref {
+        path "../../../../../../acl-sets/acl-set/config/name";
+      }
+      description
+        "Reference to the ACL set name applied on ingress";
+    }
+
+    leaf type {
+      type leafref {
+        path "../../../../../../acl-sets/acl-set[name=current()/../set-name]" +
+          "/config/type";
+      }
+      description
+        "Reference to the ACL set type applied on ingress";
+    }
+  }
+
+  grouping interface-ingress-acl-state {
+    description
+      "Operational state data for the per-interface ingress ACL";
+  }
+
+  grouping interface-ingress-acl-top {
+    description
+      "Top-level grouping for per-interface ingress ACL data";
+
+    container ingress-acl-sets {
+      description
+        "Enclosing container the list of ingress ACLs on the
+        interface";
+
+      list ingress-acl-set {
+        key "set-name type";
+        description
+          "List of ingress ACLs on the interface";
+
+        leaf set-name {
+          type leafref {
+            path "../config/set-name";
+          }
+          description
+            "Reference to set name list key";
+        }
+
+        leaf type {
+          type leafref {
+            path "../config/type";
+          }
+          description
+            "Reference to type list key";
+        }
+
+        container config {
+          description
+            "Configuration data ";
+
+          uses interface-ingress-acl-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for interface ingress ACLs";
+
+          uses interface-ingress-acl-config;
+          uses interface-ingress-acl-state;
+        }
+
+        uses interface-acl-entries-top;
+      }
+    }
+  }
+
+  grouping interface-egress-acl-config {
+    description
+      "Configuration data for per-interface egress ACLs";
+
+    leaf set-name {
+      type leafref {
+        path "../../../../../../acl-sets/acl-set/config/name";
+      }
+      description
+        "Reference to the ACL set name applied on egress";
+    }
+
+    leaf type {
+      type leafref {
+        path "../../../../../../acl-sets/acl-set[name=current()/../set-name]" +
+          "/config/type";
+      }
+      description
+        "Reference to the ACL set type applied on egress.";
+    }
+  }
+
+  grouping interface-egress-acl-state {
+    description
+      "Operational state data for the per-interface egress ACL";
+  }
+
+  grouping interface-egress-acl-top {
+    description
+      "Top-level grouping for per-interface egress ACL data";
+
+    container egress-acl-sets {
+      description
+        "Enclosing container the list of egress ACLs on the
+        interface";
+
+      list egress-acl-set {
+        key "set-name type";
+        description
+          "List of egress ACLs on the interface";
+
+        leaf set-name {
+          type leafref {
+            path "../config/set-name";
+          }
+          description
+            "Reference to set name list key";
+        }
+
+        leaf type {
+          type leafref {
+            path "../config/type";
+          }
+          description
+            "Reference to type list key";
+        }
+
+        container config {
+          description
+            "Configuration data ";
+
+          uses interface-egress-acl-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for interface egress ACLs";
+
+          uses interface-egress-acl-config;
+          uses interface-egress-acl-state;
+        }
+
+        uses interface-acl-entries-top;
+      }
+    }
+  }
+
+  grouping acl-interfaces-config {
+    description
+      "Configuration data for interface references";
+
+    leaf id {
+      type oc-if:interface-id;
+      description
+        "User-defined identifier for the interface -- a common
+        convention could be '<if name>.<subif index>'";
+    }
+  }
+
+  grouping acl-interfaces-state {
+    description
+      "Operational state data for interface references";
+  }
+
+  grouping acl-interfaces-top {
+    description
+      "Top-level grouping for interface-specific ACL data";
+
+    container interfaces {
+      description
+        "Enclosing container for the list of interfaces on which
+        ACLs are set";
+
+      list interface {
+        key "id";
+        description
+          "List of interfaces on which ACLs are set";
+
+        leaf id {
+          type leafref {
+            path "../config/id";
+          }
+          description
+            "Reference to the interface id list key";
+        }
+
+        container config {
+          description
+            "Configuration for ACL per-interface data";
+
+          uses acl-interfaces-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state for ACL per-interface data";
+
+          uses acl-interfaces-config;
+          uses acl-interfaces-state;
+        }
+
+        uses oc-if:interface-ref;
+        uses interface-ingress-acl-top;
+        uses interface-egress-acl-top;
+      }
+    }
+  }
+
+  grouping acl-config {
+    description
+      "Global configuration data for ACLs";
+  }
+
+  grouping acl-state {
+    description
+      "Global operational state data for ACLs";
+
+    leaf counter-capability {
+      type identityref {
+        base ACL_COUNTER_CAPABILITY;
+      }
+      description
+        "System reported indication of how ACL counters are reported
+        by the target";
+    }
+  }
+  grouping acl-top {
+    description
+      "Top level grouping for ACL data and structure";
+
+    container acl {
+      description
+        "Top level enclosing container for ACL model config
+        and operational state data";
+
+      container config {
+        description
+          "Global config data for ACLs";
+
+        uses acl-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Global operational state data for ACLs";
+
+        uses acl-config;
+        uses acl-state;
+      }
+
+      uses acl-set-top;
+      uses acl-interfaces-top;
+    }
+  }
+
+  // data definition statements
+  uses acl-top;
+
+  // augment statements
+
+
+}
diff --git a/models/openconfig/src/main/yang/acl/openconfig-packet-match-types.yang b/models/openconfig/src/main/yang/acl/openconfig-packet-match-types.yang
new file mode 100644
index 0000000..7c99b80
--- /dev/null
+++ b/models/openconfig/src/main/yang/acl/openconfig-packet-match-types.yang
@@ -0,0 +1,293 @@
+module openconfig-packet-match-types {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/packet-match-types";
+
+  prefix "oc-pkt-match-types";
+
+  // import some basic types
+  import openconfig-inet-types { prefix oc-inet; }
+  import openconfig-extensions { prefix oc-ext; }
+
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module defines common types for use in models requiring
+    data definitions related to packet matches.";
+
+  oc-ext:openconfig-version "1.0.0";
+
+  revision "2017-05-26" {
+    description
+        "Separated IP matches into AFs";
+    reference "1.0.0";
+  }
+
+    revision "2016-08-08" {
+    description
+      "OpenConfig public release";
+    reference "0.2.0";
+  }
+
+  revision "2016-04-27" {
+    description
+      "Initial revision";
+    reference "TBD";
+  }
+
+  // extension statements
+
+  // feature statements
+
+  // identity statements
+
+
+  //TODO: should replace this with an official IEEE module
+  // when available.  Only a select number of types are
+  // defined in this identity.
+  identity ETHERTYPE {
+    description
+      "Base identity for commonly used Ethertype values used
+      in packet header matches on Ethernet frames.  The Ethertype
+      indicates which protocol is encapsulated in the Ethernet
+      payload.";
+    reference
+      "IEEE 802.3";
+  }
+
+  identity ETHERTYPE_IPV4 {
+    base ETHERTYPE;
+    description
+      "IPv4 protocol (0x0800)";
+  }
+
+  identity ETHERTYPE_ARP {
+    base ETHERTYPE;
+    description
+      "Address resolution protocol (0x0806)";
+  }
+
+  identity ETHERTYPE_VLAN {
+    base ETHERTYPE;
+    description
+      "VLAN-tagged frame (as defined by IEEE 802.1q) (0x8100). Note
+      that this value is also used to represent Shortest Path
+      Bridging (IEEE 801.1aq) frames.";
+  }
+
+  identity ETHERTYPE_IPV6 {
+    base ETHERTYPE;
+    description
+      "IPv6 protocol (0x86DD)";
+  }
+
+  identity ETHERTYPE_MPLS {
+    base ETHERTYPE;
+    description
+      "MPLS unicast (0x8847)";
+  }
+
+  identity ETHERTYPE_LLDP {
+    base ETHERTYPE;
+    description
+      "Link Layer Discovery Protocol (0x88CC)";
+  }
+
+  identity ETHERTYPE_ROCE {
+    base ETHERTYPE;
+    description
+      "RDMA over Converged Ethernet (0x8915)";
+  }
+
+
+  //TODO: should replace this with an official IANA module when
+  //available.  Only a select set of protocols are defined with
+  //this identity.
+  identity IP_PROTOCOL {
+    description
+      "Base identity for commonly used IP protocols used in
+      packet header matches";
+    reference
+      "IANA Assigned Internet Protocol Numbers";
+  }
+
+  identity IP_TCP {
+    base IP_PROTOCOL;
+    description
+      "Transmission Control Protocol (6)";
+  }
+
+  identity IP_UDP  {
+    base IP_PROTOCOL;
+    description
+      "User Datagram Protocol (17)";
+  }
+
+  identity IP_ICMP {
+    base IP_PROTOCOL;
+    description
+      "Internet Control Message Protocol (1)";
+  }
+
+  identity IP_IGMP {
+    base IP_PROTOCOL;
+    description
+      "Internet Group Membership Protocol (2)";
+  }
+
+  identity IP_PIM {
+    base IP_PROTOCOL;
+    description
+      "Protocol Independent Multicast (103)";
+  }
+
+  identity IP_RSVP {
+    base IP_PROTOCOL;
+    description
+      "Resource Reservation Protocol (46)";
+  }
+
+  identity IP_GRE {
+    base IP_PROTOCOL;
+    description
+      "Generic Routing Encapsulation (47)";
+  }
+
+  identity IP_AUTH {
+    base IP_PROTOCOL;
+    description
+      "Authentication header, e.g., for IPSEC (51)";
+  }
+
+  identity IP_L2TP {
+    base IP_PROTOCOL;
+    description
+      "Layer Two Tunneling Protocol v.3 (115)";
+  }
+
+
+
+  identity TCP_FLAGS {
+    description
+      "Common TCP flags used in packet header matches";
+    reference
+      "IETF RFC 793 - Transmission Control Protocol
+      IETF RFC 3168 - The Addition of Explicit Congestion
+      Notification (ECN) to IP";
+  }
+
+  identity TCP_SYN {
+    base TCP_FLAGS;
+    description
+      "TCP SYN flag";
+  }
+
+  identity TCP_FIN {
+    base TCP_FLAGS;
+    description
+      "TCP FIN flag";
+  }
+
+  identity TCP_RST {
+    base TCP_FLAGS;
+    description
+      "TCP RST flag";
+  }
+
+  identity TCP_PSH {
+    base TCP_FLAGS;
+    description
+      "TCP push flag";
+  }
+
+  identity TCP_ACK {
+    base TCP_FLAGS;
+    description
+      "TCP ACK flag";
+  }
+
+  identity TCP_URG {
+    base TCP_FLAGS;
+    description
+      "TCP urgent flag";
+  }
+
+  identity TCP_ECE {
+    base TCP_FLAGS;
+    description
+      "TCP ECN-Echo flag.  If the SYN flag is set, indicates that
+      the TCP peer is ECN-capable, otherwise indicates that a
+      packet with Congestion Experienced flag in the IP header
+      is set";
+  }
+
+  identity TCP_CWR {
+    base TCP_FLAGS;
+    description
+      "TCP Congestion Window Reduced flag";
+  }
+
+  // typedef statements
+
+  typedef port-num-range {
+    type union {
+      type string {
+        pattern '^(6[0-5][0-5][0-3][0-5]|[0-5]?[0-9]?[0-9]?[0-9]?' +
+          '[0-9]?)\.\.(6[0-5][0-5][0-3][0-5]|[0-5]?[0-9]?[0-9]?' +
+          '[0-9]?[0-9]?)$';
+      }
+      type oc-inet:port-number;
+      type enumeration {
+        enum ANY {
+          description
+            "Indicates any valid port number (e.g., wildcard)";
+        }
+      }
+    }
+    description
+      "Port numbers may be represented as a single value,
+      an inclusive range as <lower>..<higher>, or as ANY to
+      indicate a wildcard.";
+  }
+
+  typedef ip-protocol-type {
+    type union {
+      type uint8 {
+        range 0..254;
+      }
+      type identityref {
+        base IP_PROTOCOL;
+      }
+    }
+    description
+      "The IP protocol number may be expressed as a valid protocol
+      number (integer) or using a protocol type defined by the
+      IP_PROTOCOL identity";
+  }
+
+  typedef ethertype-type {
+    type union {
+      type uint16 {
+        //Note range can only be expressed in decimal
+        //but value is expected in hex notation.
+        range 1..65535;
+      }
+      type identityref {
+        base ETHERTYPE;
+      }
+    }
+    description
+      "The Ethertype value may be expressed as a 16-bit number in
+      hexadecimal notation, or using a type defined by the
+      ETHERTYPE identity";
+  }
+
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/acl/openconfig-packet-match.yang b/models/openconfig/src/main/yang/acl/openconfig-packet-match.yang
new file mode 100644
index 0000000..446df36
--- /dev/null
+++ b/models/openconfig/src/main/yang/acl/openconfig-packet-match.yang
@@ -0,0 +1,314 @@
+module openconfig-packet-match {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/header-fields";
+
+  prefix "oc-pkt-match";
+
+  // import some basic types
+  import openconfig-inet-types { prefix oc-inet; }
+  import openconfig-yang-types { prefix oc-yang; }
+  import openconfig-packet-match-types { prefix oc-pkt-match-types; }
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module defines data related to packet header fields
+    used in matching operations, for example in ACLs.  When a
+    field is omitted from a match expression, the effect is a
+    wildcard ('any') for that field.";
+
+  oc-ext:openconfig-version "1.0.0";
+
+  revision "2017-05-26" {
+    description
+      "Separated IP matches into AFs";
+    reference "1.0.0";
+  }
+
+  revision "2016-08-08" {
+    description
+      "OpenConfig public release";
+    reference "0.2.0";
+  }
+
+  revision "2016-04-27" {
+    description
+      "Initial revision";
+    reference "TBD";
+  }
+
+
+  // Physical Layer fields
+  // ethernet-header
+  grouping ethernet-header-config {
+    description
+      "Configuration data of fields in Ethernet header.";
+
+    leaf source-mac {
+      type oc-yang:mac-address;
+      description
+        "Source IEEE 802 MAC address.";
+    }
+
+    leaf source-mac-mask {
+      type oc-yang:mac-address;
+      description
+        "Source IEEE 802 MAC address mask.";
+    }
+
+    leaf destination-mac {
+      type oc-yang:mac-address;
+      description
+        "Destination IEEE 802 MAC address.";
+    }
+
+    leaf destination-mac-mask {
+      type oc-yang:mac-address;
+      description
+        "Destination IEEE 802 MAC address mask.";
+    }
+
+    leaf ethertype {
+      type oc-pkt-match-types:ethertype-type;
+      description
+        "Ethertype field to match in Ethernet packets";
+    }
+  }
+
+  grouping ethernet-header-state {
+    description
+      "State information of fields in Ethernet header.";
+  }
+
+  grouping ethernet-header-top {
+    description
+      "Top level container for fields in Ethernet header.";
+
+    container l2 {
+      description
+        "Ethernet header fields";
+
+      container config {
+        description
+          "Configuration data";
+        uses ethernet-header-config;
+      }
+
+      container state {
+        config false;
+        description
+          "State Information.";
+        uses ethernet-header-config;
+        uses ethernet-header-state;
+      }
+    }
+  }
+
+  grouping ip-protocol-fields-common-config {
+    description
+      "IP protocol fields common to IPv4 and IPv6";
+
+    leaf dscp {
+      type oc-inet:dscp;
+      description
+        "Value of diffserv codepoint.";
+    }
+
+    leaf protocol {
+      type oc-pkt-match-types:ip-protocol-type;
+      description
+        "The protocol carried in the IP packet, expressed either
+        as its IP protocol number, or by a defined identity.";
+    }
+
+    leaf hop-limit {
+      type uint8 {
+        range 0..255;
+      }
+      description
+        "The IP packet's hop limit -- known as TTL (in hops) in
+        IPv4 packets, and hop limit in IPv6";
+    }
+  }
+
+  // IP Layer
+  // ip-protocol-fields
+  grouping ipv4-protocol-fields-config {
+    description
+      "Configuration data of IP protocol fields
+      for IPv4";
+
+    leaf source-address {
+      type oc-inet:ipv4-prefix;
+      description
+        "Source IPv4 address prefix.";
+    }
+
+    leaf destination-address {
+      type oc-inet:ipv4-prefix;
+      description
+        "Destination IPv4 address prefix.";
+    }
+
+    uses ip-protocol-fields-common-config;
+
+  }
+
+  grouping ipv4-protocol-fields-state {
+    description
+      "State information of IP header fields for IPv4";
+  }
+
+  grouping ipv4-protocol-fields-top {
+    description
+      "IP header fields for IPv4";
+
+    container ipv4 {
+      description
+        "Top level container for IPv4 match field data";
+
+      container config {
+        description
+          "Configuration data for IPv4 match fields";
+        uses ipv4-protocol-fields-config;
+      }
+
+      container state {
+        config false;
+        description
+          "State information for IPv4 match fields";
+        uses ipv4-protocol-fields-config;
+        uses ipv4-protocol-fields-state;
+      }
+    }
+  }
+
+  grouping ipv6-protocol-fields-config {
+    description
+      "Configuration data for IPv6 match fields";
+
+    leaf source-address {
+      type oc-inet:ipv6-prefix;
+      description
+        "Source IPv6 address prefix.";
+    }
+
+    leaf source-flow-label {
+      type oc-inet:ipv6-flow-label;
+      description
+        "Source IPv6 Flow label.";
+    }
+
+    leaf destination-address {
+      type oc-inet:ipv6-prefix;
+      description
+        "Destination IPv6 address prefix.";
+    }
+
+    leaf destination-flow-label {
+      type oc-inet:ipv6-flow-label;
+      description
+        "Destination IPv6 Flow label.";
+    }
+
+    uses ip-protocol-fields-common-config;
+  }
+
+  grouping ipv6-protocol-fields-state {
+    description
+      "Operational state data for IPv6 match fields";
+  }
+
+  grouping ipv6-protocol-fields-top {
+    description
+      "Top-level grouping for IPv6 match fields";
+
+    container ipv6 {
+      description
+        "Top-level container for IPv6 match field data";
+
+      container config {
+        description
+          "Configuration data for IPv6 match fields";
+
+        uses ipv6-protocol-fields-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for IPv6 match fields";
+
+        uses ipv6-protocol-fields-config;
+        uses ipv6-protocol-fields-state;
+      }
+    }
+  }
+
+  // Transport fields
+  grouping transport-fields-config {
+    description
+      "Configuration data of transport-layer packet fields";
+
+    leaf source-port {
+      type oc-pkt-match-types:port-num-range;
+      description
+        "Source port or range";
+    }
+
+    leaf destination-port {
+      type oc-pkt-match-types:port-num-range;
+      description
+        "Destination port or range";
+    }
+
+    leaf-list tcp-flags {
+      type identityref {
+        base oc-pkt-match-types:TCP_FLAGS;
+      }
+      description
+        "List of TCP flags to match";
+    }
+  }
+
+  grouping transport-fields-state {
+    description
+      "State data of transport-fields";
+  }
+
+  grouping transport-fields-top {
+    description
+      "Destination transport-fields top level grouping";
+
+    container transport {
+      description
+        "Transport fields container";
+
+      container config {
+        description
+          "Configuration data";
+        uses transport-fields-config;
+      }
+
+      container state {
+        config false;
+        description
+          "State data";
+        uses transport-fields-config;
+        uses transport-fields-state;
+      }
+    }
+  }
+
+}
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-common.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-common.yang
new file mode 100644
index 0000000..b740369
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-common.yang
@@ -0,0 +1,222 @@
+submodule openconfig-aft-common {
+  belongs-to "openconfig-aft" {
+    prefix "oc-aft";
+  }
+
+  import openconfig-interfaces { prefix "oc-if"; }
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-yang-types { prefix "oc-yang"; }
+  import openconfig-inet-types { prefix "oc-inet"; }
+  import openconfig-mpls-types { prefix "oc-mplst"; }
+  import openconfig-policy-types { prefix "oc-pol-types"; }
+  import openconfig-aft-types { prefix "oc-aftt"; }
+
+  oc-ext:openconfig-version "0.3.0";
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "Submodule containing definitions of groupings that are re-used
+    across multiple contexts within the AFT model.";
+
+  revision 2017-05-10 {
+    description
+      "Refactor to provide concretised per-AF schemas per AFT.";
+    reference "0.3.0";
+  }
+
+  grouping aft-common-nhop-structural {
+    description
+      "Structural grouping describing a next-hop entry.";
+
+    container next-hops {
+      description
+        "The list of next-hops that are to be used for entry within
+        the AFT table. The structure of each next-hop is address
+        family independent, such that it is possible to resolve fully
+        how the next-hop is treated. For example:
+
+        - Where ingress IPv4 unicast packets are to be forwarded via
+          an MPLS LSP, the next-hop list should indicate the MPLS
+          label stack that is used to the next-hop.
+        - Where ingress MPLS labelled packets are to be forwarded to
+          an IPv6 nexthop (for example, a CE within a VPN, then the
+          popped label stack, and IPv6 next-hop address should be
+          indicated).";
+
+      list next-hop {
+        key "index";
+
+        description
+          "A next-hop associated with the forwarding instance. The
+          entries within the next-hop list should only reflect
+          next-hops that are actively used by the local system.
+          That is to say inactive, backup or FRR next-hops should
+          not be included within this list.";
+
+        leaf index {
+          type leafref {
+            path "../config/index";
+          }
+          description
+            "A unique index identifying the next-hop entry for the
+            AFT entry";
+
+        }
+
+        container config {
+          description
+            "Configuration parameters relating to the AFT next-hop
+            entry";
+
+          uses aft-common-entry-nexthop-config;
+        }
+
+        container state {
+          config false;
+          description
+            "Operational state parameters relating to the AFT
+            next-hop entry";
+
+          uses aft-common-entry-nexthop-config;
+          uses aft-common-entry-nexthop-state;
+        }
+
+        uses oc-if:interface-ref;
+      }
+    }
+  }
+
+  grouping aft-common-entry-state {
+    description
+      "Operational state parameters relating to a forwarding entry";
+
+    leaf packets-forwarded {
+      type oc-yang:counter64;
+      description
+        "The number of packets which have matched, and been forwarded,
+         based on the AFT entry.";
+    }
+
+    leaf octets-forwarded {
+      type oc-yang:counter64;
+      description
+        "The number of octets which have matched, and been forwarded,
+         based on the AFT entry";
+    }
+  }
+
+  grouping aft-common-entry-nexthop-config {
+    description
+      "Configuration parameters relating to a next-hop entry for a AFT
+      entry";
+
+    leaf index {
+      type uint64;
+      description
+        "A unique entry for the next-hop.";
+    }
+  }
+
+  grouping aft-common-entry-nexthop-state {
+    description
+      "Parameters relating to a next-hop within the AFT entry";
+
+    leaf weight {
+      type uint32;
+      description
+        "The weight of the next-hop. Traffic is balanced according to
+        the ratio described by the relative weights of the next hops
+        that exist for the AFT entry. Note that all next-hops that are
+        specified are assumed to be active next-hops and therefore
+        eligible (and selected) to be installed in the FIB, and hence
+        used for packet forwarding.";
+    }
+
+    leaf ip-address {
+      type oc-inet:ip-address;
+      description
+        "The IP address of the next-hop system.";
+    }
+
+    leaf mac-address {
+      type oc-yang:mac-address;
+      description
+        "The MAC address of the next-hop if resolved by the local
+        network instance.";
+    }
+
+    leaf-list popped-mpls-label-stack {
+      type oc-mplst:mpls-label;
+      description
+        "The MPLS label stack to be popped from the packet when
+        switched by the system. The stack is encoded as a leaf-list
+        such that the first entry is the label that is outer-most (i.e.,
+        furthest from the bottom of the stack) label
+        stack to be popped.
+
+        If the local system pops the outer-most label 400, then the
+        value of this list is [400,]. If the local system removes two
+        labels, the outer-most being 500, and the second of which is
+        400, then the value of the list is [500, 400].
+
+        A swap operation is reflected by entries in the
+        popped-mpls-label-stack and pushed-mpls-label-stack nodes.";
+    }
+
+    leaf-list pushed-mpls-label-stack {
+      type oc-mplst:mpls-label;
+      ordered-by user;
+      description
+        "The MPLS label stack imposed when forwarding packets to the
+        next-hop
+        - the stack is encoded as a leaf list whereby the order of the
+          entries is such that the first entry in the list is the
+          label at the bottom of the stack to be pushed.
+
+        To this end, a packet which is to forwarded to a device using
+        a service label of 42, and a transport label of 8072 will be
+        represented with a label stack list of [42, 8072].
+
+        The MPLS label stack list is ordered by the user, such that no
+        system re-ordering of leaves is permitted by the system.
+
+        A swap operation is reflected by entries in the
+        popped-mpls-label-stack and pushed-mpls-label-stack nodes.";
+
+    }
+
+    leaf decapsulate-header {
+      type oc-aftt:encapsulation-header-type;
+      description
+        "When forwarding a packet to the specified next-hop, the local
+        system performs a decapsulation of the packet - removing the
+        specified header type. In the case that no next-hop is
+        specified, the packet header is removed, and a subsequent
+        forwarding lookup is performed on the packet encapsulated
+        within the header, matched within the relevant AFT within the
+        specified network-instance.";
+    }
+
+    leaf encapsulate-header {
+      type oc-aftt:encapsulation-header-type;
+      description
+        "When forwarding a packet to the specified next-hop the local
+        system performs an encapsulation of the packet - adding the
+        specified header type.";
+    }
+
+    leaf origin-protocol {
+      type identityref {
+        base "oc-pol-types:INSTALL_PROTOCOL_TYPE";
+      }
+      description
+        "The protocol from which the AFT entry was learned.";
+    }
+  }
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-ethernet.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-ethernet.yang
new file mode 100644
index 0000000..cf933db
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-ethernet.yang
@@ -0,0 +1,89 @@
+submodule openconfig-aft-ethernet {
+  belongs-to "openconfig-aft" {
+    prefix "oc-aft";
+  }
+
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-yang-types { prefix "oc-yang"; }
+
+  // Include common cross-AFT groupings from the common submodule.
+  include openconfig-aft-common;
+
+  oc-ext:openconfig-version "0.3.0";
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "Submodule containing definitions of groupings for the abstract
+    forwarding tables for Ethernet.";
+
+  revision 2017-05-10 {
+    description
+      "Refactor to provide concretised per-AF schemas per AFT.";
+    reference "0.3.0";
+  }
+
+  grouping aft-ethernet-structural {
+    description
+      "Structural grouping defining the schema for the Ethernet
+      abstract forwarding table.";
+
+    list mac-entry {
+      key "mac-address";
+
+      description
+        "List of the Ethernet entries within the abstract
+        forwarding table. This list is keyed by the outer MAC address
+        of the Ethernet frame.";
+
+      leaf mac-address {
+        type leafref {
+          path "../config/mac-address";
+        }
+        description
+          "Reference to the outer MAC address matched by the
+          entry.";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the Ethernet AFT entry.";
+        uses aft-ethernet-entry-config;
+      }
+
+      container state {
+        config false;
+        description
+          "Operational state parameters for the Ethernet AFT
+          entry.";
+        uses aft-ethernet-entry-config;
+        uses aft-ethernet-entry-state;
+      }
+
+      uses aft-common-nhop-structural;
+    }
+  }
+
+  grouping aft-ethernet-entry-config {
+    description
+      "Configuration parameters for the Ethernet AFT entry.";
+
+    leaf mac-address {
+        type oc-yang:mac-address;
+        description
+          "The outer MAC address of the Ethernet frame that must
+          be matched for the AFT entry to be utilised.";
+    }
+  }
+
+  grouping aft-ethernet-entry-state {
+    description
+      "Operational state parameters for the Ethernet AFT entry.";
+    uses aft-common-entry-state;    
+  }
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-ipv4.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-ipv4.yang
new file mode 100644
index 0000000..7f9a316
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-ipv4.yang
@@ -0,0 +1,89 @@
+submodule openconfig-aft-ipv4 {
+  belongs-to "openconfig-aft" {
+    prefix "oc-aft";
+  }
+
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-inet-types { prefix "oc-inet"; }
+
+  // Include common cross-AFT groupings from the common submodule.
+  include openconfig-aft-common;
+
+  oc-ext:openconfig-version "0.3.0";
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "Submodule containing definitions of groupings for the abstract
+    forwarding tables for IPv4.";
+
+  revision 2017-05-10 {
+    description
+      "Refactor to provide concretised per-AF schemas per AFT.";
+    reference "0.3.0";
+  }
+
+  grouping aft-ipv4-unicast-structural {
+    description
+      "Structural grouping defining the schema for the IPv4 unicast
+      abstract forwarding table.";
+
+    list ipv4-entry {
+      key "prefix";
+
+      description
+        "List of the IPv4 unicast entries within the abstract
+        forwarding table. This list is keyed by the destination IPv4
+        prefix.";
+
+      leaf prefix {
+        type leafref {
+          path "../config/prefix";
+        }
+        description
+          "Reference to the IPv4 unicast destination prefix which
+          must be matched to utilise the AFT entry.";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the IPv4 unicast AFT entry.";
+        uses aft-ipv4-unicast-entry-config;
+      }
+
+      container state {
+        config false;
+        description
+          "Operational state parameters for the IPv4 unicast AFT
+          entry.";
+        uses aft-ipv4-unicast-entry-config;
+        uses aft-ipv4-unicast-entry-state;
+      }
+
+      uses aft-common-nhop-structural;
+    }
+  }
+
+  grouping aft-ipv4-unicast-entry-config {
+    description
+      "Configuration parameters for the IPv4 unicast entry.";
+
+    leaf prefix {
+        type oc-inet:ipv4-prefix;
+        description
+          "The IPv4 destination prefix that should be matched to
+          utilise the AFT entry.";
+    }
+  }
+
+  grouping aft-ipv4-unicast-entry-state {
+    description
+      "Operational state parameters for the IPv4 unicast entry."; 
+    uses aft-common-entry-state;   
+  }
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-ipv6.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-ipv6.yang
new file mode 100644
index 0000000..9cca582
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-ipv6.yang
@@ -0,0 +1,89 @@
+submodule openconfig-aft-ipv6 {
+  belongs-to "openconfig-aft" {
+    prefix "oc-aft";
+  }
+
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-inet-types { prefix "oc-inet"; }
+
+  // Include common cross-AFT groupings from the common submodule.
+  include openconfig-aft-common;
+
+  oc-ext:openconfig-version "0.3.0";
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "Submodule containing definitions of groupings for the abstract
+    forwarding tables for IPv6.";
+
+  revision 2017-05-10 {
+    description
+      "Refactor to provide concretised per-AF schemas per AFT.";
+    reference "0.3.0";
+  }
+
+  grouping aft-ipv6-unicast-structural {
+    description
+      "Structural grouping defining the schema for the IPv6 unicast
+      abstract forwarding table.";
+
+    list ipv6-entry {
+      key "prefix";
+
+      description
+        "List of the IPv6 unicast entries within the abstract
+        forwarding table. This list is keyed by the destination IPv6
+        prefix.";
+
+      leaf prefix {
+        type leafref {
+          path "../config/prefix";
+        }
+        description
+          "Reference to the IPv6 unicast destination prefix which
+          must be matched to utilise the AFT entry.";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the IPv6 unicast AFT entry.";
+        uses aft-ipv6-unicast-entry-config;
+      }
+
+      container state {
+        config false;
+        description
+          "Operational state parameters for the IPv6 unicast AFT
+          entry.";
+        uses aft-ipv6-unicast-entry-config;
+        uses aft-ipv6-unicast-entry-state;
+      }
+
+      uses aft-common-nhop-structural;
+    }
+  }
+
+  grouping aft-ipv6-unicast-entry-config {
+    description
+      "Configuration parameters for the IPv6 unicast entry.";
+
+    leaf prefix {
+        type oc-inet:ipv6-prefix;
+        description
+          "The IPv6 destination prefix that should be matched to
+          utilise the AFT entry.";
+    }
+  }
+
+  grouping aft-ipv6-unicast-entry-state {
+    description
+      "Operational state parameters for the IPv6 unicast entry.";
+    uses aft-common-entry-state;    
+  }
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-mpls.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-mpls.yang
new file mode 100644
index 0000000..38e5cc0
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-mpls.yang
@@ -0,0 +1,89 @@
+submodule openconfig-aft-mpls {
+  belongs-to "openconfig-aft" {
+    prefix "oc-aft";
+  }
+
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-mpls-types { prefix "oc-mpls-types"; }
+
+  // Include common cross-AFT groupings from the common submodule.
+  include openconfig-aft-common;
+
+  oc-ext:openconfig-version "0.3.0";
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "Submodule containing definitions of groupings for the abstract
+    forwarding table for MPLS label forwarding.";
+
+  revision 2017-05-10 {
+    description
+      "Refactor to provide concretised per-AF schemas per AFT.";
+    reference "0.3.0";
+  }
+
+  grouping aft-mpls-structural {
+    description
+      "Structural grouping defining the schema for the MPLS
+      abstract forwarding table.";
+
+    list label-entry {
+      key "label";
+
+      description
+        "List of the MPLS entries within the abstract
+        forwarding table. This list is keyed by the top-most MPLS
+        label.";
+
+      leaf label {
+        type leafref {
+          path "../config/label";
+        }
+        description
+          "Reference to the top-most MPLS label matched by the
+          entry.";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the MPLS AFT entry.";
+        uses aft-mpls-entry-config;
+      }
+
+      container state {
+        config false;
+        description
+          "Operational state parameters for the MPLS AFT
+          entry.";
+        uses aft-mpls-entry-config;
+        uses aft-mpls-entry-state;
+      }
+
+      uses aft-common-nhop-structural;
+    }
+  }
+
+  grouping aft-mpls-entry-config {
+    description
+      "Configuration parameters for the MPLS entry.";
+
+    leaf label {
+        type oc-mpls-types:mpls-label;
+        description
+          "The top-most MPLS label that should be matched to
+          utilise the AFT entry.";
+    }
+  }
+
+  grouping aft-mpls-entry-state {
+    description
+      "Operational state parameters for the MPLS entry.";
+    uses aft-common-entry-state;    
+  }
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-network-instance.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-network-instance.yang
new file mode 100644
index 0000000..b42c8ed
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-network-instance.yang
@@ -0,0 +1,115 @@
+module openconfig-aft-network-instance {
+  yang-version "1";
+
+  namespace "http://openconfig.net/yang/aft/ni";
+  prefix "oc-aftni";
+
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-network-instance { prefix "oc-ni"; }
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+     www.openconfig.net";
+
+  description
+    "This module provides augmentations that are utilized
+     when building the OpenConfig network instance model to
+     add per-NI AFTs.";
+
+  oc-ext:openconfig-version "0.2.1";
+
+  revision 2017-01-13 {
+    description
+      "Updated revision for external review";
+    reference "0.2.1";
+  }
+
+
+  typedef network-instance-ref {
+    type leafref {
+      path "/oc-ni:network-instances/oc-ni:network-instance/oc-ni:config/oc-ni:name";
+    }
+    description
+      "A re-usable type that can be referenced within other
+       modules that references a network instance.";
+  }
+
+  augment "/oc-ni:network-instances/oc-ni:network-instance/" +
+          "oc-ni:afts/oc-ni:ipv4-unicast/oc-ni:ipv4-entry/" +
+          "oc-ni:next-hops/oc-ni:next-hop/oc-ni:state" {
+
+    description
+      "Add leaves that require referencing of a network instance to the
+      operational state parameters of a next-hop within the AFT for IPv4
+      unicast.";
+
+    uses aft-nexthop-ni-state;
+  }
+
+ augment "/oc-ni:network-instances/oc-ni:network-instance/" +
+          "oc-ni:afts/oc-ni:ipv6-unicast/oc-ni:ipv6-entry/" +
+          "oc-ni:next-hops/oc-ni:next-hop/oc-ni:state" {
+
+    description
+      "Add leaves that require referencing of a network instance to the
+      operational state parameters of a next-hop within the AFT for IPv6
+      unicast.";
+
+    uses aft-nexthop-ni-state;
+  }
+
+  grouping aft-nexthop-ni-state {
+    description
+      "Operational state parameters relating to a next-hop which reference a
+      network instance.";
+
+    leaf network-instance {
+      type network-instance-ref;
+      description
+        "The network-instance within which the next-hop should be resolved.
+         When this leaf is unspecified, the next-hop is resolved within 
+         the local instance.";
+    }
+  }
+
+  augment "/oc-ni:network-instances/oc-ni:network-instance/" +
+          "oc-ni:afts/oc-ni:ipv4-unicast/oc-ni:ipv4-entry/oc-ni:state" {
+    description
+      "Add leaves that require referencing of a network instance to the
+      operational state parameters of an entry within the IPv4 unicast AFT.";
+
+    uses aft-entry-ni-state;
+  }
+
+  augment "/oc-ni:network-instances/oc-ni:network-instance/" +
+          "oc-ni:afts/oc-ni:ipv6-unicast/oc-ni:ipv6-entry/oc-ni:state" {
+    description
+      "Add leaves that require referencing of a network instance to the
+      operational state parameters of an entry within the IPv6 unicast AFT.";
+
+    uses aft-entry-ni-state;
+  }
+
+  grouping aft-entry-ni-state {
+    description
+      "Operational state parameters relating to an AFT entry which reference
+      a network instance.";
+
+    leaf origin-network-instance {
+      type network-instance-ref;
+      description
+        "If the AFT entry was imported from another network instance (e.g., it
+        corresponds to a L3 forwarding entry which was learned within another
+        network-instance), the value of this leaf reflects the network-instance
+        from which it was learned.
+
+        For example, if the local network-instance corresponds to a L3VRF, and
+        routes are imported from the VPNv4 address-family of the BGP instance
+        in the DEFAULT_INSTANCE, then this value would reflect the
+        DEFAULT_INSTANCE as the origin-network-instance.";
+    }
+  }
+}
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-pf.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-pf.yang
new file mode 100644
index 0000000..707bb8b
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-pf.yang
@@ -0,0 +1,168 @@
+submodule openconfig-aft-pf {
+  belongs-to "openconfig-aft" {
+    prefix "oc-aft";
+  }
+
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-inet-types { prefix "oc-inet"; }
+  import openconfig-yang-types { prefix "oc-yang"; }
+  import openconfig-mpls-types { prefix "oc-mplst"; }
+  import openconfig-packet-match-types {
+    prefix "oc-pkt-match-types";
+  }
+
+  // Include common cross-AFT groupings from the common submodule.
+  include openconfig-aft-common;
+
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "Submodule containing definitions of groupings for the abstract
+    forwarding table(s) for policy forwarding entries. These are
+    defined to be forwarding tables that allow matches on
+    fields other than the destination address that is used in
+    other forwarding tables.";
+
+  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";
+  }
+
+  grouping aft-pf-structural {
+    description
+      "Structural grouping defining the schema for the policy
+      forwarding abstract forwarding table.";
+
+    list policy-forwarding-entry {
+      key "index";
+
+      description
+        "List of the policy forwarding entries within the abstract
+        forwarding table. Each entry is uniquely identified by an
+        index on the system, due to the arbitrary match conditions
+        that may be implemented within the policy forwarding AFT.
+        The index may change upon changes of the entry if, and only
+        if, the device exporting the AFT replaces the entire entry
+        by removing the previous entry and replacing it with a
+        subsequent updated version.";
+
+      leaf index {
+        type leafref {
+          path "../config/index";
+        }
+        description
+          "Reference to the arbitary index for the policy forwarding
+          AFT entry.";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the Policy forwarding
+          AFT entry.";
+        uses aft-pf-entry-config;
+      }
+
+      container state {
+        config false;
+        description
+          "Operational state parameters for the Policy Forwarding
+          AFT entry.";
+        uses aft-pf-entry-config;
+        uses aft-pf-entry-state;
+      }
+
+      uses aft-common-nhop-structural;
+    }
+  }
+
+  grouping aft-pf-entry-config {
+    description
+      "Configuration parameters for the Policy Forwarding
+      AFT entry.";
+
+    leaf index {
+      type uint64;
+      description
+        "An arbitrary 64-bit index identifying the policy forwarding
+        AFT entry.";
+    }
+
+    leaf ip-prefix {
+      type oc-inet:ip-prefix;
+      description
+        "The IP prefix that the forwarding entry matches.";
+    }
+
+    leaf mac-address {
+      type oc-yang:mac-address;
+      description
+         "The MAC address that the forwarding entry matches. Used for
+         Layer 2 forwarding entries, e.g., within a VSI instance.";
+    }
+
+    leaf mpls-label {
+      type oc-mplst:mpls-label;
+      description
+        "The MPLS label that the forwarding entry matches. Used for
+        MPLS forwarding entries, whereby the local device acts as an
+        LSR.";
+    }
+
+    leaf mpls-tc {
+      type oc-mplst:mpls-tc;
+      description
+        "The value of the MPLS Traffic Class bits (formerly known as
+        the MPLS experimental bits) that are to be matched by the AFT
+        entry.";
+      reference
+        "RFC5462: Multiprotocol Label Switching (MPLS) Label Stack
+        Entry: 'EXP' Field Renamed to 'Traffic Class' Field"; }
+
+    leaf ip-dscp {
+      type oc-inet:dscp;
+      description
+        "The value of the differentiated services code point (DSCP) to
+        be matched for the forwarding entry. The value is specified in
+        cases where specific class-based forwarding based on IP is
+        implemented by the device.";
+    }
+
+    leaf ip-protocol {
+      type oc-pkt-match-types:ip-protocol-type;
+      description
+        "The value of the IP protocol field of an IPv4 packet, or the
+        next-header field of an IPv6 packet which is to be matched by
+        the AFT entry. This field is utilised where forwarding is
+        performed based on L4 information.";
+    }
+
+    leaf l4-src-port {
+      type oc-inet:port-number;
+      description
+        "The value of the source port field of the transport header
+        that is to be matched by the AFT entry.";
+    }
+
+    leaf l4-dst-port {
+      type oc-inet:port-number;
+      description
+        "The value of the destination port field of the transport
+        header that is to be matched by the AFT entry.";
+    }
+  }
+
+  grouping aft-pf-entry-state {
+    description
+      "Operational state parameters for the Policy Forwarding
+      AFT entry.";
+    uses aft-common-entry-state;    
+  }
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/aft/openconfig-aft-types.yang b/models/openconfig/src/main/yang/aft/openconfig-aft-types.yang
new file mode 100644
index 0000000..1476ea0
--- /dev/null
+++ b/models/openconfig/src/main/yang/aft/openconfig-aft-types.yang
@@ -0,0 +1,52 @@
+module openconfig-aft-types {
+
+  namespace "http://openconfig.net/yang/fib-types";
+  prefix "oc-aftt";
+
+  import openconfig-extensions { prefix "oc-ext"; }
+
+  organization
+    "OpenConfig Working Group";
+
+  contact
+    "OpenConfig Working Group
+    www.openconfig.net";
+
+  description
+    "Types related to the OpenConfig Abstract Forwarding
+    Table (AFT) model";
+
+  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";
+  }
+
+  typedef encapsulation-header-type {
+    type enumeration {
+      enum GRE {
+        description
+          "The encapsulation header is a Generic Routing Encapsulation
+          header.";
+      }
+      enum IPV4 {
+        description
+          "The encapsulation header is an IPv4 packet header";
+      }
+      enum IPV6 {
+        description
+          "The encapsulation header is an IPv6 packet header";
+      }
+      enum MPLS {
+        description
+          "The encapsulation header is one or more MPLS labels indicated
+          by the pushed and popped label stack lists.";
+      }
+    }
+    description
+      "Types of tunnel encapsulation that are supported by systems as either
+      head- or tail-end.";
+  }
+}
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;
+      }
+    }
+  }
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-common-multiprotocol.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-common-multiprotocol.yang
new file mode 100644
index 0000000..46c61e8
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-common-multiprotocol.yang
@@ -0,0 +1,458 @@
+submodule openconfig-bgp-common-multiprotocol {
+
+  belongs-to openconfig-bgp {
+    prefix "oc-bgp";
+  }
+
+  import openconfig-extensions { prefix oc-ext; }
+  import openconfig-bgp-types { prefix oc-bgp-types; }
+  import openconfig-routing-policy { prefix oc-rpol; }
+  import openconfig-types { prefix oc-types; }
+
+  include openconfig-bgp-common;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This sub-module contains groupings that are related to support
+    for multiple protocols in BGP. The groupings are common across
+    multiple contexts.";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  grouping bgp-common-mp-afi-safi-graceful-restart-config {
+    description
+      "BGP graceful restart parameters that apply on a per-AFI-SAFI
+      basis";
+
+    leaf enabled {
+      type boolean;
+      default false;
+      description
+        "This leaf indicates whether graceful-restart is enabled for
+        this AFI-SAFI";
+    }
+  }
+
+  grouping bgp-common-mp-afi-safi-config {
+    description
+      "Configuration parameters used for all BGP AFI-SAFIs";
+
+    leaf afi-safi-name {
+      type identityref {
+        base oc-bgp-types:AFI_SAFI_TYPE;
+      }
+      description "AFI,SAFI";
+    }
+
+    leaf enabled {
+      type boolean;
+      default false;
+      description
+        "This leaf indicates whether the IPv4 Unicast AFI,SAFI is
+        enabled for the neighbour or group";
+    }
+  }
+
+  grouping bgp-common-mp-all-afi-safi-list-contents {
+    description
+      "A common grouping used for contents of the list that is used
+      for AFI-SAFI entries";
+
+    // import and export policy included for the afi/safi
+    uses oc-rpol:apply-policy-group;
+
+    uses bgp-common-mp-ipv4-unicast-group;
+    uses bgp-common-mp-ipv6-unicast-group;
+    uses bgp-common-mp-ipv4-labeled-unicast-group;
+    uses bgp-common-mp-ipv6-labeled-unicast-group;
+    uses bgp-common-mp-l3vpn-ipv4-unicast-group;
+    uses bgp-common-mp-l3vpn-ipv6-unicast-group;
+    uses bgp-common-mp-l3vpn-ipv4-multicast-group;
+    uses bgp-common-mp-l3vpn-ipv6-multicast-group;
+    uses bgp-common-mp-l2vpn-vpls-group;
+    uses bgp-common-mp-l2vpn-evpn-group;
+  }
+
+  // Groupings relating to each address family
+  grouping bgp-common-mp-ipv4-unicast-group {
+    description
+      "Group for IPv4 Unicast configuration options";
+
+    container ipv4-unicast {
+      when "../afi-safi-name = 'oc-bgp-types:IPV4_UNICAST'" {
+        description
+          "Include this container for IPv4 Unicast specific
+          configuration";
+      }
+
+      description "IPv4 unicast configuration options";
+
+      // include common IPv[46] unicast options
+      uses bgp-common-mp-ipv4-ipv6-unicast-common;
+
+      // placeholder for IPv4 unicast  specific configuration
+    }
+  }
+
+  grouping bgp-common-mp-ipv6-unicast-group {
+    description
+      "Group for IPv6 Unicast configuration options";
+
+    container ipv6-unicast {
+      when "../afi-safi-name = 'oc-bgp-types:IPV6_UNICAST'" {
+        description
+          "Include this container for IPv6 Unicast specific
+          configuration";
+      }
+
+      description "IPv6 unicast configuration options";
+
+      // include common IPv[46] unicast options
+      uses bgp-common-mp-ipv4-ipv6-unicast-common;
+
+      // placeholder for IPv6 unicast specific configuration
+      // options
+    }
+  }
+
+  grouping bgp-common-mp-ipv4-labeled-unicast-group {
+    description
+      "Group for IPv4 Labeled Unicast configuration options";
+
+    container ipv4-labeled-unicast {
+      when "../afi-safi-name = 'oc-bgp-types:IPV4_LABELED_UNICAST'" {
+        description
+          "Include this container for IPv4 Labeled Unicast specific
+          configuration";
+      }
+
+      description "IPv4 Labeled Unicast configuration options";
+
+      uses bgp-common-mp-all-afi-safi-common;
+
+      // placeholder for IPv4 Labeled Unicast specific config
+      // options
+    }
+  }
+
+  grouping bgp-common-mp-ipv6-labeled-unicast-group {
+    description
+      "Group for IPv6 Labeled Unicast configuration options";
+
+    container ipv6-labeled-unicast {
+      when "../afi-safi-name = 'oc-bgp-types:IPV6_LABELED_UNICAST'" {
+        description
+          "Include this container for IPv6 Labeled Unicast specific
+          configuration";
+      }
+
+      description "IPv6 Labeled Unicast configuration options";
+
+      uses bgp-common-mp-all-afi-safi-common;
+
+      // placeholder for IPv6 Labeled Unicast specific config
+      // options.
+    }
+  }
+
+  grouping bgp-common-mp-l3vpn-ipv4-unicast-group {
+    description
+      "Group for IPv4 Unicast L3VPN configuration options";
+
+    container l3vpn-ipv4-unicast {
+      when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_UNICAST'" {
+        description
+          "Include this container for IPv4 Unicast L3VPN specific
+          configuration";
+      }
+
+      description "Unicast IPv4 L3VPN configuration options";
+
+      // include common L3VPN configuration options
+      uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common;
+
+      // placeholder for IPv4 Unicast L3VPN specific config options.
+    }
+  }
+
+  grouping bgp-common-mp-l3vpn-ipv6-unicast-group {
+    description
+      "Group for IPv6 Unicast L3VPN configuration options";
+
+    container l3vpn-ipv6-unicast {
+      when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_UNICAST'" {
+        description
+          "Include this container for unicast IPv6 L3VPN specific
+          configuration";
+      }
+
+      description "Unicast IPv6 L3VPN configuration options";
+
+      // include common L3VPN configuration options
+      uses bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common;
+
+      // placeholder for IPv6 Unicast L3VPN specific configuration
+      // options
+    }
+  }
+
+  grouping bgp-common-mp-l3vpn-ipv4-multicast-group {
+    description
+      "Group for IPv4 L3VPN multicast configuration options";
+
+    container l3vpn-ipv4-multicast {
+      when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV4_MULTICAST'" {
+        description
+          "Include this container for multicast IPv6 L3VPN specific
+          configuration";
+      }
+
+      description "Multicast IPv4 L3VPN configuration options";
+
+      // include common L3VPN multicast options
+      uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common;
+
+      // placeholder for IPv4 Multicast L3VPN specific configuration
+      // options
+    }
+  }
+
+  grouping bgp-common-mp-l3vpn-ipv6-multicast-group {
+    description
+      "Group for IPv6 L3VPN multicast configuration options";
+
+    container l3vpn-ipv6-multicast {
+      when "../afi-safi-name = 'oc-bgp-types:L3VPN_IPV6_MULTICAST'" {
+        description
+          "Include this container for multicast IPv6 L3VPN specific
+          configuration";
+      }
+
+      description "Multicast IPv6 L3VPN configuration options";
+
+      // include common L3VPN multicast options
+      uses bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common;
+
+      // placeholder for IPv6 Multicast L3VPN specific configuration
+      // options
+    }
+  }
+
+  grouping bgp-common-mp-l2vpn-vpls-group {
+    description
+      "Group for BGP-signalled VPLS configuration options";
+
+    container l2vpn-vpls {
+      when "../afi-safi-name = 'oc-bgp-types:L2VPN_VPLS'" {
+        description
+          "Include this container for BGP-signalled VPLS specific
+          configuration";
+      }
+
+      description "BGP-signalled VPLS configuration options";
+
+      // include common L2VPN options
+      uses bgp-common-mp-l2vpn-common;
+
+      // placeholder for BGP-signalled VPLS specific configuration
+      // options
+    }
+  }
+
+  grouping bgp-common-mp-l2vpn-evpn-group {
+    description
+      "Group for BGP EVPN configuration options";
+
+    container l2vpn-evpn {
+      when "../afi-safi-name = 'oc-bgp-types:L2VPN_EVPN'" {
+        description
+          "Include this container for BGP EVPN specific
+          configuration";
+      }
+
+      description "BGP EVPN configuration options";
+
+      // include common L2VPN options
+      uses bgp-common-mp-l2vpn-common;
+
+      // placeholder for BGP EVPN specific configuration options
+    }
+  }
+
+  // Common groupings across multiple AFI,SAFIs
+  grouping bgp-common-mp-all-afi-safi-common {
+    description
+      "Grouping for configuration common to all AFI,SAFI";
+
+    container prefix-limit {
+      description
+        "Configure the maximum number of prefixes that will be
+        accepted from a peer";
+
+      container config {
+        description
+          "Configuration parameters relating to the prefix
+          limit for the AFI-SAFI";
+        uses bgp-common-mp-all-afi-safi-common-prefix-limit-config;
+      }
+
+      container state {
+        config false;
+        description
+          "State information relating to the prefix-limit for the
+          AFI-SAFI";
+        uses bgp-common-mp-all-afi-safi-common-prefix-limit-config;
+      }
+    }
+  }
+
+  grouping bgp-common-mp-ipv4-ipv6-unicast-common {
+    description
+      "Common configuration that is applicable for IPv4 and IPv6
+      unicast";
+
+    // include common afi-safi options.
+    uses bgp-common-mp-all-afi-safi-common;
+
+    // configuration options that are specific to IPv[46] unicast
+    container config {
+      description
+        "Configuration parameters for common IPv4 and IPv6 unicast
+        AFI-SAFI options";
+      uses bgp-common-mp-ipv4-ipv6-unicast-common-config;
+    }
+    container state {
+      config false;
+      description
+        "State information for common IPv4 and IPv6 unicast
+        parameters";
+      uses bgp-common-mp-ipv4-ipv6-unicast-common-config;
+    }
+  }
+
+  grouping bgp-common-mp-l3vpn-ipv4-ipv6-unicast-common {
+    description
+      "Common configuration applied across L3VPN for IPv4
+       and IPv6";
+
+    // placeholder -- specific configuration options that are generic
+    // across IPv[46] unicast address families.
+    uses bgp-common-mp-all-afi-safi-common;
+  }
+
+  grouping bgp-common-mp-l3vpn-ipv4-ipv6-multicast-common {
+    description
+      "Common configuration applied across L3VPN for IPv4
+      and IPv6";
+
+    // placeholder -- specific configuration options that are
+    // generic across IPv[46] multicast address families.
+    uses bgp-common-mp-all-afi-safi-common;
+  }
+
+  grouping bgp-common-mp-l2vpn-common {
+    description
+      "Common configuration applied across L2VPN address
+      families";
+
+    // placeholder -- specific configuration options that are
+    // generic across L2VPN address families
+    uses bgp-common-mp-all-afi-safi-common;
+  }
+
+  // Config groupings for common groups
+  grouping bgp-common-mp-all-afi-safi-common-prefix-limit-config {
+    description
+      "Configuration parameters relating to prefix-limits for an
+      AFI-SAFI";
+
+    leaf max-prefixes {
+      type uint32;
+      description
+        "Maximum number of prefixes that will be accepted
+        from the neighbour";
+    }
+
+    leaf prevent-teardown {
+      type boolean;
+      default false;
+      description
+        "Do not tear down the BGP session when the maximum
+        prefix limit is exceeded, but rather only log a
+        warning. The default of this leaf is false, such
+        that when it is not specified, the session is torn
+        down.";
+    }
+
+    leaf shutdown-threshold-pct {
+      type oc-types:percentage;
+      description
+        "Threshold on number of prefixes that can be received
+        from a neighbour before generation of warning messages
+        or log entries. Expressed as a percentage of
+        max-prefixes";
+    }
+
+    leaf restart-timer {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      units "seconds";
+      description
+        "Time interval in seconds after which the BGP session
+        is re-established after being torn down due to exceeding
+        the max-prefix limit.";
+    }
+  }
+
+  grouping bgp-common-mp-ipv4-ipv6-unicast-common-config {
+    description
+      "Common configuration parameters for IPv4 and IPv6 Unicast
+      address families";
+
+    leaf send-default-route {
+      type boolean;
+      default "false";
+      description
+        "If set to true, send the default-route to the neighbour(s)";
+    }
+  }
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-common-structure.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-common-structure.yang
new file mode 100644
index 0000000..30a5ad2
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-common-structure.yang
@@ -0,0 +1,179 @@
+submodule openconfig-bgp-common-structure {
+
+  belongs-to openconfig-bgp {
+    prefix "oc-bgp";
+  }
+
+  import openconfig-extensions { prefix oc-ext; }
+
+  include openconfig-bgp-common-multiprotocol;
+  include openconfig-bgp-common;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This sub-module contains groupings that are common across multiple BGP
+    contexts and provide structure around other primitive groupings.";
+
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  grouping bgp-common-structure-neighbor-group-logging-options {
+    description
+      "Structural grouping used to include error handling configuration and
+      state for both BGP neighbors and groups";
+
+    container logging-options {
+      description
+        "Logging options for events related to the BGP neighbor or
+        group";
+      container config {
+        description
+          "Configuration parameters enabling or modifying logging
+          for events relating to the BGPgroup";
+        uses bgp-common-neighbor-group-logging-options-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to logging for the BGP neighbor
+          or group";
+        uses bgp-common-neighbor-group-logging-options-config;
+      }
+    }
+  }
+
+  grouping bgp-common-structure-neighbor-group-ebgp-multihop {
+    description
+      "Structural grouping used to include eBGP multihop configuration and
+      state for both BGP neighbors and peer groups";
+
+    container ebgp-multihop {
+      description
+        "eBGP multi-hop parameters for the BGPgroup";
+      container config {
+        description
+          "Configuration parameters relating to eBGP multihop for the
+          BGP group";
+        uses bgp-common-neighbor-group-multihop-config;
+      }
+      container state {
+        config false;
+        description
+          "State information for eBGP multihop, for the BGP neighbor
+          or group";
+        uses bgp-common-neighbor-group-multihop-config;
+      }
+    }
+  }
+
+  grouping bgp-common-structure-neighbor-group-route-reflector {
+    description
+      "Structural grouping used to include route reflector configuration and
+      state for both BGP neighbors and peer groups";
+
+    container route-reflector {
+      description
+        "Route reflector parameters for the BGPgroup";
+      container config {
+        description
+          "Configuraton parameters relating to route reflection
+          for the BGPgroup";
+        uses bgp-common-neighbor-group-route-reflector-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to route reflection for the
+          BGPgroup";
+        uses bgp-common-neighbor-group-route-reflector-config;
+      }
+    }
+  }
+
+  grouping bgp-common-structure-neighbor-group-as-path-options {
+    description
+      "Structural grouping used to include AS_PATH manipulation configuration
+      and state for both BGP neighbors and peer groups";
+
+    container as-path-options {
+      description
+        "AS_PATH manipulation parameters for the BGP neighbor or
+        group";
+      container config {
+        description
+          "Configuration parameters relating to AS_PATH manipulation
+          for the BGP peer or group";
+        uses bgp-common-neighbor-group-as-path-options-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the AS_PATH manipulation
+          mechanisms for the BGP peer or group";
+        uses bgp-common-neighbor-group-as-path-options-config;
+      }
+    }
+  }
+
+  grouping bgp-common-structure-neighbor-group-add-paths {
+    description
+      "Structural grouping used to include ADD-PATHs configuration and state
+      for both BGP neighbors and peer groups";
+
+    container add-paths {
+      description
+        "Parameters relating to the advertisement and receipt of
+        multiple paths for a single NLRI (add-paths)";
+      container config {
+        description
+          "Configuration parameters relating to ADD_PATHS";
+        uses bgp-common-neighbor-group-add-paths-config;
+      }
+      container state {
+        config false;
+        description
+          "State information associated with ADD_PATHS";
+        uses bgp-common-neighbor-group-add-paths-config;
+      }
+    }
+  }
+
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-common.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-common.yang
new file mode 100644
index 0000000..5ebc98b
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-common.yang
@@ -0,0 +1,648 @@
+submodule openconfig-bgp-common {
+
+  belongs-to openconfig-bgp {
+    prefix "oc-bgp";
+  }
+
+  import openconfig-extensions { prefix oc-ext; }
+  import openconfig-bgp-types { prefix oc-bgp-types; }
+  import openconfig-routing-policy { prefix oc-rpol; }
+  import openconfig-types { prefix oc-types; }
+  import openconfig-inet-types { prefix oc-inet; }
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This sub-module contains common groupings that are common across
+    multiple contexts within the BGP module. That is to say that they
+    may be application to a subset of global, peer-group or neighbor
+    contexts.";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  grouping bgp-common-neighbor-group-timers-config {
+    description
+      "Config parameters related to timers associated with the BGP
+      peer";
+
+    leaf connect-retry {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      default 30;
+      description
+        "Time interval in seconds between attempts to establish a
+        session with the peer.";
+    }
+
+    leaf hold-time {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      default 90;
+      description
+        "Time interval in seconds that a BGP session will be
+        considered active in the absence of keepalive or other
+        messages from the peer.  The hold-time is typically
+        set to 3x the keepalive-interval.";
+      reference
+        "RFC 4271 - A Border Gateway Protocol 4, Sec. 10";
+    }
+
+    leaf keepalive-interval {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      default 30;
+      description
+        "Time interval in seconds between transmission of keepalive
+        messages to the neighbor.  Typically set to 1/3 the
+        hold-time.";
+    }
+
+    leaf minimum-advertisement-interval {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      default 30;
+      description
+        "Minimum time which must elapse between subsequent UPDATE
+        messages relating to a common set of NLRI being transmitted
+        to a peer. This timer is referred to as
+        MinRouteAdvertisementIntervalTimer by RFC 4721 and serves to
+        reduce the number of UPDATE messages transmitted when a
+        particular set of NLRI exhibit instability.";
+      reference
+        "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-config {
+    description
+      "Neighbor level configuration items.";
+
+    leaf peer-as {
+      type oc-inet:as-number;
+      description
+        "AS number of the peer.";
+    }
+
+    leaf local-as {
+      type oc-inet:as-number;
+      description
+        "The local autonomous system number that is to be used
+        when establishing sessions with the remote peer or peer
+        group, if this differs from the global BGP router
+        autonomous system number.";
+    }
+
+    leaf peer-type {
+        type oc-bgp-types:peer-type;
+        description
+          "Explicitly designate the peer or peer group as internal
+          (iBGP) or external (eBGP).";
+    }
+
+    leaf auth-password {
+      type oc-types:routing-password;
+      description
+        "Configures an MD5 authentication password for use with
+        neighboring devices.";
+    }
+
+    leaf remove-private-as {
+      // could also make this a container with a flag to enable
+      // remove-private and separate option.  here, option implies
+      // remove-private is enabled.
+      type oc-bgp-types:remove-private-as-option;
+      description
+        "Remove private AS numbers from updates sent to peers - when
+        this leaf is not specified, the AS_PATH attribute should be
+        sent to the peer unchanged";
+    }
+
+    leaf route-flap-damping {
+      type boolean;
+      default false;
+      description
+        "Enable route flap damping.";
+    }
+
+    leaf send-community {
+      type oc-bgp-types:community-type;
+      default "NONE";
+      description
+        "Specify which types of community should be sent to the
+        neighbor or group. The default is to not send the
+        community attribute";
+    }
+
+    leaf description {
+      type string;
+      description
+        "An optional textual description (intended primarily for use
+        with a peer or group";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-transport-config {
+    description
+      "Configuration parameters relating to the transport protocol
+      used by the BGP session to the peer";
+
+    leaf tcp-mss {
+      type uint16;
+      description
+        "Sets the max segment size for BGP TCP sessions.";
+    }
+
+    leaf mtu-discovery {
+      type boolean;
+      default false;
+      description
+        "Turns path mtu discovery for BGP TCP sessions on (true)
+        or off (false)";
+    }
+
+    leaf passive-mode {
+      type boolean;
+      default false;
+      description
+        "Wait for peers to issue requests to open a BGP session,
+        rather than initiating sessions from the local router.";
+    }
+
+    leaf local-address {
+      type union {
+        type oc-inet:ip-address;
+        type string;
+      }
+      //TODO:  the string should be converted to a leafref type
+      //to point to an interface when YANG 1.1 is available with
+      //leafrefs in union types.
+      description
+        "Set the local IP (either IPv4 or IPv6) address to use
+        for the session when sending BGP update messages.  This
+        may be expressed as either an IP address or reference
+        to the name of an interface.";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-error-handling-config {
+    description
+      "Configuration parameters relating to enhanced error handling
+      behaviours for BGP";
+
+    leaf treat-as-withdraw {
+      type boolean;
+      default "false";
+      description
+        "Specify whether erroneous UPDATE messages for which the
+        NLRI can be extracted are reated as though the NLRI is
+        withdrawn - avoiding session reset";
+      reference "draft-ietf-idr-error-handling-16";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-logging-options-config {
+    description
+      "Configuration parameters specifying the logging behaviour for
+      BGP sessions to the peer";
+
+    leaf log-neighbor-state-changes {
+      type boolean;
+      default "true";
+      description
+        "Configure logging of peer state changes.  Default is
+        to enable logging of peer state changes.";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-multihop-config {
+    description
+      "Configuration parameters specifying the multihop behaviour for
+      BGP sessions to the peer";
+
+    leaf enabled {
+      type boolean;
+      default "false";
+      description
+        "When enabled the referenced group or neighbors are permitted
+        to be indirectly connected - including cases where the TTL
+        can be decremented between the BGP peers";
+    }
+
+    leaf multihop-ttl {
+      type uint8;
+      description
+        "Time-to-live value to use when packets are sent to the
+        referenced group or neighbors and ebgp-multihop is enabled";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-route-reflector-config {
+    description
+      "Configuration parameters determining whether the behaviour of
+      the local system when acting as a route-reflector";
+
+    leaf route-reflector-cluster-id {
+      type oc-bgp-types:rr-cluster-id-type;
+      description
+        "route-reflector cluster id to use when local router is
+        configured as a route reflector.  Commonly set at the group
+        level, but allows a different cluster
+        id to be set for each neighbor.";
+    }
+
+    leaf route-reflector-client {
+      type boolean;
+      default "false";
+      description
+        "Configure the neighbor as a route reflector client.";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-as-path-options-config {
+    description
+      "Configuration parameters allowing manipulation of the AS_PATH
+      attribute";
+
+    leaf allow-own-as {
+      type uint8;
+      default 0;
+      description
+        "Specify the number of occurrences of the local BGP speaker's
+        AS that can occur within the AS_PATH before it is rejected.";
+    }
+
+    leaf replace-peer-as {
+      type boolean;
+      default "false";
+      description
+        "Replace occurrences of the peer's AS in the AS_PATH
+        with the local autonomous system number";
+    }
+
+    leaf disable-peer-as-filter {
+      type boolean;
+      default "false";
+      description
+        "When set to true, the system advertises routes to a peer
+        even if the peer's AS was in the AS path.  The default
+        behavior (false) suppresses advertisements to peers if
+        their AS number is in the AS path of the route.";
+    }
+  }
+
+  grouping bgp-common-neighbor-group-add-paths-config {
+    description
+      "Configuration parameters specfying whether the local system
+      will send or receive multiple paths using ADD_PATHS";
+
+    leaf receive {
+      type boolean;
+      default false;
+      description
+        "Enable capability negotiation to receive multiple path
+        advertisements for an NLRI from the neighbor or group";
+      reference
+        "RFC 7911 - Advertisement of Multiple Paths in BGP";
+    }
+
+    leaf send {
+      type boolean;
+      default false;
+      description
+        "Enable capability negotiation to send multiple path
+        advertisements for an NLRI from the neighbor or group";
+      reference
+        "RFC 7911 - Advertisement of Multiple Paths in BGP";
+    }
+
+    leaf send-max {
+      type uint8;
+      description
+        "The maximum total number of paths to advertise to neighbors
+        for a single NLRI.  This includes the single best path as
+        well as additional paths advertised when add-paths is
+        enabled.";
+    }
+
+    leaf eligible-prefix-policy {
+      type leafref {
+        path "/oc-rpol:routing-policy/oc-rpol:policy-definitions/" +
+          "oc-rpol:policy-definition/oc-rpol:name";
+      }
+      description
+        "A reference to a routing policy which can be used to
+        restrict the prefixes for which add-paths is enabled";
+    }
+  }
+
+  grouping bgp-common-graceful-restart-config {
+    description
+      "Configuration parameters relating to BGP graceful restart.";
+
+    leaf enabled {
+      type boolean;
+      description
+        "Enable or disable the graceful-restart capability.";
+    }
+
+    leaf restart-time {
+      type uint16 {
+        range 0..4096;
+      }
+      description
+        "Estimated time (in seconds) for the local BGP speaker to
+        restart a session. This value is advertise in the graceful
+        restart BGP capability.  This is a 12-bit value, referred to
+        as Restart Time in RFC4724.  Per RFC4724, the suggested
+        default value is <= the hold-time value.";
+    }
+
+    leaf stale-routes-time {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      description
+        "An upper-bound on the time thate stale routes will be
+        retained by a router after a session is restarted. If an
+        End-of-RIB (EOR) marker is received prior to this timer
+        expiring stale-routes will be flushed upon its receipt - if
+        no EOR is received, then when this timer expires stale paths
+        will be purged. This timer is referred to as the
+        Selection_Deferral_Timer in RFC4724";
+    }
+
+    leaf helper-only {
+      type boolean;
+      description
+        "Enable graceful-restart in helper mode only. When this
+        leaf is set, the local system does not retain forwarding
+        its own state during a restart, but supports procedures
+        for the receiving speaker, as defined in RFC4724.";
+    }
+  }
+
+  grouping bgp-common-use-multiple-paths-config {
+    description
+      "Generic configuration options relating to use of multiple
+      paths for a referenced AFI-SAFI, group or neighbor";
+
+    leaf enabled {
+      type boolean;
+      default false;
+      description
+        "Whether the use of multiple paths for the same NLRI is
+        enabled for the neighbor. This value is overridden by
+        any more specific configuration value.";
+    }
+  }
+
+  grouping bgp-common-use-multiple-paths-ebgp-as-options-config {
+    description
+      "Configuration parameters specific to eBGP multipath applicable
+      to all contexts";
+
+    leaf allow-multiple-as {
+     type boolean;
+     default "false";
+     description
+      "Allow multipath to use paths from different neighbouring
+      ASes.  The default is to only consider multiple paths from
+      the same neighbouring AS.";
+    }
+  }
+
+  grouping bgp-common-global-group-use-multiple-paths {
+    description
+      "Common grouping used for both global and groups which provides
+      configuration and state parameters relating to use of multiple
+      paths";
+
+    container use-multiple-paths {
+      description
+        "Parameters related to the use of multiple paths for the
+        same NLRI";
+
+      container config {
+        description
+          "Configuration parameters relating to multipath";
+        uses bgp-common-use-multiple-paths-config;
+      }
+      container state {
+        config false;
+        description
+          "State parameters relating to multipath";
+        uses bgp-common-use-multiple-paths-config;
+      }
+
+      container ebgp {
+        description
+          "Multipath parameters for eBGP";
+        container config {
+          description
+            "Configuration parameters relating to eBGP multipath";
+          uses bgp-common-use-multiple-paths-ebgp-config;
+        }
+        container state {
+          config false;
+          description
+            "State information relating to eBGP multipath";
+          uses bgp-common-use-multiple-paths-ebgp-config;
+        }
+      }
+
+      container ibgp {
+        description
+          "Multipath parameters for iBGP";
+        container config {
+          description
+            "Configuration parameters relating to iBGP multipath";
+          uses bgp-common-use-multiple-paths-ibgp-config;
+        }
+        container state {
+          config false;
+          description
+            "State information relating to iBGP multipath";
+          uses bgp-common-use-multiple-paths-ibgp-config;
+        }
+      }
+    }
+  }
+
+  grouping bgp-common-use-multiple-paths-ebgp-config {
+    description
+      "Configuration parameters relating to multipath for eBGP";
+
+    leaf allow-multiple-as {
+     type boolean;
+     default "false";
+     description
+      "Allow multipath to use paths from different neighbouring
+      ASes.  The default is to only consider multiple paths from
+      the same neighbouring AS.";
+    }
+
+    leaf maximum-paths {
+     type uint32;
+     default 1;
+     description
+      "Maximum number of parallel paths to consider when using
+      BGP multipath. The default is use a single path.";
+    }
+  }
+
+  grouping bgp-common-use-multiple-paths-ibgp-config {
+    description
+      "Configuration parmaeters relating to multipath for iBGP";
+
+    leaf maximum-paths {
+      type uint32;
+      default 1;
+      description
+        "Maximum number of parallel paths to consider when using
+        iBGP multipath. The default is to use a single path";
+    }
+  }
+
+  grouping bgp-common-route-selection-options-config {
+    description
+      "Set of configuration options that govern best
+       path selection.";
+
+    leaf always-compare-med {
+      type boolean;
+      default "false";
+      description
+        "Compare multi-exit discriminator (MED) value from
+        different ASes when selecting the best route.  The
+        default behavior is to only compare MEDs for paths
+        received from the same AS.";
+    }
+
+    leaf ignore-as-path-length {
+      type boolean;
+      default "false";
+      description
+        "Ignore the AS path length when selecting the best path.
+        The default is to use the AS path length and prefer paths
+        with shorter length.";
+    }
+
+    leaf external-compare-router-id {
+      type boolean;
+      default "true";
+      description
+        "When comparing similar routes received from external
+        BGP peers, use the router-id as a criterion to select
+        the active path.";
+    }
+
+    leaf advertise-inactive-routes {
+      type boolean;
+      default "false";
+      description
+        "Advertise inactive routes to external peers.  The
+        default is to only advertise active routes.";
+    }
+
+    leaf enable-aigp {
+      type boolean;
+      default false;
+      description
+        "Flag to enable sending / receiving accumulated IGP
+        attribute in routing updates";
+    }
+
+    leaf ignore-next-hop-igp-metric {
+      type boolean;
+      default "false";
+      description
+        "Ignore the IGP metric to the next-hop when calculating
+        BGP best-path. The default is to select the route for
+        which the metric to the next-hop is lowest";
+    }
+  }
+
+  grouping bgp-common-route-selection-options {
+    description
+      "Configuration and state relating to route selection options";
+
+    container route-selection-options {
+      description
+        "Parameters relating to options for route selection";
+      container config {
+        description
+          "Configuration parameters relating to route selection
+          options";
+        uses bgp-common-route-selection-options-config;
+      }
+      container state {
+        config false;
+        description
+          "State information for the route selection options";
+        uses bgp-common-route-selection-options-config;
+      }
+    }
+  }
+
+  grouping bgp-common-state {
+    description
+      "Grouping containing common counters relating to prefixes and
+      paths";
+
+    leaf total-paths {
+      type uint32;
+      description
+        "Total number of BGP paths within the context";
+    }
+
+    leaf total-prefixes {
+      type uint32;
+      description
+        "Total number of BGP prefixes received within the context";
+    }
+  }
+
+
+}
+
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-errors.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-errors.yang
new file mode 100644
index 0000000..07a464d
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-errors.yang
@@ -0,0 +1,405 @@
+submodule openconfig-bgp-errors {
+
+  belongs-to openconfig-bgp-types {
+    prefix "oc-bgp-types";
+  }
+
+  import openconfig-extensions { prefix "oc-ext"; }
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This module defines BGP NOTIFICATION message error codes
+    and subcodes";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+
+
+  identity BGP_ERROR_CODE {
+    description
+      "Indicates the error type in a BGP NOTIFICATION message";
+    reference
+      "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)";
+  }
+
+  identity BGP_ERROR_SUBCODE {
+    description
+      "Provides more specific information about the nature of the
+      error reported in a NOTIFICATION message. Each Error
+      Code may have one or more Error Subcodes associated with it.";
+    reference
+      "RFC 4271 - A Border Gateway Protocol 4 (BGP-4)";
+  }
+
+
+  identity UNSPECIFIC {
+    base  BGP_ERROR_SUBCODE;
+    description
+      "The error subcode field is unspecific when the NOTIFICATION
+      message does not include any specific error subcode (i.e..,
+      value 0).";
+  }
+
+  identity MESSAGE_HEADER_ERROR {
+    base BGP_ERROR_CODE;
+    description
+      "Errors detected while processing the Message Header";
+  }
+
+  identity OPEN_MESSAGE_ERROR {
+    base BGP_ERROR_CODE;
+    description
+      "Errors detected while processing the OPEN message";
+  }
+
+  identity UPDATE_MESSAGE_ERROR {
+    base BGP_ERROR_CODE;
+    description
+      "Errors detected while processing the UPDATE message";
+  }
+
+  identity HOLD_TIMER_EXPIRED {
+    base BGP_ERROR_CODE;
+    description
+      "Indicates that the system did not receive successive
+      KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the
+      period specified in the Hold Time field of the OPEN message";
+  }
+
+  identity FINITE_STATE_MACHINE_ERROR {
+    base BGP_ERROR_CODE;
+    description
+      "Error detected by the BGP Finite State Machine
+      (e.g., receipt of an unexpected event)";
+  }
+
+  identity CEASE {
+    base BGP_ERROR_CODE;
+    description
+      "Sent by a BGP peer to close its BGP connection in absence of
+      any fatal errors.  If the BGP speaker terminates its
+      connection with a neihbor because the number of prefixes
+      received exceeds the configured upper bound, the speaker must
+      send the neighbor a NOTIFICATION message with the Cease
+      error code.";
+  }
+
+  identity ROUTE_REFRESH_MESSAGE_ERROR {
+    base BGP_ERROR_CODE;
+    description
+      "The length, excluding the fixed-size message header, of the
+      received ROUTE-REFRESH message with Message Subtype 1 and 2 is
+      not 4.  Applicable only when a BGP speaker has received the
+      'Enhanced Route Refresh Capability' from a peer";
+    reference
+      "RFC 7313 - Enhanced Route Refresh Capability for BGP-4";
+  }
+
+  identity MESSAGE_HEADER_SUBCODE {
+    base BGP_ERROR_SUBCODE;
+    description
+      "Error subcode definitions for Message Header error
+      notifications";
+  }
+
+  identity CONNECTION_NOT_SYNCHRONIZED {
+    base MESSAGE_HEADER_SUBCODE;
+    description
+      "Marker field of the message header is not all ones as
+      expected";
+  }
+
+  identity BAD_MESSAGE_LENGTH {
+    base MESSAGE_HEADER_SUBCODE;
+    description
+      "Indicates the message has an erroneous length with one
+      or more of the following:
+
+      - the Length field of the message header is less than 19 or
+        greater than 4096
+
+      - the Length field of an OPEN message is less than the minimum
+        length of the OPEN message
+
+      - the Length field of an UPDATE message is less than the
+        minimum length of the UPDATE message
+
+      - the Length field of a KEEPALIVE message is not equal to 19
+
+      - the Length field of a NOTIFICATION message is less than the
+        minimum length of the NOTIFICATION message
+
+      The erroneous Length field must be reported in the
+      NOTIFICATION data.";
+  }
+
+  identity BAD_MESSAGE_TYPE {
+    base MESSAGE_HEADER_SUBCODE;
+    description
+      "Type field of the message header is not recognized.  The
+      erroneous type field must be reported in the NOTIFICATION
+      data";
+  }
+
+  identity OPEN_MESSAGE_SUBCODE {
+    base BGP_ERROR_SUBCODE;
+    description
+      "Error subcode definitions for OPEN message error
+      notifications";
+  }
+
+  identity UNSUPPORTED_VERSION_NUMBER {
+    base OPEN_MESSAGE_SUBCODE;
+    description
+      "Version number in the Version field of the received OPEN
+      message is not supported";
+  }
+
+  identity BAD_PEER_AS {
+    base  OPEN_MESSAGE_SUBCODE;
+    description
+      "Autonomous System field of the OPEN message is unacceptable";
+  }
+
+  identity BAD_BGP_IDENTIFIER {
+    base OPEN_MESSAGE_SUBCODE;
+    description
+      "BGP Identifier field of the OPEN message is syntactically
+      incorrect";
+  }
+
+  identity UNSUPPORTED_OPTIONAL_PARAMETER {
+    base OPEN_MESSAGE_SUBCODE;
+    description
+      "One of the Optional Parameters in the OPEN message is not
+      recognized";
+  }
+
+  identity UNACCEPTABLE_HOLD_TIME {
+    base OPEN_MESSAGE_SUBCODE;
+    description
+      "Hold Time field of the OPEN message is unacceptable";
+  }
+
+  identity UNSUPPORTED_CAPABILITY {
+    base OPEN_MESSAGE_SUBCODE;
+    description
+      "Inidicates that the peer does not support capabilities
+      advertisement -- the peer may send this subcode in response to
+      an OPEN message that carries the Capabilities Optional
+      Parameter";
+    reference
+      "RFC 5492 - Capabilities Advertisement with BGP-4";
+  }
+
+  identity UPDATE_MESSAGE_SUBCODE {
+    base BGP_ERROR_SUBCODE;
+    description
+      "Error subcode definitions for UPDATE message error
+      notifications";
+  }
+
+  identity MALFORMED_ATTRIBUTE_LIST {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "Inidicates Withdrawn Routes Length or Total Attribute Length
+      is too large, or
+
+      An attribute appears more than once in the UPDATE message";
+  }
+
+  identity UNRECOGNIZED_WELL_KNOWN_ATTRIBUTE {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "One or more of the well-known mandatory attributes are not
+      recognized";
+  }
+
+  identity MISSING_WELL_KNOWN_ATTRIBUTE {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "One or more of the well-known mandatory attributes are not
+      present";
+  }
+
+  identity ATTRIBUTE_FLAGS_ERROR {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "Attribute has Attribute Flags that conflict with the
+      Attribute Type Code";
+  }
+
+  identity ATTRIBUTE_LENGTH_ERROR {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "Attribute has an Attribute Length that conflicts with the
+      expected length (based on the attribute type code)";
+  }
+
+  identity INVALID_ORIGIN_ATTRIBUTE {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "ORIGIN attribute has an undefined value";
+  }
+
+  identity INVALID_NEXT_HOP_ATTRIBUTE {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "The NEXT_HOP attribute field is syntactically incorrect";
+  }
+
+  identity OPTIONAL_ATTRIBUTE_ERROR {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "An error is detected in the value of a recognized optional
+      attribute (such an attribute must be discarded)";
+  }
+
+  identity INVALID_NETWORK_FIELD {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "The NLRI field in the UPDATE message is syntactically
+      incorrect";
+  }
+
+  identity MALFORMED_AS_PATH {
+    base UPDATE_MESSAGE_SUBCODE;
+    description
+      "The AS_PATH attribute is syntactically incorrect";
+  }
+
+  identity FINITE_STATE_MACHINE_SUBCODE {
+    base BGP_ERROR_SUBCODE;
+    description
+      "Error subcode definitions for BGP finite state machine
+      errors.";
+    reference
+      "RFC 6608 - Subcodes for BGP Finite State Machine Error";
+  }
+
+  identity RECEIVE_UNEXPECTED_MESSAGE_OPENSENT {
+    base FINITE_STATE_MACHINE_SUBCODE;
+    description
+      "The peer BGP speaker received an unexpected message from
+      the local system while the peer speaker session was in the
+      OpenSent state";
+  }
+
+  identity RECEIVE_UNEXPECTED_MESSAGE_OPENCONFIRM {
+    base FINITE_STATE_MACHINE_SUBCODE;
+    description
+      "The peer BGP speaker received an unexpected message from
+      the local system while the peer speaker session was in the
+      OpenConfirm state";
+  }
+
+  identity RECEIVE_UNEXPECTED_MESSAGE_ESTABLISHED {
+    base FINITE_STATE_MACHINE_SUBCODE;
+    description
+      "The peer BGP speaker received an unexpected message from
+      the local system while the peer speaker session was in the
+      Established state";
+  }
+
+  identity CEASE_SUBCODE {
+    base BGP_ERROR_SUBCODE;
+    description
+      "Error subcode definitions for Cease notification messages";
+    reference
+      "RFC 4486 - Subcodes for BGP Cease Notification Message";
+  }
+
+  identity MAX_NUM_PREFIXES_REACHED {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker terminated its peering with the local
+      system because the number of address prefixes received
+      exceeds a locally configured upper bound";
+  }
+
+  identity ADMINISTRATIVE_SHUTDOWN {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker administratively shut down its peering
+      with the local system";
+  }
+
+  identity PEER_DE_CONFIGURED {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker de-configure the peering with the local
+      system";
+  }
+
+  identity ADMINISTRATIVE_RESET {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker administratively reset the peering with
+      the local system";
+  }
+
+  identity CONNECTION_REJECTED {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker disallowed the BGP connection to the
+      local system after the peer speaker accepted a transport
+      protocol connection";
+  }
+
+  identity OTHER_CONFIG_CHANGE {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker administratively reset the peering with
+      the local sytem due to a configuration change that is not
+      covered by another subcode.";
+  }
+
+  identity CONN_COLLISION_RESOLUTION {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker sent a CEASE NOTIFICATION as a result of
+      the collision resolution procedure described in RFC 4271";
+  }
+
+  identity OUT_OF_RESOURCES {
+    base CEASE_SUBCODE;
+    description
+      "The peer BGP speaker ran out of resources (e.g., memory) and
+      reset the session with the local system";
+  }
+
+  identity ROUTE_REFRESH_SUBCODE {
+    base BGP_ERROR_SUBCODE;
+    description
+      "Error subcode definitions for the ROUTE-REFRESH message
+      error";
+  }
+
+  identity INVALID_MESSAGE_LENGTH {
+    base ROUTE_REFRESH_SUBCODE;
+    description
+      "The length, excluding the fixed-size message header, of the
+      received ROUTE-REFRESH message with Message Subtype 1 and 2
+      is not 4";
+  }
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-global.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-global.yang
new file mode 100644
index 0000000..a6fa8cd
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-global.yang
@@ -0,0 +1,375 @@
+submodule openconfig-bgp-global {
+
+  belongs-to openconfig-bgp {
+    prefix "oc-bgp";
+  }
+
+  import openconfig-extensions { prefix oc-ext; }
+  import openconfig-yang-types { prefix oc-yang; }
+  import openconfig-inet-types { prefix oc-inet; }
+
+  // Include common submodules
+  include openconfig-bgp-common;
+  include openconfig-bgp-common-multiprotocol;
+  include openconfig-bgp-peer-group;
+  include openconfig-bgp-common-structure;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This sub-module contains groupings that are specific to the
+    global context of the OpenConfig BGP module";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  grouping bgp-global-config {
+    description
+      "Global configuration options for the BGP router.";
+
+    leaf as {
+      type oc-inet:as-number;
+      mandatory true;
+      description
+        "Local autonomous system number of the router.  Uses
+        the 32-bit as-number type from the model in RFC 6991.";
+    }
+
+    leaf router-id {
+      type oc-yang:dotted-quad;
+      description
+        "Router id of the router - an unsigned 32-bit integer
+        expressed in dotted quad notation.";
+      reference
+        "RFC4271 - A Border Gateway Protocol 4 (BGP-4),
+        Section 4.2";
+    }
+  }
+
+  grouping bgp-global-state {
+    description
+      "Operational state parameters for the BGP neighbor";
+
+    uses bgp-common-state;
+  }
+
+  grouping bgp-global-default-route-distance-config {
+    description
+      "Configuration options relating to the administrative distance
+      (or preference) assigned to routes received from different
+      sources (external, internal, and local).";
+
+    leaf external-route-distance {
+      type uint8 {
+        range "1..255";
+      }
+      description
+        "Administrative distance for routes learned from external
+        BGP (eBGP).";
+    }
+    leaf internal-route-distance {
+      type uint8 {
+        range "1..255";
+      }
+      description
+        "Administrative distance for routes learned from internal
+        BGP (iBGP).";
+    }
+  }
+
+  grouping bgp-global-confederation-config {
+    description
+      "Configuration options specifying parameters when the local
+      router is within an autonomous system which is part of a BGP
+      confederation.";
+
+    leaf identifier {
+      type oc-inet:as-number;
+      description
+        "Confederation identifier for the autonomous system.
+        Setting the identifier indicates that the local-AS is part
+        of a BGP confederation.";
+    }
+
+    leaf-list member-as {
+      type oc-inet:as-number;
+      description
+        "Remote autonomous systems that are to be treated
+        as part of the local confederation.";
+    }
+  }
+
+  grouping bgp-global-dynamic-neighbors {
+    description
+      "Grouping containing configuration relating to dynamic peers.";
+
+    container dynamic-neighbor-prefixes {
+      description
+        "A list of IP prefixes from which the system should:
+          - Accept connections to the BGP daemon
+          - Dynamically configure a BGP neighbor corresponding to the
+            source address of the remote system, using the parameters
+            of the specified peer-group.
+         For such neighbors, an entry within the neighbor list should
+         be created, indicating that the peer was dynamically
+         configured, and referencing the peer-group from which the
+         configuration was derived.";
+
+      list dynamic-neighbor-prefix {
+        key "prefix";
+        description
+          "An individual prefix from which dynamic neighbor
+          connections are allowed.";
+
+        leaf prefix {
+          type leafref {
+            path "../config/prefix";
+          }
+          description
+            "Reference to the IP prefix from which source connections
+            are allowed for the dynamic neighbor group.";
+        }
+
+        container config {
+          description
+            "Configuration parameters relating to the source prefix
+            for the dynamic BGP neighbor connections.";
+
+          uses bgp-global-dynamic-neighbor-config;
+        }
+
+        container state {
+          config false;
+          description
+            "Operational state parameters relating to the source
+            prefix for the dynamic BGP neighbor connections.";
+
+          uses bgp-global-dynamic-neighbor-config;
+        }
+      }
+    }
+  }
+
+  grouping bgp-global-dynamic-neighbor-config {
+    description
+      "Configuration parameters relating to an individual prefix from
+      which dynamic neighbors are accepted.";
+
+    leaf prefix {
+      type oc-inet:ip-prefix;
+      description
+        "The IP prefix within which the source address of the remote
+        BGP speaker must fall to be considered eligible to the
+        dynamically configured."; }
+
+    leaf peer-group {
+      type leafref {
+        // At bgp/global/dynamic-neighbor-prefixes/dynamic-neighbor
+        // prefix/config/peer-group
+        path "../../../../../peer-groups/peer-group/config/" +
+             "peer-group-name";
+      }
+      description
+        "The peer-group within which the dynamic neighbor will be
+        configured.  The configuration parameters used for the dynamic
+        neighbor are those specified within the referenced peer
+        group.";
+    }
+  }
+
+  grouping bgp-global-mp-all-afi-safi-list-contents {
+    description
+      "A grouping used for contents of the list of AFI-SAFI
+      entries at the global BGP level.";
+
+    // import and export policy included for the afi/safi
+
+    uses bgp-common-mp-ipv4-unicast-group;
+    uses bgp-common-mp-ipv6-unicast-group;
+    uses bgp-common-mp-ipv4-labeled-unicast-group;
+    uses bgp-common-mp-ipv6-labeled-unicast-group;
+    uses bgp-common-mp-l3vpn-ipv4-unicast-group;
+    uses bgp-common-mp-l3vpn-ipv6-unicast-group;
+    uses bgp-common-mp-l3vpn-ipv4-multicast-group;
+    uses bgp-common-mp-l3vpn-ipv6-multicast-group;
+    uses bgp-common-mp-l2vpn-vpls-group;
+    uses bgp-common-mp-l2vpn-evpn-group;
+  }
+
+  grouping bgp-global-afi-safi-list {
+    description
+      "List of address-families associated with the BGP instance";
+
+    list afi-safi {
+      key "afi-safi-name";
+
+      description
+        "AFI,SAFI configuration available for the
+        neighbour or group";
+
+      leaf afi-safi-name {
+        type leafref {
+          path "../config/afi-safi-name";
+        }
+        description
+          "Reference to the AFI-SAFI name used as a key
+          for the AFI-SAFI list";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the AFI-SAFI";
+        uses bgp-common-mp-afi-safi-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the AFI-SAFI";
+        uses bgp-common-mp-afi-safi-config;
+        uses bgp-common-state;
+      }
+
+      container graceful-restart {
+        description
+          "Parameters relating to BGP graceful-restart";
+        container config {
+          description
+            "Configuration options for BGP graceful-restart";
+          uses bgp-common-mp-afi-safi-graceful-restart-config;
+        }
+        container state {
+          config false;
+          description
+            "State information for BGP graceful-restart";
+          uses bgp-common-mp-afi-safi-graceful-restart-config;
+        }
+      }
+
+      uses bgp-common-route-selection-options;
+      uses bgp-common-global-group-use-multiple-paths;
+      uses bgp-common-structure-neighbor-group-add-paths;
+      uses bgp-global-mp-all-afi-safi-list-contents;
+    }
+  }
+
+  // Structural groupings
+  grouping bgp-global-base {
+    description
+      "Global configuration parameters for the BGP router";
+
+    container config {
+      description
+        "Configuration parameters relating to the global BGP router";
+      uses bgp-global-config;
+    }
+    container state {
+      config false;
+      description
+        "State information relating to the global BGP router";
+      uses bgp-global-config;
+      uses bgp-global-state;
+    }
+
+    container default-route-distance {
+      description
+        "Administrative distance (or preference) assigned to
+        routes received from different sources
+        (external, internal, and local).";
+
+      container config {
+        description
+          "Configuration parameters relating to the default route
+          distance";
+        uses bgp-global-default-route-distance-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the default route distance";
+        uses bgp-global-default-route-distance-config;
+      }
+    }
+
+    container confederation {
+      description
+        "Parameters indicating whether the local system acts as part
+        of a BGP confederation";
+
+      container config {
+        description
+          "Configuration parameters relating to BGP confederations";
+        uses bgp-global-confederation-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the BGP confederations";
+        uses bgp-global-confederation-config;
+      }
+    }
+
+    container graceful-restart {
+      description
+        "Parameters relating the graceful restart mechanism for BGP";
+      container config {
+        description
+          "Configuration parameters relating to graceful-restart";
+        uses bgp-common-graceful-restart-config;
+      }
+      container state {
+        config false;
+        description
+          "State information associated with graceful-restart";
+        uses bgp-common-graceful-restart-config;
+      }
+    }
+
+    uses bgp-common-global-group-use-multiple-paths;
+    uses bgp-common-route-selection-options;
+
+    container afi-safis {
+      description
+        "Address family specific configuration";
+      uses bgp-global-afi-safi-list;
+    }
+
+    uses bgp-global-dynamic-neighbors;
+  }
+
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-neighbor.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-neighbor.yang
new file mode 100644
index 0000000..f88dc4e
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-neighbor.yang
@@ -0,0 +1,686 @@
+submodule openconfig-bgp-neighbor {
+
+  belongs-to openconfig-bgp {
+    prefix "oc-bgp";
+  }
+
+  import openconfig-extensions { prefix oc-ext; }
+  import openconfig-routing-policy { prefix oc-rpol; }
+  import openconfig-types { prefix oc-types; }
+  import openconfig-bgp-types { prefix oc-bgp-types; }
+  import openconfig-inet-types { prefix oc-inet; }
+  import openconfig-yang-types { prefix oc-yang; }
+
+  // Include the common submodule
+  include openconfig-bgp-common;
+  include openconfig-bgp-common-multiprotocol;
+  include openconfig-bgp-peer-group;
+  include openconfig-bgp-common-structure;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This sub-module contains groupings that are specific to the
+    neighbor context of the OpenConfig BGP module.";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  grouping bgp-neighbor-config {
+    description
+      "Configuration parameters relating to a base BGP neighbor that
+      are not also applicable to any other context
+      (e.g., peer group)";
+
+    leaf peer-group {
+      type leafref {
+        path "../../../../peer-groups/peer-group/peer-group-name";
+      }
+      description
+        "The peer-group with which this neighbor is associated";
+    }
+
+    leaf neighbor-address {
+        type oc-inet:ip-address;
+        description
+          "Address of the BGP peer, either in IPv4 or IPv6";
+    }
+
+    leaf enabled {
+        type boolean;
+        default true;
+        description
+          "Whether the BGP peer is enabled. In cases where the
+          enabled leaf is set to false, the local system should not
+          initiate connections to the neighbor, and should not
+          respond to TCP connections attempts from the neighbor. If
+          the state of the BGP session is ESTABLISHED at the time
+          that this leaf is set to false, the BGP session should be
+          ceased.";
+    }
+  }
+
+  grouping bgp-neighbor-use-multiple-paths {
+    description
+      "Multipath configuration and state applicable to a BGP
+      neighbor";
+
+    container use-multiple-paths {
+      description
+        "Parameters related to the use of multiple-paths for the same
+        NLRI when they are received only from this neighbor";
+
+      container config {
+        description
+          "Configuration parameters relating to multipath";
+        uses bgp-common-use-multiple-paths-config;
+      }
+      container state {
+        config false;
+        description
+          "State parameters relating to multipath";
+        uses bgp-common-use-multiple-paths-config;
+      }
+
+      container ebgp {
+        description
+          "Multipath configuration for eBGP";
+        container config {
+          description
+            "Configuration parameters relating to eBGP multipath";
+          uses bgp-common-use-multiple-paths-ebgp-as-options-config;
+        }
+        container state {
+          config false;
+          description
+            "State information relating to eBGP multipath";
+          uses bgp-common-use-multiple-paths-ebgp-as-options-config;
+        }
+      }
+    }
+  }
+
+  grouping bgp-neighbor-state {
+    description
+      "Operational state parameters relating only to a BGP neighbor";
+
+    leaf session-state {
+      type enumeration {
+          enum IDLE {
+            description
+              "neighbor is down, and in the Idle state of the
+              FSM";
+          }
+          enum CONNECT {
+            description
+              "neighbor is down, and the session is waiting for
+              the underlying transport session to be established";
+          }
+          enum ACTIVE {
+            description
+              "neighbor is down, and the local system is awaiting
+              a conncetion from the remote peer";
+          }
+          enum OPENSENT {
+            description
+              "neighbor is in the process of being established.
+              The local system has sent an OPEN message";
+          }
+          enum OPENCONFIRM {
+            description
+              "neighbor is in the process of being established.
+              The local system is awaiting a NOTIFICATION or
+              KEEPALIVE message";
+          }
+          enum ESTABLISHED {
+            description
+              "neighbor is up - the BGP session with the peer is
+              established";
+          }
+        }
+      description
+        "Operational state of the BGP peer";
+    }
+
+    leaf last-established {
+      type oc-types:timeticks64;
+      description
+        "This timestamp indicates the time that the
+        BGP session last transitioned in or out of the Established
+        state.  The value is the timestamp in seconds relative to
+        the Unix Epoch (Jan 1, 1970 00:00:00 UTC).
+
+        The BGP session uptime can be computed by clients as the
+        difference between this value and the current time in UTC
+        (assuming the session is in the ESTABLISHED state, per the
+        session-state leaf).";
+    }
+
+    leaf established-transitions {
+      type oc-yang:counter64;
+      description
+        "Number of transitions to the Established state for
+        the neighbor session.  This value is analogous to the
+        bgpPeerFsmEstablishedTransitions object from the standard
+        BGP-4 MIB";
+      reference
+        "RFC 4273 - Definitions of Managed Objects for BGP-4";
+    }
+
+    leaf-list supported-capabilities {
+      type identityref {
+        base oc-bgp-types:BGP_CAPABILITY;
+      }
+      description
+        "BGP capabilities negotiated as supported with the peer";
+    }
+
+    container messages {
+      description
+        "Counters for BGP messages sent and received from the
+        neighbor";
+      container sent {
+        description
+          "Counters relating to BGP messages sent to the neighbor";
+        uses bgp-neighbor-counters-message-types-state;
+        }
+
+      container received {
+        description
+          "Counters for BGP messages received from the neighbor";
+        uses bgp-neighbor-counters-message-types-state;
+      }
+    }
+
+    container queues {
+      description
+        "Counters related to queued messages associated with the
+        BGP neighbor";
+      uses bgp-neighbor-queue-counters-state;
+    }
+
+    leaf dynamically-configured {
+      type boolean;
+      default false;
+      description
+        "When this leaf is set to true, the peer was configured dynamically
+        due to an inbound connection request from a specified source prefix
+        within a dynamic-neighbor-prefix.";
+    }
+  }
+
+  grouping bgp-neighbor-counters-message-types-state {
+    description
+      "Grouping of BGP message types, included for re-use
+      across counters";
+
+    leaf UPDATE {
+      type uint64;
+      description
+        "Number of BGP UPDATE messages announcing, withdrawing
+        or modifying paths exchanged.";
+    }
+
+    leaf NOTIFICATION {
+      type uint64;
+      description
+        "Number of BGP NOTIFICATION messages indicating an
+        error condition has occurred exchanged.";
+    }
+
+    leaf last-notification-time {
+      type oc-types:timeticks64;
+      description
+        "This timestamp indicates the time that a NOTIFICATION
+        message was sent or received on the peering session
+        (based on whether this leaf is associated with
+        sent or received messages).
+
+        The value is the timestamp in seconds relative to
+        the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
+    }
+
+    leaf last-notification-error-code {
+      type identityref {
+        base oc-bgp-types:BGP_ERROR_CODE;
+      }
+      description
+        "Indicates the last BGP error sent or received on the peering
+        session (based on whether this leaf is associated with
+        sent or received messages).";
+    }
+
+    leaf last-notification-error-subcode {
+      type identityref {
+        base oc-bgp-types:BGP_ERROR_SUBCODE;
+      }
+      description
+        "Indicates the last BGP error subcode sent or received on
+        the peering session (based on whether this leaf is associated
+        with sent or received messages)";
+    }
+  }
+
+  grouping bgp-neighbor-queue-counters-state {
+    description
+      "Counters relating to the message queues associated with the
+      BGP peer";
+
+    leaf input {
+      type uint32;
+      description
+        "The number of messages received from the peer currently
+        queued";
+    }
+
+    leaf output {
+      type uint32;
+      description
+        "The number of messages queued to be sent to the peer";
+    }
+  }
+
+  grouping bgp-neighbor-transport-state {
+    description
+      "Operational state parameters relating to the transport session
+      used for the BGP session";
+
+    leaf local-port {
+      type oc-inet:port-number;
+      description
+        "Local TCP port being used for the TCP session supporting
+        the BGP session";
+    }
+
+    leaf remote-address {
+      type oc-inet:ip-address;
+      description
+        "Remote address to which the BGP session has been
+        established";
+    }
+
+    leaf remote-port {
+      type oc-inet:port-number;
+      description
+        "Remote port being used by the peer for the TCP session
+        supporting the BGP session";
+    }
+  }
+
+  grouping bgp-neighbor-error-handling-state {
+    description
+      "Operational state parameters relating to enhanced error
+      error handling for BGP";
+
+    leaf erroneous-update-messages {
+      type uint32;
+      description
+        "The number of BGP UPDATE messages for which the
+        treat-as-withdraw mechanism has been applied based
+        on erroneous message contents";
+    }
+  }
+
+  grouping bgp-neighbor-timers-state {
+    description
+      "Operational state parameters relating to BGP timers associated
+      with the BGP session";
+
+    leaf negotiated-hold-time {
+      type decimal64 {
+        fraction-digits 2;
+      }
+      description
+        "The negotiated hold-time for the BGP session";
+    }
+  }
+
+  grouping bgp-neighbor-afi-safi-graceful-restart-state {
+    description
+      "Operational state variables relating to the graceful-restart
+      mechanism on a per-AFI-SAFI basis";
+
+    leaf received {
+      type boolean;
+      description
+        "This leaf indicates whether the neighbor advertised the
+        ability to support graceful-restart for this AFI-SAFI";
+    }
+
+    leaf advertised {
+      type boolean;
+      description
+        "This leaf indicates whether the ability to support
+        graceful-restart has been advertised to the peer";
+    }
+  }
+
+  grouping bgp-neighbor-graceful-restart-state {
+    description
+      "Operational state information relevant to graceful restart
+      for BGP";
+
+    leaf peer-restart-time {
+      type uint16 {
+        range 0..4096;
+      }
+      description
+        "The period of time (advertised by the peer) that
+        the peer expects a restart of a BGP session to
+        take";
+    }
+
+    leaf peer-restarting {
+      type boolean;
+      description
+        "This flag indicates whether the remote neighbor is currently
+        in the process of restarting, and hence received routes are
+        currently stale";
+    }
+
+    leaf local-restarting {
+      type boolean;
+      description
+        "This flag indicates whether the local neighbor is currently
+        restarting. The flag is unset after all NLRI have been
+        advertised to the peer, and the End-of-RIB (EOR) marker has
+        been unset";
+    }
+
+    leaf mode {
+      type enumeration {
+        enum HELPER_ONLY {
+          description
+            "The local router is operating in helper-only mode, and
+            hence will not retain forwarding state during a local
+            session restart, but will do so during a restart of the
+            remote peer";
+        }
+        enum BILATERAL {
+          description
+            "The local router is operating in both helper mode, and
+            hence retains forwarding state during a remote restart,
+            and also maintains forwarding state during local session
+            restart";
+        }
+        enum REMOTE_HELPER {
+          description
+            "The local system is able to retain routes during restart
+            but the remote system is only able to act as a helper";
+        }
+      }
+      description
+        "Ths leaf indicates the mode of operation of BGP graceful
+        restart with the peer";
+    }
+  }
+
+  grouping bgp-neighbor-afi-safi-state {
+    description
+      "Operational state parameters relating to an individual AFI,
+      SAFI for a neighbor";
+
+    leaf active {
+      type boolean;
+      description
+        "This value indicates whether a particular AFI-SAFI has
+        been succesfully negotiated with the peer. An AFI-SAFI
+        may be enabled in the current running configuration, but a
+        session restart may be required in order to negotiate the new
+        capability.";
+    }
+
+    container prefixes {
+      description "Prefix counters for the BGP session";
+      leaf received {
+        type uint32;
+        description
+          "The number of prefixes received from the neighbor";
+      }
+
+      leaf sent {
+        type uint32;
+        description
+          "The number of prefixes advertised to the neighbor";
+      }
+
+      leaf installed {
+        type uint32;
+        description
+          "The number of advertised prefixes installed in the
+          Loc-RIB";
+      }
+    }
+  }
+
+  grouping bgp-neighbor-afi-safi-list {
+    description
+      "List of address-families associated with the BGP neighbor";
+
+    list afi-safi {
+      key "afi-safi-name";
+
+      description
+        "AFI,SAFI configuration available for the
+        neighbour or group";
+
+
+      leaf afi-safi-name {
+        type leafref {
+          path "../config/afi-safi-name";
+        }
+        description
+          "Reference to the AFI-SAFI name used as a key
+          for the AFI-SAFI list";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the AFI-SAFI";
+        uses bgp-common-mp-afi-safi-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the AFI-SAFI";
+        uses bgp-common-mp-afi-safi-config;
+        uses bgp-neighbor-afi-safi-state;
+      }
+
+
+      container graceful-restart {
+        description
+          "Parameters relating to BGP graceful-restart";
+        container config {
+          description
+            "Configuration options for BGP graceful-restart";
+          uses bgp-common-mp-afi-safi-graceful-restart-config;
+        }
+        container state {
+          config false;
+          description
+            "State information for BGP graceful-restart";
+          uses bgp-common-mp-afi-safi-graceful-restart-config;
+          uses bgp-neighbor-afi-safi-graceful-restart-state;
+        }
+      }
+
+      uses bgp-common-structure-neighbor-group-add-paths;
+      uses bgp-common-mp-all-afi-safi-list-contents;
+      uses bgp-neighbor-use-multiple-paths;
+    }
+  }
+
+  grouping bgp-neighbor-base {
+    description
+      "Parameters related to a BGP neighbor";
+
+    container config {
+      description
+        "Configuration parameters relating to the BGP neighbor or
+        group";
+      uses bgp-neighbor-config;
+      uses bgp-common-neighbor-group-config;
+    }
+    container state {
+      config false;
+      description
+        "State information relating to the BGP neighbor";
+      uses bgp-neighbor-config;
+      uses bgp-common-neighbor-group-config;
+      uses bgp-neighbor-state;
+    }
+
+    container timers {
+      description
+        "Timers related to a BGP neighbor";
+      container config {
+        description
+          "Configuration parameters relating to timers used for the
+          BGP neighbor";
+        uses bgp-common-neighbor-group-timers-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the timers used for the BGP
+          neighbor";
+        uses bgp-common-neighbor-group-timers-config;
+        uses bgp-neighbor-timers-state;
+      }
+    }
+
+    container transport {
+      description
+        "Transport session parameters for the BGP neighbor";
+      container config {
+        description
+          "Configuration parameters relating to the transport
+          session(s) used for the BGP neighbor";
+        uses bgp-common-neighbor-group-transport-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the transport session(s)
+          used for the BGP neighbor";
+        uses bgp-common-neighbor-group-transport-config;
+        uses bgp-neighbor-transport-state;
+      }
+    }
+
+    container error-handling {
+      description
+        "Error handling parameters used for the BGP neighbor or
+        group";
+      container config {
+        description
+          "Configuration parameters enabling or modifying the
+          behavior or enhanced error handling mechanisms for the BGP
+          neighbor";
+        uses bgp-common-neighbor-group-error-handling-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to enhanced error handling
+          mechanisms for the BGP neighbor";
+        uses bgp-common-neighbor-group-error-handling-config;
+        uses bgp-neighbor-error-handling-state;
+      }
+    }
+
+    container graceful-restart {
+      description
+        "Parameters relating the graceful restart mechanism for BGP";
+      container config {
+        description
+          "Configuration parameters relating to graceful-restart";
+        uses bgp-common-graceful-restart-config;
+      }
+      container state {
+        config false;
+        description
+          "State information associated with graceful-restart";
+        uses bgp-common-graceful-restart-config;
+        uses bgp-neighbor-graceful-restart-state;
+      }
+    }
+
+    uses bgp-common-structure-neighbor-group-logging-options;
+    uses bgp-common-structure-neighbor-group-ebgp-multihop;
+    uses bgp-common-structure-neighbor-group-route-reflector;
+    uses bgp-common-structure-neighbor-group-as-path-options;
+    uses bgp-neighbor-use-multiple-paths;
+    uses oc-rpol:apply-policy-group;
+
+    container afi-safis {
+      description
+        "Per-address-family configuration parameters associated with
+        the neighbor";
+      uses bgp-neighbor-afi-safi-list;
+    }
+  }
+
+  grouping bgp-neighbor-list {
+    description
+      "The list of BGP neighbors";
+
+    list neighbor {
+      key "neighbor-address";
+      description
+        "List of BGP neighbors configured on the local system,
+        uniquely identified by peer IPv[46] address";
+
+      leaf neighbor-address {
+        type leafref {
+          path "../config/neighbor-address";
+        }
+        description
+          "Reference to the address of the BGP neighbor used as
+          a key in the neighbor list";
+      }
+
+      uses bgp-neighbor-base;
+    }
+
+  }
+
+
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-peer-group.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-peer-group.yang
new file mode 100644
index 0000000..a579b85
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-peer-group.yang
@@ -0,0 +1,259 @@
+submodule openconfig-bgp-peer-group {
+
+  belongs-to openconfig-bgp {
+    prefix "oc-bgp";
+  }
+
+  import openconfig-extensions { prefix oc-ext; }
+  import openconfig-routing-policy { prefix oc-rpol; }
+
+  // Include the common submodule
+  include openconfig-bgp-common;
+  include openconfig-bgp-common-multiprotocol;
+  include openconfig-bgp-common-structure;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This sub-module contains groupings that are specific to the
+    peer-group context of the OpenConfig BGP module.";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  grouping bgp-peer-group-config {
+    description
+      "Configuration parameters relating to a base BGP peer group that
+      are not also applicable to any other context (e.g., neighbor)";
+
+    leaf peer-group-name {
+      type string;
+      description
+        "Name of the BGP peer-group";
+    }
+
+  }
+
+  grouping bgp-peer-group-afi-safi-list {
+    description
+      "List of address-families associated with the BGP peer-group";
+
+    list afi-safi {
+      key "afi-safi-name";
+
+      description
+        "AFI,SAFI configuration available for the
+        neighbour or group";
+
+      leaf afi-safi-name {
+        type leafref {
+          path "../config/afi-safi-name";
+        }
+        description
+          "Reference to the AFI-SAFI name used as a key
+          for the AFI-SAFI list";
+      }
+
+      container config {
+        description
+          "Configuration parameters for the AFI-SAFI";
+        uses bgp-common-mp-afi-safi-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the AFI-SAFI";
+        uses bgp-common-mp-afi-safi-config;
+      }
+
+      container graceful-restart {
+        description
+          "Parameters relating to BGP graceful-restart";
+        container config {
+          description
+            "Configuration options for BGP graceful-restart";
+          uses bgp-common-mp-afi-safi-graceful-restart-config;
+        }
+        container state {
+          config false;
+          description
+            "State information for BGP graceful-restart";
+          uses bgp-common-mp-afi-safi-graceful-restart-config;
+        }
+      }
+
+      uses bgp-common-structure-neighbor-group-add-paths;
+      uses bgp-common-global-group-use-multiple-paths;
+      uses bgp-common-mp-all-afi-safi-list-contents;
+    }
+  }
+
+  grouping bgp-peer-group-base {
+    description
+      "Parameters related to a BGP group";
+
+    container config {
+      description
+        "Configuration parameters relating to the BGP neighbor or
+        group";
+      uses bgp-peer-group-config;
+      uses bgp-common-neighbor-group-config;
+    }
+    container state {
+      config false;
+      description
+        "State information relating to the BGP peer-group";
+      uses bgp-peer-group-config;
+      uses bgp-common-neighbor-group-config;
+      uses bgp-common-state;
+    }
+
+    container timers {
+      description
+        "Timers related to a BGP peer-group";
+
+      container config {
+        description
+          "Configuration parameters relating to timers used for the
+          BGP neighbor or peer group";
+        uses bgp-common-neighbor-group-timers-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the timers used for the BGP
+         group";
+        uses bgp-common-neighbor-group-timers-config;
+      }
+    }
+
+    container transport {
+      description
+        "Transport session parameters for the BGP peer-group";
+
+      container config {
+        description
+          "Configuration parameters relating to the transport
+          session(s) used for the BGP neighbor or group";
+        uses bgp-common-neighbor-group-transport-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to the transport session(s)
+          used for the BGP neighbor or group";
+        uses bgp-common-neighbor-group-transport-config;
+      }
+    }
+
+    container error-handling {
+      description
+        "Error handling parameters used for the BGP peer-group";
+
+      container config {
+        description
+          "Configuration parameters enabling or modifying the
+          behavior or enhanced error handling mechanisms for the BGP
+          group";
+        uses bgp-common-neighbor-group-error-handling-config;
+      }
+      container state {
+        config false;
+        description
+          "State information relating to enhanced error handling
+          mechanisms for the BGP group";
+        uses bgp-common-neighbor-group-error-handling-config;
+      }
+    }
+
+    container graceful-restart {
+      description
+        "Parameters relating the graceful restart mechanism for BGP";
+      container config {
+        description
+          "Configuration parameters relating to graceful-restart";
+        uses bgp-common-graceful-restart-config;
+      }
+      container state {
+        config false;
+        description
+          "State information associated with graceful-restart";
+        uses bgp-common-graceful-restart-config;
+      }
+    }
+
+    uses bgp-common-structure-neighbor-group-logging-options;
+    uses bgp-common-structure-neighbor-group-ebgp-multihop;
+    uses bgp-common-structure-neighbor-group-route-reflector;
+    uses bgp-common-structure-neighbor-group-as-path-options;
+    uses bgp-common-global-group-use-multiple-paths;
+    uses oc-rpol:apply-policy-group;
+
+    container afi-safis {
+      description
+        "Per-address-family configuration parameters associated with
+        thegroup";
+      uses bgp-peer-group-afi-safi-list;
+    }
+  }
+
+  grouping bgp-peer-group-list {
+    description
+      "The list of BGP peer groups";
+
+    list peer-group {
+      key "peer-group-name";
+      description
+        "List of BGP peer-groups configured on the local system -
+        uniquely identified by peer-group name";
+
+    leaf peer-group-name {
+      type leafref {
+        path "../config/peer-group-name";
+      }
+      description
+        "Reference to the name of the BGP peer-group used as a
+        key in the peer-group list";
+      }
+
+      uses bgp-peer-group-base;
+    }
+  }
+
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-policy.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-policy.yang
new file mode 100644
index 0000000..4903de8
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-policy.yang
@@ -0,0 +1,1198 @@
+module openconfig-bgp-policy {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/bgp-policy";
+
+  prefix "oc-bgp-pol";
+
+  // import some basic types
+  import openconfig-inet-types { prefix oc-inet; }
+  import openconfig-routing-policy {prefix oc-rpol; }
+  import openconfig-policy-types { prefix oc-pol-types; }
+  import openconfig-bgp-types { prefix oc-bgp-types; }
+  import openconfig-extensions { prefix oc-ext; }
+
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This module contains data definitions for BGP routing policy.
+    It augments the base routing-policy module with BGP-specific
+    options for conditions and actions.";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+
+  // typedef statements
+
+  typedef bgp-set-community-option-type {
+    type enumeration {
+      enum ADD {
+        description
+          "add the specified communities to the existing
+          community attribute";
+      }
+      enum REMOVE {
+        description
+          "remove the specified communities from the
+          existing community attribute";
+      }
+      enum REPLACE {
+        description
+          "replace the existing community attribute with
+          the specified communities. If an empty set is
+          specified, this removes the community attribute
+          from the route.";
+      }
+    }
+    description
+      "Type definition for options when setting the community
+      attribute in a policy action";
+  }
+
+  typedef bgp-next-hop-type {
+    type union {
+      type oc-inet:ip-address;
+      type enumeration {
+        enum SELF {
+          description "special designation for local router's own
+          address, i.e., next-hop-self";
+        }
+      }
+    }
+    description
+      "type definition for specifying next-hop in policy actions";
+  }
+
+  typedef bgp-set-med-type {
+    type union {
+      type uint32;
+      type string {
+        pattern '^[+-][0-9]+$';
+      }
+      type enumeration {
+        enum IGP {
+          description "set the MED value to the IGP cost toward the
+          next hop for the route";
+        }
+      }
+    }
+    description
+      "Type definition for specifying how the BGP MED can
+      be set in BGP policy actions. The three choices are to set
+      the MED directly, increment/decrement using +/- notation,
+      and setting it to the IGP cost (predefined value).";
+  }
+
+  // grouping statements
+
+  grouping match-community-config {
+    description
+      "Configuration data for match conditions on communities";
+
+    leaf community-set {
+      type leafref {
+        path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" +
+          "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:community-sets/" +
+          "oc-bgp-pol:community-set/oc-bgp-pol:community-set-name";
+      }
+      description
+        "References a defined community set";
+    }
+
+    uses oc-rpol:match-set-options-group;
+  }
+
+  grouping match-community-state {
+    description
+      "Operational state data for match conditions on communities";
+  }
+
+  grouping match-community-top {
+    description
+      "Top-level grouping for match conditions on communities";
+
+    container match-community-set {
+      description
+        "Top-level container for match conditions on communities.
+        Match a referenced community-set according to the logic
+        defined in the match-set-options leaf";
+
+      container config {
+        description
+          "Configuration data for match conditions on communities";
+
+        uses match-community-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data ";
+
+        uses match-community-config;
+        uses match-community-state;
+      }
+    }
+  }
+
+  grouping match-ext-community-config {
+    description
+      "Configuration data for match conditions on extended
+      communities";
+
+      leaf ext-community-set {
+        type leafref {
+          path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" +
+            "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:ext-community-sets/" +
+            "oc-bgp-pol:ext-community-set/" +
+            "oc-bgp-pol:ext-community-set-name";
+        }
+        description "References a defined extended community set";
+      }
+
+      uses oc-rpol:match-set-options-group;
+  }
+
+  grouping match-ext-community-state {
+    description
+      "Operational state data for match conditions on extended
+      communities";
+  }
+
+  grouping match-ext-community-top {
+    description
+      "Top-level grouping for match conditions on extended
+      communities";
+
+    container match-ext-community-set {
+      description
+        "Match a referenced extended community-set according to the
+        logic defined in the match-set-options leaf";
+
+      container config {
+        description
+          "Configuration data for match conditions on extended
+          communities";
+
+        uses match-ext-community-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for match conditions on extended
+          communities";
+
+        uses match-ext-community-config;
+        uses match-ext-community-state;
+      }
+    }
+  }
+
+  grouping match-as-path-config {
+    description
+      "Configuration data for match conditions on AS path set";
+
+    leaf as-path-set {
+      type leafref {
+        path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" +
+          "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:as-path-sets/" +
+          "oc-bgp-pol:as-path-set/oc-bgp-pol:as-path-set-name";
+      }
+      description "References a defined AS path set";
+    }
+    uses oc-rpol:match-set-options-group;
+  }
+
+  grouping match-as-path-state {
+    description
+      "Operational state data for match conditions on AS path set";
+  }
+
+  grouping match-as-path-top {
+    description
+      "Top-level grouping for match conditions on AS path set";
+
+    container match-as-path-set {
+      description
+        "Match a referenced as-path set according to the logic
+        defined in the match-set-options leaf";
+
+      container config {
+        description
+          "Configuration data for match conditions on AS path set";
+
+        uses match-as-path-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for match conditions on AS
+          path set";
+
+        uses match-as-path-config;
+        uses match-as-path-state;
+      }
+    }
+  }
+
+  grouping bgp-match-set-conditions {
+    description
+      "Condition statement definitions for checking membership in a
+      defined set";
+
+    uses match-community-top;
+    uses match-ext-community-top;
+    uses match-as-path-top;
+  }
+
+  grouping community-count-config {
+    description
+      "Configuration data for community count condition";
+
+    uses oc-pol-types:attribute-compare-operators;
+  }
+
+  grouping community-count-state {
+    description
+      "Operational state data for community count condition";
+  }
+
+  grouping community-count-top {
+    description
+      "Top-level grouping for community count condition";
+
+    container community-count {
+      description
+        "Value and comparison operations for conditions based on the
+        number of communities in the route update";
+
+      container config {
+        description
+          "Configuration data for community count condition";
+
+        uses community-count-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for community count condition";
+
+        uses community-count-config;
+        uses community-count-state;
+      }
+    }
+  }
+
+  grouping as-path-length-config {
+    description
+      "Configuration data for AS path length condition";
+
+    uses oc-pol-types:attribute-compare-operators;
+  }
+
+  grouping as-path-length-state {
+    description
+      "Operational state data for AS path length condition";
+  }
+
+  grouping as-path-length-top {
+    description
+      "Top-level grouping for AS path length condition";
+
+    container as-path-length {
+      description
+        "Value and comparison operations for conditions based on the
+        length of the AS path in the route update";
+
+      container config {
+        description
+          "Configuration data for AS path length condition";
+
+        uses as-path-length-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for AS path length condition";
+
+        uses as-path-length-config;
+        uses as-path-length-state;
+      }
+    }
+  }
+
+  grouping bgp-conditions-config {
+    description
+      "Configuration data for BGP-specific policy conditions";
+
+    leaf med-eq {
+      type uint32;
+      description
+        "Condition to check if the received MED value is equal to
+        the specified value";
+    }
+
+    leaf origin-eq {
+      type oc-bgp-types:bgp-origin-attr-type;
+      description
+        "Condition to check if the route origin is equal to the
+        specified value";
+    }
+
+    leaf-list next-hop-in {
+      type oc-inet:ip-address;
+      description
+        "List of next hop addresses to check for in the route
+        update";
+    }
+
+    leaf-list afi-safi-in {
+      type identityref {
+        base oc-bgp-types:AFI_SAFI_TYPE;
+      }
+      description
+        "List of address families which the NLRI may be
+        within";
+    }
+
+    leaf local-pref-eq {
+      type uint32;
+      // TODO: add support for other comparisons if needed
+      description
+        "Condition to check if the local pref attribute is equal to
+        the specified value";
+    }
+
+    leaf route-type {
+      // TODO: verify extent of vendor support for this comparison
+      type enumeration {
+        enum INTERNAL {
+          description "route type is internal";
+        }
+        enum EXTERNAL {
+          description "route type is external";
+        }
+      }
+      description
+        "Condition to check the route type in the route update";
+    }
+  }
+
+  grouping bgp-conditions-state {
+    description
+      "Operational state data for BGP-specific policy conditions";
+  }
+
+  grouping bgp-conditions-top {
+    description
+      "Top-level grouping for BGP-specific policy conditions";
+
+    container bgp-conditions {
+      description
+        "Top-level container ";
+
+      container config {
+        description
+          "Configuration data for BGP-specific policy conditions";
+
+        uses bgp-conditions-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for BGP-specific policy
+          conditions";
+
+        uses bgp-conditions-config;
+        uses bgp-conditions-state;
+      }
+
+      uses community-count-top;
+      uses as-path-length-top;
+      uses bgp-match-set-conditions;
+    }
+  }
+
+  grouping community-set-config {
+    description
+      "Configuration data for BGP community sets";
+
+    leaf community-set-name {
+      type string;
+      mandatory true;
+      description
+        "name / label of the community set -- this is used to
+        reference the set in match conditions";
+    }
+
+    leaf-list community-member {
+      type union {
+        type oc-bgp-types:bgp-std-community-type;
+        type oc-bgp-types:bgp-community-regexp-type;
+        type oc-bgp-types:bgp-well-known-community-type;
+      }
+      description
+        "members of the community set";
+    }
+  }
+
+  grouping community-set-state {
+    description
+      "Operational state data for BGP community sets";
+  }
+
+  grouping community-set-top {
+    description
+      "Top-level grouping for BGP community sets";
+
+    container community-sets {
+      description
+        "Enclosing container for list of defined BGP community sets";
+
+      list community-set {
+        key "community-set-name";
+        description
+          "List of defined BGP community sets";
+
+        leaf community-set-name {
+          type leafref {
+            path "../config/community-set-name";
+          }
+          description
+            "Reference to list key";
+        }
+
+        container config {
+          description
+            "Configuration data for BGP community sets";
+
+          uses community-set-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for BGP community sets";
+
+          uses community-set-config;
+          uses community-set-state;
+        }
+      }
+    }
+  }
+
+  grouping ext-community-set-config {
+    description
+      "Configuration data for extended BGP community sets";
+
+    leaf ext-community-set-name {
+      type string;
+      description
+        "name / label of the extended community set -- this is
+        used to reference the set in match conditions";
+    }
+
+    leaf-list ext-community-member {
+      type union {
+        type oc-bgp-types:bgp-ext-community-type;
+        type oc-bgp-types:bgp-community-regexp-type;
+      }
+      description
+          "members of the extended community set";
+    }
+  }
+
+  grouping ext-community-set-state {
+    description
+      "Operational state data for extended BGP community sets";
+  }
+
+  grouping ext-community-set-top {
+    description
+      "Top-level grouping for extended BGP community sets";
+
+    container ext-community-sets {
+      description
+        "Enclosing container for list of extended BGP community
+        sets";
+
+      list ext-community-set {
+        key "ext-community-set-name";
+        description
+          "List of defined extended BGP community sets";
+
+        leaf ext-community-set-name {
+          type leafref {
+            path "../config/ext-community-set-name";
+          }
+          description
+            "Reference to list key";
+        }
+
+        container config {
+          description
+            "Configuration data for extended BGP community sets";
+
+          uses ext-community-set-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for extended BGP community sets";
+
+          uses ext-community-set-config;
+          uses ext-community-set-state;
+        }
+      }
+    }
+  }
+
+  grouping as-path-set-config {
+    description
+      "Configuration data for AS path sets";
+
+    leaf as-path-set-name {
+      type string;
+      description
+        "name of the AS path set -- this is used to reference
+        the set in match conditions";
+    }
+
+    leaf-list as-path-set-member {
+      // TODO: need to refine typedef for AS path expressions
+      type string;
+      description
+          "AS path expression -- list of ASes in the set";
+    }
+  }
+
+  grouping as-path-set-state {
+    description
+      "Operational state data for AS path sets";
+  }
+
+  grouping as-path-set-top {
+    description
+      "Top-level grouping for AS path sets";
+
+    container as-path-sets {
+      description
+        "Enclosing container for list of define AS path sets";
+
+      list as-path-set {
+        key "as-path-set-name";
+        description
+          "List of defined AS path sets";
+
+        leaf as-path-set-name {
+          type leafref {
+            path "../config/as-path-set-name";
+          }
+          description
+            "Reference to list key";
+        }
+
+        container config {
+          description
+            "Configuration data for AS path sets";
+
+          uses as-path-set-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for AS path sets";
+
+          uses as-path-set-config;
+          uses as-path-set-state;
+        }
+      }
+    }
+  }
+
+  // augment statements
+
+  augment "/oc-rpol:routing-policy/oc-rpol:defined-sets" {
+    description "adds BGP defined sets container to routing policy
+    model";
+
+    container bgp-defined-sets {
+      description
+        "BGP-related set definitions for policy match conditions";
+
+      uses community-set-top;
+      uses ext-community-set-top;
+      uses as-path-set-top;
+    }
+  }
+
+  grouping as-path-prepend-config {
+    description
+      "Configuration data for the AS path prepend action";
+
+    leaf repeat-n {
+      type uint8 {
+        range 1..max;
+      }
+      description
+        "Number of times to prepend the value specified in the asn
+        leaf to the AS path. If no value is specified by the asn
+        leaf, the local AS number of the system is used. The value
+        should be between 1 and the maximum supported by the
+        implementation.";
+    }
+
+    leaf asn {
+      type oc-inet:as-number;
+      description
+        "The AS number to prepend to the AS path. If this leaf is
+        not specified and repeat-n is set, then the local AS
+        number will be used for prepending.";
+    }
+  }
+
+  grouping as-path-prepend-state {
+    description
+      "Operational state data for the AS path prepend action";
+  }
+
+  grouping as-path-prepend-top {
+    description
+      "Top-level grouping for the AS path prepend action";
+
+    container set-as-path-prepend {
+      description
+        "Action to prepend the specified AS number to the AS-path a
+        specified number of times";
+
+      container config {
+        description
+          "Configuration data for the AS path prepend action";
+
+        uses as-path-prepend-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for the AS path prepend action";
+
+        uses as-path-prepend-config;
+        uses as-path-prepend-state;
+      }
+    }
+  }
+
+  grouping set-community-action-common {
+    description
+      "Common leaves for set-community and set-ext-community
+      actions";
+
+    leaf method {
+      type enumeration {
+        enum INLINE {
+          description
+            "The extended communities are specified inline as a
+            list";
+        }
+        enum REFERENCE {
+          description
+            "The extended communities are specified by referencing a
+            defined ext-community set";
+        }
+      }
+      description
+        "Indicates the method used to specify the extended
+        communities for the set-ext-community action";
+    }
+
+    leaf options {
+      type bgp-set-community-option-type;
+      description
+        "Options for modifying the community attribute with
+        the specified values.  These options apply to both
+        methods of setting the community attribute.";
+    }
+  }
+
+  grouping set-community-inline-config {
+    description
+      "Configuration data for inline specification of set-community
+      action";
+
+    leaf-list communities {
+      type union {
+        type oc-bgp-types:bgp-std-community-type;
+        type oc-bgp-types:bgp-well-known-community-type;
+      }
+      description
+        "Set the community values for the update inline with
+        a list.";
+    }
+  }
+
+  grouping set-community-inline-state {
+    description
+      "Operational state data or inline specification of
+      set-community action";
+  }
+
+  grouping set-community-inline-top {
+    description
+      "Top-level grouping or inline specification of set-community
+      action";
+
+    container inline {
+      when "../config/method=INLINE" {
+        description
+          "Active only when the set-community method is INLINE";
+      }
+      description
+        "Set the community values for the action inline with
+        a list.";
+
+      container config {
+        description
+          "Configuration data or inline specification of set-community
+      action";
+
+        uses set-community-inline-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data or inline specification of
+          set-community action";
+
+        uses set-community-inline-config;
+        uses set-community-inline-state;
+      }
+    }
+  }
+
+  grouping set-community-reference-config {
+    description
+      "Configuration data for referening a community-set in the
+      set-community action";
+
+    leaf community-set-ref {
+      type leafref {
+        path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" +
+          "oc-bgp-pol:bgp-defined-sets/" +
+          "oc-bgp-pol:community-sets/oc-bgp-pol:community-set/" +
+          "oc-bgp-pol:community-set-name";
+      }
+      description
+        "References a defined community set by name";
+    }
+  }
+
+  grouping set-community-reference-state {
+    description
+      "Operational state data for referening a community-set in the
+      set-community action";
+  }
+
+  grouping set-community-reference-top {
+    description
+      "Top-level grouping for referening a community-set in the
+      set-community action";
+
+    container reference {
+      when "../config/method=REFERENCE" {
+        description
+          "Active only when the set-community method is REFERENCE";
+      }
+      description
+        "Provide a reference to a defined community set for the
+        set-community action";
+
+      container config {
+        description
+          "Configuration data for referening a community-set in the
+      set-community action";
+
+        uses set-community-reference-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for referening a community-set
+          in the set-community action";
+
+        uses set-community-reference-config;
+        uses set-community-reference-state;
+      }
+    }
+  }
+
+  grouping set-community-action-config {
+    description
+      "Configuration data for the set-community action";
+
+    uses set-community-action-common;
+  }
+
+  grouping set-community-action-state {
+    description
+      "Operational state data for the set-community action";
+  }
+
+  grouping set-community-action-top {
+    description
+      "Top-level grouping for the set-community action";
+
+    container set-community {
+      description
+        "Action to set the community attributes of the route, along
+        with options to modify how the community is modified.
+        Communities may be set using an inline list OR
+        reference to an existing defined set (not both).";
+
+      container config {
+        description
+          "Configuration data for the set-community action";
+
+        uses set-community-action-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for the set-community action";
+
+        uses set-community-action-config;
+        uses set-community-action-state;
+      }
+
+      uses set-community-inline-top;
+      uses set-community-reference-top;
+    }
+  }
+
+  grouping set-ext-community-inline-config {
+    description
+      "Configuration data for inline specification of
+      set-ext-community action";
+
+    leaf-list communities {
+      type union {
+        type oc-bgp-types:bgp-ext-community-type;
+        type oc-bgp-types:bgp-well-known-community-type;
+      }
+      description
+        "Set the extended community values for the update inline
+        with a list.";
+    }
+  }
+
+  grouping set-ext-community-inline-state {
+    description
+      "Operational state data or inline specification of
+      set-ext-community action";
+  }
+
+  grouping set-ext-community-inline-top {
+    description
+      "Top-level grouping or inline specification of set-ext-community
+      action";
+
+    container inline {
+      when "../config/method=INLINE" {
+        description
+          "Active only when the set-community method is INLINE";
+      }
+      description
+        "Set the extended community values for the action inline with
+        a list.";
+
+      container config {
+        description
+          "Configuration data or inline specification of
+          set-ext-community action";
+
+        uses set-ext-community-inline-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data or inline specification of
+          set-ext-community action";
+
+        uses set-ext-community-inline-config;
+        uses set-ext-community-inline-state;
+      }
+    }
+  }
+
+  grouping set-ext-community-reference-config {
+    description
+      "Configuration data for referening a extended community-set
+      in the set-ext-community action";
+
+    leaf ext-community-set-ref {
+      type leafref {
+        path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" +
+          "oc-bgp-pol:bgp-defined-sets/" +
+          "oc-bgp-pol:ext-community-sets/" +
+          "oc-bgp-pol:ext-community-set/" +
+          "oc-bgp-pol:ext-community-set-name";
+      }
+      description
+        "References a defined extended community set by
+        name";
+    }
+  }
+
+  grouping set-ext-community-reference-state {
+    description
+      "Operational state data for referening an extended
+      community-set in the set-ext-community action";
+  }
+
+  grouping set-ext-community-reference-top {
+    description
+      "Top-level grouping for referening an extended community-set
+      in the set-community action";
+
+    container reference {
+      when "../config/method=REFERENCE" {
+        description
+          "Active only when the set-community method is REFERENCE";
+      }
+      description
+        "Provide a reference to an extended community set for the
+        set-ext-community action";
+
+      container config {
+        description
+          "Configuration data for referening an extended
+          community-set in the set-ext-community action";
+
+        uses set-ext-community-reference-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for referening an extended
+          community-set in the set-ext-community action";
+
+        uses set-ext-community-reference-config;
+        uses set-ext-community-reference-state;
+      }
+    }
+  }
+
+  grouping set-ext-community-action-config {
+    description
+      "Configuration data for the set-ext-community action";
+
+    uses set-community-action-common;
+  }
+
+  grouping set-ext-community-action-state {
+    description
+      "Operational state data for the set-ext-community action";
+  }
+
+  grouping set-ext-community-action-top {
+    description
+      "Top-level grouping for the set-ext-community action";
+
+    container set-ext-community {
+      description
+        "Action to set the extended community attributes of the
+        route, along with options to modify how the community is
+        modified. Extended communities may be set using an inline
+        list OR a reference to an existing defined set (but not
+        both).";
+
+      container config {
+        description
+          "Configuration data for the set-ext-community action";
+
+        uses set-ext-community-action-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for the set-ext-community action";
+
+        uses set-ext-community-action-config;
+        uses set-ext-community-action-state;
+      }
+      uses set-ext-community-inline-top;
+      uses set-ext-community-reference-top;
+    }
+  }
+
+  grouping bgp-actions-config {
+    description
+      "Configuration data for BGP-specific actions";
+
+    leaf set-route-origin {
+      type oc-bgp-types:bgp-origin-attr-type;
+      description "set the origin attribute to the specified
+      value";
+    }
+
+    leaf set-local-pref {
+      type uint32;
+      description "set the local pref attribute on the route
+      update";
+    }
+
+    leaf set-next-hop {
+      type bgp-next-hop-type;
+      description "set the next-hop attribute in the route update";
+    }
+
+    leaf set-med {
+      type bgp-set-med-type;
+      description "set the med metric attribute in the route
+      update";
+    }
+  }
+
+  grouping bgp-actions-state {
+    description
+      "Operational state data for BGP-specific actions";
+  }
+
+  grouping bgp-actions-top {
+    description
+      "Top-level grouping for BGP-specific actions";
+
+    container bgp-actions {
+      description
+        "Top-level container for BGP-specific actions";
+
+      container config {
+        description
+          "Configuration data for BGP-specific actions";
+
+        uses bgp-actions-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for BGP-specific actions";
+
+        uses bgp-actions-config;
+        uses bgp-actions-state;
+      }
+      uses as-path-prepend-top;
+      uses set-community-action-top;
+      uses set-ext-community-action-top;
+    }
+  }
+
+  augment "/oc-rpol:routing-policy/oc-rpol:policy-definitions/" +
+    "oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/" +
+    "oc-rpol:conditions" {
+    description
+      "BGP policy conditions added to routing policy module";
+
+    uses bgp-conditions-top;
+  }
+
+  augment "/oc-rpol:routing-policy/oc-rpol:policy-definitions/" +
+    "oc-rpol:policy-definition/oc-rpol:statements/oc-rpol:statement/" +
+    "oc-rpol:actions" {
+    description "BGP policy actions added to routing policy
+    module";
+
+    uses bgp-actions-top;
+  }
+
+  // rpc statements
+
+  // notification statements
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp-types.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp-types.yang
new file mode 100644
index 0000000..1e58de2
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp-types.yang
@@ -0,0 +1,554 @@
+module openconfig-bgp-types {
+  yang-version "1";
+
+  namespace "http://openconfig.net/yang/bgp-types";
+
+  prefix "oc-bgp-types";
+
+  import openconfig-types { prefix "oc-types"; }
+  import openconfig-inet-types { prefix "oc-inet"; }
+  import openconfig-extensions { prefix "oc-ext"; }
+
+  // Include definitions of BGP error notifications
+  include openconfig-bgp-errors;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This module contains general data definitions for use in BGP
+    policy. It can be imported by modules that make use of BGP
+    attributes";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+
+  identity BGP_CAPABILITY {
+    description "Base identity for a BGP capability";
+  }
+
+  identity MPBGP {
+    base BGP_CAPABILITY;
+    description
+      "Multi-protocol extensions to BGP";
+    reference "RFC2858";
+  }
+
+  identity ROUTE_REFRESH {
+    base BGP_CAPABILITY;
+    description
+      "The BGP route-refresh functionality";
+    reference "RFC2918";
+  }
+
+  identity ASN32 {
+    base BGP_CAPABILITY;
+    description
+      "4-byte (32-bit) AS number functionality";
+    reference "RFC6793";
+  }
+
+  identity GRACEFUL_RESTART {
+    base BGP_CAPABILITY;
+    description
+      "Graceful restart functionality";
+    reference "RFC4724";
+  }
+
+  identity ADD_PATHS {
+    base BGP_CAPABILITY;
+    description
+      "BGP add-paths";
+    reference "draft-ietf-idr-add-paths";
+  }
+
+  identity AFI_SAFI_TYPE {
+    description
+      "Base identity type for AFI,SAFI tuples for BGP-4";
+    reference "RFC4760 - multiprotocol extensions for BGP-4";
+  }
+
+  identity IPV4_UNICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "IPv4 unicast (AFI,SAFI = 1,1)";
+    reference "RFC4760";
+  }
+
+  identity IPV6_UNICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "IPv6 unicast (AFI,SAFI = 2,1)";
+    reference "RFC4760";
+  }
+
+  identity IPV4_LABELED_UNICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "Labeled IPv4 unicast (AFI,SAFI = 1,4)";
+    reference "RFC3107";
+  }
+
+  identity IPV6_LABELED_UNICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "Labeled IPv6 unicast (AFI,SAFI = 2,4)";
+    reference "RFC3107";
+  }
+
+  identity L3VPN_IPV4_UNICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)";
+    reference "RFC4364";
+  }
+
+  identity L3VPN_IPV6_UNICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)";
+    reference "RFC4659";
+  }
+
+  identity L3VPN_IPV4_MULTICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)";
+    reference "RFC6514";
+  }
+
+  identity L3VPN_IPV6_MULTICAST {
+    base AFI_SAFI_TYPE;
+    description
+      "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)";
+    reference "RFC6514";
+  }
+
+  identity L2VPN_VPLS {
+    base AFI_SAFI_TYPE;
+    description
+      "BGP-signalled VPLS (AFI,SAFI = 25,65)";
+    reference "RFC4761";
+  }
+
+  identity L2VPN_EVPN {
+    base AFI_SAFI_TYPE;
+    description
+      "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)";
+  }
+
+  identity BGP_WELL_KNOWN_STD_COMMUNITY {
+    description
+      "Reserved communities within the standard community space
+      defined by RFC1997. These communities must fall within the
+      range 0x00000000 to 0xFFFFFFFF";
+    reference "RFC1997";
+  }
+
+  identity NO_EXPORT {
+    base BGP_WELL_KNOWN_STD_COMMUNITY;
+    description
+      "Do not export NLRI received carrying this community outside
+      the bounds of this autonomous system, or this confederation if
+      the local autonomous system is a confederation member AS. This
+      community has a value of 0xFFFFFF01.";
+    reference "RFC1997";
+  }
+
+  identity NO_ADVERTISE {
+    base BGP_WELL_KNOWN_STD_COMMUNITY;
+    description
+      "All NLRI received carrying this community must not be
+      advertised to other BGP peers. This community has a value of
+      0xFFFFFF02.";
+    reference "RFC1997";
+  }
+
+  identity NO_EXPORT_SUBCONFED {
+    base BGP_WELL_KNOWN_STD_COMMUNITY;
+    description
+      "All NLRI received carrying this community must not be
+      advertised to external BGP peers - including over confederation
+      sub-AS boundaries. This community has a value of 0xFFFFFF03.";
+    reference "RFC1997";
+  }
+
+  identity NOPEER {
+    base BGP_WELL_KNOWN_STD_COMMUNITY;
+    description
+      "An autonomous system receiving NLRI tagged with this community
+      is advised not to readvertise the NLRI to external bi-lateral
+      peer autonomous systems. An AS may also filter received NLRI
+      from bilateral peer sessions when they are tagged with this
+      community value";
+    reference "RFC3765";
+  }
+
+  typedef bgp-session-direction {
+    type enumeration {
+      enum INBOUND {
+        description
+          "Refers to all NLRI received from the BGP peer";
+      }
+      enum OUTBOUND {
+        description
+          "Refers to all NLRI advertised to the BGP peer";
+      }
+    }
+    description
+      "Type to describe the direction of NLRI transmission";
+  }
+
+  typedef bgp-well-known-community-type {
+    type identityref {
+      base BGP_WELL_KNOWN_STD_COMMUNITY;
+    }
+    description
+      "Type definition for well-known IETF community attribute
+      values";
+    reference
+      "IANA Border Gateway Protocol (BGP) Well Known Communities";
+  }
+
+
+  typedef bgp-std-community-type {
+    // TODO: further refine restrictions and allowed patterns
+    // 4-octet value:
+    //  <as number> 2 octets
+    //  <community value> 2 octets
+    type union {
+      type uint32 {
+      // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 -
+      // 0xFFFFFFFF are reserved
+      }
+      type string {
+        pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'      +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'      +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'       +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+    }
+    description
+      "Type definition for standard commmunity attributes represented as
+      a integer value, or a string of the form N:M where N and M are
+      integers between 0 and 65535.";
+    reference "RFC 1997 - BGP Communities Attribute";
+  }
+
+  typedef bgp-ext-community-type {
+    type union {
+      type string {
+        // Type 1: 2-octet global and 4-octet local
+        //         (AS number)        (Integer)
+        pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'      +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'      +
+                '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'    +
+                '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' +
+                '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'             +
+                '[1-9][0-9]{1,8}|[0-9])$';
+      }
+      type string {
+        // Type 2: 4-octet global and 2-octet local
+        //         (ipv4-address)     (integer)
+        pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'         +
+                '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'         +
+                '2[0-4][0-9]|25[0-5]):'                                +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+      type string {
+        // RFC5668: 4-octet global and 2-octet local
+        //            (AS number)        (integer)
+        pattern '^(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'   +
+                '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' +
+                '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'             +
+                '[1-9][0-9]{1,8}|[0-9]):'                                    +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'       +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+      type string {
+        // route-target with Type 1
+        // route-target:(ASN):(local-part)
+        pattern '^route\-target:'                                             +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'       +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'      +
+                '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'    +
+                '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' +
+                '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'             +
+                '[1-9][0-9]{1,8}|[0-9])$';
+      }
+      type string {
+        // route-target with Type 2
+        // route-target:(IPv4):(local-part)
+        pattern '^route\-target:'                                      +
+                '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'          +
+                '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'         +
+                '2[0-4][0-9]|25[0-5]):'                                +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+      type string {
+        // 4-byte AS Type 1 route-target
+        pattern '^route\-target:'                                            +
+                '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'    +
+                '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' +
+                '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'             +
+                '[1-9][0-9]{1,8}|[0-9]):'                                    +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'       +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+      type string {
+        // route-origin with Type 1
+        pattern '^route\-origin:'                                            +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'       +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'      +
+                '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'    +
+                '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' +
+                '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'             +
+                '[1-9][0-9]{1,8}|[0-9])$';
+      }
+      type string {
+        // route-origin with Type 2
+        pattern '^route\-origin:'                                      +
+                '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'          +
+                '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'         +
+                '2[0-4][0-9]|25[0-5]):'                                +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+      type string {
+        // 4-byte AS Type 1 route-origin
+        pattern '^route\-origin:'                                            +
+                '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'    +
+                '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' +
+                '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'             +
+                '[1-9][0-9]{1,8}|[0-9]):'                                    +
+                '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'       +
+                '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
+      }
+    }
+    description
+      "Type definition for extended community attributes. In the case that
+      common communities are utilised, they are represented as a string
+      of the form:
+        - <2b AS>:<4b value> per RFC4360 section 3.1
+        - <4b IPv4>:<2b value> per RFC4360 section 3.2
+        - <4b AS>:<2b value> per RFC5668 section 2.
+        - route-target:<2b AS>:<4b value> per RFC4360 section 4
+        - route-target:<4b IPv4>:<2b value> per RFC4360 section 4
+        - route-origin:<2b ASN>:<4b value> per RFC4360 section 5
+        - route-origin:<4b IPv4>:<2b value> per RFC4360 section 5";
+    reference
+      "RFC 4360 - BGP Extended Communities Attribute
+       RFC 5668 - 4-Octet AS Specific BGP Extended Community";
+  }
+
+  typedef bgp-ext-community-recv-type {
+    type union {
+      type bgp-ext-community-type;
+      type binary {
+        length 8;
+      }
+    }
+    description
+      "A type definition utilised to define the extended community
+      in a context where the system is receiving the extended
+      community from an external source, such that the value may be
+      unknown. In the case that the received extended community is
+      unknown it is defined to be a 8-octet quantity formatted
+      according to RFC4360:
+
+      Type Field: 1 or 2 octets.
+      Value Field: Remaining octets.
+
+      The high-order octet of the type field is encoded such that
+      bit 0 indicates whether the extended community type is IANA
+      assigned; and bit 1 indicates whether the extended community
+      is transitive.  The remaining bits of the high-order type
+      field must be interpreted to determine whether the low-order
+      type field should be parsed, or whether the entire remainder
+      of the extended community is a value.";
+    reference
+      "RFC 4360 - BGP Extended Communities Attribute
+       RFC 5668 - 4-Octet AS Specific BGP Extended Community";
+  }
+
+  typedef bgp-community-regexp-type {
+    // TODO: needs more work to decide what format these regexps can
+    // take.
+    type oc-types:std-regexp;
+    description
+      "Type definition for communities specified as regular
+      expression patterns";
+  }
+
+  typedef bgp-origin-attr-type {
+    type enumeration {
+      enum IGP {
+        description
+          "Origin of the NLRI is internal";
+      }
+      enum EGP {
+        description
+          "Origin of the NLRI is EGP";
+      }
+      enum INCOMPLETE {
+        description
+          "Origin of the NLRI is neither IGP or EGP";
+      }
+    }
+    description
+      "Type definition for standard BGP origin attribute";
+    reference "RFC 4271 - A Border Gateway Protocol 4 (BGP-4),
+      Sec 4.3";
+  }
+
+  typedef peer-type {
+    type enumeration {
+      enum INTERNAL {
+        description
+          "Internal (iBGP) peer";
+      }
+      enum EXTERNAL {
+        description
+          "External (eBGP) peer";
+      }
+    }
+    description
+      "Labels a peer or peer group as explicitly internal or
+      external";
+  }
+
+  identity REMOVE_PRIVATE_AS_OPTION {
+    description
+      "Base identity for options for removing private autonomous
+      system numbers from the AS_PATH attribute";
+  }
+
+  identity PRIVATE_AS_REMOVE_ALL {
+    base REMOVE_PRIVATE_AS_OPTION;
+    description
+      "Strip all private autonmous system numbers from the AS_PATH.
+      This action is performed regardless of the other content of the
+      AS_PATH attribute, and for all instances of private AS numbers
+      within that attribute.";
+  }
+
+  identity PRIVATE_AS_REPLACE_ALL {
+    base REMOVE_PRIVATE_AS_OPTION;
+    description
+      "Replace all instances of private autonomous system numbers in
+      the AS_PATH with the local BGP speaker's autonomous system
+      number. This action is performed regardless of the other
+      content of the AS_PATH attribute, and for all instances of
+      private AS number within that attribute.";
+  }
+
+  typedef remove-private-as-option {
+    type identityref {
+      base REMOVE_PRIVATE_AS_OPTION;
+    }
+    description
+      "Set of options for configuring how private AS path numbers
+      are removed from advertisements";
+  }
+
+  typedef rr-cluster-id-type {
+    type union {
+      type uint32;
+      type oc-inet:ipv4-address;
+    }
+    description
+      "Union type for route reflector cluster ids:
+      option 1: 4-byte number
+      option 2: IP address";
+  }
+
+  typedef community-type {
+    type enumeration {
+      enum STANDARD {
+        description "Send only standard communities";
+      }
+      enum EXTENDED {
+        description "Send only extended communities";
+      }
+      enum BOTH {
+        description "Send both standard and extended communities";
+      }
+      enum NONE {
+        description "Do not send any community attribute";
+      }
+    }
+    description
+      "type describing variations of community attributes:
+      STANDARD: standard BGP community [rfc1997]
+      EXTENDED: extended BGP community [rfc4360]
+      BOTH: both standard and extended community";
+  }
+
+
+  typedef as-path-segment-type {
+    type enumeration {
+      enum AS_SEQ {
+        description
+          "Ordered set of autonomous systems that a route in
+          the UPDATE message has traversed";
+      }
+      enum AS_SET {
+        description
+          "Unordered set of autonomous systems that a route in
+          the UPDATE message has traversed";
+      }
+      enum AS_CONFED_SEQUENCE {
+        description
+          "Ordered set of Member Autonomous
+          Systems in the local confederation that the UPDATE message
+          has traversed";
+      }
+      enum AS_CONFED_SET {
+        description
+          "Unordered set of Member Autonomous Systems
+          in the local confederation that the UPDATE message has
+          traversed";
+      }
+    }
+    description
+      "Defines the types of BGP AS path segments.";
+  }
+}
diff --git a/models/openconfig/src/main/yang/bgp/openconfig-bgp.yang b/models/openconfig/src/main/yang/bgp/openconfig-bgp.yang
new file mode 100644
index 0000000..f3ea180
--- /dev/null
+++ b/models/openconfig/src/main/yang/bgp/openconfig-bgp.yang
@@ -0,0 +1,137 @@
+module openconfig-bgp {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/bgp";
+
+  prefix "oc-bgp";
+
+  // import some basic inet types
+  import openconfig-extensions { prefix oc-ext; }
+
+  // Include the OpenConfig BGP submodules
+  // Common: defines the groupings that are common across more than
+  //         one context (where contexts are neighbor, group, global)
+  include openconfig-bgp-common;
+  // Multiprotocol: defines the groupings that are common across more
+  //                than one context, and relate to Multiprotocol
+  include openconfig-bgp-common-multiprotocol;
+  // Structure: defines groupings that are shared but are solely used for
+  //            structural reasons.
+  include openconfig-bgp-common-structure;
+  // Include peer-group/neighbor/global - these define the groupings
+  // that are specific to one context
+  include openconfig-bgp-peer-group;
+  include openconfig-bgp-neighbor;
+  include openconfig-bgp-global;
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This module describes a YANG model for BGP protocol
+    configuration.It is a limited subset of all of the configuration
+    parameters available in the variety of vendor implementations,
+    hence it is expected that it would be augmented with vendor-
+    specific configuration data as needed. Additional modules or
+    submodules to handle other aspects of BGP configuration,
+    including policy, VRFs, VPNs, and additional address families
+    are also expected.
+
+    This model supports the following BGP configuration level
+    hierarchy:
+
+      BGP
+        |
+        +-> [ global BGP configuration ]
+          +-> AFI / SAFI global
+        +-> peer group
+          +-> [ peer group config ]
+          +-> AFI / SAFI [ per-AFI overrides ]
+        +-> neighbor
+          +-> [ neighbor config ]
+          +-> [ optional pointer to peer-group ]
+          +-> AFI / SAFI [ per-AFI overrides ]";
+
+  oc-ext:openconfig-version "4.0.1";
+
+  revision "2017-07-30" {
+    description
+      "Clarification of add-paths send-max leaf";
+    reference "4.0.1";
+  }
+
+  revision "2017-07-10" {
+    description
+      "Add error notifications; moved add-paths config; add AS
+      prepend policy features; removed unneeded config leaves";
+    reference "4.0.0";
+  }
+
+  revision "2017-02-02" {
+    description
+      "Bugfix to remove remaining global-level policy data";
+    reference "3.0.1";
+  }
+
+  revision "2017-01-26" {
+    description
+      "Add dynamic neighbor support, migrate to OpenConfig types";
+    reference "3.0.0";
+  }
+
+  revision "2016-06-21" {
+    description
+      "OpenConfig BGP refactor";
+    reference "2.1.1";
+  }
+
+  revision "2016-06-06" {
+    description
+      "OpenConfig public release";
+    reference "2.1.0";
+  }
+
+  revision "2016-03-31" {
+    description
+      "OpenConfig public release";
+    reference "2.0.1";
+  }
+
+  grouping bgp-top {
+    description
+      "Top-level grouping for the BGP model data";
+
+    container bgp {
+      description
+        "Top-level configuration and state for the BGP router";
+
+      container global {
+        description
+          "Global configuration for the BGP router";
+          uses bgp-global-base;
+      }
+
+      container neighbors {
+        description
+          "Configuration for BGP neighbors";
+        uses bgp-neighbor-list;
+      }
+
+      container peer-groups {
+        description
+          "Configuration for BGP peer-groups";
+        uses bgp-peer-group-list;
+      }
+    }
+  }
+
+  uses bgp-top;
+
+}
diff --git a/models/openconfig/src/main/yang/catalog/openconfig-catalog-types.yang b/models/openconfig/src/main/yang/catalog/openconfig-catalog-types.yang
new file mode 100644
index 0000000..bdec31e
--- /dev/null
+++ b/models/openconfig/src/main/yang/catalog/openconfig-catalog-types.yang
@@ -0,0 +1,242 @@
+module openconfig-catalog-types {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/catalog-types";
+
+  prefix "oc-cat-types";
+
+  import openconfig-extensions { prefix oc-ext; }
+
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module defines types and identities used by the OpenConfig
+    YANG module catalog model.";
+
+  oc-ext:openconfig-version "0.2.1";
+
+  revision "2017-05-01" {
+    description
+      "Fix to module dependency list";
+    reference "0.2.1";
+  }
+
+  revision "2017-03-08" {
+    description
+      "OpenConfig public release";
+    reference "0.2.0";
+  }
+
+  revision "2016-02-15" {
+    description
+      "Initial OpenConfig public release";
+    reference "0.1.0";
+  }
+
+
+  // extension statements
+
+  // feature statements
+
+  // identity statements
+
+  identity CATALOG_MEMBER_TYPE {
+    description
+      "Base identity for elements in the catalog";
+  }
+
+  identity MODULE {
+    base CATALOG_MEMBER_TYPE;
+    description
+      "Module elements in the catalog";
+  }
+
+  identity RELEASE_BUNDLE {
+    base CATALOG_MEMBER_TYPE;
+    description
+      "Release bundle elements in the catalog";
+  }
+
+  identity FEATURE_BUNDLE {
+    base CATALOG_MEMBER_TYPE;
+    description
+      "Feature bundle elements in the catalog";
+  }
+
+
+  identity IMPLEMENTATION_STATUS_TYPE {
+    description
+      "Indications of the status of a module's implementation on a
+      device or server";
+  }
+
+  identity IN_PROGRESS {
+    base IMPLEMENTATION_STATUS_TYPE;
+    description
+      "Implementation is in progress";
+  }
+
+  identity PLANNED {
+    base IMPLEMENTATION_STATUS_TYPE;
+    description
+      "Implementation is planned";
+  }
+
+  identity COMPLETE {
+    base IMPLEMENTATION_STATUS_TYPE;
+    description
+      "Implementation is complete and fully supports the model";
+  }
+
+  identity PARTIAL {
+    base IMPLEMENTATION_STATUS_TYPE;
+    description
+      "Implementation is complete, but only supports the model
+      partially";
+  }
+
+  identity MODULE_STATUS_TYPE {
+    description
+      "Indicates the deployment status of the module";
+  }
+
+  identity EXPERIMENTAL {
+    base MODULE_STATUS_TYPE;
+    description
+      "Module should be considered experimental, not deployed in
+      production settings";
+  }
+
+  identity PRODUCTION {
+    base MODULE_STATUS_TYPE;
+    description
+      "Module is suitable for use in production, or has been
+      deployed in production";
+  }
+
+  identity MODULE_CATEGORY_BASE {
+    description
+      "Base identity for the module category.  It is expected that
+      publishing organizations will define additional derived
+      identities to describe their categorization scheme.";
+  }
+
+  identity MODULE_SUBCATEGORY_BASE {
+    description
+      "Base identity for the module subcategory.  It is expected that
+      publishing organizations will define additional derived
+      identities to describe their categorization scheme.";
+  }
+
+  identity ORGANIZATION_TYPE {
+    description
+      "Publishing organization type for the set of modules";
+  }
+
+  identity STANDARDS {
+    base ORGANIZATION_TYPE;
+    description
+      "Standards development organization (SDO) publisher type";
+  }
+
+  identity INDUSTRY {
+    base ORGANIZATION_TYPE;
+    description
+      "Industry forum or other industry group";
+  }
+
+  identity COMMERCIAL {
+    base ORGANIZATION_TYPE;
+    description
+      "Commercial entity, company, etc.";
+  }
+
+  identity INDIVIDUAL {
+    base ORGANIZATION_TYPE;
+    description
+      "For modules published by an individual";
+  }
+
+  identity IETF_MODEL_LAYER {
+    base MODULE_CATEGORY_BASE;
+    description
+      "Describes layering of models based on their abstraction
+      level as defined by IETF model classification proposals";
+    reference
+      "IETF draft-ietf-netmod-yang-model-classification";
+  }
+
+  identity IETF_MODEL_TYPE {
+    base MODULE_SUBCATEGORY_BASE;
+    description
+      "IETF proposed classification dimension of YANG model types as
+     standard YANG models, vendor-specific, or user-specific YANG
+     models and extensions";
+    reference
+      "IETF draft-ietf-netmod-yang-model-classification";
+  }
+
+  identity IETF_NETWORK_SERVICE {
+    base IETF_MODEL_LAYER;
+    description
+      "Service-layer model as defined by IETF classification
+      proposal";
+  }
+
+  identity IETF_NETWORK_ELEMENT {
+    base IETF_MODEL_LAYER;
+    description
+      "Network element-layer model as defined by IETF classification
+      proposal";
+  }
+
+  identity IETF_TYPE_STANDARD {
+    base IETF_MODEL_TYPE;
+    description
+      "Models published by standards-defining organizations (SDOs)";
+  }
+
+  identity IETF_TYPE_VENDOR {
+    base IETF_MODEL_TYPE;
+    description
+      "Developed by organizations (e.g., vendors) with the intent
+      to support a specific set of implementations under control of
+      that organization";
+  }
+
+  identity IETF_TYPE_USER {
+    base IETF_MODEL_TYPE;
+    description
+      "Developed by organizations that operate YANG-based
+      infrastructure including devices and orchestrators.
+      The intent of these models is to express the specific needs
+      for a certain implementation, above and beyond what is provided
+      by vendors";
+  }
+
+  typedef module-version-type {
+    type string;
+    description
+      "This type defines acceptable formats for the version of a
+      module.  The version may be a semantic version, or a YANG
+      revision statement date, and may include wildcards when
+      included in a bundle compatibility list, e.g.:
+
+      semver format: <major>.<minor>.<patch>
+      examples: 0.1.0, 2.1.0, 1.1.*, 2.*.*
+
+      revision format:  YYYY-MM-DD
+      example:  2016-11-31";
+  }
+
+
+
+}
diff --git a/models/openconfig/src/main/yang/catalog/openconfig-module-catalog.yang b/models/openconfig/src/main/yang/catalog/openconfig-module-catalog.yang
new file mode 100644
index 0000000..673fe95
--- /dev/null
+++ b/models/openconfig/src/main/yang/catalog/openconfig-module-catalog.yang
@@ -0,0 +1,786 @@
+module openconfig-module-catalog {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/module-catalog";
+
+  prefix "oc-cat";
+
+  // import some basic types
+  import openconfig-inet-types { prefix oc-inet; }
+  import openconfig-catalog-types { prefix oc-cat-types; }
+  import openconfig-extensions { prefix oc-ext; }
+
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module provides a schema for cataloging and descrbing
+    YANG models published across various organizations.  The catalog
+    contains several categories of data:
+
+    * organizations -- entities that publish and/or maintain
+      individual YANG modules or groups of modules
+
+    * modules -- information regarding individual YANG modules,
+      including their versions, dependencies, submodules, and how
+      to access them
+
+    * release bundles -- groups of modules that are compatible and
+      consistent with each other (as determined by the publisher of
+      of the bundle).  The release bundle does not necessarily
+      correspond to a functional area, e.g., it could the entire
+      set of modules published by an organization
+
+    * feature bundles -- sets of schema paths across a
+      release bundle that provide a specific set of functionality
+
+    * implementations -- information about available module and/or
+      bundle implementations and their status";
+
+  oc-ext:openconfig-version "0.2.1";
+
+  revision "2017-05-01" {
+    description
+      "Fix to module dependency list";
+    reference "0.2.1";
+  }
+
+  revision "2017-03-08" {
+    description
+      "OpenConfig public release";
+    reference "0.2.0";
+  }
+
+  revision "2016-02-15" {
+    description
+      "Initial OpenConfig public release";
+    reference "0.1.0";
+  }
+
+
+
+  // grouping statements
+
+  grouping catalog-module-common-config {
+    description
+      "Data definitions common for both bundles and standalone
+      modules";
+
+    leaf name {
+      type string;
+      description
+        "The name of the module or bundle.  For modules, this
+        should reflect the 'module' or 'submodule'
+        statement in the YANG module file.
+
+        For bundles, this is the canonical name for the overall
+        bundle of modules which is to be released together.
+        This name should be consistent over multiple
+        releases";
+    }
+
+    leaf version {
+      type oc-cat-types:module-version-type;
+      description
+        "For individual modules, this is the version number, e.g.,
+        a semantic version.  The version may be the same as the date
+        indicated in the module revision statement.
+
+        For bundles, this is a semantic version number for the
+        overall bundle. This version is to be defined as per the
+        approach specified in the OpenConfig semantic version
+        guidance - and is of the form x.y.z, where x is the major
+        version, y is the minor version, and z is the patch level";
+      reference
+        "Semantic versioning for OpenConfig models";
+    }
+  }
+
+  grouping feature-bundle-included-reference {
+    description
+      "References to the included feature bundles";
+
+    leaf name {
+      type leafref {
+        path "../../../../../../../organizations/" +
+          "organization[name=current()/../publisher]/" +
+            "feature-bundles/feature-bundle/name";
+      }
+      description
+        "Name of the referenced feature bundle";
+    }
+
+    leaf publisher {
+      type leafref {
+        path "../../../../../../../organizations/organization/" +
+          "name";
+      }
+      description
+        "Publisher of the referenced feature bundle";
+    }
+
+    leaf version {
+      type oc-cat-types:module-version-type;
+      description
+        "Version of the referenced feature bundle";
+    }
+  }
+
+  grouping catalog-implementation-bundle-config {
+    description
+      "References to the feature bundles supported by an
+      implementation";
+
+    uses feature-bundle-included-reference;
+  }
+
+  grouping catalog-implementation-bundle-top {
+    description
+      "Top-level grouping for the list of feature bundles
+      supported by an implementation";
+
+    container feature-bundles {
+      description
+        "Enclosing container for the list of feature bundles";
+
+      list feature-bundle {
+        key "name version";
+        description
+          "List of feature bundles supported by the implementation";
+
+        uses catalog-implementation-bundle-config;
+      }
+    }
+  }
+
+  grouping catalog-implementation-config {
+    description
+      "Data describing any available implementations";
+
+    leaf id {
+      type string;
+      description
+        "An identifier for the implementation, provided by the
+        implementor.  This id should uniquely identify a specific
+        implementation of the module, e.g., based on the vendor,
+        platform, and platform version.";
+    }
+
+    leaf description {
+      type string;
+      description
+        "A text summary of important information about the
+        implementation";
+    }
+
+    leaf reference {
+      type union {
+        type oc-inet:uri;
+        type string;
+      }
+      description
+        "A URI (preferred) or text reference to more detailed
+        information about the implementation.";
+    }
+
+
+    leaf platform {
+      type string;
+      description
+        "Name of the platform on which the implementation
+        is available -- this could be the model name of a network
+        device, a server OS, etc.";
+    }
+
+    leaf platform-version {
+      type string;
+      description
+        "Implementor-defined version name or number of the
+        module implementation, corresponding to the platform.
+        This could be the firmware version of a network device
+        such as a router, OS version, or other server platform
+        version.";
+    }
+
+    leaf status {
+      type identityref {
+        base oc-cat-types:IMPLEMENTATION_STATUS_TYPE;
+      }
+      description
+        "Indicates the status of the implementation, e.g.,
+        complete, partial, in-progress, etc.  Implementors
+        may define additional values for the base identity";
+    }
+  }
+
+  grouping catalog-implementation-top {
+    description
+      "Top level grouping for information on model implementations";
+
+    container implementations {
+      description
+        "Container for module implementation information";
+
+      list implementation {
+        key "id";
+        description
+          "List of available implementations, keyed by an identifier
+          provided by either the implementor or the module
+          maintainer.  Such a key avoids needing a complex composite
+          key to uniquely identify an implementation.";
+
+        uses catalog-implementation-config;
+        uses catalog-implementation-bundle-top;
+      }
+    }
+  }
+
+  grouping catalog-module-dependency-config {
+    description
+      "Information about module dependencies";
+
+
+    leaf-list required-module {
+      type string;
+      description
+        "List of names of modules that are imported by the
+        current module.  This list should reflect all of the 'import'
+        statements in the module.  Release bundles should be used to
+        indicate which versions of the imported module are used
+        (or are compatible) with the current module";
+    }
+  }
+
+  grouping catalog-module-dependency-top {
+    description
+      "Top-level grouping for module dependency data";
+
+    container dependencies {
+      description
+        "Data about dependencies of the module";
+
+      uses catalog-module-dependency-config;
+    }
+
+  }
+
+  grouping catalog-module-classification-config {
+    description
+      "Data describing the module's classification(s)";
+
+    leaf category {
+      type identityref {
+        base oc-cat-types:MODULE_CATEGORY_BASE;
+      }
+      description
+         "Categorization of the module based on identities defined
+         or used by the publishing organizations.";
+    }
+
+    leaf subcategory {
+      type identityref {
+        base oc-cat-types:MODULE_SUBCATEGORY_BASE;
+      }
+      description
+         "Sub-categorization of the module based on identities
+          defined or used by the publishing organizations.";
+    }
+
+    leaf deployment-status {
+      type identityref {
+        base oc-cat-types:MODULE_STATUS_TYPE;
+      }
+      description
+        "Deployment status of the module -- experimental,
+        standards-track, production, etc.";
+    }
+  }
+
+  grouping catalog-module-classification-top {
+    description
+      "Data definitions related to module classfications";
+
+    container classification {
+      description
+        "Container for data describing the module's classification";
+
+      uses catalog-module-classification-config;
+    }
+  }
+
+  grouping catalog-module-access-config {
+    description
+      "Data pertaining to retrieval and usage of the module";
+
+    leaf uri {
+      type oc-inet:uri;
+      description
+        "URI where module can be downloaded.  Modules may be
+        made available from the catalog maintainer, or directly
+        from the publisher";
+    }
+
+    leaf md5-hash {
+      type string;
+      description
+        "Optional MD5 hash of the module file.  If specified, the
+        hash may be used by users to validate data integrity";
+    }
+  }
+
+  grouping catalog-module-access-top {
+    description
+      "Top level groupig for data related to accessing a module
+      or submodule";
+
+    container access {
+      description
+        "Container for data pertaining to retrieval and usage of the
+        module";
+
+      uses catalog-module-access-config;
+    }
+  }
+
+  grouping catalog-module-submodule-config {
+    description
+      "Data definitions for submodules belonging to a
+      module";
+
+    leaf name {
+      type string;
+      description
+        "Name of the submodule as indicated by its top-level
+        'submodule' statement";
+    }
+
+  }
+
+  grouping catalog-module-submodule-top {
+    description
+      "Top-level grouping for submodule information";
+
+    container submodules {
+      description
+        "Data for the submodules belonging to a submodule. If the
+        module does not have any submodules, this container
+        should be empty.";
+
+      list submodule {
+        key "name";
+        description
+          "List of submodules included by a module.  All submodules
+          specified by 'include' statements in the module should be
+          included in this list.";
+
+        uses catalog-module-submodule-config;
+        uses catalog-module-access-top;
+      }
+    }
+  }
+
+  grouping catalog-module-base-config {
+    description
+      "Basic information describing the module, e.g., the
+      YANG metadata in the module preface.";
+
+
+    leaf namespace {
+      type string;
+      description
+        "Published namespace of module, i.e., defined by the
+        'namespace' ";
+    }
+
+    leaf prefix {
+      type string;
+      description
+        "Published prefix of the module";
+    }
+
+    leaf revision {
+      type string;
+      description
+        "Date in the revision statement of the module";
+    }
+
+    leaf summary {
+      type string;
+      description
+        "Summary description of the module";
+    }
+  }
+
+  grouping release-bundle-member-config {
+    description
+      "Data for each member of a bundle";
+
+    leaf id {
+      type string;
+      description
+        "Identifier for the bundle member";
+    }
+
+    leaf type {
+      type identityref {
+        base oc-cat-types:CATALOG_MEMBER_TYPE;
+      }
+      description
+        "The type of member that is to be included within the
+        release bundle. Release bundles may include modules and
+        other release bundles.  Both member modules and member
+        bundles should specify the list of compatible versions.";
+    }
+
+    leaf module {
+      when "../type = 'oc-cat-types:MODULE'" {
+        description
+          "The module name is specified for bundle membrs that are
+          modules";
+      }
+      type leafref {
+        path "../../../../../../../organizations/" +
+          "organization[name=current()/../publisher]/modules/" +
+          "module/name";
+      }
+      description
+        "Name of the module set which is included in this bundle -
+        for example, 'openconfig-bgp'";
+    }
+
+    leaf release-bundle {
+      when "../type = 'oc-cat-types:RELEASE_BUNDLE'" {
+        description
+          "The release bundle is specified for bundle members that
+          are release bundles";
+      }
+      type leafref {
+        path "../../../../../../../organizations/" +
+          "organization[name=current()/../publisher]/" +
+            "release-bundles/release-bundle/name";
+      }
+      description
+        "Name of the module set which is included in this bundle -
+        for example, 'openconfig-bgp'";
+    }
+
+    leaf publisher {
+      type leafref {
+        path "../../../../../../../organizations/organization/" +
+          "name";
+      }
+      description
+        "Reference to the name of the publishing organization";
+    }
+
+    leaf-list compatible-versions {
+      type oc-cat-types:module-version-type;
+      description
+        "A list of semantic version specification of the versions
+        of the specified module or release bundle which are
+        compatible when building this version of the bundle.
+
+        Version specifications may be added when changes are made
+        to a module within a bundle, and this does not affect the
+        interaction between it and other modules. It is expected
+        that backwards compatible changes to an individual module or
+        member bundle do not affect the compatibility of that
+        with other members, and hence wildcard matches are allowed
+        within this list.";
+    }
+  }
+
+  grouping release-bundle-member-top {
+
+    description
+      "Parameters relating to models within release bundles";
+
+    container members {
+      description
+        "List of bundle members which make up this release bundle. A
+        member is defined as an individual YANG module specified
+        in the YANG catalogue, or another release
+        bundle which can be used to group multiple YANG
+        models together.";
+
+      list member {
+        key "id";
+        description
+          "A set of modules or bundles which are part of the bundle
+          of models. For example, if 'ietf-yang-types' were to be
+          specified within the bundle, then this would refer to the
+          individual entry within the module catalogue. If the type
+          of the entry is set to bundle, then for example,
+          openconfig-bgp could be referenced - which itself consists
+          of separate modules.";
+
+        uses release-bundle-member-config;
+
+      }
+    }
+  }
+
+  grouping release-bundle-top {
+    description
+      "Top-level container for a release bundle";
+
+    container release-bundles {
+      description
+        "List of release bundles";
+
+      list release-bundle {
+        key "name version";
+
+        description
+          "List of release bundles - sets of modules and/or
+          bundles which are interoperable";
+
+        uses catalog-module-common-config;
+        uses release-bundle-member-top;
+      }
+    }
+  }
+
+  grouping feature-bundle-release-config {
+    description
+      "Data definitions to identify the release bundle that the
+      feature bundle is based on.";
+
+    leaf name {
+      type leafref {
+        path "../../../../release-bundles/release-bundle/name";
+      }
+      description
+        "Reference to the name of the release bundle used for the
+        feature paths.";
+    }
+
+    leaf version {
+      type leafref {
+        path "../../../../release-bundles/" +
+          "release-bundle[name=current()/../name]/version";
+      }
+      description
+        "Reference to the release bundle version used for the
+        feature paths";
+    }
+
+    leaf publisher {
+      type leafref {
+        path "../../../../release-bundles/" +
+          "release-bundle[name=current()/../name]/publisher";
+      }
+      description
+        "Reference to the publisher of the release bundle used for
+        the feature paths";
+    }
+  }
+
+  grouping feature-bundle-release-top {
+    description
+      "Top-level grouping for data about the release bundle used
+      to specify the feature bundle";
+
+    container release-bundle {
+      description
+        "Data to identify the release bundle from which the feature
+        paths should be specified.  If the feature crosses
+        release bundles, a new release bundle should be
+        created to support the feature bundle.";
+
+      leaf name {
+        type leafref {
+          path "../../../../../../organizations/" +
+            "organization[name=current()/../publisher]/" +
+              "release-bundles/release-bundle/name";
+        }
+        description
+          "Name of the module set which is included in this bundle -
+          for example, 'openconfig-bgp'";
+      }
+
+      leaf publisher {
+        type leafref {
+          path "../../../../../../organizations/organization/" +
+            "name";
+        }
+        description
+          "Reference to the name of the publishing organization";
+      }
+
+      leaf version {
+        type oc-cat-types:module-version-type;
+        description
+          "Version of the referenced release bundle";
+      }
+    }
+  }
+
+
+  grouping feature-bundle-config {
+    description
+      "Data definitions for the feature bundle";
+
+    uses catalog-module-common-config;
+
+    leaf-list path {
+      type string;
+      description
+        "The list of schema paths included in the feature.  The
+        paths specify subtrees, i.e., all data underneath the
+        specified path are included in the feature.";
+    }
+  }
+
+  grouping feature-bundle-feature-config {
+    description
+      "Data definitions for included feature bundles";
+
+    uses feature-bundle-included-reference;
+  }
+
+  grouping feature-bundle-feature-top {
+    description
+      "Top level grouping for the list of included feature
+      bundles";
+
+    container feature-bundles {
+      description
+        "Enclosing container for the list of included feature
+        bundles.  Feature bundles may be composed from other
+        smaller feature units";
+
+      list feature-bundle {
+        key "name";
+        description
+          "The list of feature bundles included in the current
+          feature bundle.";
+
+        uses feature-bundle-feature-config;
+      }
+    }
+
+  }
+
+
+  grouping feature-bundle-top {
+    description
+      "Top-level grouping for OpenConfig feature bundles";
+
+    container feature-bundles {
+      description
+        "Enclosing container for the list of feature bundles";
+
+      list feature-bundle {
+        key "name version";
+        description
+          "List of feature bundles";
+
+        uses feature-bundle-config;
+        uses feature-bundle-release-top;
+        uses feature-bundle-feature-top;
+      }
+    }
+  }
+
+  grouping catalog-module-top {
+    description
+      "Top level structure of the module catalog";
+
+    container modules {
+      description
+        "Modules published by this organization";
+
+      list module {
+        key "name version";
+        description
+          "List of published modules from the organization";
+
+        uses catalog-module-common-config;
+        uses catalog-module-base-config;
+        uses catalog-module-classification-top;
+        uses catalog-module-dependency-top;
+        uses catalog-module-access-top;
+        uses catalog-module-submodule-top;
+      }
+    }
+  }
+
+  grouping catalog-organization-config {
+    description
+      "Top level grouping for data related to an organization that
+      publishes module, bundles, etc.";
+
+    leaf name {
+      type string;
+      description
+        "Name of the maintaining organization -- the name should be
+        supplied in the official format used by the organization.
+        Standards Body examples:
+          IETF, IEEE, MEF, ONF, etc.
+        Commercial entity examples:
+          AT&T, Facebook, <Vendor>
+        Name of industry forum examples:
+          OpenConfig, OpenDaylight, ON.Lab";
+    }
+
+    leaf type {
+      type identityref {
+        base oc-cat-types:ORGANIZATION_TYPE;
+      }
+      description
+        "Type of the publishing organization";
+    }
+
+    leaf contact {
+      type string;
+      description
+        "Contact information for the publishing organization (web
+        site, email address, etc.)";
+    }
+  }
+
+  grouping catalog-organization-top {
+    description
+      "Top level grouping for list of maintaining organizations";
+
+    container organizations {
+      description
+        "List of organizations owning modules";
+
+      list organization {
+        key "name";
+
+        description
+          "List of organizations publishing YANG modules or
+          module bundles";
+
+        uses catalog-organization-config;
+        uses catalog-module-top;
+        uses release-bundle-top;
+        uses feature-bundle-top;
+        uses catalog-implementation-top;
+      }
+    }
+  }
+
+
+  grouping catalog-top {
+    description
+      "Top-level grouping for the YANG model catalog";
+
+    uses catalog-organization-top;
+  }
+
+  // data definition statements
+
+  uses catalog-top;
+
+}
diff --git a/models/openconfig/src/main/yang/comm/iana-if-type.yang b/models/openconfig/src/main/yang/comm/iana-if-type.yang
new file mode 100644
index 0000000..931f8b6
--- /dev/null
+++ b/models/openconfig/src/main/yang/comm/iana-if-type.yang
@@ -0,0 +1,1629 @@
+module iana-if-type {
+  namespace "urn:ietf:params:xml:ns:yang:iana-if-type";
+  prefix ianaift;
+
+  import ietf-interfaces {
+    prefix if;
+  }
+
+  organization "IANA";
+  contact
+    "        Internet Assigned Numbers Authority
+
+     Postal: ICANN
+             12025 Waterfront Drive, Suite 300
+             Los Angeles, CA 90094-2536
+             United States
+
+     Tel:    +1 310 301 5800
+     <mailto:iana&iana.org>";
+  description
+    "This YANG module defines YANG identities for IANA-registered
+     interface types.
+
+     This YANG module is maintained by IANA and reflects the
+     'ifType definitions' registry.
+
+     The latest revision of this YANG module can be obtained from
+     the IANA web site.
+
+     Requests for new values should be made to IANA via
+     email (iana&iana.org).
+
+     Copyright (c) 2014 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject
+     to the license terms contained in, the Simplified BSD License
+     set forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (http://trustee.ietf.org/license-info).
+
+     The initial version of this YANG module is part of RFC 7224;
+     see the RFC itself for full legal notices.";
+  reference
+    "IANA 'ifType definitions' registry.
+     <http://www.iana.org/assignments/smi-numbers>";
+
+  revision 2017-03-30 {
+    description
+      "Registered ifType 290.";
+  }
+
+  revision 2017-01-19 {
+    description
+      "Registered ifType 289.";
+  }
+
+  revision 2016-11-23 {
+    description
+      "Registered ifTypes 283-288.";
+  }
+
+  revision 2016-06-09 {
+    description
+      "Registered ifType 282.";
+  }
+  revision 2016-05-03 {
+    description
+      "Registered ifType 281.";
+  }
+  revision 2015-06-12 {
+    description
+      "Corrected formatting issue.";
+  }  
+  revision 2014-09-24 {
+    description
+      "Registered ifType 280.";
+  }
+  revision 2014-09-19 {
+    description
+      "Registered ifType 279.";
+  }
+  revision 2014-07-03 {
+    description
+      "Registered ifTypes 277-278.";
+  }
+  revision 2014-05-19 {
+    description
+      "Updated the contact address.";
+  }
+  revision 2014-05-08 {
+    description
+      "Initial revision.";
+    reference
+      "RFC 7224: IANA Interface Type YANG Module";
+  }
+
+  identity iana-interface-type {
+    base if:interface-type;
+    description
+      "This identity is used as a base for all interface types
+       defined in the 'ifType definitions' registry.";
+  }
+
+  identity other {
+    base iana-interface-type;
+  }
+  identity regular1822 {
+    base iana-interface-type;
+  }
+  identity hdh1822 {
+    base iana-interface-type;
+  }
+  identity ddnX25 {
+    base iana-interface-type;
+  }
+  identity rfc877x25 {
+    base iana-interface-type;
+    reference
+      "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer";
+  }
+  identity ethernetCsmacd {
+    base iana-interface-type;
+    description
+      "For all Ethernet-like interfaces, regardless of speed,
+       as per RFC 3635.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+  identity iso88023Csmacd {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "Deprecated via RFC 3635.
+       Use ethernetCsmacd(6) instead.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+  identity iso88024TokenBus {
+    base iana-interface-type;
+  }
+  identity iso88025TokenRing {
+    base iana-interface-type;
+  }
+  identity iso88026Man {
+    base iana-interface-type;
+  }
+  identity starLan {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "Deprecated via RFC 3635.
+       Use ethernetCsmacd(6) instead.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+  identity proteon10Mbit {
+    base iana-interface-type;
+  }
+  identity proteon80Mbit {
+    base iana-interface-type;
+  }
+  identity hyperchannel {
+    base iana-interface-type;
+  }
+  identity fddi {
+    base iana-interface-type;
+    reference
+      "RFC 1512 - FDDI Management Information Base";
+  }
+  identity lapb {
+    base iana-interface-type;
+    reference
+      "RFC 1381 - SNMP MIB Extension for X.25 LAPB";
+  }
+  identity sdlc {
+    base iana-interface-type;
+  }
+  identity ds1 {
+    base iana-interface-type;
+    description
+      "DS1-MIB.";
+    reference
+      "RFC 4805 - Definitions of Managed Objects for the
+                  DS1, J1, E1, DS2, and E2 Interface Types";
+  }
+  identity e1 {
+    base iana-interface-type;
+    status obsolete;
+    description
+      "Obsolete; see DS1-MIB.";
+    reference
+      "RFC 4805 - Definitions of Managed Objects for the
+                  DS1, J1, E1, DS2, and E2 Interface Types";
+  }
+  identity basicISDN {
+    base iana-interface-type;
+    description
+      "No longer used.  See also RFC 2127.";
+  }
+  identity primaryISDN {
+    base iana-interface-type;
+    description
+      "No longer used.  See also RFC 2127.";
+  }
+  identity propPointToPointSerial {
+    base iana-interface-type;
+    description
+      "Proprietary serial.";
+  }
+  identity ppp {
+    base iana-interface-type;
+  }
+  identity softwareLoopback {
+    base iana-interface-type;
+  }
+  identity eon {
+    base iana-interface-type;
+    description
+      "CLNP over IP.";
+  }
+  identity ethernet3Mbit {
+    base iana-interface-type;
+  }
+  identity nsip {
+    base iana-interface-type;
+    description
+      "XNS over IP.";
+  }
+  identity slip {
+    base iana-interface-type;
+    description
+      "Generic SLIP.";
+  }
+  identity ultra {
+    base iana-interface-type;
+    description
+      "Ultra Technologies.";
+  }
+  identity ds3 {
+    base iana-interface-type;
+    description
+      "DS3-MIB.";
+    reference
+      "RFC 3896 - Definitions of Managed Objects for the
+                  DS3/E3 Interface Type";
+  }
+  identity sip {
+    base iana-interface-type;
+    description
+      "SMDS, coffee.";
+    reference
+      "RFC 1694 - Definitions of Managed Objects for SMDS
+                  Interfaces using SMIv2";
+  }
+  identity frameRelay {
+    base iana-interface-type;
+    description
+      "DTE only.";
+    reference
+      "RFC 2115 - Management Information Base for Frame Relay
+                  DTEs Using SMIv2";
+  }
+  identity rs232 {
+    base iana-interface-type;
+    reference
+      "RFC 1659 - Definitions of Managed Objects for RS-232-like
+                  Hardware Devices using SMIv2";
+  }
+  identity para {
+    base iana-interface-type;
+    description
+      "Parallel-port.";
+    reference
+      "RFC 1660 - Definitions of Managed Objects for
+                  Parallel-printer-like Hardware Devices using
+                  SMIv2";
+  }
+  identity arcnet {
+    base iana-interface-type;
+    description
+      "ARCnet.";
+  }
+  identity arcnetPlus {
+    base iana-interface-type;
+    description
+      "ARCnet Plus.";
+  }
+  identity atm {
+    base iana-interface-type;
+    description
+      "ATM cells.";
+  }
+  identity miox25 {
+    base iana-interface-type;
+    reference
+      "RFC 1461 - SNMP MIB extension for Multiprotocol
+                  Interconnect over X.25";
+  }
+  identity sonet {
+    base iana-interface-type;
+    description
+      "SONET or SDH.";
+  }
+  identity x25ple {
+    base iana-interface-type;
+    reference
+      "RFC 2127 - ISDN Management Information Base using SMIv2";
+  }
+  identity iso88022llc {
+    base iana-interface-type;
+  }
+  identity localTalk {
+    base iana-interface-type;
+  }
+  identity smdsDxi {
+    base iana-interface-type;
+  }
+  identity frameRelayService {
+    base iana-interface-type;
+    description
+      "FRNETSERV-MIB.";
+    reference
+      "RFC 2954 - Definitions of Managed Objects for Frame
+                  Relay Service";
+  }
+  identity v35 {
+    base iana-interface-type;
+  }
+  identity hssi {
+    base iana-interface-type;
+  }
+  identity hippi {
+    base iana-interface-type;
+  }
+  identity modem {
+    base iana-interface-type;
+    description
+      "Generic modem.";
+  }
+  identity aal5 {
+    base iana-interface-type;
+    description
+      "AAL5 over ATM.";
+  }
+  identity sonetPath {
+    base iana-interface-type;
+  }
+  identity sonetVT {
+    base iana-interface-type;
+  }
+  identity smdsIcip {
+    base iana-interface-type;
+    description
+      "SMDS InterCarrier Interface.";
+  }
+  identity propVirtual {
+    base iana-interface-type;
+    description
+      "Proprietary virtual/internal.";
+    reference
+      "RFC 2863 - The Interfaces Group MIB";
+  }
+  identity propMultiplexor {
+    base iana-interface-type;
+    description
+      "Proprietary multiplexing.";
+    reference
+      "RFC 2863 - The Interfaces Group MIB";
+  }
+  identity ieee80212 {
+    base iana-interface-type;
+    description
+      "100BaseVG.";
+  }
+  identity fibreChannel {
+    base iana-interface-type;
+    description
+      "Fibre Channel.";
+  }
+  identity hippiInterface {
+    base iana-interface-type;
+    description
+      "HIPPI interfaces.";
+  }
+  identity frameRelayInterconnect {
+    base iana-interface-type;
+    status obsolete;
+    description
+      "Obsolete; use either
+       frameRelay(32) or frameRelayService(44).";
+  }
+  identity aflane8023 {
+    base iana-interface-type;
+    description
+      "ATM Emulated LAN for 802.3.";
+  }
+  identity aflane8025 {
+    base iana-interface-type;
+    description
+      "ATM Emulated LAN for 802.5.";
+  }
+  identity cctEmul {
+    base iana-interface-type;
+    description
+      "ATM Emulated circuit.";
+  }
+  identity fastEther {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "Obsoleted via RFC 3635.
+       ethernetCsmacd(6) should be used instead.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+  identity isdn {
+    base iana-interface-type;
+    description
+      "ISDN and X.25.";
+    reference
+      "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN
+                  in the Packet Mode";
+  }
+  identity v11 {
+    base iana-interface-type;
+    description
+      "CCITT V.11/X.21.";
+  }
+  identity v36 {
+    base iana-interface-type;
+    description
+      "CCITT V.36.";
+  }
+  identity g703at64k {
+    base iana-interface-type;
+    description
+      "CCITT G703 at 64Kbps.";
+  }
+  identity g703at2mb {
+    base iana-interface-type;
+    status obsolete;
+    description
+      "Obsolete; see DS1-MIB.";
+  }
+  identity qllc {
+    base iana-interface-type;
+    description
+      "SNA QLLC.";
+  }
+  identity fastEtherFX {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "Obsoleted via RFC 3635.
+       ethernetCsmacd(6) should be used instead.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+  identity channel {
+    base iana-interface-type;
+    description
+      "Channel.";
+  }
+  identity ieee80211 {
+    base iana-interface-type;
+    description
+      "Radio spread spectrum.";
+  }
+  identity ibm370parChan {
+    base iana-interface-type;
+    description
+      "IBM System 360/370 OEMI Channel.";
+  }
+  identity escon {
+    base iana-interface-type;
+    description
+      "IBM Enterprise Systems Connection.";
+  }
+  identity dlsw {
+    base iana-interface-type;
+    description
+      "Data Link Switching.";
+  }
+  identity isdns {
+    base iana-interface-type;
+    description
+      "ISDN S/T interface.";
+  }
+  identity isdnu {
+    base iana-interface-type;
+    description
+      "ISDN U interface.";
+  }
+  identity lapd {
+    base iana-interface-type;
+    description
+      "Link Access Protocol D.";
+  }
+  identity ipSwitch {
+    base iana-interface-type;
+    description
+      "IP Switching Objects.";
+  }
+  identity rsrb {
+    base iana-interface-type;
+    description
+      "Remote Source Route Bridging.";
+  }
+  identity atmLogical {
+    base iana-interface-type;
+    description
+      "ATM Logical Port.";
+    reference
+      "RFC 3606 - Definitions of Supplemental Managed Objects
+                  for ATM Interface";
+  }
+  identity ds0 {
+    base iana-interface-type;
+    description
+      "Digital Signal Level 0.";
+    reference
+      "RFC 2494 - Definitions of Managed Objects for the DS0
+                  and DS0 Bundle Interface Type";
+  }
+  identity ds0Bundle {
+    base iana-interface-type;
+    description
+      "Group of ds0s on the same ds1.";
+    reference
+      "RFC 2494 - Definitions of Managed Objects for the DS0
+                  and DS0 Bundle Interface Type";
+  }
+  identity bsc {
+    base iana-interface-type;
+    description
+      "Bisynchronous Protocol.";
+  }
+  identity async {
+    base iana-interface-type;
+    description
+      "Asynchronous Protocol.";
+  }
+  identity cnr {
+    base iana-interface-type;
+    description
+      "Combat Net Radio.";
+  }
+  identity iso88025Dtr {
+    base iana-interface-type;
+    description
+      "ISO 802.5r DTR.";
+  }
+  identity eplrs {
+    base iana-interface-type;
+    description
+      "Ext Pos Loc Report Sys.";
+  }
+  identity arap {
+    base iana-interface-type;
+    description
+      "Appletalk Remote Access Protocol.";
+  }
+  identity propCnls {
+    base iana-interface-type;
+    description
+      "Proprietary Connectionless Protocol.";
+  }
+  identity hostPad {
+    base iana-interface-type;
+    description
+      "CCITT-ITU X.29 PAD Protocol.";
+  }
+  identity termPad {
+    base iana-interface-type;
+    description
+      "CCITT-ITU X.3 PAD Facility.";
+  }
+  identity frameRelayMPI {
+    base iana-interface-type;
+    description
+      "Multiproto Interconnect over FR.";
+  }
+  identity x213 {
+    base iana-interface-type;
+    description
+      "CCITT-ITU X213.";
+  }
+  identity adsl {
+    base iana-interface-type;
+    description
+      "Asymmetric Digital Subscriber Loop.";
+  }
+  identity radsl {
+    base iana-interface-type;
+    description
+      "Rate-Adapt. Digital Subscriber Loop.";
+  }
+  identity sdsl {
+    base iana-interface-type;
+    description
+      "Symmetric Digital Subscriber Loop.";
+  }
+  identity vdsl {
+    base iana-interface-type;
+    description
+      "Very H-Speed Digital Subscrib. Loop.";
+  }
+  identity iso88025CRFPInt {
+    base iana-interface-type;
+    description
+      "ISO 802.5 CRFP.";
+  }
+  identity myrinet {
+    base iana-interface-type;
+    description
+      "Myricom Myrinet.";
+  }
+  identity voiceEM {
+    base iana-interface-type;
+    description
+      "Voice recEive and transMit.";
+  }
+  identity voiceFXO {
+    base iana-interface-type;
+    description
+      "Voice Foreign Exchange Office.";
+  }
+  identity voiceFXS {
+    base iana-interface-type;
+    description
+      "Voice Foreign Exchange Station.";
+  }
+  identity voiceEncap {
+    base iana-interface-type;
+    description
+      "Voice encapsulation.";
+  }
+  identity voiceOverIp {
+    base iana-interface-type;
+    description
+      "Voice over IP encapsulation.";
+  }
+  identity atmDxi {
+    base iana-interface-type;
+    description
+      "ATM DXI.";
+  }
+  identity atmFuni {
+    base iana-interface-type;
+    description
+      "ATM FUNI.";
+  }
+  identity atmIma {
+    base iana-interface-type;
+    description
+      "ATM IMA.";
+  }
+  identity pppMultilinkBundle {
+    base iana-interface-type;
+    description
+      "PPP Multilink Bundle.";
+  }
+  identity ipOverCdlc {
+    base iana-interface-type;
+    description
+      "IBM ipOverCdlc.";
+  }
+  identity ipOverClaw {
+    base iana-interface-type;
+    description
+      "IBM Common Link Access to Workstn.";
+  }
+  identity stackToStack {
+    base iana-interface-type;
+    description
+      "IBM stackToStack.";
+  }
+  identity virtualIpAddress {
+    base iana-interface-type;
+    description
+      "IBM VIPA.";
+  }
+  identity mpc {
+    base iana-interface-type;
+    description
+      "IBM multi-protocol channel support.";
+  }
+  identity ipOverAtm {
+    base iana-interface-type;
+    description
+      "IBM ipOverAtm.";
+    reference
+      "RFC 2320 - Definitions of Managed Objects for Classical IP
+                  and ARP Over ATM Using SMIv2 (IPOA-MIB)";
+  }
+  identity iso88025Fiber {
+    base iana-interface-type;
+    description
+      "ISO 802.5j Fiber Token Ring.";
+  }
+  identity tdlc {
+    base iana-interface-type;
+    description
+      "IBM twinaxial data link control.";
+  }
+  identity gigabitEthernet {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "Obsoleted via RFC 3635.
+       ethernetCsmacd(6) should be used instead.";
+    reference
+      "RFC 3635 - Definitions of Managed Objects for the
+                  Ethernet-like Interface Types";
+  }
+  identity hdlc {
+    base iana-interface-type;
+    description
+      "HDLC.";
+  }
+  identity lapf {
+    base iana-interface-type;
+    description
+      "LAP F.";
+  }
+  identity v37 {
+    base iana-interface-type;
+    description
+      "V.37.";
+  }
+  identity x25mlp {
+    base iana-interface-type;
+    description
+      "Multi-Link Protocol.";
+  }
+  identity x25huntGroup {
+    base iana-interface-type;
+    description
+      "X25 Hunt Group.";
+  }
+  identity transpHdlc {
+    base iana-interface-type;
+    description
+      "Transp HDLC.";
+  }
+  identity interleave {
+    base iana-interface-type;
+    description
+      "Interleave channel.";
+  }
+  identity fast {
+    base iana-interface-type;
+    description
+      "Fast channel.";
+  }
+  identity ip {
+    base iana-interface-type;
+    description
+      "IP (for APPN HPR in IP networks).";
+  }
+  identity docsCableMaclayer {
+    base iana-interface-type;
+    description
+      "CATV Mac Layer.";
+  }
+  identity docsCableDownstream {
+    base iana-interface-type;
+    description
+      "CATV Downstream interface.";
+  }
+  identity docsCableUpstream {
+    base iana-interface-type;
+    description
+      "CATV Upstream interface.";
+  }
+  identity a12MppSwitch {
+    base iana-interface-type;
+    description
+      "Avalon Parallel Processor.";
+  }
+  identity tunnel {
+    base iana-interface-type;
+    description
+      "Encapsulation interface.";
+  }
+  identity coffee {
+    base iana-interface-type;
+    description
+      "Coffee pot.";
+    reference
+      "RFC 2325 - Coffee MIB";
+  }
+  identity ces {
+    base iana-interface-type;
+    description
+      "Circuit Emulation Service.";
+  }
+  identity atmSubInterface {
+    base iana-interface-type;
+    description
+      "ATM Sub Interface.";
+  }
+  identity l2vlan {
+    base iana-interface-type;
+    description
+      "Layer 2 Virtual LAN using 802.1Q.";
+  }
+  identity l3ipvlan {
+    base iana-interface-type;
+    description
+      "Layer 3 Virtual LAN using IP.";
+  }
+  identity l3ipxvlan {
+    base iana-interface-type;
+    description
+      "Layer 3 Virtual LAN using IPX.";
+  }
+  identity digitalPowerline {
+    base iana-interface-type;
+    description
+      "IP over Power Lines.";
+  }
+  identity mediaMailOverIp {
+    base iana-interface-type;
+    description
+      "Multimedia Mail over IP.";
+  }
+  identity dtm {
+    base iana-interface-type;
+    description
+      "Dynamic synchronous Transfer Mode.";
+  }
+  identity dcn {
+    base iana-interface-type;
+    description
+      "Data Communications Network.";
+  }
+  identity ipForward {
+    base iana-interface-type;
+    description
+      "IP Forwarding Interface.";
+  }
+  identity msdsl {
+    base iana-interface-type;
+    description
+      "Multi-rate Symmetric DSL.";
+  }
+  identity ieee1394 {
+    base iana-interface-type;
+
+    description
+      "IEEE1394 High Performance Serial Bus.";
+  }
+  identity if-gsn {
+    base iana-interface-type;
+    description
+      "HIPPI-6400.";
+  }
+  identity dvbRccMacLayer {
+    base iana-interface-type;
+    description
+      "DVB-RCC MAC Layer.";
+  }
+  identity dvbRccDownstream {
+    base iana-interface-type;
+    description
+      "DVB-RCC Downstream Channel.";
+  }
+  identity dvbRccUpstream {
+    base iana-interface-type;
+    description
+      "DVB-RCC Upstream Channel.";
+  }
+  identity atmVirtual {
+    base iana-interface-type;
+    description
+      "ATM Virtual Interface.";
+  }
+  identity mplsTunnel {
+    base iana-interface-type;
+    description
+      "MPLS Tunnel Virtual Interface.";
+  }
+  identity srp {
+    base iana-interface-type;
+    description
+      "Spatial Reuse Protocol.";
+  }
+  identity voiceOverAtm {
+    base iana-interface-type;
+    description
+      "Voice over ATM.";
+  }
+  identity voiceOverFrameRelay {
+    base iana-interface-type;
+    description
+      "Voice Over Frame Relay.";
+  }
+  identity idsl {
+    base iana-interface-type;
+    description
+      "Digital Subscriber Loop over ISDN.";
+  }
+  identity compositeLink {
+    base iana-interface-type;
+    description
+      "Avici Composite Link Interface.";
+  }
+  identity ss7SigLink {
+    base iana-interface-type;
+    description
+      "SS7 Signaling Link.";
+  }
+  identity propWirelessP2P {
+    base iana-interface-type;
+    description
+      "Prop. P2P wireless interface.";
+  }
+  identity frForward {
+    base iana-interface-type;
+    description
+      "Frame Forward Interface.";
+  }
+  identity rfc1483 {
+    base iana-interface-type;
+    description
+      "Multiprotocol over ATM AAL5.";
+    reference
+      "RFC 1483 - Multiprotocol Encapsulation over ATM
+                  Adaptation Layer 5";
+  }
+  identity usb {
+    base iana-interface-type;
+    description
+      "USB Interface.";
+  }
+  identity ieee8023adLag {
+    base iana-interface-type;
+    description
+      "IEEE 802.3ad Link Aggregate.";
+  }
+  identity bgppolicyaccounting {
+    base iana-interface-type;
+    description
+      "BGP Policy Accounting.";
+  }
+  identity frf16MfrBundle {
+    base iana-interface-type;
+    description
+      "FRF.16 Multilink Frame Relay.";
+  }
+  identity h323Gatekeeper {
+    base iana-interface-type;
+    description
+      "H323 Gatekeeper.";
+  }
+  identity h323Proxy {
+    base iana-interface-type;
+    description
+      "H323 Voice and Video Proxy.";
+  }
+  identity mpls {
+    base iana-interface-type;
+    description
+      "MPLS.";
+  }
+  identity mfSigLink {
+    base iana-interface-type;
+    description
+      "Multi-frequency signaling link.";
+  }
+  identity hdsl2 {
+    base iana-interface-type;
+    description
+      "High Bit-Rate DSL - 2nd generation.";
+  }
+  identity shdsl {
+    base iana-interface-type;
+    description
+      "Multirate HDSL2.";
+  }
+  identity ds1FDL {
+    base iana-interface-type;
+    description
+      "Facility Data Link (4Kbps) on a DS1.";
+  }
+  identity pos {
+    base iana-interface-type;
+    description
+      "Packet over SONET/SDH Interface.";
+  }
+  identity dvbAsiIn {
+    base iana-interface-type;
+    description
+      "DVB-ASI Input.";
+  }
+  identity dvbAsiOut {
+    base iana-interface-type;
+    description
+      "DVB-ASI Output.";
+  }
+  identity plc {
+    base iana-interface-type;
+    description
+      "Power Line Communications.";
+  }
+  identity nfas {
+    base iana-interface-type;
+    description
+      "Non-Facility Associated Signaling.";
+  }
+  identity tr008 {
+    base iana-interface-type;
+    description
+      "TR008.";
+  }
+  identity gr303RDT {
+    base iana-interface-type;
+    description
+      "Remote Digital Terminal.";
+  }
+  identity gr303IDT {
+    base iana-interface-type;
+    description
+      "Integrated Digital Terminal.";
+  }
+  identity isup {
+    base iana-interface-type;
+    description
+      "ISUP.";
+  }
+  identity propDocsWirelessMaclayer {
+    base iana-interface-type;
+    description
+      "Cisco proprietary Maclayer.";
+  }
+  identity propDocsWirelessDownstream {
+    base iana-interface-type;
+    description
+      "Cisco proprietary Downstream.";
+  }
+  identity propDocsWirelessUpstream {
+    base iana-interface-type;
+    description
+      "Cisco proprietary Upstream.";
+  }
+  identity hiperlan2 {
+    base iana-interface-type;
+    description
+      "HIPERLAN Type 2 Radio Interface.";
+  }
+  identity propBWAp2Mp {
+    base iana-interface-type;
+    description
+      "PropBroadbandWirelessAccesspt2Multipt (use of this value
+       for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f
+       is deprecated, and ieee80216WMAN(237) should be used
+       instead).";
+  }
+  identity sonetOverheadChannel {
+    base iana-interface-type;
+    description
+      "SONET Overhead Channel.";
+  }
+  identity digitalWrapperOverheadChannel {
+    base iana-interface-type;
+    description
+      "Digital Wrapper.";
+  }
+  identity aal2 {
+    base iana-interface-type;
+    description
+      "ATM adaptation layer 2.";
+  }
+  identity radioMAC {
+    base iana-interface-type;
+    description
+      "MAC layer over radio links.";
+  }
+  identity atmRadio {
+    base iana-interface-type;
+    description
+      "ATM over radio links.";
+  }
+  identity imt {
+    base iana-interface-type;
+    description
+      "Inter-Machine Trunks.";
+  }
+  identity mvl {
+    base iana-interface-type;
+    description
+      "Multiple Virtual Lines DSL.";
+  }
+  identity reachDSL {
+    base iana-interface-type;
+    description
+      "Long Reach DSL.";
+  }
+  identity frDlciEndPt {
+    base iana-interface-type;
+    description
+      "Frame Relay DLCI End Point.";
+  }
+  identity atmVciEndPt {
+    base iana-interface-type;
+    description
+      "ATM VCI End Point.";
+  }
+  identity opticalChannel {
+    base iana-interface-type;
+    description
+      "Optical Channel.";
+  }
+  identity opticalTransport {
+    base iana-interface-type;
+    description
+      "Optical Transport.";
+  }
+  identity propAtm {
+    base iana-interface-type;
+    description
+      "Proprietary ATM.";
+  }
+  identity voiceOverCable {
+    base iana-interface-type;
+    description
+      "Voice Over Cable Interface.";
+  }
+  identity infiniband {
+    base iana-interface-type;
+    description
+      "Infiniband.";
+  }
+  identity teLink {
+    base iana-interface-type;
+    description
+      "TE Link.";
+  }
+  identity q2931 {
+    base iana-interface-type;
+    description
+      "Q.2931.";
+  }
+  identity virtualTg {
+    base iana-interface-type;
+    description
+      "Virtual Trunk Group.";
+  }
+  identity sipTg {
+    base iana-interface-type;
+    description
+      "SIP Trunk Group.";
+  }
+  identity sipSig {
+    base iana-interface-type;
+    description
+      "SIP Signaling.";
+  }
+  identity docsCableUpstreamChannel {
+    base iana-interface-type;
+    description
+      "CATV Upstream Channel.";
+  }
+  identity econet {
+    base iana-interface-type;
+    description
+      "Acorn Econet.";
+  }
+  identity pon155 {
+    base iana-interface-type;
+    description
+      "FSAN 155Mb Symetrical PON interface.";
+  }
+  identity pon622 {
+    base iana-interface-type;
+    description
+      "FSAN 622Mb Symetrical PON interface.";
+  }
+  identity bridge {
+    base iana-interface-type;
+    description
+      "Transparent bridge interface.";
+  }
+  identity linegroup {
+    base iana-interface-type;
+    description
+      "Interface common to multiple lines.";
+  }
+  identity voiceEMFGD {
+    base iana-interface-type;
+    description
+      "Voice E&M Feature Group D.";
+  }
+  identity voiceFGDEANA {
+    base iana-interface-type;
+    description
+      "Voice FGD Exchange Access North American.";
+  }
+  identity voiceDID {
+    base iana-interface-type;
+    description
+      "Voice Direct Inward Dialing.";
+  }
+  identity mpegTransport {
+    base iana-interface-type;
+    description
+      "MPEG transport interface.";
+  }
+  identity sixToFour {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "6to4 interface (DEPRECATED).";
+    reference
+      "RFC 4087 - IP Tunnel MIB";
+  }
+  identity gtp {
+    base iana-interface-type;
+    description
+      "GTP (GPRS Tunneling Protocol).";
+  }
+  identity pdnEtherLoop1 {
+    base iana-interface-type;
+    description
+      "Paradyne EtherLoop 1.";
+  }
+  identity pdnEtherLoop2 {
+    base iana-interface-type;
+    description
+      "Paradyne EtherLoop 2.";
+  }
+  identity opticalChannelGroup {
+    base iana-interface-type;
+    description
+      "Optical Channel Group.";
+  }
+  identity homepna {
+    base iana-interface-type;
+    description
+      "HomePNA ITU-T G.989.";
+  }
+  identity gfp {
+    base iana-interface-type;
+    description
+      "Generic Framing Procedure (GFP).";
+  }
+  identity ciscoISLvlan {
+    base iana-interface-type;
+    description
+      "Layer 2 Virtual LAN using Cisco ISL.";
+  }
+  identity actelisMetaLOOP {
+    base iana-interface-type;
+    description
+      "Acteleis proprietary MetaLOOP High Speed Link.";
+  }
+  identity fcipLink {
+    base iana-interface-type;
+    description
+      "FCIP Link.";
+  }
+  identity rpr {
+    base iana-interface-type;
+    description
+      "Resilient Packet Ring Interface Type.";
+  }
+  identity qam {
+    base iana-interface-type;
+    description
+      "RF Qam Interface.";
+  }
+  identity lmp {
+    base iana-interface-type;
+    description
+      "Link Management Protocol.";
+    reference
+      "RFC 4327 - Link Management Protocol (LMP) Management
+                  Information Base (MIB)";
+  }
+  identity cblVectaStar {
+    base iana-interface-type;
+    description
+      "Cambridge Broadband Networks Limited VectaStar.";
+  }
+  identity docsCableMCmtsDownstream {
+    base iana-interface-type;
+    description
+      "CATV Modular CMTS Downstream Interface.";
+  }
+  identity adsl2 {
+    base iana-interface-type;
+    status deprecated;
+    description
+      "Asymmetric Digital Subscriber Loop Version 2
+       (DEPRECATED/OBSOLETED - please use adsl2plus(238)
+       instead).";
+    reference
+      "RFC 4706 - Definitions of Managed Objects for Asymmetric
+                  Digital Subscriber Line 2 (ADSL2)";
+  }
+  identity macSecControlledIF {
+    base iana-interface-type;
+    description
+      "MACSecControlled.";
+  }
+  identity macSecUncontrolledIF {
+    base iana-interface-type;
+    description
+      "MACSecUncontrolled.";
+  }
+  identity aviciOpticalEther {
+    base iana-interface-type;
+    description
+      "Avici Optical Ethernet Aggregate.";
+  }
+  identity atmbond {
+    base iana-interface-type;
+    description
+      "atmbond.";
+  }
+  identity voiceFGDOS {
+    base iana-interface-type;
+    description
+      "Voice FGD Operator Services.";
+  }
+  identity mocaVersion1 {
+    base iana-interface-type;
+    description
+      "MultiMedia over Coax Alliance (MoCA) Interface
+       as documented in information provided privately to IANA.";
+  }
+  identity ieee80216WMAN {
+    base iana-interface-type;
+    description
+      "IEEE 802.16 WMAN interface.";
+  }
+  identity adsl2plus {
+    base iana-interface-type;
+    description
+      "Asymmetric Digital Subscriber Loop Version 2 -
+       Version 2 Plus and all variants.";
+  }
+  identity dvbRcsMacLayer {
+    base iana-interface-type;
+    description
+      "DVB-RCS MAC Layer.";
+    reference
+      "RFC 5728 - The SatLabs Group DVB-RCS MIB";
+  }
+  identity dvbTdm {
+    base iana-interface-type;
+    description
+      "DVB Satellite TDM.";
+    reference
+      "RFC 5728 - The SatLabs Group DVB-RCS MIB";
+  }
+  identity dvbRcsTdma {
+    base iana-interface-type;
+    description
+      "DVB-RCS TDMA.";
+    reference
+      "RFC 5728 - The SatLabs Group DVB-RCS MIB";
+  }
+  identity x86Laps {
+    base iana-interface-type;
+    description
+      "LAPS based on ITU-T X.86/Y.1323.";
+  }
+  identity wwanPP {
+    base iana-interface-type;
+    description
+      "3GPP WWAN.";
+  }
+  identity wwanPP2 {
+    base iana-interface-type;
+    description
+      "3GPP2 WWAN.";
+  }
+  identity voiceEBS {
+    base iana-interface-type;
+    description
+      "Voice P-phone EBS physical interface.";
+  }
+  identity ifPwType {
+    base iana-interface-type;
+    description
+      "Pseudowire interface type.";
+    reference
+      "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)";
+  }
+  identity ilan {
+    base iana-interface-type;
+    description
+      "Internal LAN on a bridge per IEEE 802.1ap.";
+  }
+  identity pip {
+    base iana-interface-type;
+    description
+      "Provider Instance Port on a bridge per IEEE 802.1ah PBB.";
+  }
+  identity aluELP {
+    base iana-interface-type;
+    description
+      "Alcatel-Lucent Ethernet Link Protection.";
+  }
+  identity gpon {
+    base iana-interface-type;
+    description
+      "Gigabit-capable passive optical networks (G-PON) as per
+       ITU-T G.948.";
+  }
+  identity vdsl2 {
+    base iana-interface-type;
+    description
+      "Very high speed digital subscriber line Version 2
+       (as per ITU-T Recommendation G.993.2).";
+    reference
+      "RFC 5650 - Definitions of Managed Objects for Very High
+                  Speed Digital Subscriber Line 2 (VDSL2)";
+  }
+  identity capwapDot11Profile {
+    base iana-interface-type;
+    description
+      "WLAN Profile Interface.";
+    reference
+      "RFC 5834 - Control and Provisioning of Wireless Access
+                  Points (CAPWAP) Protocol Binding MIB for
+                  IEEE 802.11";
+  }
+  identity capwapDot11Bss {
+    base iana-interface-type;
+    description
+      "WLAN BSS Interface.";
+    reference
+      "RFC 5834 - Control and Provisioning of Wireless Access
+                  Points (CAPWAP) Protocol Binding MIB for
+                  IEEE 802.11";
+  }
+  identity capwapWtpVirtualRadio {
+    base iana-interface-type;
+    description
+      "WTP Virtual Radio Interface.";
+    reference
+      "RFC 5833 - Control and Provisioning of Wireless Access
+                  Points (CAPWAP) Protocol Base MIB";
+  }
+  identity bits {
+    base iana-interface-type;
+    description
+      "bitsport.";
+  }
+  identity docsCableUpstreamRfPort {
+    base iana-interface-type;
+    description
+      "DOCSIS CATV Upstream RF Port.";
+  }
+  identity cableDownstreamRfPort {
+    base iana-interface-type;
+    description
+      "CATV downstream RF Port.";
+  }
+  identity vmwareVirtualNic {
+    base iana-interface-type;
+    description
+      "VMware Virtual Network Interface.";
+  }
+  identity ieee802154 {
+    base iana-interface-type;
+    description
+      "IEEE 802.15.4 WPAN interface.";
+    reference
+      "IEEE 802.15.4-2006";
+  }
+  identity otnOdu {
+    base iana-interface-type;
+    description
+      "OTN Optical Data Unit.";
+  }
+  identity otnOtu {
+    base iana-interface-type;
+    description
+      "OTN Optical channel Transport Unit.";
+  }
+  identity ifVfiType {
+    base iana-interface-type;
+    description
+      "VPLS Forwarding Instance Interface Type.";
+  }
+  identity g9981 {
+    base iana-interface-type;
+    description
+      "G.998.1 bonded interface.";
+  }
+  identity g9982 {
+    base iana-interface-type;
+    description
+      "G.998.2 bonded interface.";
+  }
+  identity g9983 {
+    base iana-interface-type;
+    description
+      "G.998.3 bonded interface.";
+  }
+
+  identity aluEpon {
+    base iana-interface-type;
+    description
+      "Ethernet Passive Optical Networks (E-PON).";
+  }
+  identity aluEponOnu {
+    base iana-interface-type;
+    description
+      "EPON Optical Network Unit.";
+  }
+  identity aluEponPhysicalUni {
+    base iana-interface-type;
+    description
+      "EPON physical User to Network interface.";
+  }
+  identity aluEponLogicalLink {
+    base iana-interface-type;
+    description
+      "The emulation of a point-to-point link over the EPON
+       layer.";
+  }
+  identity aluGponOnu {
+    base iana-interface-type;
+    description
+      "GPON Optical Network Unit.";
+    reference
+      "ITU-T G.984.2";
+  }
+  identity aluGponPhysicalUni {
+    base iana-interface-type;
+    description
+      "GPON physical User to Network interface.";
+    reference
+      "ITU-T G.984.2";
+  }
+  identity vmwareNicTeam {
+    base iana-interface-type;
+    description
+      "VMware NIC Team.";
+  }
+  identity docsOfdmDownstream {
+    base iana-interface-type;
+    description
+      "CATV Downstream OFDM interface.";
+  }
+  identity docsOfdmaUpstream {
+    base iana-interface-type;
+    description
+      "CATV Upstream OFDMA interface.";
+  }
+  identity gfast {
+    base iana-interface-type;
+    description
+      "G.fast port.";
+    reference
+      "ITU-T G.9701";
+  }
+  identity sdci {
+    base iana-interface-type;
+    description
+      "SDCI (IO-Link).";
+    reference
+      "IEC 61131-9 Edition 1.0 2013-09";
+  }
+  identity xboxWireless {
+    base iana-interface-type;
+    description
+      "Xbox wireless.";
+  }
+  identity fastdsl {
+    base iana-interface-type;
+    description
+      "FastDSL.";
+    reference
+      "BBF TR-355";
+  }
+  identity docsCableScte55d1FwdOob {
+    base iana-interface-type;
+    description
+      "Cable SCTE 55-1 OOB Forward Channel.";
+  }
+  identity docsCableScte55d1RetOob {
+    base iana-interface-type;
+    description
+      "Cable SCTE 55-1 OOB Return Channel.";
+  }
+  identity docsCableScte55d2DsOob {
+    base iana-interface-type;
+    description
+      "Cable SCTE 55-2 OOB Downstream Channel.";
+  }
+  identity docsCableScte55d2UsOob {
+    base iana-interface-type;
+    description
+      "Cable SCTE 55-2 OOB Upstream Channel.";
+  }
+  identity docsCableNdf {
+    base iana-interface-type;
+    description
+      "Cable Narrowband Digital Forward.";
+  }
+  identity docsCableNdr {
+    base iana-interface-type;
+    description
+      "Cable Narrowband Digital Return.";
+  }
+  identity ptm {
+    base iana-interface-type;
+    description
+      "Packet Transfer Mode.";
+  }
+  identity ghn {
+    base iana-interface-type;
+    description
+      "G.hn port.";
+  }
+}
diff --git a/models/openconfig/src/main/yang/comm/ietf-inet-types.yang b/models/openconfig/src/main/yang/comm/ietf-inet-types.yang
new file mode 100644
index 0000000..2b7ed38
--- /dev/null
+++ b/models/openconfig/src/main/yang/comm/ietf-inet-types.yang
@@ -0,0 +1,454 @@
+  module ietf-inet-types {
+
+    yang-version 1;
+
+    namespace
+      "urn:ietf:params:xml:ns:yang:ietf-inet-types";
+
+    prefix inet;
+
+    organization
+      "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+    contact
+      "WG Web:   <http://tools.ietf.org/wg/netmod/>
+    WG List:  <mailto:netmod@ietf.org>
+
+    WG Chair: David Kessens
+              <mailto:david.kessens@nsn.com>
+
+    WG Chair: Juergen Schoenwaelder
+              <mailto:j.schoenwaelder@jacobs-university.de>
+
+    Editor:   Juergen Schoenwaelder
+              <mailto:j.schoenwaelder@jacobs-university.de>";
+
+    description
+      "This module contains a collection of generally useful derived
+    YANG data types for Internet addresses and related things.
+
+    Copyright (c) 2013 IETF Trust and the persons identified as
+    authors of the code.  All rights reserved.
+
+    Redistribution and use in source and binary forms, with or
+    without modification, is permitted pursuant to, and subject
+    to the license terms contained in, the Simplified BSD License
+    set forth in Section 4.c of the IETF Trust's Legal Provisions
+    Relating to IETF Documents
+    (http://trustee.ietf.org/license-info).
+
+    This version of this YANG module is part of RFC 6991; see
+    the RFC itself for full legal notices.";
+
+    revision "2013-07-15" {
+      description
+        "This revision adds the following new data types:
+      - ip-address-no-zone
+      - ipv4-address-no-zone
+      - ipv6-address-no-zone";
+      reference
+        "RFC 6991: Common YANG Data Types";
+
+    }
+
+    revision "2010-09-24" {
+      description "Initial revision.";
+      reference
+        "RFC 6021: Common YANG Data Types";
+
+    }
+
+
+    typedef ip-version {
+      type enumeration {
+        enum "unknown" {
+          value 0;
+          description
+            "An unknown or unspecified version of the Internet
+          protocol.";
+        }
+        enum "ipv4" {
+          value 1;
+          description
+            "The IPv4 protocol as defined in RFC 791.";
+        }
+        enum "ipv6" {
+          value 2;
+          description
+            "The IPv6 protocol as defined in RFC 2460.";
+        }
+      }
+      description
+        "This value represents the version of the IP protocol.
+
+      In the value set and its semantics, this type is equivalent
+      to the InetVersion textual convention of the SMIv2.";
+      reference
+        "RFC  791: Internet Protocol
+         RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
+         RFC 4001: Textual Conventions for Internet Network Addresses";
+
+    }
+
+    typedef dscp {
+      type uint8 {
+        range "0..63";
+      }
+      description
+        "The dscp type represents a Differentiated Services Code Point
+      that may be used for marking packets in a traffic stream.
+      In the value set and its semantics, this type is equivalent
+      to the Dscp textual convention of the SMIv2.";
+      reference
+        "RFC 3289: Management Information Base for the Differentiated
+        	  Services Architecture
+         RFC 2474: Definition of the Differentiated Services Field
+        	  (DS Field) in the IPv4 and IPv6 Headers
+         RFC 2780: IANA Allocation Guidelines For Values In
+        	  the Internet Protocol and Related Headers";
+
+    }
+
+    typedef ipv6-flow-label {
+      type uint32 {
+        range "0..1048575";
+      }
+      description
+        "The ipv6-flow-label type represents the flow identifier or Flow
+      Label in an IPv6 packet header that may be used to
+      discriminate traffic flows.
+
+      In the value set and its semantics, this type is equivalent
+      to the IPv6FlowLabel textual convention of the SMIv2.";
+      reference
+        "RFC 3595: Textual Conventions for IPv6 Flow Label
+         RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
+
+    }
+
+    typedef port-number {
+      type uint16 {
+        range "0..65535";
+      }
+      description
+        "The port-number type represents a 16-bit port number of an
+      Internet transport-layer protocol such as UDP, TCP, DCCP, or
+      SCTP.  Port numbers are assigned by IANA.  A current list of
+      all assignments is available from <http://www.iana.org/>.
+
+      Note that the port number value zero is reserved by IANA.  In
+      situations where the value zero does not make sense, it can
+      be excluded by subtyping the port-number type.
+      In the value set and its semantics, this type is equivalent
+      to the InetPortNumber textual convention of the SMIv2.";
+      reference
+        "RFC  768: User Datagram Protocol
+         RFC  793: Transmission Control Protocol
+         RFC 4960: Stream Control Transmission Protocol
+         RFC 4340: Datagram Congestion Control Protocol (DCCP)
+         RFC 4001: Textual Conventions for Internet Network Addresses";
+
+    }
+
+    typedef as-number {
+      type uint32;
+      description
+        "The as-number type represents autonomous system numbers
+      which identify an Autonomous System (AS).  An AS is a set
+      of routers under a single technical administration, using
+      an interior gateway protocol and common metrics to route
+      packets within the AS, and using an exterior gateway
+      protocol to route packets to other ASes.  IANA maintains
+      the AS number space and has delegated large parts to the
+      regional registries.
+
+      Autonomous system numbers were originally limited to 16
+      bits.  BGP extensions have enlarged the autonomous system
+      number space to 32 bits.  This type therefore uses an uint32
+      base type without a range restriction in order to support
+      a larger autonomous system number space.
+
+      In the value set and its semantics, this type is equivalent
+      to the InetAutonomousSystemNumber textual convention of
+      the SMIv2.";
+      reference
+        "RFC 1930: Guidelines for creation, selection, and registration
+        	  of an Autonomous System (AS)
+         RFC 4271: A Border Gateway Protocol 4 (BGP-4)
+         RFC 4001: Textual Conventions for Internet Network Addresses
+         RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
+        	  Number Space";
+
+    }
+
+    typedef ip-address {
+      type union {
+        type ipv4-address;
+        type ipv6-address;
+      }
+      description
+        "The ip-address type represents an IP address and is IP
+      version neutral.  The format of the textual representation
+      implies the IP version.  This type supports scoped addresses
+      by allowing zone identifiers in the address format.";
+      reference
+        "RFC 4007: IPv6 Scoped Address Architecture";
+
+    }
+
+    typedef ipv4-address {
+      type string {
+        pattern
+          '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?';
+      }
+      description
+        "The ipv4-address type represents an IPv4 address in
+       dotted-quad notation.  The IPv4 address may include a zone
+       index, separated by a % sign.
+
+       The zone index is used to disambiguate identical address
+       values.  For link-local addresses, the zone index will
+       typically be the interface index number or the name of an
+       interface.  If the zone index is not present, the default
+       zone of the device will be used.
+
+       The canonical format for the zone index is the numerical
+       format";
+    }
+
+    typedef ipv6-address {
+      type string {
+        pattern
+          '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\p{N}\p{L}]+)?';
+        pattern
+          '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(%.+)?';
+      }
+      description
+        "The ipv6-address type represents an IPv6 address in full,
+      mixed, shortened, and shortened-mixed notation.  The IPv6
+      address may include a zone index, separated by a % sign.
+
+      The zone index is used to disambiguate identical address
+      values.  For link-local addresses, the zone index will
+      typically be the interface index number or the name of an
+      interface.  If the zone index is not present, the default
+      zone of the device will be used.
+
+
+
+      The canonical format of IPv6 addresses uses the textual
+      representation defined in Section 4 of RFC 5952.  The
+      canonical format for the zone index is the numerical
+      format as described in Section 11.2 of RFC 4007.";
+      reference
+        "RFC 4291: IP Version 6 Addressing Architecture
+         RFC 4007: IPv6 Scoped Address Architecture
+         RFC 5952: A Recommendation for IPv6 Address Text
+        	  Representation";
+
+    }
+
+    typedef ip-address-no-zone {
+      type union {
+        type ipv4-address-no-zone;
+        type ipv6-address-no-zone;
+      }
+      description
+        "The ip-address-no-zone type represents an IP address and is
+      IP version neutral.  The format of the textual representation
+      implies the IP version.  This type does not support scoped
+      addresses since it does not allow zone identifiers in the
+      address format.";
+      reference
+        "RFC 4007: IPv6 Scoped Address Architecture";
+
+    }
+
+    typedef ipv4-address-no-zone {
+      type ipv4-address {
+        pattern '[0-9\.]*';
+      }
+      description
+        "An IPv4 address without a zone index.  This type, derived from
+       ipv4-address, may be used in situations where the zone is
+       known from the context and hence no zone index is needed.";
+    }
+
+    typedef ipv6-address-no-zone {
+      type ipv6-address {
+        pattern '[0-9a-fA-F:\.]*';
+      }
+      description
+        "An IPv6 address without a zone index.  This type, derived from
+       ipv6-address, may be used in situations where the zone is
+       known from the context and hence no zone index is needed.";
+      reference
+        "RFC 4291: IP Version 6 Addressing Architecture
+         RFC 4007: IPv6 Scoped Address Architecture
+         RFC 5952: A Recommendation for IPv6 Address Text
+        	  Representation";
+
+    }
+
+    typedef ip-prefix {
+      type union {
+        type ipv4-prefix;
+        type ipv6-prefix;
+      }
+      description
+        "The ip-prefix type represents an IP prefix and is IP
+      version neutral.  The format of the textual representations
+      implies the IP version.";
+    }
+
+    typedef ipv4-prefix {
+      type string {
+        pattern
+          '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))';
+      }
+      description
+        "The ipv4-prefix type represents an IPv4 address prefix.
+      The prefix length is given by the number following the
+      slash character and must be less than or equal to 32.
+
+      A prefix length value of n corresponds to an IP address
+      mask that has n contiguous 1-bits from the most
+      significant bit (MSB) and all other bits set to 0.
+
+      The canonical format of an IPv4 prefix has all bits of
+      the IPv4 address set to zero that are not part of the
+      IPv4 prefix.";
+    }
+
+    typedef ipv6-prefix {
+      type string {
+        pattern
+          '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
+        pattern
+          '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)';
+      }
+      description
+        "The ipv6-prefix type represents an IPv6 address prefix.
+      The prefix length is given by the number following the
+      slash character and must be less than or equal to 128.
+
+      A prefix length value of n corresponds to an IP address
+      mask that has n contiguous 1-bits from the most
+      significant bit (MSB) and all other bits set to 0.
+
+      The IPv6 address should have all bits that do not belong
+      to the prefix set to zero.
+
+      The canonical format of an IPv6 prefix has all bits of
+      the IPv6 address set to zero that are not part of the
+      IPv6 prefix.  Furthermore, the IPv6 address is represented
+      as defined in Section 4 of RFC 5952.";
+      reference
+        "RFC 5952: A Recommendation for IPv6 Address Text
+        	  Representation";
+
+    }
+
+    typedef domain-name {
+      type string {
+        length "1..253";
+        pattern
+          '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)|\.';
+      }
+      description
+        "The domain-name type represents a DNS domain name.  The
+      name SHOULD be fully qualified whenever possible.
+
+      Internet domain names are only loosely specified.  Section
+      3.5 of RFC 1034 recommends a syntax (modified in Section
+      2.1 of RFC 1123).  The pattern above is intended to allow
+      for current practice in domain name use, and some possible
+      future expansion.  It is designed to hold various types of
+      domain names, including names used for A or AAAA records
+      (host names) and other records, such as SRV records.  Note
+      that Internet host names have a stricter syntax (described
+      in RFC 952) than the DNS recommendations in RFCs 1034 and
+      1123, and that systems that want to store host names in
+      schema nodes using the domain-name type are recommended to
+      adhere to this stricter standard to ensure interoperability.
+
+      The encoding of DNS names in the DNS protocol is limited
+      to 255 characters.  Since the encoding consists of labels
+      prefixed by a length bytes and there is a trailing NULL
+      byte, only 253 characters can appear in the textual dotted
+      notation.
+
+      The description clause of schema nodes using the domain-name
+      type MUST describe when and how these names are resolved to
+      IP addresses.  Note that the resolution of a domain-name value
+      may require to query multiple DNS records (e.g., A for IPv4
+      and AAAA for IPv6).  The order of the resolution process and
+      which DNS record takes precedence can either be defined
+      explicitly or may depend on the configuration of the
+      resolver.
+
+      Domain-name values use the US-ASCII encoding.  Their canonical
+      format uses lowercase US-ASCII characters.  Internationalized
+      domain names MUST be A-labels as per RFC 5890.";
+      reference
+        "RFC  952: DoD Internet Host Table Specification
+         RFC 1034: Domain Names - Concepts and Facilities
+         RFC 1123: Requirements for Internet Hosts -- Application
+        	  and Support
+         RFC 2782: A DNS RR for specifying the location of services
+        	  (DNS SRV)
+         RFC 5890: Internationalized Domain Names in Applications
+        	  (IDNA): Definitions and Document Framework";
+
+    }
+
+    typedef host {
+      type union {
+        type ip-address;
+        type domain-name;
+      }
+      description
+        "The host type represents either an IP address or a DNS
+      domain name.";
+    }
+
+    typedef uri {
+      type string;
+      description
+        "The uri type represents a Uniform Resource Identifier
+      (URI) as defined by STD 66.
+
+      Objects using the uri type MUST be in US-ASCII encoding,
+      and MUST be normalized as described by RFC 3986 Sections
+      6.2.1, 6.2.2.1, and 6.2.2.2.  All unnecessary
+      percent-encoding is removed, and all case-insensitive
+      characters are set to lowercase except for hexadecimal
+      digits, which are normalized to uppercase as described in
+      Section 6.2.2.1.
+
+      The purpose of this normalization is to help provide
+      unique URIs.  Note that this normalization is not
+      sufficient to provide uniqueness.  Two URIs that are
+      textually distinct after this normalization may still be
+      equivalent.
+
+      Objects using the uri type may restrict the schemes that
+      they permit.  For example, 'data:' and 'urn:' schemes
+      might not be appropriate.
+
+      A zero-length URI is not a valid URI.  This can be used to
+      express 'URI absent' where required.
+
+      In the value set and its semantics, this type is equivalent
+      to the Uri SMIv2 textual convention defined in RFC 5017.";
+      reference
+        "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
+         RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
+        	  Group: Uniform Resource Identifiers (URIs), URLs,
+        	  and Uniform Resource Names (URNs): Clarifications
+        	  and Recommendations
+         RFC 5017: MIB Textual Conventions for Uniform Resource
+        	  Identifiers (URIs)";
+
+    }
+  }  // module ietf-inet-types
diff --git a/models/openconfig/src/main/yang/comm/ietf-interfaces.yang b/models/openconfig/src/main/yang/comm/ietf-interfaces.yang
new file mode 100644
index 0000000..d02aca2
--- /dev/null
+++ b/models/openconfig/src/main/yang/comm/ietf-interfaces.yang
@@ -0,0 +1,703 @@
+module ietf-interfaces {
+
+     namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces";
+     prefix if;
+
+     import ietf-yang-types {
+       prefix yang;
+     }
+
+     organization
+       "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+     contact
+       "WG Web:   <http://tools.ietf.org/wg/netmod/>
+        WG List:  <mailto:netmod@ietf.org>
+
+        WG Chair: Thomas Nadeau
+                  <mailto:tnadeau@lucidvision.com>
+
+        WG Chair: Juergen Schoenwaelder
+                  <mailto:j.schoenwaelder@jacobs-university.de>
+
+        Editor:   Martin Bjorklund
+                  <mailto:mbj@tail-f.com>";
+
+     description
+       "This module contains a collection of YANG definitions for
+        managing network interfaces.
+
+        Copyright (c) 2014 IETF Trust and the persons identified as
+        authors of the code.  All rights reserved.
+
+        Redistribution and use in source and binary forms, with or
+        without modification, is permitted pursuant to, and subject
+        to the license terms contained in, the Simplified BSD License
+        set forth in Section 4.c of the IETF Trust's Legal Provisions
+        Relating to IETF Documents
+        (http://trustee.ietf.org/license-info).
+
+        This version of this YANG module is part of RFC 7223; see
+        the RFC itself for full legal notices.";
+
+     revision 2014-05-08 {
+       description
+         "Initial revision.";
+       reference
+         "RFC 7223: A YANG Data Model for Interface Management";
+     }
+
+     /*
+      * Typedefs
+      */
+
+     typedef interface-ref {
+       type leafref {
+         path "/if:interfaces/if:interface/if:name";
+       }
+       description
+         "This type is used by data models that need to reference
+          configured interfaces.";
+     }
+
+     typedef interface-state-ref {
+       type leafref {
+         path "/if:interfaces-state/if:interface/if:name";
+       }
+       description
+         "This type is used by data models that need to reference
+          the operationally present interfaces.";
+     }
+
+     /*
+      * Identities
+      */
+
+     identity interface-type {
+       description
+         "Base identity from which specific interface types are
+          derived.";
+     }
+
+     /*
+      * Features
+      */
+
+     feature arbitrary-names {
+       description
+         "This feature indicates that the device allows user-controlled
+          interfaces to be named arbitrarily.";
+     }
+
+
+     feature pre-provisioning {
+       description
+         "This feature indicates that the device supports
+          pre-provisioning of interface configuration, i.e., it is
+          possible to configure an interface whose physical interface
+          hardware is not present on the device.";
+     }
+
+     feature if-mib {
+       description
+         "This feature indicates that the device implements
+          the IF-MIB.";
+       reference
+         "RFC 2863: The Interfaces Group MIB";
+     }
+
+     /*
+      * Configuration data nodes
+      */
+
+     container interfaces {
+       description
+         "Interface configuration parameters.";
+
+       list interface {
+         key "name";
+
+         description
+           "The list of configured interfaces on the device.
+
+            The operational state of an interface is available in the
+            /interfaces-state/interface list.  If the configuration of a
+            system-controlled interface cannot be used by the system
+            (e.g., the interface hardware present does not match the
+            interface type), then the configuration is not applied to
+            the system-controlled interface shown in the
+            /interfaces-state/interface list.  If the configuration
+            of a user-controlled interface cannot be used by the system,
+            the configured interface is not instantiated in the
+            /interfaces-state/interface list.";
+
+        leaf name {
+           type string;
+           description
+             "The name of the interface.
+
+              A device MAY restrict the allowed values for this leaf,
+              possibly depending on the type of the interface.
+
+
+              For system-controlled interfaces, this leaf is the
+              device-specific name of the interface.  The 'config false'
+              list /interfaces-state/interface contains the currently
+              existing interfaces on the device.
+
+              If a client tries to create configuration for a
+              system-controlled interface that is not present in the
+              /interfaces-state/interface list, the server MAY reject
+              the request if the implementation does not support
+              pre-provisioning of interfaces or if the name refers to
+              an interface that can never exist in the system.  A
+              NETCONF server MUST reply with an rpc-error with the
+              error-tag 'invalid-value' in this case.
+
+              If the device supports pre-provisioning of interface
+              configuration, the 'pre-provisioning' feature is
+              advertised.
+
+              If the device allows arbitrarily named user-controlled
+              interfaces, the 'arbitrary-names' feature is advertised.
+
+              When a configured user-controlled interface is created by
+              the system, it is instantiated with the same name in the
+              /interface-state/interface list.";
+         }
+
+         leaf description {
+           type string;
+           description
+             "A textual description of the interface.
+
+              A server implementation MAY map this leaf to the ifAlias
+              MIB object.  Such an implementation needs to use some
+              mechanism to handle the differences in size and characters
+              allowed between this leaf and ifAlias.  The definition of
+              such a mechanism is outside the scope of this document.
+
+              Since ifAlias is defined to be stored in non-volatile
+              storage, the MIB implementation MUST map ifAlias to the
+              value of 'description' in the persistently stored
+              datastore.
+
+              Specifically, if the device supports ':startup', when
+              ifAlias is read the device MUST return the value of
+              'description' in the 'startup' datastore, and when it is
+              written, it MUST be written to the 'running' and 'startup'
+              datastores.  Note that it is up to the implementation to
+
+              decide whether to modify this single leaf in 'startup' or
+              perform an implicit copy-config from 'running' to
+              'startup'.
+
+              If the device does not support ':startup', ifAlias MUST
+              be mapped to the 'description' leaf in the 'running'
+              datastore.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifAlias";
+         }
+
+         leaf type {
+           type identityref {
+             base interface-type;
+           }
+           mandatory true;
+           description
+             "The type of the interface.
+
+              When an interface entry is created, a server MAY
+              initialize the type leaf with a valid value, e.g., if it
+              is possible to derive the type from the name of the
+              interface.
+
+              If a client tries to set the type of an interface to a
+              value that can never be used by the system, e.g., if the
+              type is not supported or if the type does not match the
+              name of the interface, the server MUST reject the request.
+              A NETCONF server MUST reply with an rpc-error with the
+              error-tag 'invalid-value' in this case.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifType";
+         }
+
+         leaf enabled {
+           type boolean;
+           default "true";
+           description
+             "This leaf contains the configured, desired state of the
+              interface.
+
+              Systems that implement the IF-MIB use the value of this
+              leaf in the 'running' datastore to set
+              IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
+              has been initialized, as described in RFC 2863.
+
+              Changes in this leaf in the 'running' datastore are
+              reflected in ifAdminStatus, but if ifAdminStatus is
+              changed over SNMP, this leaf is not affected.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
+         }
+
+         leaf link-up-down-trap-enable {
+           if-feature if-mib;
+           type enumeration {
+             enum enabled {
+               value 1;
+             }
+             enum disabled {
+               value 2;
+             }
+           }
+           description
+             "Controls whether linkUp/linkDown SNMP notifications
+              should be generated for this interface.
+
+              If this node is not configured, the value 'enabled' is
+              operationally used by the server for interfaces that do
+              not operate on top of any other interface (i.e., there are
+              no 'lower-layer-if' entries), and 'disabled' otherwise.";
+           reference
+             "RFC 2863: The Interfaces Group MIB -
+                        ifLinkUpDownTrapEnable";
+         }
+       }
+     }
+
+     /*
+      * Operational state data nodes
+      */
+
+     container interfaces-state {
+       config false;
+       description
+         "Data nodes for the operational state of interfaces.";
+
+       list interface {
+         key "name";
+
+         description
+           "The list of interfaces on the device.
+
+            System-controlled interfaces created by the system are
+            always present in this list, whether they are configured or
+            not.";
+
+         leaf name {
+           type string;
+           description
+             "The name of the interface.
+
+              A server implementation MAY map this leaf to the ifName
+              MIB object.  Such an implementation needs to use some
+              mechanism to handle the differences in size and characters
+              allowed between this leaf and ifName.  The definition of
+              such a mechanism is outside the scope of this document.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifName";
+         }
+
+         leaf type {
+           type identityref {
+             base interface-type;
+           }
+           mandatory true;
+           description
+             "The type of the interface.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifType";
+         }
+
+         leaf admin-status {
+           if-feature if-mib;
+           type enumeration {
+             enum up {
+               value 1;
+               description
+                 "Ready to pass packets.";
+             }
+             enum down {
+               value 2;
+               description
+                 "Not ready to pass packets and not in some test mode.";
+             }
+
+             enum testing {
+               value 3;
+               description
+                 "In some test mode.";
+             }
+           }
+           mandatory true;
+           description
+             "The desired state of the interface.
+
+              This leaf has the same read semantics as ifAdminStatus.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
+         }
+
+         leaf oper-status {
+           type enumeration {
+             enum up {
+               value 1;
+               description
+                 "Ready to pass packets.";
+             }
+             enum down {
+               value 2;
+               description
+                 "The interface does not pass any packets.";
+             }
+             enum testing {
+               value 3;
+               description
+                 "In some test mode.  No operational packets can
+                  be passed.";
+             }
+             enum unknown {
+               value 4;
+               description
+                 "Status cannot be determined for some reason.";
+             }
+             enum dormant {
+               value 5;
+               description
+                 "Waiting for some external event.";
+             }
+             enum not-present {
+               value 6;
+               description
+                 "Some component (typically hardware) is missing.";
+             }
+
+             enum lower-layer-down {
+               value 7;
+               description
+                 "Down due to state of lower-layer interface(s).";
+             }
+           }
+           mandatory true;
+           description
+             "The current operational state of the interface.
+
+              This leaf has the same semantics as ifOperStatus.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifOperStatus";
+         }
+
+         leaf last-change {
+           type yang:date-and-time;
+           description
+             "The time the interface entered its current operational
+              state.  If the current state was entered prior to the
+              last re-initialization of the local network management
+              subsystem, then this node is not present.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifLastChange";
+         }
+
+         leaf if-index {
+           if-feature if-mib;
+           type int32 {
+             range "1..2147483647";
+           }
+           mandatory true;
+           description
+             "The ifIndex value for the ifEntry represented by this
+              interface.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifIndex";
+         }
+
+         leaf phys-address {
+           type yang:phys-address;
+           description
+             "The interface's address at its protocol sub-layer.  For
+              example, for an 802.x interface, this object normally
+              contains a Media Access Control (MAC) address.  The
+              interface's media-specific modules must define the bit
+
+
+              and byte ordering and the format of the value of this
+              object.  For interfaces that do not have such an address
+              (e.g., a serial line), this node is not present.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifPhysAddress";
+         }
+
+         leaf-list higher-layer-if {
+           type interface-state-ref;
+           description
+             "A list of references to interfaces layered on top of this
+              interface.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifStackTable";
+         }
+
+         leaf-list lower-layer-if {
+           type interface-state-ref;
+           description
+             "A list of references to interfaces layered underneath this
+              interface.";
+           reference
+             "RFC 2863: The Interfaces Group MIB - ifStackTable";
+         }
+
+         leaf speed {
+           type yang:gauge64;
+           units "bits/second";
+           description
+               "An estimate of the interface's current bandwidth in bits
+                per second.  For interfaces that do not vary in
+                bandwidth or for those where no accurate estimation can
+                be made, this node should contain the nominal bandwidth.
+                For interfaces that have no concept of bandwidth, this
+                node is not present.";
+           reference
+             "RFC 2863: The Interfaces Group MIB -
+                        ifSpeed, ifHighSpeed";
+         }
+
+
+         container statistics {
+           description
+             "A collection of interface-related statistics objects.";
+
+           leaf discontinuity-time {
+             type yang:date-and-time;
+             mandatory true;
+             description
+               "The time on the most recent occasion at which any one or
+                more of this interface's counters suffered a
+                discontinuity.  If no such discontinuities have occurred
+                since the last re-initialization of the local management
+                subsystem, then this node contains the time the local
+                management subsystem re-initialized itself.";
+           }
+
+           leaf in-octets {
+             type yang:counter64;
+             description
+               "The total number of octets received on the interface,
+                including framing characters.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
+           }
+
+           leaf in-unicast-pkts {
+             type yang:counter64;
+             description
+               "The number of packets, delivered by this sub-layer to a
+                higher (sub-)layer, that were not addressed to a
+                multicast or broadcast address at this sub-layer.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
+           }
+
+           leaf in-broadcast-pkts {
+             type yang:counter64;
+             description
+               "The number of packets, delivered by this sub-layer to a
+                higher (sub-)layer, that were addressed to a broadcast
+                address at this sub-layer.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB -
+                          ifHCInBroadcastPkts";
+           }
+
+           leaf in-multicast-pkts {
+             type yang:counter64;
+             description
+               "The number of packets, delivered by this sub-layer to a
+                higher (sub-)layer, that were addressed to a multicast
+                address at this sub-layer.  For a MAC-layer protocol,
+                this includes both Group and Functional addresses.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB -
+                          ifHCInMulticastPkts";
+           }
+
+           leaf in-discards {
+             type yang:counter32;
+             description
+               "The number of inbound packets that were chosen to be
+                discarded even though no errors had been detected to
+                prevent their being deliverable to a higher-layer
+                protocol.  One possible reason for discarding such a
+                packet could be to free up buffer space.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifInDiscards";
+           }
+
+           leaf in-errors {
+             type yang:counter32;
+             description
+               "For packet-oriented interfaces, the number of inbound
+                packets that contained errors preventing them from being
+                deliverable to a higher-layer protocol.  For character-
+                oriented or fixed-length interfaces, the number of
+                inbound transmission units that contained errors
+                preventing them from being deliverable to a higher-layer
+                protocol.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifInErrors";
+           }
+
+           leaf in-unknown-protos {
+             type yang:counter32;
+             description
+               "For packet-oriented interfaces, the number of packets
+                received via the interface that were discarded because
+                of an unknown or unsupported protocol.  For
+                character-oriented or fixed-length interfaces that
+                support protocol multiplexing, the number of
+                transmission units received via the interface that were
+                discarded because of an unknown or unsupported protocol.
+                For any interface that does not support protocol
+                multiplexing, this counter is not present.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
+           }
+
+           leaf out-octets {
+             type yang:counter64;
+             description
+               "The total number of octets transmitted out of the
+                interface, including framing characters.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
+           }
+
+           leaf out-unicast-pkts {
+             type yang:counter64;
+             description
+               "The total number of packets that higher-level protocols
+                requested be transmitted, and that were not addressed
+                to a multicast or broadcast address at this sub-layer,
+                including those that were discarded or not sent.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
+           }
+
+           leaf out-broadcast-pkts {
+             type yang:counter64;
+             description
+               "The total number of packets that higher-level protocols
+                requested be transmitted, and that were addressed to a
+                broadcast address at this sub-layer, including those
+                that were discarded or not sent.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB -
+                          ifHCOutBroadcastPkts";
+           }
+
+           leaf out-multicast-pkts {
+             type yang:counter64;
+             description
+               "The total number of packets that higher-level protocols
+                requested be transmitted, and that were addressed to a
+                multicast address at this sub-layer, including those
+                that were discarded or not sent.  For a MAC-layer
+                protocol, this includes both Group and Functional
+                addresses.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB -
+                          ifHCOutMulticastPkts";
+           }
+
+           leaf out-discards {
+             type yang:counter32;
+             description
+               "The number of outbound packets that were chosen to be
+                discarded even though no errors had been detected to
+                prevent their being transmitted.  One possible reason
+                for discarding such a packet could be to free up buffer
+                space.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
+           }
+
+           leaf out-errors {
+             type yang:counter32;
+             description
+               "For packet-oriented interfaces, the number of outbound
+                packets that could not be transmitted because of errors.
+                For character-oriented or fixed-length interfaces, the
+                number of outbound transmission units that could not be
+                transmitted because of errors.
+
+                Discontinuities in the value of this counter can occur
+                at re-initialization of the management system, and at
+                other times as indicated by the value of
+                'discontinuity-time'.";
+             reference
+               "RFC 2863: The Interfaces Group MIB - ifOutErrors";
+           }
+         }
+       }
+     }
+   }
diff --git a/models/openconfig/src/main/yang/comm/ietf-yang-types.yang b/models/openconfig/src/main/yang/comm/ietf-yang-types.yang
new file mode 100644
index 0000000..9a543fa
--- /dev/null
+++ b/models/openconfig/src/main/yang/comm/ietf-yang-types.yang
@@ -0,0 +1,490 @@
+  module ietf-yang-types {
+
+    yang-version 1;
+
+    namespace
+      "urn:ietf:params:xml:ns:yang:ietf-yang-types";
+
+    prefix yang;
+
+    organization
+      "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+    contact
+      "WG Web:   <http://tools.ietf.org/wg/netmod/>
+    WG List:  <mailto:netmod@ietf.org>
+
+    WG Chair: David Kessens
+              <mailto:david.kessens@nsn.com>
+
+    WG Chair: Juergen Schoenwaelder
+              <mailto:j.schoenwaelder@jacobs-university.de>
+
+    Editor:   Juergen Schoenwaelder
+              <mailto:j.schoenwaelder@jacobs-university.de>";
+
+    description
+      "This module contains a collection of generally useful derived
+    YANG data types.
+
+    Copyright (c) 2013 IETF Trust and the persons identified as
+    authors of the code.  All rights reserved.
+
+    Redistribution and use in source and binary forms, with or
+    without modification, is permitted pursuant to, and subject
+    to the license terms contained in, the Simplified BSD License
+    set forth in Section 4.c of the IETF Trust's Legal Provisions
+    Relating to IETF Documents
+    (http://trustee.ietf.org/license-info).
+
+    This version of this YANG module is part of RFC 6991; see
+    the RFC itself for full legal notices.";
+
+    revision "2013-07-15" {
+      description
+        "This revision adds the following new data types:
+      - yang-identifier
+      - hex-string
+      - uuid
+      - dotted-quad";
+      reference
+        "RFC 6991: Common YANG Data Types";
+
+    }
+
+    revision "2010-09-24" {
+      description "Initial revision.";
+      reference
+        "RFC 6021: Common YANG Data Types";
+
+    }
+
+
+    typedef counter32 {
+      type uint32;
+      description
+        "The counter32 type represents a non-negative integer
+      that monotonically increases until it reaches a
+      maximum value of 2^32-1 (4294967295 decimal), when it
+      wraps around and starts increasing again from zero.
+
+      Counters have no defined 'initial' value, and thus, a
+      single value of a counter has (in general) no information
+      content.  Discontinuities in the monotonically increasing
+      value normally occur at re-initialization of the
+      management system, and at other times as specified in the
+      description of a schema node using this type.  If such
+      other times can occur, for example, the creation of
+      a schema node of type counter32 at times other than
+      re-initialization, then a corresponding schema node
+      should be defined, with an appropriate type, to indicate
+      the last discontinuity.
+
+      The counter32 type should not be used for configuration
+      schema nodes.  A default statement SHOULD NOT be used in
+      combination with the type counter32.
+
+      In the value set and its semantics, this type is equivalent
+      to the Counter32 type of the SMIv2.";
+      reference
+        "RFC 2578: Structure of Management Information Version 2
+        	  (SMIv2)";
+
+    }
+
+    typedef zero-based-counter32 {
+      type counter32;
+      default "0";
+      description
+        "The zero-based-counter32 type represents a counter32
+      that has the defined 'initial' value zero.
+
+      A schema node of this type will be set to zero (0) on creation
+      and will thereafter increase monotonically until it reaches
+      a maximum value of 2^32-1 (4294967295 decimal), when it
+      wraps around and starts increasing again from zero.
+
+      Provided that an application discovers a new schema node
+      of this type within the minimum time to wrap, it can use the
+      'initial' value as a delta.  It is important for a management
+      station to be aware of this minimum time and the actual time
+      between polls, and to discard data if the actual time is too
+      long or there is no defined minimum time.
+
+      In the value set and its semantics, this type is equivalent
+      to the ZeroBasedCounter32 textual convention of the SMIv2.";
+      reference
+        "RFC 4502: Remote Network Monitoring Management Information
+        	  Base Version 2";
+
+    }
+
+    typedef counter64 {
+      type uint64;
+      description
+        "The counter64 type represents a non-negative integer
+      that monotonically increases until it reaches a
+      maximum value of 2^64-1 (18446744073709551615 decimal),
+      when it wraps around and starts increasing again from zero.
+
+      Counters have no defined 'initial' value, and thus, a
+      single value of a counter has (in general) no information
+      content.  Discontinuities in the monotonically increasing
+      value normally occur at re-initialization of the
+      management system, and at other times as specified in the
+      description of a schema node using this type.  If such
+      other times can occur, for example, the creation of
+      a schema node of type counter64 at times other than
+      re-initialization, then a corresponding schema node
+      should be defined, with an appropriate type, to indicate
+      the last discontinuity.
+
+      The counter64 type should not be used for configuration
+      schema nodes.  A default statement SHOULD NOT be used in
+      combination with the type counter64.
+
+      In the value set and its semantics, this type is equivalent
+      to the Counter64 type of the SMIv2.";
+      reference
+        "RFC 2578: Structure of Management Information Version 2
+        	  (SMIv2)";
+
+    }
+
+    typedef zero-based-counter64 {
+      type counter64;
+      default "0";
+      description
+        "The zero-based-counter64 type represents a counter64 that
+      has the defined 'initial' value zero.
+
+
+
+
+      A schema node of this type will be set to zero (0) on creation
+      and will thereafter increase monotonically until it reaches
+      a maximum value of 2^64-1 (18446744073709551615 decimal),
+      when it wraps around and starts increasing again from zero.
+
+      Provided that an application discovers a new schema node
+      of this type within the minimum time to wrap, it can use the
+      'initial' value as a delta.  It is important for a management
+      station to be aware of this minimum time and the actual time
+      between polls, and to discard data if the actual time is too
+      long or there is no defined minimum time.
+
+      In the value set and its semantics, this type is equivalent
+      to the ZeroBasedCounter64 textual convention of the SMIv2.";
+      reference
+        "RFC 2856: Textual Conventions for Additional High Capacity
+        	  Data Types";
+
+    }
+
+    typedef gauge32 {
+      type uint32;
+      description
+        "The gauge32 type represents a non-negative integer, which
+      may increase or decrease, but shall never exceed a maximum
+      value, nor fall below a minimum value.  The maximum value
+      cannot be greater than 2^32-1 (4294967295 decimal), and
+      the minimum value cannot be smaller than 0.  The value of
+      a gauge32 has its maximum value whenever the information
+      being modeled is greater than or equal to its maximum
+      value, and has its minimum value whenever the information
+      being modeled is smaller than or equal to its minimum value.
+      If the information being modeled subsequently decreases
+      below (increases above) the maximum (minimum) value, the
+      gauge32 also decreases (increases).
+
+      In the value set and its semantics, this type is equivalent
+      to the Gauge32 type of the SMIv2.";
+      reference
+        "RFC 2578: Structure of Management Information Version 2
+        	  (SMIv2)";
+
+    }
+
+    typedef gauge64 {
+      type uint64;
+      description
+        "The gauge64 type represents a non-negative integer, which
+      may increase or decrease, but shall never exceed a maximum
+      value, nor fall below a minimum value.  The maximum value
+      cannot be greater than 2^64-1 (18446744073709551615), and
+      the minimum value cannot be smaller than 0.  The value of
+      a gauge64 has its maximum value whenever the information
+      being modeled is greater than or equal to its maximum
+      value, and has its minimum value whenever the information
+      being modeled is smaller than or equal to its minimum value.
+      If the information being modeled subsequently decreases
+      below (increases above) the maximum (minimum) value, the
+      gauge64 also decreases (increases).
+
+      In the value set and its semantics, this type is equivalent
+      to the CounterBasedGauge64 SMIv2 textual convention defined
+      in RFC 2856";
+      reference
+        "RFC 2856: Textual Conventions for Additional High Capacity
+        	  Data Types";
+
+    }
+
+    typedef object-identifier {
+      type string {
+        pattern
+          '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))(\.(0|([1-9]\d*)))*';
+      }
+      description
+        "The object-identifier type represents administratively
+      assigned names in a registration-hierarchical-name tree.
+
+      Values of this type are denoted as a sequence of numerical
+      non-negative sub-identifier values.  Each sub-identifier
+      value MUST NOT exceed 2^32-1 (4294967295).  Sub-identifiers
+      are separated by single dots and without any intermediate
+      whitespace.
+
+      The ASN.1 standard restricts the value space of the first
+      sub-identifier to 0, 1, or 2.  Furthermore, the value space
+      of the second sub-identifier is restricted to the range
+      0 to 39 if the first sub-identifier is 0 or 1.  Finally,
+      the ASN.1 standard requires that an object identifier
+      has always at least two sub-identifiers.  The pattern
+      captures these restrictions.
+
+      Although the number of sub-identifiers is not limited,
+      module designers should realize that there may be
+      implementations that stick with the SMIv2 limit of 128
+      sub-identifiers.
+
+      This type is a superset of the SMIv2 OBJECT IDENTIFIER type
+      since it is not restricted to 128 sub-identifiers.  Hence,
+      this type SHOULD NOT be used to represent the SMIv2 OBJECT
+      IDENTIFIER type; the object-identifier-128 type SHOULD be
+      used instead.";
+      reference
+        "ISO9834-1: Information technology -- Open Systems
+        Interconnection -- Procedures for the operation of OSI
+        Registration Authorities: General procedures and top
+        arcs of the ASN.1 Object Identifier tree";
+
+    }
+
+    typedef object-identifier-128 {
+      type object-identifier {
+        pattern '\d*(\.\d*){1,127}';
+      }
+      description
+        "This type represents object-identifiers restricted to 128
+      sub-identifiers.
+
+      In the value set and its semantics, this type is equivalent
+      to the OBJECT IDENTIFIER type of the SMIv2.";
+      reference
+        "RFC 2578: Structure of Management Information Version 2
+        	  (SMIv2)";
+
+    }
+
+    typedef yang-identifier {
+      type string {
+        length "1..max";
+        pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*';
+        pattern
+          '.|..|[^xX].*|.[^mM].*|..[^lL].*';
+      }
+      description
+        "A YANG identifier string as defined by the 'identifier'
+       rule in Section 12 of RFC 6020.  An identifier must
+       start with an alphabetic character or an underscore
+       followed by an arbitrary sequence of alphabetic or
+       numeric characters, underscores, hyphens, or dots.
+
+       A YANG identifier MUST NOT start with any possible
+       combination of the lowercase or uppercase character
+       sequence 'xml'.";
+      reference
+        "RFC 6020: YANG - A Data Modeling Language for the Network
+        	  Configuration Protocol (NETCONF)";
+
+    }
+
+    typedef date-and-time {
+      type string {
+        pattern
+          '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[\+\-]\d{2}:\d{2})';
+      }
+      description
+        "The date-and-time type is a profile of the ISO 8601
+      standard for representation of dates and times using the
+      Gregorian calendar.  The profile is defined by the
+      date-time production in Section 5.6 of RFC 3339.
+
+      The date-and-time type is compatible with the dateTime XML
+      schema type with the following notable exceptions:
+
+      (a) The date-and-time type does not allow negative years.
+
+      (b) The date-and-time time-offset -00:00 indicates an unknown
+          time zone (see RFC 3339) while -00:00 and +00:00 and Z
+          all represent the same time zone in dateTime.
+
+      (c) The canonical format (see below) of data-and-time values
+          differs from the canonical format used by the dateTime XML
+          schema type, which requires all times to be in UTC using
+          the time-offset 'Z'.
+
+      This type is not equivalent to the DateAndTime textual
+      convention of the SMIv2 since RFC 3339 uses a different
+      separator between full-date and full-time and provides
+      higher resolution of time-secfrac.
+
+      The canonical format for date-and-time values with a known time
+      zone uses a numeric time zone offset that is calculated using
+      the device's configured known offset to UTC time.  A change of
+      the device's offset to UTC time will cause date-and-time values
+      to change accordingly.  Such changes might happen periodically
+      in case a server follows automatically daylight saving time
+      (DST) time zone offset changes.  The canonical format for
+      date-and-time values with an unknown time zone (usually
+      referring to the notion of local time) uses the time-offset
+      -00:00.";
+      reference
+        "RFC 3339: Date and Time on the Internet: Timestamps
+         RFC 2579: Textual Conventions for SMIv2
+        XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
+
+    }
+
+    typedef timeticks {
+      type uint32;
+      description
+        "The timeticks type represents a non-negative integer that
+      represents the time, modulo 2^32 (4294967296 decimal), in
+      hundredths of a second between two epochs.  When a schema
+      node is defined that uses this type, the description of
+      the schema node identifies both of the reference epochs.
+
+      In the value set and its semantics, this type is equivalent
+      to the TimeTicks type of the SMIv2.";
+      reference
+        "RFC 2578: Structure of Management Information Version 2
+        	  (SMIv2)";
+
+    }
+
+    typedef timestamp {
+      type timeticks;
+      description
+        "The timestamp type represents the value of an associated
+      timeticks schema node at which a specific occurrence
+      happened.  The specific occurrence must be defined in the
+      description of any schema node defined using this type.  When
+      the specific occurrence occurred prior to the last time the
+      associated timeticks attribute was zero, then the timestamp
+      value is zero.  Note that this requires all timestamp values
+      to be reset to zero when the value of the associated timeticks
+      attribute reaches 497+ days and wraps around to zero.
+
+      The associated timeticks schema node must be specified
+      in the description of any schema node using this type.
+
+      In the value set and its semantics, this type is equivalent
+      to the TimeStamp textual convention of the SMIv2.";
+      reference
+        "RFC 2579: Textual Conventions for SMIv2";
+
+    }
+
+    typedef phys-address {
+      type string {
+        pattern
+          '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
+      }
+      description
+        "Represents media- or physical-level addresses represented
+      as a sequence octets, each octet represented by two hexadecimal
+      numbers.  Octets are separated by colons.  The canonical
+      representation uses lowercase characters.
+
+      In the value set and its semantics, this type is equivalent
+      to the PhysAddress textual convention of the SMIv2.";
+      reference
+        "RFC 2579: Textual Conventions for SMIv2";
+
+    }
+
+    typedef mac-address {
+      type string {
+        pattern
+          '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
+      }
+      description
+        "The mac-address type represents an IEEE 802 MAC address.
+      The canonical representation uses lowercase characters.
+
+      In the value set and its semantics, this type is equivalent
+      to the MacAddress textual convention of the SMIv2.";
+      reference
+        "IEEE 802: IEEE Standard for Local and Metropolitan Area
+        	  Networks: Overview and Architecture
+         RFC 2579: Textual Conventions for SMIv2";
+
+    }
+
+    typedef xpath1.0 {
+      type string;
+      description
+        "This type represents an XPATH 1.0 expression.
+
+      When a schema node is defined that uses this type, the
+      description of the schema node MUST specify the XPath
+      context in which the XPath expression is evaluated.";
+      reference
+        "XPATH: XML Path Language (XPath) Version 1.0";
+
+    }
+
+    typedef hex-string {
+      type string {
+        pattern
+          '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
+      }
+      description
+        "A hexadecimal string with octets represented as hex digits
+      separated by colons.  The canonical representation uses
+      lowercase characters.";
+    }
+
+    typedef uuid {
+      type string {
+        pattern
+          '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}';
+      }
+      description
+        "A Universally Unique IDentifier in the string representation
+      defined in RFC 4122.  The canonical representation uses
+      lowercase characters.
+
+      The following is an example of a UUID in string representation:
+      f81d4fae-7dec-11d0-a765-00a0c91e6bf6
+      ";
+      reference
+        "RFC 4122: A Universally Unique IDentifier (UUID) URN
+        	  Namespace";
+
+    }
+
+    typedef dotted-quad {
+      type string {
+        pattern
+          '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
+      }
+      description
+        "An unsigned 32-bit number expressed in the dotted-quad
+       notation, i.e., four octets written as decimal numbers
+       and separated with the '.' (full stop) character.";
+    }
+  }  // module ietf-yang-types
+
diff --git a/models/openconfig/src/main/yang/interfaces/openconfig-if-aggregate.yang b/models/openconfig/src/main/yang/interfaces/openconfig-if-aggregate.yang
new file mode 100644
index 0000000..8115652
--- /dev/null
+++ b/models/openconfig/src/main/yang/interfaces/openconfig-if-aggregate.yang
@@ -0,0 +1,200 @@
+module openconfig-if-aggregate {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/interfaces/aggregate";
+
+  prefix "oc-lag";
+
+  // import some basic types
+  import openconfig-interfaces { prefix oc-if; }
+  import openconfig-if-ethernet { prefix oc-eth; }
+  import iana-if-type { prefix ift; }
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "Model for managing aggregated (aka bundle, LAG) interfaces.";
+
+  oc-ext:openconfig-version "2.0.0";
+
+  revision "2017-07-14" {
+    description
+      "Added Ethernet/IP state data; Add dhcp-client;
+      migrate to OpenConfig types modules; Removed or
+      renamed opstate values";
+    reference "2.0.0";
+  }
+
+  revision "2016-12-22" {
+    description
+      "Fixes to Ethernet interfaces model";
+    reference "1.1.0";
+  }
+
+  // extension statements
+
+  // feature statements
+
+  // identity statements
+
+  // typedef statements
+
+
+
+  typedef aggregation-type {
+    type enumeration {
+      enum LACP {
+        description "LAG managed by LACP";
+      }
+      enum STATIC {
+        description "Statically configured bundle / LAG";
+      }
+    }
+    description
+      "Type to define the lag-type, i.e., how the LAG is
+      defined and managed";
+  }
+
+  // grouping statements
+
+
+  grouping aggregation-logical-config {
+    description
+      "Configuration data for aggregate interfaces";
+
+
+    leaf lag-type {
+      type aggregation-type;
+      description
+        "Sets the type of LAG, i.e., how it is
+        configured / maintained";
+    }
+
+    leaf min-links {
+      type uint16;
+      description
+        "Specifies the mininum number of member
+        interfaces that must be active for the aggregate interface
+        to be available";
+    }
+  }
+
+  grouping aggregation-logical-state {
+    description
+      "Operational state data for aggregate interfaces";
+
+    leaf lag-speed {
+      type uint32;
+      units Mbps;
+      description
+        "Reports effective speed of the aggregate interface,
+        based on speed of active member interfaces";
+    }
+
+    leaf-list member {
+      when "oc-lag:lag-type = 'STATIC'" {
+        description
+          "The simple list of member interfaces is active
+          when the aggregate is statically configured";
+      }
+      type oc-if:base-interface-ref;
+      description
+        "List of current member interfaces for the aggregate,
+        expressed as references to existing interfaces";
+    }
+  }
+
+  grouping aggregation-logical-top {
+    description "Top-level data definitions for LAGs";
+
+    container aggregation {
+
+      description
+        "Options for logical interfaces representing
+        aggregates";
+
+      container config {
+        description
+          "Configuration variables for logical aggregate /
+          LAG interfaces";
+
+        uses aggregation-logical-config;
+      }
+
+      container state {
+
+        config false;
+        description
+          "Operational state variables for logical
+          aggregate / LAG interfaces";
+
+        uses aggregation-logical-config;
+        uses aggregation-logical-state;
+
+      }
+    }
+  }
+
+  grouping ethernet-if-aggregation-config {
+    description
+      "Adds configuration items for Ethernet interfaces
+      belonging to a logical aggregate / LAG";
+
+    leaf aggregate-id {
+      type leafref {
+        path "/oc-if:interfaces/oc-if:interface/oc-if:name";
+      }
+      description
+        "Specify the logical aggregate interface to which
+        this interface belongs";
+    }
+  }
+
+  // data definition statements
+
+  // augment statements
+
+  augment "/oc-if:interfaces/oc-if:interface" {
+    when "oc-if:type = 'ift:ieee8023adLag'" {
+      description "active when the interface is set to type LAG";
+    }
+    description "Adds LAG configuration to the interface module";
+
+    uses aggregation-logical-top;
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" +
+    "oc-eth:config" {
+    when "oc-if:type = 'ift:ethernetCsmacd'" {
+      description "active when the interface is Ethernet";
+    }
+    description "Adds LAG settings to individual Ethernet
+    interfaces";
+
+    uses ethernet-if-aggregation-config;
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-eth:ethernet/" +
+    "oc-eth:state" {
+    when "oc-if:type = 'ift:ethernetCsmacd'" {
+      description "active when the interface is Ethernet";
+    }
+    description "Adds LAG settings to individual Ethernet
+    interfaces";
+
+    uses ethernet-if-aggregation-config;
+  }
+
+  // rpc statements
+
+  // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/interfaces/openconfig-if-ethernet.yang b/models/openconfig/src/main/yang/interfaces/openconfig-if-ethernet.yang
new file mode 100644
index 0000000..0a3c2e8
--- /dev/null
+++ b/models/openconfig/src/main/yang/interfaces/openconfig-if-ethernet.yang
@@ -0,0 +1,345 @@
+module openconfig-if-ethernet {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/interfaces/ethernet";
+
+  prefix "oc-eth";
+
+  // import some basic types
+  import openconfig-interfaces { prefix oc-if; }
+  import iana-if-type { prefix ift; }
+  import openconfig-yang-types { prefix oc-yang; }
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "Model for managing Ethernet interfaces -- augments the IETF YANG
+    model for interfaces described by RFC 7223";
+
+  oc-ext:openconfig-version "2.0.0";
+
+  revision "2017-07-14" {
+    description
+      "Added Ethernet/IP state data; Add dhcp-client;
+      migrate to OpenConfig types modules; Removed or
+      renamed opstate values";
+    reference "2.0.0";
+  }
+
+  revision "2016-12-22" {
+    description
+      "Fixes to Ethernet interfaces model";
+    reference "1.1.0";
+  }
+
+  // extension statements
+
+  // feature statements
+
+  // identity statements
+
+  identity ETHERNET_SPEED {
+    description "base type to specify available Ethernet link
+    speeds";
+  }
+
+  identity SPEED_10MB {
+    base ETHERNET_SPEED;
+    description "10 Mbps Ethernet";
+  }
+
+  identity SPEED_100MB {
+    base ETHERNET_SPEED;
+    description "100 Mbps Ethernet";
+  }
+
+  identity SPEED_1GB {
+    base ETHERNET_SPEED;
+    description "1 GBps Ethernet";
+  }
+
+  identity SPEED_10GB {
+    base ETHERNET_SPEED;
+    description "10 GBps Ethernet";
+  }
+
+  identity SPEED_25GB {
+    base ETHERNET_SPEED;
+    description "25 GBps Ethernet";
+  }
+
+  identity SPEED_40GB {
+    base ETHERNET_SPEED;
+    description "40 GBps Ethernet";
+  }
+
+  identity SPEED_50GB {
+    base ETHERNET_SPEED;
+    description "50 GBps Ethernet";
+  }
+
+  identity SPEED_100GB {
+    base ETHERNET_SPEED;
+    description "100 GBps Ethernet";
+  }
+
+  identity SPEED_UNKNOWN {
+    base ETHERNET_SPEED;
+    description
+      "Interface speed is unknown.  Systems may report
+      speed UNKNOWN when an interface is down or unpopuplated (e.g.,
+      pluggable not present).";
+  }
+
+  // typedef statements
+
+
+  // grouping statements
+
+  grouping ethernet-interface-config {
+    description "Configuration items for Ethernet interfaces";
+
+    leaf mac-address {
+      type oc-yang:mac-address;
+      description
+        "Assigns a MAC address to the Ethernet interface.  If not
+        specified, the corresponding operational state leaf is
+        expected to show the system-assigned MAC address.";
+    }
+
+    leaf auto-negotiate {
+      type boolean;
+      default true;
+      description
+        "Set to TRUE to request the interface to auto-negotiate
+        transmission parameters with its peer interface.  When
+        set to FALSE, the transmission parameters are specified
+        manually.";
+      reference
+        "IEEE 802.3-2012 auto-negotiation transmission parameters";
+    }
+
+    leaf duplex-mode {
+      type enumeration {
+        enum FULL {
+          description "Full duplex mode";
+        }
+        enum HALF {
+          description "Half duplex mode";
+        }
+      }
+      description
+        "When auto-negotiate is TRUE, this optionally sets the
+        duplex mode that will be advertised to the peer.  If
+        unspecified, the interface should negotiate the duplex mode
+        directly (typically full-duplex).  When auto-negotiate is
+        FALSE, this sets the duplex mode on the interface directly.";
+    }
+
+    leaf port-speed {
+      type identityref {
+        base ETHERNET_SPEED;
+      }
+      description
+        "When auto-negotiate is TRUE, this optionally sets the
+        port-speed mode that will be advertised to the peer for
+        negotiation.  If unspecified, it is expected that the
+        interface will select the highest speed available based on
+        negotiation.  When auto-negotiate is set to FALSE, sets the
+        link speed to a fixed value -- supported values are defined
+        by ETHERNET_SPEED identities";
+    }
+
+    leaf enable-flow-control {
+      type boolean;
+      default false;
+      description
+        "Enable or disable flow control for this interface.
+        Ethernet flow control is a mechanism by which a receiver
+        may send PAUSE frames to a sender to stop transmission for
+        a specified time.
+
+        This setting should override auto-negotiated flow control
+        settings.  If left unspecified, and auto-negotiate is TRUE,
+        flow control mode is negotiated with the peer interface.";
+      reference
+        "IEEE 802.3x";
+    }
+  }
+
+  grouping ethernet-interface-state-counters {
+    description
+      "Ethernet-specific counters and statistics";
+
+    // ingress counters
+
+    leaf in-mac-control-frames {
+      type oc-yang:counter64;
+      description
+        "MAC layer control frames received on the interface";
+    }
+
+    leaf in-mac-pause-frames {
+      type oc-yang:counter64;
+      description
+        "MAC layer PAUSE frames received on the interface";
+    }
+
+    leaf in-oversize-frames {
+      type oc-yang:counter64;
+      description
+        "Number of oversize frames received on the interface";
+    }
+
+    leaf in-jabber-frames {
+      type oc-yang:counter64;
+      description
+        "Number of jabber frames received on the
+        interface.  Jabber frames are typically defined as oversize
+        frames which also have a bad CRC.  Implementations may use
+        slightly different definitions of what constitutes a jabber
+        frame.  Often indicative of a NIC hardware problem.";
+    }
+
+    leaf in-fragment-frames {
+      type oc-yang:counter64;
+      description
+        "Number of fragment frames received on the interface.";
+    }
+
+    leaf in-8021q-frames {
+      type oc-yang:counter64;
+      description
+        "Number of 802.1q tagged frames received on the interface";
+    }
+
+    leaf in-crc-errors {
+      type oc-yang:counter64;
+      description
+        "Number of receive error events due to FCS/CRC check
+        failure";
+    }
+
+    // egress counters
+
+    leaf out-mac-control-frames {
+      type oc-yang:counter64;
+      description
+        "MAC layer control frames sent on the interface";
+    }
+
+    leaf out-mac-pause-frames {
+      type oc-yang:counter64;
+      description
+        "MAC layer PAUSE frames sent on the interface";
+    }
+
+    leaf out-8021q-frames {
+      type oc-yang:counter64;
+      description
+        "Number of 802.1q tagged frames sent on the interface";
+    }
+  }
+
+  grouping ethernet-interface-state {
+    description
+      "Grouping for defining Ethernet-specific operational state";
+
+    leaf hw-mac-address {
+      type oc-yang:mac-address;
+      description
+        "Represenets the 'burned-in',  or system-assigned, MAC
+        address for the Ethernet interface.";
+    }
+
+    leaf negotiated-duplex-mode {
+      type enumeration {
+        enum FULL {
+          description "Full duplex mode";
+        }
+        enum HALF {
+          description "Half duplex mode";
+        }
+      }
+      description
+        "When auto-negotiate is set to TRUE, and the interface has
+        completed auto-negotiation with the remote peer, this value
+        shows the duplex mode that has been negotiated.";
+    }
+
+    leaf negotiated-port-speed {
+      type identityref {
+        base ETHERNET_SPEED;
+      }
+      description
+        "When auto-negotiate is set to TRUE, and the interface has
+        completed auto-negotiation with the remote peer, this value
+        shows the interface speed that has been negotiated.";
+    }
+
+    container counters {
+      description "Ethernet interface counters";
+
+      uses ethernet-interface-state-counters;
+
+    }
+
+  }
+
+  // data definition statements
+
+  grouping ethernet-top {
+    description "top-level Ethernet config and state containers";
+
+    container ethernet {
+      description
+        "Top-level container for ethernet configuration
+        and state";
+
+      container config {
+        description "Configuration data for ethernet interfaces";
+
+        uses ethernet-interface-config;
+
+      }
+
+      container state {
+
+        config false;
+        description "State variables for Ethernet interfaces";
+
+        uses ethernet-interface-config;
+        uses ethernet-interface-state;
+
+      }
+
+    }
+  }
+
+  // augment statements
+
+  augment "/oc-if:interfaces/oc-if:interface" {
+    description "Adds addtional Ethernet-specific configuration to
+    interfaces model";
+
+    uses ethernet-top {
+      when "oc-if:state/oc-if:type = 'ift:ethernetCsmacd'" {
+      description "Additional interface configuration parameters when
+      the interface type is Ethernet";
+      }
+    }
+  }
+
+  // rpc statements
+
+  // notification statements
+
+}
diff --git a/models/openconfig/src/main/yang/interfaces/openconfig-if-ip-ext.yang b/models/openconfig/src/main/yang/interfaces/openconfig-if-ip-ext.yang
new file mode 100644
index 0000000..558b0de
--- /dev/null
+++ b/models/openconfig/src/main/yang/interfaces/openconfig-if-ip-ext.yang
@@ -0,0 +1,157 @@
+module openconfig-if-ip-ext {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/interfaces/ip-ext";
+
+  prefix "oc-ip-ext";
+
+  import openconfig-interfaces { prefix oc-if; }
+  import openconfig-if-ip { prefix oc-ip; }
+  import openconfig-extensions { prefix oc-ext; }
+
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module adds extensions to the base IP configuration and
+    operational state model to support additional use cases.";
+
+  oc-ext:openconfig-version "2.0.0";
+
+  revision "2017-07-14" {
+    description
+      "Added Ethernet/IP state data; Add dhcp-client;
+      migrate to OpenConfig types modules; Removed or
+      renamed opstate values";
+    reference "2.0.0";
+  }
+
+  revision "2016-12-22" {
+    description
+      "Fixes to Ethernet interfaces model";
+    reference "1.1.0";
+  }
+
+
+  // grouping statements
+
+  grouping ipv6-autoconf-config {
+    description
+      "Configuration data for IPv6 address autoconfiguration";
+
+    leaf create-global-addresses {
+      type boolean;
+      default true;
+      description
+        "[adapted from IETF IP model RFC 7277]
+
+        If enabled, the host creates global addresses as
+        described in RFC 4862.";
+      reference
+        "RFC 4862: IPv6 Stateless Address Autoconfiguration
+                  Section 5.5";
+    }
+    leaf create-temporary-addresses {
+      type boolean;
+      default false;
+      description
+      "[adapted from IETF IP model RFC 7277]
+
+      If enabled, the host creates temporary addresses as
+      described in RFC 4941.";
+      reference
+        "RFC 4941: Privacy Extensions for Stateless Address
+                  Autoconfiguration in IPv6";
+    }
+
+    leaf temporary-valid-lifetime {
+      type uint32;
+      units "seconds";
+      default 604800;
+      description
+        "[adapted from IETF IP model RFC 7277]
+
+        The time period during which the temporary address
+        is valid.";
+      reference
+        "RFC 4941: Privacy Extensions for Stateless Address
+                  Autoconfiguration in IPv6
+                  - TEMP_VALID_LIFETIME";
+    }
+
+    leaf temporary-preferred-lifetime {
+      type uint32;
+      units "seconds";
+      default 86400;
+      description
+        "[adapted from IETF IP model RFC 7277]
+
+        The time period during which the temporary address is
+        preferred.";
+      reference
+        "RFC 4941: Privacy Extensions for Stateless Address
+                  Autoconfiguration in IPv6
+                  - TEMP_PREFERRED_LIFETIME";
+    }
+  }
+
+  grouping ipv6-autoconf-state {
+    description
+      "Operational state data for IPv6 address autoconfiguration";
+
+    //TODO: placeholder for additional opstate for IPv6 autoconf
+  }
+
+  grouping ipv6-autoconf-top {
+    description
+      "Top-level grouping for IPv6 address autoconfiguration";
+
+    container autoconf {
+      description
+        "Top-level container for IPv6 autoconf";
+
+      container config {
+        description
+          "[adapted from IETF IP model RFC 7277]
+
+          Parameters to control the autoconfiguration of IPv6
+          addresses, as described in RFC 4862.";
+        reference
+          "RFC 4862: IPv6 Stateless Address Autoconfiguration";
+
+        uses ipv6-autoconf-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data ";
+
+        uses ipv6-autoconf-config;
+        uses ipv6-autoconf-state;
+      }
+    }
+  }
+
+  // data definition statements
+
+  // augment statements
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+    "oc-if:subinterface/oc-ip:ipv6" {
+      description
+        "Adds address autoconfiguration to the base IP model";
+
+      uses ipv6-autoconf-top;
+    }
+
+}
\ No newline at end of file
diff --git a/models/openconfig/src/main/yang/interfaces/openconfig-if-ip.yang b/models/openconfig/src/main/yang/interfaces/openconfig-if-ip.yang
new file mode 100644
index 0000000..cc291de
--- /dev/null
+++ b/models/openconfig/src/main/yang/interfaces/openconfig-if-ip.yang
@@ -0,0 +1,1191 @@
+module openconfig-if-ip {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/interfaces/ip";
+
+  prefix "oc-ip";
+
+  // import some basic types
+  import openconfig-inet-types { prefix oc-inet; }
+  import openconfig-interfaces { prefix oc-if; }
+  import openconfig-vlan { prefix oc-vlan; }
+  import openconfig-yang-types { prefix oc-yang; }
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This model defines data for managing configuration and
+    operational state on IP (IPv4 and IPv6) interfaces.
+
+    This model reuses data items defined in the IETF YANG model for
+    interfaces described by RFC 7277 with an alternate structure
+    (particularly for operational state data) and with
+    additional configuration items.
+
+    Portions of this code were derived from IETF RFC 7277.
+    Please reproduce this note if possible.
+
+    IETF code is subject to the following copyright and license:
+    Copyright (c) IETF Trust and the persons identified as authors of
+    the code.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, is permitted pursuant to, and subject to the license
+    terms contained in, the Simplified BSD License set forth in
+    Section 4.c of the IETF Trust's Legal Provisions Relating
+    to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  oc-ext:openconfig-version "2.0.0";
+
+  revision "2017-07-14" {
+    description
+      "Added Ethernet/IP state data; Add dhcp-client;
+      migrate to OpenConfig types modules; Removed or
+      renamed opstate values";
+    reference "2.0.0";
+  }
+
+  revision "2017-04-03"{
+    description
+      "Update copyright notice.";
+    reference "1.1.1";
+  }
+
+  revision "2016-12-22" {
+    description
+      "Fixes to Ethernet interfaces model";
+    reference "1.1.0";
+  }
+
+
+  // typedef statements
+
+  typedef ip-address-origin {
+    type enumeration {
+      enum OTHER {
+        description
+          "None of the following.";
+        }
+      enum STATIC {
+        description
+          "Indicates that the address has been statically
+          configured - for example, using NETCONF or a Command Line
+          Interface.";
+      }
+      enum DHCP {
+        description
+          "Indicates an address that has been assigned to this
+          system by a DHCP server.";
+      }
+      enum LINK_LAYER {
+        description
+          "Indicates an address created by IPv6 stateless
+          autoconfiguration that embeds a link-layer address in its
+          interface identifier.";
+      }
+      enum RANDOM {
+        description
+          "Indicates an address chosen by the system at
+          random, e.g., an IPv4 address within 169.254/16, an
+          RFC 4941 temporary address, or an RFC 7217 semantically
+          opaque address.";
+        reference
+          "RFC 4941: Privacy Extensions for Stateless Address
+                    Autoconfiguration in IPv6
+          RFC 7217: A Method for Generating Semantically Opaque
+                    Interface Identifiers with IPv6 Stateless
+                    Address Autoconfiguration (SLAAC)";
+      }
+    }
+    description
+     "The origin of an address.";
+  }
+
+  typedef neighbor-origin {
+    type enumeration {
+      enum OTHER {
+       description
+         "None of the following.";
+      }
+      enum STATIC {
+       description
+         "Indicates that the mapping has been statically
+          configured - for example, using NETCONF or a Command Line
+          Interface.";
+      }
+      enum DYNAMIC {
+       description
+        "Indicates that the mapping has been dynamically resolved
+        using, e.g., IPv4 ARP or the IPv6 Neighbor Discovery
+        protocol.";
+      }
+    }
+    description
+      "The origin of a neighbor entry.";
+  }
+
+  // grouping statements
+
+  grouping ip-common-global-config {
+    description
+      "Shared configuration data for IPv4 or IPv6 assigned
+      globally on an interface.";
+
+    leaf dhcp-client {
+      type boolean;
+      default false;
+      description
+        "Enables a DHCP client on the interface in order to request
+        an address";
+    }
+  }
+
+  grouping ip-common-counters-state {
+    description
+      "Operational state for IP traffic statistics for IPv4 and
+      IPv6";
+
+    container counters {
+      description
+        "Packet and byte counters for IP transmission and
+        reception for the address family.";
+
+
+      leaf in-pkts {
+        type oc-yang:counter64;
+        description
+          "The total number of IP packets received for the specified
+          address family, including those received in error";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf in-octets {
+        type oc-yang:counter64;
+        description
+          "The total number of octets received in input IP packets
+          for the specified address family, including those received
+          in error.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf in-error-pkts {
+        // TODO: this counter combines several error conditions --
+        // could consider breaking them out to separate leaf nodes
+        type oc-yang:counter64;
+        description
+          "Number of IP packets discarded due to errors for the
+          specified address family, including errors in the IP
+          header, no route found to the IP destination, invalid
+          address, unknown protocol, etc.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf in-forwarded-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of input packets for which the device was not
+          their final IP destination and for which the device
+          attempted to find a route to forward them to that final
+          destination.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf in-forwarded-octets {
+        type oc-yang:counter64;
+        description
+          "The number of octets received in input IP packets
+          for the specified address family for which the device was
+          not their final IP destination and for which the
+          device attempted to find a route to forward them to that
+          final destination.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf in-discarded-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of input IP packets for the
+          specified address family, for which no problems were
+          encountered to prevent their continued processing, but
+          were discarded (e.g., for lack of buffer space).";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf out-pkts {
+        type oc-yang:counter64;
+        description
+          "The total number of IP packets for the
+          specified address family that the device supplied
+          to the lower layers for transmission.  This includes
+          packets generated locally and those forwarded by the
+          device.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf out-octets {
+        type oc-yang:counter64;
+        description
+          "The total number of octets in IP packets for the
+          specified address family that the device
+          supplied to the lower layers for transmission.  This
+          includes packets generated locally and those forwarded by
+          the device.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf out-error-pkts {
+        // TODO: this counter combines several error conditions --
+        // could consider breaking them out to separate leaf nodes
+        type oc-yang:counter64;
+        description
+          "Number of IP packets for the specified address family
+          locally generated and discarded due to errors, including
+          no route found to the IP destination.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf out-forwarded-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of packets for which this entity was not their
+          final IP destination and for which it was successful in
+          finding a path to their final destination.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf out-forwarded-octets {
+        type oc-yang:counter64;
+        description
+          "The number of octets in packets for which this entity was
+          not their final IP destination and for which it was
+          successful in finding a path to their final destination.";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+
+      leaf out-discarded-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of output IP packets for the
+          specified address family for which no problem was
+          encountered to prevent their transmission to their
+          destination, but were discarded (e.g., for lack of
+          buffer space).";
+        reference
+          "RFC 4293 - Management Information Base for the
+          Internet Protocol (IP)";
+      }
+    }
+
+  }
+
+
+
+  grouping ipv4-global-config {
+    description
+      "Configuration data for IPv4 interfaces across
+      all addresses assigned to the interface";
+
+    leaf enabled {
+     type boolean;
+     default true;
+     description
+       "Controls whether IPv4 is enabled or disabled on this
+        interface.  When IPv4 is enabled, this interface is
+        connected to an IPv4 stack, and the interface can send
+        and receive IPv4 packets.";
+    }
+
+    leaf mtu {
+     type uint16 {
+       range "68..max";
+     }
+     units octets;
+     description
+       "The size, in octets, of the largest IPv4 packet that the
+        interface will send and receive.
+
+        The server may restrict the allowed values for this leaf,
+        depending on the interface's type.
+
+        If this leaf is not configured, the operationally used MTU
+        depends on the interface's type.";
+     reference
+       "RFC 791: Internet Protocol";
+    }
+
+    uses ip-common-global-config;
+
+
+  }
+
+  grouping ipv4-address-config {
+
+    description
+      "Per IPv4 adresss configuration data for the
+      interface.";
+
+    leaf ip {
+       type oc-inet:ipv4-address;
+       description
+        "The IPv4 address on the interface.";
+    }
+
+    leaf prefix-length {
+      type uint8 {
+       range "0..32";
+      }
+      description
+       "The length of the subnet prefix.";
+    }
+  }
+
+  grouping ipv4-neighbor-config {
+    description
+      "Per IPv4 neighbor configuration data. Neighbor
+      entries are analagous to static ARP entries, i.e., they
+      create a correspondence between IP and link-layer addresses";
+
+    leaf ip {
+     type oc-inet:ipv4-address;
+     description
+       "The IPv4 address of the neighbor node.";
+    }
+    leaf link-layer-address {
+     type oc-yang:phys-address;
+     mandatory true;
+     description
+       "The link-layer address of the neighbor node.";
+    }
+  }
+
+  grouping ipv4-address-state {
+    description
+      "State variables for IPv4 addresses on the interface";
+
+    leaf origin {
+      type ip-address-origin;
+      description
+       "The origin of this address, e.g., statically configured,
+       assigned by DHCP, etc..";
+    }
+  }
+
+  grouping ipv4-neighbor-state {
+    description
+      "State variables for IPv4 neighbor entries on the interface.";
+
+    leaf origin {
+      type neighbor-origin;
+      description
+        "The origin of this neighbor entry, static or dynamic.";
+    }
+  }
+
+  grouping ipv6-global-config {
+    description
+      "Configuration data at the global level for each
+      IPv6 interface";
+
+    leaf enabled {
+      type boolean;
+      default true;
+      description
+        "Controls whether IPv6 is enabled or disabled on this
+        interface.  When IPv6 is enabled, this interface is
+        connected to an IPv6 stack, and the interface can send
+        and receive IPv6 packets.";
+    }
+
+    leaf mtu {
+      type uint32 {
+       range "1280..max";
+      }
+      units octets;
+      description
+        "The size, in octets, of the largest IPv6 packet that the
+        interface will send and receive.
+
+        The server may restrict the allowed values for this leaf,
+        depending on the interface's type.
+
+        If this leaf is not configured, the operationally used MTU
+        depends on the interface's type.";
+      reference
+        "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
+                  Section 5";
+    }
+
+    leaf dup-addr-detect-transmits {
+      type uint32;
+      default 1;
+      description
+        "The number of consecutive Neighbor Solicitation messages
+        sent while performing Duplicate Address Detection on a
+        tentative address.  A value of zero indicates that
+        Duplicate Address Detection is not performed on
+        tentative addresses.  A value of one indicates a single
+        transmission with no follow-up retransmissions.";
+      reference
+        "RFC 4862: IPv6 Stateless Address Autoconfiguration";
+    }
+
+    uses ip-common-global-config;
+  }
+
+  grouping ipv6-address-config {
+    description "Per-address configuration data for IPv6 interfaces";
+
+    leaf ip {
+      type oc-inet:ipv6-address;
+      description
+        "The IPv6 address on the interface.";
+    }
+
+    leaf prefix-length {
+      type uint8 {
+        range "0..128";
+      }
+      mandatory true;
+      description
+        "The length of the subnet prefix.";
+    }
+  }
+
+  grouping ipv6-address-state {
+    description
+      "Per-address operational state data for IPv6 interfaces";
+
+    leaf origin {
+      type ip-address-origin;
+      description
+        "The origin of this address, e.g., static, dhcp, etc.";
+    }
+
+    leaf status {
+      type enumeration {
+        enum PREFERRED {
+          description
+            "This is a valid address that can appear as the
+            destination or source address of a packet.";
+        }
+        enum DEPRECATED {
+          description
+            "This is a valid but deprecated address that should
+            no longer be used as a source address in new
+            communications, but packets addressed to such an
+            address are processed as expected.";
+        }
+        enum INVALID {
+          description
+            "This isn't a valid address, and it shouldn't appear
+            as the destination or source address of a packet.";
+        }
+        enum INACCESSIBLE {
+          description
+            "The address is not accessible because the interface
+            to which this address is assigned is not
+            operational.";
+        }
+        enum UNKNOWN {
+          description
+            "The status cannot be determined for some reason.";
+        }
+        enum TENTATIVE {
+          description
+            "The uniqueness of the address on the link is being
+            verified.  Addresses in this state should not be
+            used for general communication and should only be
+            used to determine the uniqueness of the address.";
+        }
+        enum DUPLICATE {
+          description
+           "The address has been determined to be non-unique on
+            the link and so must not be used.";
+        }
+        enum OPTIMISTIC {
+          description
+            "The address is available for use, subject to
+            restrictions, while its uniqueness on a link is
+            being verified.";
+        }
+      }
+      description
+        "The status of an address.  Most of the states correspond
+        to states from the IPv6 Stateless Address
+        Autoconfiguration protocol.";
+      reference
+          "RFC 4293: Management Information Base for the
+                      Internet Protocol (IP)
+                      - IpAddressStatusTC
+            RFC 4862: IPv6 Stateless Address Autoconfiguration";
+    }
+  }
+
+  grouping ipv6-neighbor-config {
+    description
+      "Per-neighbor configuration data for IPv6 interfaces";
+
+    leaf ip {
+      type oc-inet:ipv6-address;
+      description
+        "The IPv6 address of the neighbor node.";
+    }
+
+    leaf link-layer-address {
+      type oc-yang:phys-address;
+      mandatory true;
+      description
+        "The link-layer address of the neighbor node.";
+    }
+  }
+
+  grouping ipv6-neighbor-state {
+    description "Per-neighbor state variables for IPv6 interfaces";
+
+    leaf origin {
+      type neighbor-origin;
+      description
+        "The origin of this neighbor entry.";
+    }
+    leaf is-router {
+      type empty;
+      description
+        "Indicates that the neighbor node acts as a router.";
+    }
+    leaf neighbor-state {
+      type enumeration {
+        enum INCOMPLETE {
+          description
+          "Address resolution is in progress, and the link-layer
+                address of the neighbor has not yet been
+                determined.";
+        }
+        enum REACHABLE {
+          description
+          "Roughly speaking, the neighbor is known to have been
+                reachable recently (within tens of seconds ago).";
+        }
+        enum STALE {
+          description
+          "The neighbor is no longer known to be reachable, but
+                until traffic is sent to the neighbor no attempt
+                should be made to verify its reachability.";
+        }
+        enum DELAY {
+          description
+          "The neighbor is no longer known to be reachable, and
+                traffic has recently been sent to the neighbor.
+                Rather than probe the neighbor immediately, however,
+                delay sending probes for a short while in order to
+                give upper-layer protocols a chance to provide
+                reachability confirmation.";
+        }
+        enum PROBE {
+          description
+          "The neighbor is no longer known to be reachable, and
+                unicast Neighbor Solicitation probes are being sent
+                to verify reachability.";
+        }
+      }
+      description
+        "The Neighbor Unreachability Detection state of this
+        entry.";
+      reference
+        "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+             Section 7.3.2";
+    }
+  }
+
+  grouping ip-vrrp-ipv6-config {
+    description
+      "IPv6-specific configuration data for VRRP on IPv6
+      interfaces";
+
+      leaf virtual-link-local {
+        type oc-inet:ip-address;
+        description
+          "For VRRP on IPv6 interfaces, sets the virtual link local
+          address";
+      }
+  }
+
+  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
+      in a VRRP group";
+
+    leaf-list track-interface {
+      type leafref {
+        path "/oc-if:interfaces/oc-if:interface/oc-if:name";
+      }
+      // TODO: we may need to add some restriction to ethernet
+      // or IP interfaces.
+      description
+        "Sets a list of one or more interfaces that should
+        be tracked for up/down events to dynamically change the
+        priority state of the VRRP group, and potentially
+        change the mastership if the tracked interface going
+        down lowers the priority sufficiently.  Any of the tracked
+        interfaces going down will cause the priority to be lowered.
+        Some implementations may only support a single
+        tracked interface.";
+    }
+
+    leaf priority-decrement {
+      type uint8 {
+        range 0..254;
+      }
+      default 0;
+      description "Set the value to subtract from priority when
+      the tracked interface goes down";
+    }
+  }
+
+  grouping ip-vrrp-tracking-state {
+    description
+      "Operational state data for tracking interfaces in a VRRP
+      group";
+  }
+
+  grouping ip-vrrp-tracking-top {
+    description
+      "Top-level grouping for VRRP interface tracking";
+
+    container interface-tracking {
+      description
+        "Top-level container for VRRP interface tracking";
+
+      container config {
+        description
+          "Configuration data for VRRP interface tracking";
+
+        uses ip-vrrp-tracking-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for VRRP interface tracking";
+
+        uses ip-vrrp-tracking-config;
+        uses ip-vrrp-tracking-state;
+      }
+    }
+  }
+
+  grouping ip-vrrp-config {
+    description
+      "Configuration data for VRRP on IP interfaces";
+
+    leaf virtual-router-id {
+      type uint8 {
+        range 1..255;
+      }
+      description
+        "Set the virtual router id for use by the VRRP group.  This
+        usually also determines the virtual MAC address that is
+        generated for the VRRP group";
+    }
+
+    leaf-list virtual-address {
+      type oc-inet:ip-address;
+      description
+        "Configure one or more virtual addresses for the
+        VRRP group";
+    }
+
+    leaf priority {
+      type uint8 {
+        range 1..254;
+      }
+      default 100;
+      description
+        "Specifies the sending VRRP interface's priority
+        for the virtual router.  Higher values equal higher
+        priority";
+    }
+
+    leaf preempt {
+      type boolean;
+      default true;
+      description
+        "When set to true, enables preemption by a higher
+        priority backup router of a lower priority master router";
+    }
+
+    leaf preempt-delay {
+      type uint16 {
+        range 0..3600;
+      }
+      default 0;
+      description
+        "Set the delay the higher priority router waits
+        before preempting";
+    }
+
+    leaf accept-mode {
+      type boolean;
+      // TODO: should we adopt the RFC default given the common
+      // operational practice of setting to true?
+      default false;
+      description
+        "Configure whether packets destined for
+        virtual addresses are accepted even when the virtual
+        address is not owned by the router interface";
+    }
+
+    leaf advertisement-interval {
+      type uint16 {
+        range 1..4095;
+      }
+      // TODO this range is theoretical -- needs to be validated
+      // against major implementations.
+      units "centiseconds";
+      default 100;
+      description
+        "Sets the interval between successive VRRP
+        advertisements -- RFC 5798 defines this as a 12-bit
+        value expressed as 0.1 seconds, with default 100, i.e.,
+        1 second.  Several implementation express this in units of
+        seconds";
+    }
+  }
+
+  grouping ip-vrrp-state {
+    description
+      "Operational state data for VRRP on IP interfaces";
+
+    leaf current-priority {
+      type uint8;
+      description "Operational value of the priority for the
+      interface in the VRRP group";
+    }
+  }
+
+  grouping ip-vrrp-top {
+    description
+      "Top-level grouping for Virtual Router Redundancy Protocol";
+
+    container vrrp {
+      description
+        "Enclosing container for VRRP groups handled by this
+        IP interface";
+
+      reference "RFC 5798 - Virtual Router Redundancy Protocol
+        (VRRP) Version 3 for IPv4 and IPv6";
+
+      list vrrp-group {
+        key "virtual-router-id";
+        description
+          "List of VRRP groups, keyed by virtual router id";
+
+        leaf virtual-router-id {
+          type leafref {
+            path "../config/virtual-router-id";
+          }
+          description
+            "References the configured virtual router id for this
+            VRRP group";
+        }
+
+        container config {
+          description
+            "Configuration data for the VRRP group";
+
+          uses ip-vrrp-config;
+        }
+
+        container state {
+
+          config false;
+
+          description
+            "Operational state data for the VRRP group";
+
+          uses ip-vrrp-config;
+          uses ip-vrrp-state;
+        }
+
+        uses ip-vrrp-tracking-top;
+      }
+    }
+  }
+
+  grouping ipv4-top {
+    description "Top-level configuration and state for IPv4
+    interfaces";
+
+    container ipv4 {
+      description
+        "Parameters for the IPv4 address family.";
+
+      container addresses {
+        description
+          "Enclosing container for address list";
+
+        list address {
+          key "ip";
+          description
+           "The list of configured IPv4 addresses on the interface.";
+
+          leaf ip {
+            type leafref {
+              path "../oc-ip:config/oc-ip:ip";
+            }
+            description "References the configured IP address";
+          }
+
+          container config {
+            description "Configuration data for each configured IPv4
+            address on the interface";
+
+            uses ipv4-address-config;
+
+          }
+
+          container state {
+
+            config false;
+            description "Operational state data for each IPv4 address
+            configured on the interface";
+
+            uses ipv4-address-config;
+            uses ipv4-address-state;
+          }
+
+        }
+      }
+
+      container neighbors {
+        description
+          "Enclosing container for neighbor list";
+
+        list neighbor {
+          key "ip";
+          description
+           "A list of mappings from IPv4 addresses to
+            link-layer addresses.
+
+            Entries in this list are used as static entries in the
+            ARP Cache.";
+          reference
+           "RFC 826: An Ethernet Address Resolution Protocol";
+
+          leaf ip {
+            type leafref  {
+              path "../oc-ip:config/oc-ip:ip";
+            }
+            description "References the configured IP address";
+          }
+
+          container config {
+            description "Configuration data for each configured IPv4
+            address on the interface";
+
+            uses ipv4-neighbor-config;
+
+          }
+
+          container state {
+
+            config false;
+            description "Operational state data for each IPv4 address
+            configured on the interface";
+
+            uses ipv4-neighbor-config;
+            uses ipv4-neighbor-state;
+          }
+        }
+      }
+
+      uses oc-if:sub-unnumbered-top;
+
+      container config {
+        description
+          "Top-level IPv4 configuration data for the interface";
+
+        uses ipv4-global-config;
+      }
+
+      container state {
+
+        config false;
+        description
+          "Top level IPv4 operational state data";
+
+        uses ipv4-global-config;
+        uses ip-common-counters-state;
+      }
+    }
+  }
+
+  grouping ipv6-top {
+    description
+      "Top-level configuration and state for IPv6 interfaces";
+
+    container ipv6 {
+      description
+       "Parameters for the IPv6 address family.";
+
+      container addresses {
+        description
+          "Enclosing container for address list";
+
+        list address {
+          key "ip";
+          description
+           "The list of configured IPv6 addresses on the interface.";
+
+          leaf ip {
+            type leafref {
+              path "../oc-ip:config/oc-ip:ip";
+            }
+            description "References the configured IP address";
+          }
+
+          container config {
+            description
+              "Configuration data for each IPv6 address on
+              the interface";
+
+            uses ipv6-address-config;
+
+          }
+
+          container state {
+
+            config false;
+            description
+              "State data for each IPv6 address on the
+              interface";
+
+            uses ipv6-address-config;
+            uses ipv6-address-state;
+          }
+        }
+      }
+
+      container neighbors {
+        description
+          "Enclosing container for list of IPv6 neighbors";
+
+        list neighbor {
+          key "ip";
+          description
+            "List of IPv6 neighbors";
+
+          leaf ip {
+            type leafref {
+              path "../oc-ip:config/oc-ip:ip";
+            }
+            description
+              "References the configured IP neighbor address";
+          }
+
+          container config {
+            description "Configuration data for each IPv6 address on
+            the interface";
+
+            uses ipv6-neighbor-config;
+
+          }
+
+          container state {
+
+            config false;
+            description "State data for each IPv6 address on the
+            interface";
+
+            uses ipv6-neighbor-config;
+            uses ipv6-neighbor-state;
+          }
+        }
+      }
+      uses oc-if:sub-unnumbered-top;
+
+      container config {
+        description "Top-level config data for the IPv6 interface";
+
+        uses ipv6-global-config;
+      }
+
+      container state {
+        config false;
+        description
+          "Top-level operational state data for the IPv6 interface";
+
+        uses ipv6-global-config;
+        uses ip-common-counters-state;
+
+      }
+    }
+  }
+
+  // augment statements
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+    "oc-if:subinterface" {
+    description
+      "IPv4 addr family configuration for
+      interfaces";
+
+    uses ipv4-top;
+
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+    "oc-if:subinterface" {
+    description
+      "IPv6 addr family configuration for
+      interfaces";
+
+    uses ipv6-top;
+
+  }
+
+  // VRRP for IPv4 interfaces
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+    "oc-if:subinterface/oc-ip:ipv4/oc-ip:addresses/oc-ip:address" {
+
+    description
+      "Additional IP addr family configuration for
+      interfaces";
+
+    uses ip-vrrp-top;
+
+  }
+
+  // VRRP for IPv6 interfaces
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+    "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address" {
+    description
+      "Additional IP addr family configuration for
+      interfaces";
+
+    uses ip-vrrp-top;
+
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+    "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address/" +
+    "vrrp/vrrp-group/config" {
+    description
+      "Additional VRRP data for IPv6 interfaces";
+
+    uses ip-vrrp-ipv6-config;
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
+  "oc-if:subinterface/oc-ip:ipv6/oc-ip:addresses/oc-ip:address/vrrp/" +
+    "vrrp-group/state" {
+    description
+      "Additional VRRP data for IPv6 interfaces";
+
+    uses ip-vrrp-ipv6-state;
+  }
+
+  // Augments for for routed VLANs
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan" {
+    description
+      "IPv4 addr family configuration for
+      interfaces";
+
+    uses ipv4-top;
+
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan" {
+    description
+      "IPv6 addr family configuration for
+      interfaces";
+
+    uses ipv6-top;
+
+  }
+
+  // VRRP for routed VLAN interfaces
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
+    "oc-ip:ipv4/oc-ip:addresses/oc-ip:address" {
+    description
+      "Additional IP addr family configuration for
+      interfaces";
+
+    uses ip-vrrp-top;
+
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
+    "oc-ip:ipv6/oc-ip:addresses/oc-ip:address" {
+    description
+      "Additional IP addr family configuration for
+      interfaces";
+
+    uses ip-vrrp-top;
+
+  }
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
+    "oc-ip:ipv6/oc-ip:addresses/oc-ip:address/vrrp/vrrp-group/config" {
+    description
+      "Additional VRRP data for IPv6 interfaces";
+
+    uses ip-vrrp-ipv6-config;
+  }
+
+
+  augment "/oc-if:interfaces/oc-if:interface/oc-vlan:routed-vlan/" +
+    "oc-ip:ipv6/oc-ip:addresses/oc-ip:address/vrrp/vrrp-group/state" {
+    description
+      "Additional VRRP data for IPv6 interfaces";
+
+    uses ip-vrrp-ipv6-state;
+  }
+
+  // rpc statements
+
+  // notification statements
+}
diff --git a/models/openconfig/src/main/yang/interfaces/openconfig-if-types.yang b/models/openconfig/src/main/yang/interfaces/openconfig-if-types.yang
new file mode 100644
index 0000000..dc447ef
--- /dev/null
+++ b/models/openconfig/src/main/yang/interfaces/openconfig-if-types.yang
@@ -0,0 +1,80 @@
+module openconfig-if-types {
+  yang-version "1";
+
+  namespace "http://openconfig.net/yang/openconfig-if-types";
+
+  prefix "oc-ift";
+
+  // import statements
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "This module contains a set of interface type definitions that
+    are used across OpenConfig models. These are generally physical
+    or logical interfaces, distinct from hardware ports (which are
+    described by the OpenConfig platform model).";
+
+  oc-ext:openconfig-version "0.1.0";
+
+  revision "2016-11-14" {
+    description
+      "Initial version";
+    reference "0.1.0";
+  }
+
+
+  identity INTERFACE_TYPE {
+    description
+      "Base identity from which interface types are derived.";
+  }
+
+  identity IF_ETHERNET {
+    base INTERFACE_TYPE;
+    description
+      "Ethernet interfaces based on IEEE 802.3 standards, as well
+      as FlexEthernet";
+    reference
+      "IEEE 802.3-2015 - IEEE Standard for Ethernet
+      OIF Flex Ethernet Implementation Agreement 1.0";
+  }
+
+  identity IF_AGGREGATE {
+    base INTERFACE_TYPE;
+    description
+      "An aggregated, or bonded, interface forming a
+      Link Aggregation Group (LAG), or bundle, most often based on
+      the IEEE 802.1AX (or 802.3ad) standard.";
+    reference
+      "IEEE 802.1AX-2008";
+  }
+
+  identity IF_LOOPBACK {
+    base INTERFACE_TYPE;
+    description
+      "A virtual interface designated as a loopback used for
+      various management and operations tasks.";
+  }
+
+  identity IF_ROUTED_VLAN {
+    base INTERFACE_TYPE;
+    description
+      "A logical interface used for routing services on a VLAN.
+      Such interfaces are also known as switch virtual interfaces
+      (SVI) or integrated routing and bridging interfaces (IRBs).";
+  }
+
+  identity IF_SONET {
+    base INTERFACE_TYPE;
+    description
+      "SONET/SDH interface";
+  }
+
+}
diff --git a/models/openconfig/src/main/yang/interfaces/openconfig-interfaces.yang b/models/openconfig/src/main/yang/interfaces/openconfig-interfaces.yang
new file mode 100644
index 0000000..b5c928e
--- /dev/null
+++ b/models/openconfig/src/main/yang/interfaces/openconfig-interfaces.yang
@@ -0,0 +1,965 @@
+module openconfig-interfaces {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/interfaces";
+
+  prefix "oc-if";
+
+  // import some basic types
+  import ietf-interfaces { prefix ietf-if; }
+  import openconfig-yang-types { prefix oc-yang; }
+  import openconfig-types { prefix oc-types; }
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    netopenconfig@googlegroups.com";
+
+  description
+    "Model for managing network interfaces and subinterfaces.  This
+    module also defines convenience types / groupings for other
+    models to create references to interfaces:
+
+      base-interface-ref (type) -  reference to a base interface
+      interface-ref (grouping) -  container for reference to a
+        interface + subinterface
+      interface-ref-state (grouping) - container for read-only
+        (opstate) reference to interface + subinterface
+
+    This model reuses data items defined in the IETF YANG model for
+    interfaces described by RFC 7223 with an alternate structure
+    (particularly for operational state data) and with
+    additional configuration items.
+
+    Portions of this code were derived from IETF RFC 7223.
+    Please reproduce this note if possible.
+
+    IETF code is subject to the following copyright and license:
+    Copyright (c) IETF Trust and the persons identified as authors of
+    the code.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, is permitted pursuant to, and subject to the license
+    terms contained in, the Simplified BSD License set forth in
+    Section 4.c of the IETF Trust's Legal Provisions Relating
+    to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  oc-ext:openconfig-version "2.0.0";
+
+  revision "2017-07-14" {
+    description
+      "Added Ethernet/IP state data; Add dhcp-client;
+      migrate to OpenConfig types modules; Removed or
+      renamed opstate values";
+    reference "2.0.0";
+  }
+
+  revision "2017-04-03" {
+    description
+      "Update copyright notice.";
+    reference "1.1.1";
+  }
+
+  revision "2016-12-22" {
+    description
+      "Fixes to Ethernet interfaces model";
+    reference "1.1.0";
+  }
+
+
+  // typedef statements
+
+  typedef base-interface-ref {
+    type leafref {
+      path "/oc-if:interfaces/oc-if:interface/oc-if:name";
+    }
+    description
+      "Reusable type for by-name reference to a base interface.
+      This type may be used in cases where ability to reference
+      a subinterface is not required.";
+  }
+
+  typedef interface-id {
+    type string;
+    description
+      "User-defined identifier for an interface, generally used to
+      name a interface reference.  The id can be arbitrary but a
+      useful convention is to use a combination of base interface
+      name and subinterface index.";
+  }
+
+  // grouping statements
+
+  grouping interface-ref-common {
+    description
+      "Reference leafrefs to interface / subinterface";
+
+    leaf interface {
+      type leafref {
+        path "/oc-if:interfaces/oc-if:interface/oc-if:name";
+      }
+      description
+        "Reference to a base interface.  If a reference to a
+        subinterface is required, this leaf must be specified
+        to indicate the base interface.";
+    }
+
+    leaf subinterface {
+      type leafref {
+        path "/oc-if:interfaces/" +
+          "oc-if:interface[oc-if:name=current()/../interface]/" +
+          "oc-if:subinterfaces/oc-if:subinterface/oc-if:index";
+      }
+      description
+        "Reference to a subinterface -- this requires the base
+        interface to be specified using the interface leaf in
+        this container.  If only a reference to a base interface
+        is requuired, this leaf should not be set.";
+    }
+  }
+
+  grouping interface-ref-state-container {
+    description
+      "Reusable opstate w/container for a reference to an
+      interface or subinterface";
+
+    container state {
+      config false;
+      description
+        "Operational state for interface-ref";
+
+      uses interface-ref-common;
+    }
+  }
+
+  grouping interface-ref {
+    description
+      "Reusable definition for a reference to an interface or
+      subinterface";
+
+    container interface-ref {
+      description
+        "Reference to an interface or subinterface";
+
+      container config {
+        description
+          "Configured reference to interface / subinterface";
+
+        uses interface-ref-common;
+      }
+
+      uses interface-ref-state-container;
+    }
+  }
+
+  grouping interface-ref-state {
+    description
+      "Reusable opstate w/container for a reference to an
+      interface or subinterface";
+
+    container interface-ref {
+      description
+        "Reference to an interface or subinterface";
+
+      uses interface-ref-state-container;
+    }
+  }
+
+  grouping base-interface-ref-state {
+    description
+      "Reusable opstate w/container for a reference to a
+      base interface (no subinterface).";
+
+      container state {
+        config false;
+        description
+          "Operational state for base interface reference";
+
+        leaf interface {
+          type base-interface-ref;
+          description
+            "Reference to a base interface.";
+        }
+      }
+  }
+
+
+  grouping interface-common-config {
+    description
+      "Configuration data data nodes common to physical interfaces
+      and subinterfaces";
+
+    leaf description {
+      type string;
+      description
+        "A textual description of the interface.
+
+        A server implementation MAY map this leaf to the ifAlias
+        MIB object.  Such an implementation needs to use some
+        mechanism to handle the differences in size and characters
+        allowed between this leaf and ifAlias.  The definition of
+        such a mechanism is outside the scope of this document.
+
+        Since ifAlias is defined to be stored in non-volatile
+        storage, the MIB implementation MUST map ifAlias to the
+        value of 'description' in the persistently stored
+        datastore.
+
+        Specifically, if the device supports ':startup', when
+        ifAlias is read the device MUST return the value of
+        'description' in the 'startup' datastore, and when it is
+        written, it MUST be written to the 'running' and 'startup'
+        datastores.  Note that it is up to the implementation to
+
+        decide whether to modify this single leaf in 'startup' or
+        perform an implicit copy-config from 'running' to
+        'startup'.
+
+        If the device does not support ':startup', ifAlias MUST
+        be mapped to the 'description' leaf in the 'running'
+        datastore.";
+      reference
+        "RFC 2863: The Interfaces Group MIB - ifAlias";
+    }
+
+    leaf enabled {
+      type boolean;
+      default "true";
+      description
+        "This leaf contains the configured, desired state of the
+        interface.
+
+        Systems that implement the IF-MIB use the value of this
+        leaf in the 'running' datastore to set
+        IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry
+        has been initialized, as described in RFC 2863.
+
+        Changes in this leaf in the 'running' datastore are
+        reflected in ifAdminStatus, but if ifAdminStatus is
+        changed over SNMP, this leaf is not affected.";
+      reference
+        "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
+    }
+
+  }
+
+  grouping interface-phys-config {
+    description
+      "Configuration data for physical interfaces";
+
+    leaf name {
+      type string;
+      description
+        "The name of the interface.
+
+        A device MAY restrict the allowed values for this leaf,
+        possibly depending on the type of the interface.
+        For system-controlled interfaces, this leaf is the
+        device-specific name of the interface.  The 'config false'
+        list interfaces/interface[name]/state contains the currently
+        existing interfaces on the device.
+
+        If a client tries to create configuration for a
+        system-controlled interface that is not present in the
+        corresponding state list, the server MAY reject
+        the request if the implementation does not support
+        pre-provisioning of interfaces or if the name refers to
+        an interface that can never exist in the system.  A
+        NETCONF server MUST reply with an rpc-error with the
+        error-tag 'invalid-value' in this case.
+
+        The IETF model in RFC 7223 provides YANG features for the
+        following (i.e., pre-provisioning and arbitrary-names),
+        however they are omitted here:
+
+          If the device supports pre-provisioning of interface
+          configuration, the 'pre-provisioning' feature is
+          advertised.
+
+          If the device allows arbitrarily named user-controlled
+          interfaces, the 'arbitrary-names' feature is advertised.
+
+        When a configured user-controlled interface is created by
+        the system, it is instantiated with the same name in the
+        /interfaces/interface[name]/state list.";
+    }
+
+    leaf type {
+      type identityref {
+        base ietf-if:interface-type;
+      }
+      mandatory true;
+      description
+        "The type of the interface.
+
+        When an interface entry is created, a server MAY
+        initialize the type leaf with a valid value, e.g., if it
+        is possible to derive the type from the name of the
+        interface.
+
+        If a client tries to set the type of an interface to a
+        value that can never be used by the system, e.g., if the
+        type is not supported or if the type does not match the
+        name of the interface, the server MUST reject the request.
+        A NETCONF server MUST reply with an rpc-error with the
+        error-tag 'invalid-value' in this case.";
+      reference
+        "RFC 2863: The Interfaces Group MIB - ifType";
+    }
+
+    leaf mtu {
+      type uint16;
+      description
+        "Set the max transmission unit size in octets
+        for the physical interface.  If this is not set, the mtu is
+        set to the operational default -- e.g., 1514 bytes on an
+        Ethernet interface.";
+    }
+
+    uses interface-common-config;
+  }
+
+  grouping interface-phys-holdtime-config {
+    description
+      "Configuration data for interface hold-time settings --
+      applies to physical interfaces.";
+
+    leaf up {
+      type uint32;
+      units milliseconds;
+      default 0;
+      description
+        "Dampens advertisement when the interface
+        transitions from down to up.  A zero value means dampening
+        is turned off, i.e., immediate notification.";
+    }
+
+    leaf down {
+      type uint32;
+      units milliseconds;
+      default 0;
+      description
+        "Dampens advertisement when the interface transitions from
+        up to down.  A zero value means dampening is turned off,
+        i.e., immediate notification.";
+    }
+  }
+
+  grouping interface-phys-holdtime-state {
+    description
+      "Operational state data for interface hold-time.";
+  }
+
+  grouping interface-phys-holdtime-top {
+    description
+      "Top-level grouping for setting link transition
+      dampening on physical and other types of interfaces.";
+
+    container hold-time {
+      description
+        "Top-level container for hold-time settings to enable
+        dampening advertisements of interface transitions.";
+
+      container config {
+        description
+          "Configuration data for interface hold-time settings.";
+
+        uses interface-phys-holdtime-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for interface hold-time.";
+
+        uses interface-phys-holdtime-config;
+        uses interface-phys-holdtime-state;
+      }
+    }
+  }
+
+  grouping interface-common-state {
+    description
+      "Operational state data (in addition to intended configuration)
+      at the global level for this interface";
+
+    leaf ifindex {
+      type uint32;
+      description
+        "System assigned number for each interface.  Corresponds to
+        ifIndex object in SNMP Interface MIB";
+      reference
+        "RFC 2863 - The Interfaces Group MIB";
+    }
+
+    leaf admin-status {
+      type enumeration {
+        enum UP {
+          description
+            "Ready to pass packets.";
+        }
+        enum DOWN {
+          description
+            "Not ready to pass packets and not in some test mode.";
+        }
+        enum TESTING {
+          //TODO: This is generally not supported as a configured
+          //admin state, though it's in the standard interfaces MIB.
+          //Consider removing it.
+          description
+            "In some test mode.";
+        }
+      }
+      //TODO:consider converting to an identity to have the
+      //flexibility to remove some values defined by RFC 7223 that
+      //are not used or not implemented consistently.
+      mandatory true;
+      description
+        "The desired state of the interface.  In RFC 7223 this leaf
+        has the same read semantics as ifAdminStatus.  Here, it
+        reflects the administrative state as set by enabling or
+        disabling the interface.";
+      reference
+        "RFC 2863: The Interfaces Group MIB - ifAdminStatus";
+    }
+
+    leaf oper-status {
+      type enumeration {
+        enum UP {
+          value 1;
+          description
+            "Ready to pass packets.";
+        }
+        enum DOWN {
+          value 2;
+          description
+            "The interface does not pass any packets.";
+        }
+        enum TESTING {
+          value 3;
+          description
+            "In some test mode.  No operational packets can
+             be passed.";
+        }
+        enum UNKNOWN {
+          value 4;
+          description
+            "Status cannot be determined for some reason.";
+        }
+        enum DORMANT {
+          value 5;
+          description
+            "Waiting for some external event.";
+        }
+        enum NOT_PRESENT {
+          value 6;
+          description
+            "Some component (typically hardware) is missing.";
+        }
+        enum LOWER_LAYER_DOWN {
+          value 7;
+          description
+            "Down due to state of lower-layer interface(s).";
+        }
+      }
+      //TODO:consider converting to an identity to have the
+      //flexibility to remove some values defined by RFC 7223 that
+      //are not used or not implemented consistently.
+      mandatory true;
+      description
+        "The current operational state of the interface.
+
+         This leaf has the same semantics as ifOperStatus.";
+      reference
+        "RFC 2863: The Interfaces Group MIB - ifOperStatus";
+    }
+
+    leaf last-change {
+      type oc-types:timeticks64;
+      units nanoseconds;
+      description
+        "This timestamp indicates the time of the last state change
+        of the interface (e.g., up-to-down transition). This
+        corresponds to the ifLastChange object in the standard
+        interface MIB.
+
+        The value is the timestamp in nanoseconds relative to
+        the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
+      reference
+        "RFC 2863: The Interfaces Group MIB - ifLastChange";
+    }
+
+  }
+
+
+  grouping interface-counters-state {
+    description
+      "Operational state representing interface counters
+      and statistics.";
+
+      //TODO: we may need to break this list of counters into those
+      //that would appear for physical vs. subinterface or logical
+      //interfaces.  For now, just replicating the full stats
+      //grouping to both interface and subinterface.
+
+    container counters {
+      description
+        "A collection of interface-related statistics objects.";
+
+      leaf in-octets {
+        type oc-yang:counter64;
+        description
+          "The total number of octets received on the interface,
+          including framing characters.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifHCInOctets";
+      }
+
+      leaf in-unicast-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of packets, delivered by this sub-layer to a
+          higher (sub-)layer, that were not addressed to a
+          multicast or broadcast address at this sub-layer.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts";
+      }
+
+      leaf in-broadcast-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of packets, delivered by this sub-layer to a
+          higher (sub-)layer, that were addressed to a broadcast
+          address at this sub-layer.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB -
+                     ifHCInBroadcastPkts";
+      }
+
+      leaf in-multicast-pkts {
+        type oc-yang:counter64;
+        description
+          "The number of packets, delivered by this sub-layer to a
+          higher (sub-)layer, that were addressed to a multicast
+          address at this sub-layer.  For a MAC-layer protocol,
+          this includes both Group and Functional addresses.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB -
+                     ifHCInMulticastPkts";
+      }
+
+      leaf in-discards {
+        type oc-yang:counter64;
+        description
+          "The number of inbound packets that were chosen to be
+          discarded even though no errors had been detected to
+          prevent their being deliverable to a higher-layer
+          protocol.  One possible reason for discarding such a
+          packet could be to free up buffer space.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+
+
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifInDiscards";
+      }
+
+      leaf in-errors {
+        type oc-yang:counter64;
+        description
+          "For packet-oriented interfaces, the number of inbound
+          packets that contained errors preventing them from being
+          deliverable to a higher-layer protocol.  For character-
+          oriented or fixed-length interfaces, the number of
+          inbound transmission units that contained errors
+          preventing them from being deliverable to a higher-layer
+          protocol.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifInErrors";
+      }
+
+      leaf in-unknown-protos {
+        type oc-yang:counter64;
+        description
+          "For packet-oriented interfaces, the number of packets
+          received via the interface that were discarded because
+          of an unknown or unsupported protocol.  For
+          character-oriented or fixed-length interfaces that
+          support protocol multiplexing, the number of
+          transmission units received via the interface that were
+          discarded because of an unknown or unsupported protocol.
+          For any interface that does not support protocol
+          multiplexing, this counter is not present.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos";
+      }
+
+      leaf in-fcs-errors {
+        type oc-yang:counter64;
+        description
+          "Number of received packets which had errors in the
+          frame check sequence (FCS), i.e., framing errors.
+
+          Discontinuities in the value of this counter can occur
+          when the device is re-initialization as indicated by the
+          value of 'last-clear'.";
+      }
+
+      leaf out-octets {
+        type oc-yang:counter64;
+        description
+          "The total number of octets transmitted out of the
+          interface, including framing characters.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifHCOutOctets";
+      }
+
+      leaf out-unicast-pkts {
+        type oc-yang:counter64;
+        description
+          "The total number of packets that higher-level protocols
+          requested be transmitted, and that were not addressed
+          to a multicast or broadcast address at this sub-layer,
+          including those that were discarded or not sent.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts";
+      }
+
+      leaf out-broadcast-pkts {
+        type oc-yang:counter64;
+        description
+          "The total number of packets that higher-level protocols
+          requested be transmitted, and that were addressed to a
+          broadcast address at this sub-layer, including those
+          that were discarded or not sent.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB -
+                     ifHCOutBroadcastPkts";
+      }
+
+
+      leaf out-multicast-pkts {
+        type oc-yang:counter64;
+        description
+          "The total number of packets that higher-level protocols
+          requested be transmitted, and that were addressed to a
+          multicast address at this sub-layer, including those
+          that were discarded or not sent.  For a MAC-layer
+          protocol, this includes both Group and Functional
+          addresses.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB -
+                     ifHCOutMulticastPkts";
+      }
+
+      leaf out-discards {
+        type oc-yang:counter64;
+        description
+          "The number of outbound packets that were chosen to be
+          discarded even though no errors had been detected to
+          prevent their being transmitted.  One possible reason
+          for discarding such a packet could be to free up buffer
+          space.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifOutDiscards";
+      }
+
+      leaf out-errors {
+        type oc-yang:counter64;
+        description
+          "For packet-oriented interfaces, the number of outbound
+          packets that could not be transmitted because of errors.
+          For character-oriented or fixed-length interfaces, the
+          number of outbound transmission units that could not be
+          transmitted because of errors.
+
+          Discontinuities in the value of this counter can occur
+          at re-initialization of the management system, and at
+          other times as indicated by the value of
+          'last-clear'.";
+        reference
+          "RFC 2863: The Interfaces Group MIB - ifOutErrors";
+      }
+
+      leaf carrier-transitions {
+        type oc-yang:counter64;
+        description
+          "Number of times the interface state has transitioned
+          between up and down since the time the device restarted
+          or the last-clear time, whichever is most recent.";
+      }
+
+      leaf last-clear {
+        type oc-types:timeticks64;
+        units nanoseconds;
+        description
+          "Timestamp of the last time the interface counters were
+          cleared.
+
+          The value is the timestamp in nanoseconds relative to
+          the Unix Epoch (Jan 1, 1970 00:00:00 UTC).";
+      }
+    }
+  }
+
+  // data definition statements
+
+  grouping sub-unnumbered-config {
+    description
+      "Configuration data for unnumbered subinterfaces";
+
+    leaf enabled {
+      type boolean;
+      default false;
+      description
+        "Indicates that the subinterface is unnumbered.  By default
+        the subinterface is numbered, i.e., expected to have an
+        IP address configuration.";
+    }
+  }
+
+  grouping sub-unnumbered-state {
+    description
+      "Operational state data unnumbered subinterfaces";
+  }
+
+  grouping sub-unnumbered-top {
+    description
+      "Top-level grouping unnumbered subinterfaces";
+
+    container unnumbered {
+      description
+        "Top-level container for setting unnumbered interfaces.
+        Includes reference the interface that provides the
+        address information";
+
+      container config {
+        description
+          "Configuration data for unnumbered interface";
+
+        uses sub-unnumbered-config;
+      }
+
+      container state {
+
+        config false;
+
+        description
+          "Operational state data for unnumbered interfaces";
+
+        uses sub-unnumbered-config;
+        uses sub-unnumbered-state;
+      }
+
+      uses oc-if:interface-ref;
+    }
+  }
+
+  grouping subinterfaces-config {
+    description
+      "Configuration data for subinterfaces";
+
+    leaf index {
+      type uint32;
+      default 0;
+      description
+        "The index of the subinterface, or logical interface number.
+        On systems with no support for subinterfaces, or not using
+        subinterfaces, this value should default to 0, i.e., the
+        default subinterface.";
+    }
+
+    uses interface-common-config;
+
+  }
+
+  grouping subinterfaces-state {
+    description
+      "Operational state data for subinterfaces";
+
+    leaf name {
+      type string;
+      description
+        "The system-assigned name for the sub-interface.  This MAY
+        be a combination of the base interface name and the
+        subinterface index, or some other convention used by the
+        system.";
+    }
+
+    uses interface-common-state;
+    uses interface-counters-state;
+  }
+
+  grouping subinterfaces-top {
+    description
+      "Subinterface data for logical interfaces associated with a
+      given interface";
+
+    container subinterfaces {
+      description
+        "Enclosing container for the list of subinterfaces associated
+        with a physical interface";
+
+      list subinterface {
+        key "index";
+
+        description
+          "The list of subinterfaces (logical interfaces) associated
+          with a physical interface";
+
+        leaf index {
+          type leafref {
+            path "../config/index";
+          }
+          description
+            "The index number of the subinterface -- used to address
+            the logical interface";
+        }
+
+        container config {
+          description
+            "Configurable items at the subinterface level";
+
+          uses subinterfaces-config;
+        }
+
+        container state {
+
+          config false;
+          description
+            "Operational state data for logical interfaces";
+
+          uses subinterfaces-config;
+          uses subinterfaces-state;
+        }
+      }
+    }
+  }
+
+  grouping interfaces-top {
+    description
+      "Top-level grouping for interface configuration and
+      operational state data";
+
+    container interfaces {
+      description
+        "Top level container for interfaces, including configuration
+        and state data.";
+
+
+      list interface {
+        key "name";
+
+        description
+          "The list of named interfaces on the device.";
+
+        leaf name {
+          type leafref {
+            path "../config/name";
+          }
+          description
+            "References the configured name of the interface";
+            //TODO: need to consider whether this should actually
+            //reference the name in the state subtree, which
+            //presumably would be the system-assigned name, or the
+            //configured name.  Points to the config/name now
+            //because of YANG 1.0 limitation that the list
+            //key must have the same "config" as the list, and
+            //also can't point to a non-config node.
+        }
+
+        container config {
+          description
+            "Configurable items at the global, physical interface
+            level";
+
+          uses interface-phys-config;
+        }
+
+        container state {
+
+          config false;
+          description
+            "Operational state data at the global interface level";
+
+          uses interface-phys-config;
+          uses interface-common-state;
+          uses interface-counters-state;
+        }
+
+        uses interface-phys-holdtime-top;
+        uses subinterfaces-top;
+      }
+    }
+  }
+
+  uses interfaces-top;
+
+
+}
diff --git a/models/openconfig/src/main/yang/isis/openconfig-isis-lsdb-types.yang b/models/openconfig/src/main/yang/isis/openconfig-isis-lsdb-types.yang
new file mode 100644
index 0000000..b645e35
--- /dev/null
+++ b/models/openconfig/src/main/yang/isis/openconfig-isis-lsdb-types.yang
@@ -0,0 +1,677 @@
+module openconfig-isis-lsdb-types {
+
+  yang-version "1";
+
+  // namespace
+  namespace "http://openconfig.net/yang/isis-lsdb-types";
+
+  prefix "oc-isis-lsdb-types";
+
+  import openconfig-extensions { prefix oc-ext; }
+
+  // meta
+  organization "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net";
+
+  description
+    "This module contains general LSDB type definitions for use in
+    ISIS YANG model. ";
+
+  oc-ext:openconfig-version "0.3.2";
+
+  revision "2017-07-26" {
+    description
+      "Update LSDB and fix bugs.";
+    reference "0.3.2";
+  }
+
+  revision "2017-05-15" {
+    description
+      "Refactor LSDB.";
+    reference "0.3.0";
+  }
+
+  revision "2017-01-13" {
+    description
+      "Remove top-level /isis container";
+    reference "0.2.1";
+  }
+
+  revision "2016-12-15" {
+    description
+      "Add segment routing to IS-IS module";
+    reference "0.2.0";
+  }
+
+  revision "2016-10-18" {
+    description
+      "Initial revision of IS-IS models.";
+    reference "0.1.0";
+  }
+
+  identity ISIS_TLV_TYPE {
+    description
+      "Base identity for an ISIS TLV type.";
+  }
+
+  identity ISIS_SUBTLV_TYPE {
+    description
+      "Base identity for an ISIS SUB-TLV type.";
+  }
+
+  identity IS_REACHABILITY_SUBTLVS_TYPE {
+    base "ISIS_SUBTLV_TYPE";
+    description
+      "Base identity for an ISIS TLV 22, 23, 222, 223, 141 SUB-TLV
+      type.";
+  }
+
+  identity IP_REACHABILITY_SUBTLVS_TYPE {
+    base "ISIS_SUBTLV_TYPE";
+    description
+      "Base identity for an ISIS TLV 135, 235, 236, 237 SUB-TLV
+      type.";
+  }
+
+  identity ROUTER_CAPABILITY_SUBTLVS_TYPE {
+    base "ISIS_SUBTLV_TYPE";
+    description
+      "Base identity for an ISIS TLV 242 SUB-TLV type.";
+  }
+
+  identity AREA_ADDRESSES {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 1. Intermediate System to Intermediate System Intra-
+      Domain Routeing Exchange Protocol for use in Conjunction with
+      the Protocol for Providing the Connectionless-mode Network
+      Service (ISO 8473), International Standard 10589: 2002, Second
+      Edition, 2002.";
+    reference
+      "ISO 10589";
+  }
+
+  identity IIS_NEIGHBORS {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 2. Intermediate System to Intermediate System Intra-
+      Domain Routeing Exchange Protocol for use in Conjunction with
+      the Protocol for Providing the Connectionless-mode Network
+      Service (ISO 8473), International Standard 10589: 2002, Second
+      Edition, 2002.";
+    reference
+      "ISO 10589";
+  }
+
+  identity INSTANCE_ID {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 7. An Instance Identifier (IID) to uniquely
+      identify an IS-IS instance. When the IID = 0, the list of
+      supported ITIDs MUST NOT be present. An IID-TLV with IID = 0
+      MUST NOT appear in an SNP or LSP. When the TLV appears (with a
+      non-zero IID) in an SNP or LSP, exactly one ITID. MUST be
+      present indicating the topology with which the PDU is
+      associated. If no ITIDs or multiple ITIDs are present or the
+      IID is zero, then the PDU MUST be ignored";
+    reference
+      "RFC6822: IS-IS Multi-Instance";
+  }
+
+  identity AUTHENTICATION {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 10.Intermediate System to Intermediate System Intra-
+      Domain Routeing Exchange Protocol for use in Conjunction with
+      the Protocol for Providing the Connectionless-mode Network
+      Service (ISO 8473) International Standard 10589: 2002, Second
+      Edition, 2002.";
+    reference
+      "ISO 10589";
+  }
+
+  identity PURGE_OI {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 13. If an IS generates a purge, it SHOULD include
+      this TLV in the purge with its own system ID.  If an IS
+      receives a purge that does not include this TLV, then it SHOULD
+      add this TLV with both its own system ID and the system ID of
+      the IS from which it received the purge.  This allows ISs
+      receiving purges to log the system ID of the originator, or the
+      upstream source of the purge.";
+    reference
+      "RFC6232: Purge Originator Identification TLV";
+  }
+
+  identity LSP_BUFFER_SIZE {
+   base "ISIS_TLV_TYPE";
+   description
+     "ISIS TLV 14. The maximum MTU that the advertising system can
+     receive, expressed in bytes.";
+   reference
+     "ISO 10589: LSP Buffer Size TLV";
+  }
+
+  identity EXTENDED_IS_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 22. An extended IS reachability TLV that has a
+      different data structure to TLV 2 that introduces the use of
+      sub-TLV object-group.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering";
+  }
+
+  identity IS_NEIGHBOR_ATTRIBUTE {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 23. Identical in format to TLV 22 and included in
+      Original LSPs or Extended LSPs. Regardless of the type of LSP
+      in which the TLVs appear, the information pertains to the
+      neighbor relationship between the Originating System and the IS
+      identified in the TLV";
+    reference
+      "RFC5311: Simplified Extension of Link State PDU (LSP) Space
+      for IS-IS";
+  }
+
+  identity ISIS_ALIAS_ID {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 24. IS-Alias TLV which extension-capable ISs to
+      recognize the Originating System of an Extended LSP set. It
+      identifies the Normal system-id of the Originating System";
+    reference
+      "RFC5311: Simplified Extension of Link State PDU (LSP) Space
+      for IS-IS";
+  }
+
+  identity IPV4_INTERNAL_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 128. TLV defines IP addresses within the routing
+      domain reachable directly via one or more interfaces on this
+      Intermediate system";
+    reference
+      "RFC1195: OSI ISIS for IP and Dual Environments. RFC5302:
+      Domain-Wide Prefix Distribution with Two-Level IS-IS";
+  }
+
+  identity NLPID {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 129. TLV defines the set Network Layer Protocol
+      Identifiers for Network Layer protocols that this Intermediate
+      System is capable of relaying";
+    reference
+      "RFC1195: Use of OSI IS-IS for Routing in TCP/IP and
+      Dual Environments";
+  }
+
+  identity IPV4_EXTERNAL_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 130. TLV defines IP addresses outside the routing
+      domain reachable via interfaces on this Intermediate system.
+      This is permitted to appear multiple times, and in an LSP with
+      any LSP number. However, this field must not appear in
+      pseudonode LSPs";
+    reference "
+      RFC1195: OSI ISIS for IP and Dual Environments.  RFC5302:
+      Domain-Wide Prefix Distribution with Two-Level IS-IS";
+  }
+
+  identity IPV4_INTERFACE_ADDRESSES {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 132. The IP address of one or more interfaces
+      corresponding to the SNPAs enabled on this Intermediate system
+      (i.e., one or more IP addresses of this router). This is
+      permitted to appear multiple times, and in an LSP with any LSP
+      number.";
+    reference
+      "RFC1195: Use of OSI IS-IS for Routing in TCP/IP and Dual
+      Environments";
+  }
+
+  identity IPV4_TE_ROUTER_ID {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 134. Traffic Engineering router ID TLV that contains
+      the 4-octet router ID of the router originating the LSP";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering";
+  }
+
+  identity EXTENDED_IPV4_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 135. Extended IP reachability TLV that provides for a
+      32-bit metric and adds one bit to indicate that a prefix has
+      been redistributed _down_ in the hierarchy";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering";
+  }
+
+  identity DYNAMIC_NAME {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 137. The Dynamic hostname TLV is optional.  This TLV
+      may be present in any fragment of a non-pseudonode LSP.  The
+      value field identifies the symbolic name of the router
+      originating the LSP.  This symbolic name can be the FQDN for the
+      router, it can be a subset of the FQDN, or it can be any string
+      operators want to use for the router.";
+    reference
+      "RFC6233: IS-IS Registry Extension for Purges, RFC 5301: Dynamic
+      Hostname Exchange Mechanism for IS-IS.";
+  }
+
+  identity IPV4_SRLG {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 138. IPv4 Shared Risk Link Group TLV";
+    reference
+      "RFC5307: IS-IS Extensions in Support of Generalized
+      Multi-Protocol Label Switching (GMPLS)";
+  }
+
+  identity IPV6_SRLG {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 139. IPv6 Shared Risk Link Group";
+    reference
+      "RFC6119: IPv6 Traffic Engineering in IS-IS";
+  }
+
+  identity IPV6_TE_ROUTER_ID {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 140. The IPv6 TE Router ID TLV contains a 16-octet
+      IPv6 address. A stable global IPv6 address MUST be used, so that
+      the router ID provides a routable address, regardless of the
+      state of a node's interfaces. If a router does not implement
+      traffic engineering, it MAY include or omit the IPv6 TE Router
+      ID TLV.  If a router implements traffic engineering for IPv6, it
+      MUST include this TLV in its LSP.  This TLV MUST NOT be included
+      more than once in an LSP.";
+    reference
+      "RFC6119: IPv6 Traffic Engineering in IS-IS.";
+  }
+
+  identity MT_ISN {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 222. TLV is aligned with extended IS reachability TLV
+      type 22 beside an additional two bytes in front at the beginning
+      of the TLV that. indicate MT membership.";
+    reference
+      "RFC5120: M-ISIS: Multi Topology (MT) Routing in Intermediate
+      System to Intermediate Systems (IS-ISs)";
+  }
+
+  identity MT_IS_NEIGHBOR_ATTRIBUTE {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 223. Is is identical in format to TLV 222. In the
+      event that there is a need to advertise in Extended LSPs such
+      information associated with neighbors of the Originating System,
+      it is necessary to define new TLVs to carry the sub-TLV
+      information.";
+    reference
+      "RFC5311: Simplified Extension of Link State PDU (LSP) Space for
+      IS-IS";
+  }
+
+  identity MULTI_TOPOLOGY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 229. This MT TLV can advertise up to 127 MTs.  It is
+      announced in IIHs and LSP fragment 0, and can occur multiple
+      times.  The resulting MT set SHOULD be the union of all the MT
+      TLV occurrences in the packet. Any other IS-IS PDU occurrence of
+      this TLV MUST be ignored.  Lack of MT TLV in hellos and fragment
+      zero LSPs MUST be interpreted as participation of the
+      advertising interface or router in MT ID #0 only.  If a router
+      advertises MT TLV, it has to advertise all the MTs it
+      participates in, specifically including topology ID #0 also.";
+    reference
+      "RFC5120: M-ISIS: Multi Topology (MT) Routing in Intermediate
+      System to Intermediate Systems (IS-ISs)";
+  }
+
+  identity IPV6_INTERFACE_ADDRESSES {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 232. IPv6 Interface Address TLV that maps directly to
+      the IP Interface Address TLV in [RFC1195]. We necessarily modify
+      the contents to be 0-15 16-octet IPv6 interface addresses
+      instead of 0-63 4-octet IPv4 interface addresses";
+    reference "RFC5308: Routing IPv6 with IS-IS.";
+  }
+
+  identity MT_IPV4_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 235. TLV is aligned with extended IP reachability TLV
+      type 135 beside an additional two bytes in front to indicate MT
+      membership";
+    reference
+      "RFC5120: M-ISIS: Multi Topology (MT) Routing in Intermediate
+      System to Intermediate Systems (IS-ISs)";
+  }
+
+  identity IPV6_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 236. The IPv6 Reachability TLV describes network
+      reachability through the specification of a routing prefix,
+      metric information, a bit to indicate if the prefix is being
+      advertised down from a higher level, a bit to indicate if the
+      prefix is being distributed from another routing protocol, and
+      OPTIONALLY the existence of Sub-TLVs to allow for later
+      extension.";
+    reference
+      "RFC5308: Routing IPv6 with IS-IS";
+  }
+
+  identity MT_IPV6_REACHABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 237. TLV is aligned with IPv6 Reachability TLV type
+      236 beside an additional two bytes in front to indicate MT
+      membership.";
+    reference
+      "RFC5120: M-ISIS: Multi Topology (MT) Routing in Intermediate
+      System to Intermediate Systems (IS-ISs).";
+  }
+
+  identity ROUTER_CAPABILITY {
+    base "ISIS_TLV_TYPE";
+    description
+      "ISIS TLV 242. IS-IS TLV named CAPABILITY, formed of multiple
+      sub-TLVs, which allows a router to announce its capabilities
+      within an IS-IS level or the entire routing domain.";
+    reference
+      "RFC4971: Intermediate System to Intermediate System (IS-IS)
+      Extensions for Advertising Router Information.";
+  }
+
+  //sub-TLVs for TLVs 22, 23, 141, 222, 223
+
+  identity IS_REACHABILITY_ADMIN_GROUP {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 3. Administrative group(color).";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering";
+  }
+
+  identity IS_REACHABILITY_LINK_ID {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 4. Link Local/Remote Identifiers.";
+    reference
+      "RFC5307: IS-IS Extensions in Support of Generalized
+      Multi-Protocol Label Switching (GMPLS)";
+  }
+
+  identity IS_REACHABILITY_IPV4_INTERFACE_ADDRESS {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 6. IPv4 Interface Address.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 8. IPv4 Neighbor Address.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_MAX_LINK_BANDWIDTH {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 9. Maximum Link Bandwidth.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 10. Maximum Reservable Bandwidth.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_UNRESERVED_BANDWIDTH {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 11. Unreserved bandwidth.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_IPV6_INTERFACE_ADDRESS {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 12. IPv6 Interface Address.";
+    reference
+      "RFC6119: IPv6 Traffic Engineering in IS-IS.";
+  }
+
+  identity IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 13. IPv6 Neighbor Address.";
+    reference
+      "RFC6119: IPv6 Traffic Engineering in IS-IS.";
+  }
+
+  identity IS_REACHABILITY_EXTENDED_ADMIN_GROUP {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 14. Extended Administrative Group.";
+    reference
+      "RFC7308: Extended Administrative Groups in MPLS Traffic
+      Engineering (MPLS-TE).";
+  }
+
+  identity IS_REACHABILITY_TE_DEFAULT_METRIC {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 18. TE Default Metric.";
+    reference
+      "RFC5305: IS-IS Extensions for Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_LINK_ATTRIBUTES {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 19. Link Attributes.";
+    reference
+      "RFC5209: Definition of an IS-IS Link Attribute Sub-TLV.";
+  }
+
+  identity IS_REACHABILITY_LINK_PROTECTION_TYPE {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 20. Link Protection Type.";
+    reference
+      "RFC5307: IS-IS Extensions in Support of Generalized
+      Multi-Protocol  Label Switching (GMPLS)";
+  }
+
+  identity IS_REACHABILITY_BANDWIDTH_CONSTRAINTS {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 22. Bandwidth Constraints.";
+    reference
+      "RFC4124: Protocol Extensions for Support of Diffserv-aware MPLS
+      Traffic Engineering.";
+  }
+
+  identity IS_REACHABILITY_UNCONSTRAINED_LSP {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 23. Unconstrained LSP.";
+    reference
+      "RFC5330: A Link-Type sub-TLV to Convey the Number of Traffic
+      Engineering Label Switched Paths Signalled with Zero
+      Reserved Bandwidth across a Link.";
+  }
+
+  identity IS_REACHABILITY_ADJ_SID {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 31. Adjacency Segment Identifier.";
+    reference
+      "draft-ietf-isis-segment-routing-extensions.";
+  }
+
+  identity IS_REACHABILITY_ADJ_LAN_SID {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 32. Adjacency LAN Segment Identifier.";
+    reference
+      "draft-ietf-isis-segment-routing-extensions.";
+  }
+
+  identity IS_REACHABILITY_LINK_DELAY {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 33. Unidirectional Link Delay.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  identity IS_REACHABILITY_MIN_MAX_LINK_DELAY {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 34. Min/Max Unidirectional Link Delay.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  identity IS_REACHABILITY_LINK_DELAY_VARIATION {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 35. Unidirectional Link Delay Variation.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  identity IS_REACHABILITY_LINK_LOSS {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 36. Unidirectional Link Loss Delay.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  identity IS_REACHABILITY_RESIDUAL_BANDWIDTH {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 37. Unidirectional Residual Bandwidth.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  identity IS_REACHABILITY_AVAILABLE_BANDWIDTH {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 38. Unidirectional Available Bandwidth.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  identity IS_REACHABILITY_UTILIZED_BANDWIDTH {
+    base "IS_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 39. Unidirectional Utilized Bandwidth.";
+    reference
+      "RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions.";
+  }
+
+  //sub-TLVs for TLVs 135, 235, 236, 237
+  identity IP_REACHABILITY_TAG {
+    base "IP_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 1. 32-bit Administrative Tag.";
+    reference
+      "RFC7794: IS-IS Prefix Attributes for Extended IPv4 and IPv6
+      Reachability.";
+  }
+
+  identity IP_REACHABILITY_TAG64 {
+    base "IP_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 2. 64-bit Administrative Tag.";
+    reference
+      "RFC7794: IS-IS Prefix Attributes for Extended IPv4 and IPv6
+      Reachability.";
+  }
+
+  identity IP_REACHABILITY_PREFIX_SID {
+    base "IP_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 3. Prefix Segment Identifier.";
+    reference
+      "draft-ietf-isis-segment-routing-extension.";
+  }
+
+  identity IP_REACHABILITY_PREFIX_FLAGS {
+    base "IP_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 4. Prefix Attribute Flags.";
+    reference
+      "RFC7794: IS-IS Prefix Attributes for Extended IPv4 and IPv6
+      Reachability.";
+  }
+
+  identity IP_REACHABILITY_IPV4_ROUTER_ID {
+    base "IP_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 11. IPv4 Source Router ID.";
+    reference
+      "RFC7794: IS-IS Prefix Attributes for Extended IPv4 and IPv6
+      Reachability.";
+  }
+
+  identity IP_REACHABILITY_IPV6_ROUTER_ID {
+    base "IP_REACHABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 12. IPv6 Source Router ID.";
+    reference
+      "RFC7794: IS-IS Prefix Attributes for Extended IPv4 and IPv6
+      Reachability.";
+  }
+
+
+  //sub-TLVs for TLVs 242
+
+  identity ROUTER_CAPABILITY_SR_CAPABILITY {
+    base "ROUTER_CAPABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 2. Segment Routing Capability.";
+    reference
+      "draft-ietf-isis-segment-routing-extensions.";
+  }
+
+  identity ROUTER_CAPABILITY_SR_ALGORITHM {
+    base "ROUTER_CAPABILITY_SUBTLVS_TYPE";
+    description
+      "sub-TLV 19. Segment Routing Algorithm.";
+    reference
+      "draft-ietf-isis-segment-routing-extensions.";
+  }
+
+}
diff --git a/models/openconfig/src/main/yang/isis/openconfig-isis-lsp.yang b/models/openconfig/src/main/yang/isis/openconfig-isis-lsp.yang
new file mode 100644
index 0000000..81c48e6
--- /dev/null
+++ b/models/openconfig/src/main/yang/isis/openconfig-isis-lsp.yang
@@ -0,0 +1,3542 @@
+submodule openconfig-isis-lsp {
+
+  belongs-to openconfig-isis {
+    prefix oc-isis;
+  }
+  import openconfig-extensions { prefix "oc-ext"; }
+  import openconfig-inet-types { prefix "inet"; }
+  import openconfig-isis-types { prefix "oc-isis-types"; }
+  import openconfig-isis-lsdb-types { prefix "oc-isis-lsdb-types"; }
+  import openconfig-types { prefix "oc-types"; }
+  import openconfig-mpls-types { prefix "oc-mpls-types"; }
+  // meta
+  organization
+    "OpenConfig working group";
+
+  contact
+    "OpenConfig working group
+    www.openconfig.net ";
+
+  description
+    "This sub-module describes a YANG model for the IS-IS Link State
+    Database (LSDB).
+
+    Portions of this code were derived from IETF RFCs relating to the
+    IS-IS protocol.
+    Please reproduce this note if possible.
+    IETF code is subject to the following copyright and license:
+    Copyright (c) IETF Trust and the persons identified as authors of
+    the code.
+    All rights reserved.
+    Redistribution and use in source and binary forms, with or without
+    modification, is permitted pursuant to, and subject to the license
+    terms contained in, the Simplified BSD License set forth in
+    Section 4.c of the IETF Trust's Legal Provisions Relating
+    to IETF Documents (http://trustee.ietf.org/license-info).";
+
+  oc-ext:openconfig-version "0.3.2";
+
+  revision "2017-07-26" {
+    description
+      "Update LSDB and fix bugs.";
+    reference "0.3.2";
+  }
+
+  revision "2017-05-15" {
+    description
+      "Refactor LSDB.";
+    reference "0.3.0";
+  }
+
+  revision "2017-01-13" {
+    description
+      "Remove top-level /isis container";
+    reference "0.2.1";
+  }
+
+  revision "2016-12-15" {
+    description
+      "Add segment routing to IS-IS module";
+    reference "0.2.0";
+  }
+
+  revision "2016-10-18" {
+    description
+      "Initial revision of IS-IS models.";
+    reference "0.1.0";
+  }
+
+  typedef isis-metric-flags {
+    type enumeration {
+      enum INTERNAL {
+        description
+          "When this flag is not set, internal metrics are in use.";
+      }
+      enum UNSUPPORTED {
+        description
+          "When this flag (referred to as the S-bit) is set, then
+          the metric is unsupported.";
+      }
+    }
+    description
+      "Type definition for flags used in IS-IS metrics";
+  }
+
+  grouping isis-lsdb-link-characteristics-a-bit {
+    description
+      "Definition of the A bit, as used in IS-IS link delay TLVs.";
+
+    leaf a-bit {
+      type boolean;
+      description
+        "The A bit is set when the measured value of this parameter
+        exceeds its configured maximum threshold. The A bit is cleared
+        when the measured value falls below its configured reuse
+        threshold.";
+    }
+  }
+
+  grouping isis-lsdb-tlv-nlpid-state {
+    description
+      "NLP ID parameters for IS-IS.";
+
+    leaf-list nlpid {
+      type enumeration {
+        enum IPV4 {
+          description "IPv4 Address family.";
+        }
+        enum IPV6 {
+          description "IPv6 Address family.";
+        }
+      }
+      description
+        "Protocol supported. IPv4 is defined as (0xcc) and IPv6 -
+        (0x8e)";
+      reference
+        "RFC1195: Use of OSI IS-IS for Routing in TCP/IP and
+        Dual Environments. TLV 129. ";
+    }
+  }
+
+  grouping isis-lsdb-subtlv-type-state {
+    description
+      "Per-subTLV type operational state parameters for ISIS.";
+
+    leaf type {
+      type identityref {
+        base oc-isis-lsdb-types:ISIS_SUBTLV_TYPE;
+      }
+      description
+        "The type of subTLV being described. The type of subTLV is
+        expressed as a canonical name.";
+    }
+  }
+
+  grouping isis-lsdb-tlv-type-state {
+    description
+      "Per-subTLV type operational state parameters for ISIS.";
+
+    leaf type {
+      type identityref {
+        base oc-isis-lsdb-types:ISIS_TLV_TYPE;
+      }
+      description
+        "The type of TLV being described. The type of TLV is
+        expressed as a canonical name.";
+    }
+  }
+
+  grouping is-reachability-neighbor-state {
+    description
+      "This grouping defines is-reachability neighbor.";
+
+    container subtlvs {
+      description
+        "This container describes IS Neighbor sub-TLVs.";
+
+      list subtlv {
+        key "type";
+
+        description
+          "List of subTLV types in the LSDB for the specified TLV.";
+
+        leaf type {
+          type leafref {
+            path "../state/type";
+          }
+          description
+            "Reference to the sub-TLV type.";
+        }
+
+        container state {
+          description
+            "State parameters of IS neighbor state";
+
+          uses isis-lsdb-subtlv-type-state;
+        }
+
+        container admin-group {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP'" {
+            description
+              "Only include the administrative group container when
+              the sub-TLV is type 3";
+          }
+          description
+            "This container defines sub-TLV 3.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 3.";
+
+            leaf-list admin-group {
+              type uint32;
+              description
+                "The administrative group sub-TLV contains a 4-octet
+                bit mask assigned by the network administrator.  Each
+                set bit corresponds to one administrative group
+                assigned to the interface. By convention, the least
+                significant bit is referred to as group 0, and the
+                most significant bit is referred to as group 31.";
+              reference
+                "RFC5305: IS-IS Extensions for Traffic Engineering.
+                sub-TLV 3: TLV 22,23,141,222, 223.";
+            }
+          }
+        }
+
+        container link-id {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID'" {
+            description
+              "Only include the link identifier container when the
+              sub-TLV is type 4";
+          }
+          description
+            "This container defines sub-TLV 4.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 4.";
+
+            leaf local {
+              type uint32;
+              description
+                "The value field of this sub-TLV contains 4 octets of
+                Link Local Identifier followed by 4 octets of Link
+                Remote Identifier.";
+              reference
+                "RFC5307: IS-IS Extensions in Support of Generalized
+                Multi-Protocol Label Switching (GMPLS). sub-TLV 3: TLV
+                22,23,141,222, 223.";
+            }
+
+            leaf remote {
+              type uint32;
+              description
+                "If the Link Remote Identifier is unknown, it is set
+                to 0.";
+              reference
+                "RFC5307: IS-IS Extensions in Support of Generalized
+                Multi-Protocol Label Switching (GMPLS). sub-TLV 3: TLV
+                22,23,141,222, 223.";
+            }
+          }
+        }
+
+        container ipv4-interface-address {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS'" {
+            description
+              "Only include the IPv4 interface address group container
+              when the sub-TLV is type 6";
+          }
+          description
+            "This container defines sub-TLV 6.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 6.";
+
+            leaf-list address {
+              type inet:ipv4-address;
+              description
+                "A 4-octet IPv4 address for the interface described by
+                the (main) TLV. This sub-TLV can occur multiple
+                times.";
+              reference
+                "RFC5305: IS-IS Extensions for Traffic Engineering.
+                sub-TLV 6: TLV 22,23,41,222,223.";
+            }
+          }
+        }
+
+        container ipv4-neighbor-address {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS'" {
+            description
+              "Only include the IPv4 neighbor address container when
+              the sub-TLV is type 8.";
+          }
+          description
+            "This container defines sub-TLV 8.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 8.";
+
+            leaf-list address {
+              type inet:ipv4-address;
+              description
+                "A single IPv4 address for a neighboring router on
+                this link. This sub-TLV can occur multiple times.";
+              reference
+                "RFC5305: IS-IS Extensions for Traffic Engineering.
+                sub-TLV 8: TLV 22,23, 141,222,223.";
+            }
+          }
+        }
+
+        container max-link-bandwidth {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH'" {
+            description
+              "Only include the maximum link bandwidth container when
+              the sub-TLV is type 9.";
+          }
+          description
+            "This container defines sub-TLV 9.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 9.";
+
+            leaf bandwidth {
+              type oc-types:ieeefloat32;
+              units "bytes per second";
+              description
+                "The maximum bandwidth that can be used on this link
+                in this direction (from the system originating the LSP
+                to its neighbors).  It is encoded in 32 bits in IEEE
+                floating point format.  The units are bytes (not
+                bits!) per second.";
+              reference
+                "RFC5305: IS-IS Extensions for Traffic Engineering.
+                sub-TLV 9: TLV 22,23,141,222,223.";
+            }
+          }
+        }
+
+        container max-reservable-link-bandwidth {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH'" {
+            description
+              "Only include the maximum reservable link bandwidth
+              container when the sub-TLV type is 10.";
+          }
+          description
+            "This container defines sub-TLV 10.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 10.";
+
+            leaf bandwidth {
+              type oc-types:ieeefloat32;
+              units "bytes per second";
+              description
+                "The maximum amount of bandwidth that can be reserved
+                in this direction on this link.  Note that for
+                oversubscription purposes,  this can be greater than
+                the bandwidth of the link. It is encoded  in 32 bits
+                in IEEE floating point format.  The units are bytes
+                (not bits!) per second.";
+              reference
+                "RFC5305: IS-IS Extensions for Traffic Engineering.
+                Sub-TLV 10: TLV 22,23,141,222,223.";
+            }
+          }
+        }
+
+        container unreserved-bandwidth {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH'" {
+            description
+              "Only include the unreserved bandwidth container when
+              the sub-TLV type is 11.";
+          }
+          description
+            "This container defines unreserved-bandwidth. The units
+            are bytes per second.";
+
+          reference
+            "RFC5305: IS-IS Extensions for Traffic Engineering. sub-
+            TLV 11: TLV 22,23,141,222,223";
+
+          list setup-priority {
+            key "priority";
+
+            leaf priority {
+              type leafref {
+                path "../state/priority";
+              }
+              description
+                "Reference to the setup priority to which the
+                unreserved bandwidth corresponds.";
+            }
+
+            description
+              "Setup priority (0 through 7) for unreserved
+              bandwidth.";
+
+            container state {
+              description
+                "State parameters of IS Extended Reachability sub-TLV
+                11.";
+
+              leaf priority {
+                type uint8 {
+                  range "0..7";
+                }
+                description
+                  "Setup priority level of 0 through 7 to be used by
+                  Unreserved Bandwidth sub-TLV 11.";
+              }
+
+              leaf bandwidth {
+                type oc-types:ieeefloat32;
+                units "bytes per second";
+                description
+                  "The amount of bandwidth reservable in this
+                  direction on this link. Note that for
+                  oversubscription purposes, this can be greater than
+                  the bandwidth of the link. It contains eight 32-bit
+                  IEEE floating point numbers(one for each priority).
+                  The units are bytes (not bits!) per second. The
+                  values correspond to the bandwidth that can be
+                  reserved with a setup priority of 0 through 7,
+                  arranged in increasing order with priority 0
+                  occurring at the start of the sub-TLV, and priority
+                  7 at the end of the sub-TLV.";
+              }
+            }
+          }
+        }
+
+        container ipv6-interface-address {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS'" {
+            description
+              "Only include the IPv6 interface address when the
+              sub-TLV type is 12.";
+          }
+          description
+            "This container defines sub-TLV 12.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 12.";
+
+            leaf-list address {
+              type inet:ipv6-address;
+              description
+                "Contains a 16-octet IPv6 address for the interface
+                described by the containing  Extended IS Reachability
+                TLV. This sub-TLV can occur multiple times.";
+              reference
+                "RFC6119: IPv6 Traffic Engineering in IS-IS. sub-TLV
+                12: TLV 22,23,141,222,223.";
+            }
+          }
+        }
+
+        container ipv6-neighbor-address {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS'" {
+            description
+              "Only include the IPv6 neighbor address when the
+              sub-TLV type is 13.";
+          }
+          description
+            "This container defines sub-TLV 13.";
+
+          container state {
+            description
+              "State parameters of sub-TLV 13.";
+
+            leaf-list address {
+              type inet:ipv6-address;
+              description
+                "Contains a 16-octet IPv6 address for a neighboring
+                router on the link described by the (main) TLV. This
+                sub-TLV can occur multiple times.";
+              reference
+                "RFC6119: IPv6 Traffic Engineering in IS-IS. sub-TLV
+                13: ISIS TLV 22,23,141,222,223.";
+            }
+          }
+        }
+
+        container extended-admin-group {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP'" {
+            description
+              "Only include the extended admin group when the
+              sub-TLV type is 14.";
+          }
+          description
+            "This container defines sub-TLV 14.";
+          container state {
+            description
+              "State parameters of sub-TLV 14.";
+
+            leaf-list extended-admin-group {
+              type uint32;
+              description
+                "The extended-admin-group sub-TLV is used in addition
+                to the Administrative Groups when it is desirable to
+                make more than 32 colors available for advertisement
+                in a network.";
+              reference
+                "RFC7308: Extended Administrative Groups in MPLS
+                Traffic Engineering (MPLS-TE). sub-TLV 14: TLV
+                22,23,141,222,223.";
+            }
+          }
+        }
+
+        container te-default-metric {
+          when "../state/type = " +
+               "'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC'" {
+            description
+              "Only include the default traffic engineering m