Remove dependency on Honeycomb/VBD 70/70170/2
authorLorand Jakab <lojakab@cisco.com>
Wed, 28 Mar 2018 23:15:06 +0000 (02:15 +0300)
committerLorand Jakab <lojakab@cisco.com>
Wed, 28 Mar 2018 23:15:06 +0000 (02:15 +0300)
Change-Id: I1f4213c18773934760fa6d9745f37fe69cfbeba6
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
features/odl-lispflowmapping-neutron/pom.xml
mappingservice/neutron/pom.xml
mappingservice/neutron/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170607/InterfaceNameOrIndexBuilder.java [new file with mode: 0644]
mappingservice/neutron/src/main/yang/ietf-ip.yang [new file with mode: 0644]
mappingservice/neutron/src/main/yang/odl-external-reference.yang [new file with mode: 0644]
mappingservice/neutron/src/main/yang/v3po.yang [new file with mode: 0644]
mappingservice/neutron/src/main/yang/vbridge-topology.yang [new file with mode: 0644]

index ef9d17a51070d34ee09c95fcec37f654802c547a..c0279caf9f4e7085648ff1fa06bb3774efe196e1 100644 (file)
@@ -32,13 +32,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.honeycomb.vbd</groupId>
-      <artifactId>odl-vbd</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
-      <type>xml</type>
-      <classifier>features</classifier>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.netconf</groupId>
       <artifactId>odl-netconf-tcp</artifactId>
index 02588b4acade613b840c588c8e2180f39574f598..6d6195afd53f2f78dd5c6917e1fb176227e62c79 100644 (file)
@@ -3,12 +3,15 @@
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
-    <groupId>org.opendaylight.lispflowmapping</groupId>
-    <artifactId>mappingservice-parent</artifactId>
-    <version>1.8.0-SNAPSHOT</version>
+    <groupId>org.opendaylight.mdsal</groupId>
+    <artifactId>binding-parent</artifactId>
+    <version>0.13.0-SNAPSHOT</version>
+    <relativePath/>
   </parent>
 
+  <groupId>org.opendaylight.lispflowmapping</groupId>
   <artifactId>mappingservice.neutron</artifactId>
+  <version>1.8.0-SNAPSHOT</version>
   <packaging>bundle</packaging>
   <!-- <name> formatting is used by autorelease to parse and notify projects on
        build failure. Please do not modify this unless you have a good reason. -->
 
   <dependencyManagement>
     <dependencies>
+      <dependency>
+        <groupId>org.opendaylight.lispflowmapping</groupId>
+        <artifactId>lispflowmapping-artifacts</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
       <dependency>
         <groupId>org.opendaylight.netconf</groupId>
         <artifactId>netconf-artifacts</artifactId>
       <version>0.11.0-SNAPSHOT</version>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.lispflowmapping</groupId>
-      <artifactId>common.unittest.tools</artifactId>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>yang-ext</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>yang-ext</artifactId>
+      <artifactId>ietf-interfaces</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.opendaylight.honeycomb.vbd</groupId>
-      <artifactId>vbd-api</artifactId>
-      <version>1.4.0-SNAPSHOT</version>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>iana-if-type-2014-05-08</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.netconf</groupId>
@@ -79,6 +88,7 @@
     <dependency>
       <groupId>junit-addons</groupId>
       <artifactId>junit-addons</artifactId>
+      <version>1.4</version>
     </dependency>
     <dependency>
       <groupId>org.powermock</groupId>
diff --git a/mappingservice/neutron/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170607/InterfaceNameOrIndexBuilder.java b/mappingservice/neutron/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/rev170607/InterfaceNameOrIndexBuilder.java
new file mode 100644 (file)
index 0000000..7033020
--- /dev/null
@@ -0,0 +1,18 @@
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607;
+
+/**
+ * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
+ * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
+ *
+ * The reason behind putting it under src/main/java is:
+ * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
+ * loss of user code.
+ *
+ */
+public class InterfaceNameOrIndexBuilder {
+
+    public static InterfaceNameOrIndex getDefaultInstance(java.lang.String defaultValue) {
+        return new InterfaceNameOrIndex(defaultValue);
+    }
+
+}
diff --git a/mappingservice/neutron/src/main/yang/ietf-ip.yang b/mappingservice/neutron/src/main/yang/ietf-ip.yang
new file mode 100644 (file)
index 0000000..f6c59ed
--- /dev/null
@@ -0,0 +1,742 @@
+module ietf-ip {
+
+  yang-version 1;
+
+  namespace
+    "urn:ietf:params:xml:ns:yang:ietf-ip";
+
+  prefix ip;
+
+  import ietf-interfaces {
+    prefix if;
+  }
+  import ietf-inet-types {
+    prefix inet;
+  }
+  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
+  configuring IP implementations.
+
+  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 7277; see
+  the RFC itself for full legal notices.";
+
+  revision "2014-06-16" {
+    description "Initial revision.";
+    reference
+      "RFC 7277: A YANG Data Model for IP Management";
+
+  }
+
+
+  feature ipv4-non-contiguous-netmasks {
+    description
+      "Indicates support for configuring non-contiguous
+    subnet masks.";
+  }
+
+  feature ipv6-privacy-autoconf {
+    description
+      "Indicates support for Privacy Extensions for Stateless Address
+    Autoconfiguration in IPv6.";
+    reference
+      "RFC 4941: Privacy Extensions for Stateless Address
+         Autoconfiguration in IPv6";
+
+  }
+
+  typedef ip-address-origin {
+    type enumeration {
+      enum "other" {
+        value 0;
+        description
+          "None of the following.";
+      }
+      enum "static" {
+        value 1;
+        description
+          "Indicates that the address has been statically
+        configured - for example, using NETCONF or a Command Line
+        Interface.";
+      }
+      enum "dhcp" {
+        value 2;
+        description
+          "Indicates an address that has been assigned to this
+        system by a DHCP server.";
+      }
+      enum "link-layer" {
+        value 3;
+        description
+          "Indicates an address created by IPv6 stateless
+        autoconfiguration that embeds a link-layer address in its
+        interface identifier.";
+      }
+      enum "random" {
+        value 4;
+        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" {
+        value 0;
+        description
+          "None of the following.";
+      }
+      enum "static" {
+        value 1;
+        description
+          "Indicates that the mapping has been statically
+        configured - for example, using NETCONF or a Command Line
+        Interface.";
+      }
+      enum "dynamic" {
+        value 2;
+        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.";
+  }
+
+  augment /if:interfaces/if:interface {
+    description
+      "Parameters for configuring IP on interfaces.
+
+    If an interface is not capable of running IP, the server
+    must not allow the client to configure these parameters.";
+    container ipv4 {
+      presence
+        "Enables IPv4 unless the 'enabled' leaf
+      (which defaults to 'true') is set to 'false'";
+      description
+        "Parameters for the IPv4 address family.";
+      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 forwarding {
+        type boolean;
+        default 'false';
+        description
+          "Controls IPv4 packet forwarding of datagrams received by,
+        but not addressed to, this interface.  IPv4 routers
+        forward datagrams.  IPv4 hosts do not (except those
+        source-routed via the host).";
+      }
+
+      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";
+
+      }
+
+      list address {
+        key "ip";
+        description
+          "The list of configured IPv4 addresses on the interface.";
+        leaf ip {
+          type inet:ipv4-address-no-zone;
+          description
+            "The IPv4 address on the interface.";
+        }
+
+        choice subnet {
+          mandatory true;
+          description
+            "The subnet can be specified as a prefix-length, or,
+          if the server supports non-contiguous netmasks, as
+          a netmask.";
+          leaf prefix-length {
+            type uint8 {
+              range "0..32";
+            }
+            description
+              "The length of the subnet prefix.";
+          }
+          leaf netmask {
+            if-feature ipv4-non-contiguous-netmasks;
+            type yang:dotted-quad;
+            description
+              "The subnet specified as a netmask.";
+          }
+        }  // choice subnet
+      }  // list address
+
+      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 inet:ipv4-address-no-zone;
+          description
+            "The IPv4 address of the neighbor node.";
+        }
+
+        leaf link-layer-address {
+          type yang:phys-address;
+          mandatory true;
+          description
+            "The link-layer address of the neighbor node.";
+        }
+      }  // list neighbor
+    }  // container ipv4
+
+    container ipv6 {
+      presence
+        "Enables IPv6 unless the 'enabled' leaf
+      (which defaults to 'true') is set to 'false'";
+      description
+        "Parameters for the IPv6 address family.";
+      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 forwarding {
+        type boolean;
+        default 'false';
+        description
+          "Controls IPv6 packet forwarding of datagrams received by,
+        but not addressed to, this interface.  IPv6 routers
+        forward datagrams.  IPv6 hosts do not (except those
+        source-routed via the host).";
+        reference
+          "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+                 Section 6.2.1, IsRouter";
+
+      }
+
+      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";
+
+      }
+
+      list address {
+        key "ip";
+        description
+          "The list of configured IPv6 addresses on the interface.";
+        leaf ip {
+          type inet:ipv6-address-no-zone;
+          description
+            "The IPv6 address on the interface.";
+        }
+
+        leaf prefix-length {
+          type uint8 {
+            range "0..128";
+          }
+          mandatory true;
+          description
+            "The length of the subnet prefix.";
+        }
+      }  // list address
+
+      list neighbor {
+        key "ip";
+        description
+          "A list of mappings from IPv6 addresses to
+        link-layer addresses.
+
+        Entries in this list are used as static entries in the
+        Neighbor Cache.";
+        reference
+          "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
+
+        leaf ip {
+          type inet:ipv6-address-no-zone;
+          description
+            "The IPv6 address of the neighbor node.";
+        }
+
+        leaf link-layer-address {
+          type yang:phys-address;
+          mandatory true;
+          description
+            "The link-layer address of the neighbor node.";
+        }
+      }  // list neighbor
+
+      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";
+
+      }
+
+      container autoconf {
+        description
+          "Parameters to control the autoconfiguration of IPv6
+        addresses, as described in RFC 4862.";
+        reference
+          "RFC 4862: IPv6 Stateless Address Autoconfiguration";
+
+        leaf create-global-addresses {
+          type boolean;
+          default 'true';
+          description
+            "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 {
+          if-feature ipv6-privacy-autoconf;
+          type boolean;
+          default 'false';
+          description
+            "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 {
+          if-feature ipv6-privacy-autoconf;
+          type uint32;
+          units "seconds";
+          default '604800';
+          description
+            "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 {
+          if-feature ipv6-privacy-autoconf;
+          type uint32;
+          units "seconds";
+          default '86400';
+          description
+            "The time period during which the temporary address is
+          preferred.";
+          reference
+            "RFC 4941: Privacy Extensions for Stateless Address
+                 Autoconfiguration in IPv6
+                 - TEMP_PREFERRED_LIFETIME";
+
+        }
+      }  // container autoconf
+    }  // container ipv6
+  }
+
+  augment /if:interfaces-state/if:interface {
+    description
+      "Data nodes for the operational state of IP on interfaces.";
+    container ipv4 {
+      presence
+        "Present if IPv4 is enabled on this interface";
+      config false;
+      description
+        "Interface-specific parameters for the IPv4 address family.";
+      leaf forwarding {
+        type boolean;
+        description
+          "Indicates whether IPv4 packet forwarding is enabled or
+        disabled on this interface.";
+      }
+
+      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.";
+        reference
+          "RFC 791: Internet Protocol";
+
+      }
+
+      list address {
+        key "ip";
+        description
+          "The list of IPv4 addresses on the interface.";
+        leaf ip {
+          type inet:ipv4-address-no-zone;
+          description
+            "The IPv4 address on the interface.";
+        }
+
+        choice subnet {
+          description
+            "The subnet can be specified as a prefix-length, or,
+          if the server supports non-contiguous netmasks, as
+          a netmask.";
+          leaf prefix-length {
+            type uint8 {
+              range "0..32";
+            }
+            description
+              "The length of the subnet prefix.";
+          }
+          leaf netmask {
+            if-feature ipv4-non-contiguous-netmasks;
+            type yang:dotted-quad;
+            description
+              "The subnet specified as a netmask.";
+          }
+        }  // choice subnet
+
+        leaf origin {
+          type ip-address-origin;
+          description
+            "The origin of this address.";
+        }
+      }  // list address
+
+      list neighbor {
+        key "ip";
+        description
+          "A list of mappings from IPv4 addresses to
+        link-layer addresses.
+
+        This list represents the ARP Cache.";
+        reference
+          "RFC 826: An Ethernet Address Resolution Protocol";
+
+        leaf ip {
+          type inet:ipv4-address-no-zone;
+          description
+            "The IPv4 address of the neighbor node.";
+        }
+
+        leaf link-layer-address {
+          type yang:phys-address;
+          description
+            "The link-layer address of the neighbor node.";
+        }
+
+        leaf origin {
+          type neighbor-origin;
+          description
+            "The origin of this neighbor entry.";
+        }
+      }  // list neighbor
+    }  // container ipv4
+
+    container ipv6 {
+      presence
+        "Present if IPv6 is enabled on this interface";
+      config false;
+      description
+        "Parameters for the IPv6 address family.";
+      leaf forwarding {
+        type boolean;
+        default 'false';
+        description
+          "Indicates whether IPv6 packet forwarding is enabled or
+        disabled on this interface.";
+        reference
+          "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
+                 Section 6.2.1, IsRouter";
+
+      }
+
+      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.";
+        reference
+          "RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
+                 Section 5";
+
+      }
+
+      list address {
+        key "ip";
+        description
+          "The list of IPv6 addresses on the interface.";
+        leaf ip {
+          type inet:ipv6-address-no-zone;
+          description
+            "The IPv6 address on the interface.";
+        }
+
+        leaf prefix-length {
+          type uint8 {
+            range "0..128";
+          }
+          mandatory true;
+          description
+            "The length of the subnet prefix.";
+        }
+
+        leaf origin {
+          type ip-address-origin;
+          description
+            "The origin of this address.";
+        }
+
+        leaf status {
+          type enumeration {
+            enum "preferred" {
+              value 0;
+              description
+                "This is a valid address that can appear as the
+              destination or source address of a packet.";
+            }
+            enum "deprecated" {
+              value 1;
+              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" {
+              value 2;
+              description
+                "This isn't a valid address, and it shouldn't appear
+              as the destination or source address of a packet.";
+            }
+            enum "inaccessible" {
+              value 3;
+              description
+                "The address is not accessible because the interface
+              to which this address is assigned is not
+              operational.";
+            }
+            enum "unknown" {
+              value 4;
+              description
+                "The status cannot be determined for some reason.";
+            }
+            enum "tentative" {
+              value 5;
+              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" {
+              value 6;
+              description
+                "The address has been determined to be non-unique on
+              the link and so must not be used.";
+            }
+            enum "optimistic" {
+              value 7;
+              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";
+
+        }
+      }  // list address
+
+      list neighbor {
+        key "ip";
+        description
+          "A list of mappings from IPv6 addresses to
+        link-layer addresses.
+
+        This list represents the Neighbor Cache.";
+        reference
+          "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
+
+        leaf ip {
+          type inet:ipv6-address-no-zone;
+          description
+            "The IPv6 address of the neighbor node.";
+        }
+
+        leaf link-layer-address {
+          type yang:phys-address;
+          description
+            "The link-layer address of the neighbor node.";
+        }
+
+        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 state {
+          type enumeration {
+            enum "incomplete" {
+              value 0;
+              description
+                "Address resolution is in progress, and the link-layer
+              address of the neighbor has not yet been
+              determined.";
+            }
+            enum "reachable" {
+              value 1;
+              description
+                "Roughly speaking, the neighbor is known to have been
+              reachable recently (within tens of seconds ago).";
+            }
+            enum "stale" {
+              value 2;
+              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" {
+              value 3;
+              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" {
+              value 4;
+              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";
+
+        }
+      }  // list neighbor
+    }  // container ipv6
+  }
+}  // module ietf-ip
diff --git a/mappingservice/neutron/src/main/yang/odl-external-reference.yang b/mappingservice/neutron/src/main/yang/odl-external-reference.yang
new file mode 100644 (file)
index 0000000..e82bfe2
--- /dev/null
@@ -0,0 +1,41 @@
+module odl-external-reference {
+    // vi: set et smarttab sw=4 tabstop=4:
+
+    yang-version 1;
+    // FIXME: this mode should go to OpenDaylight/mdsal
+    namespace "urn:opendaylight:params:xml:ns:yang:external:reference";
+    prefix "extref";
+
+    organization "Cisco Systems, Inc.";
+
+    contact "Robert Varga <rovarga@cisco.com>";
+
+    description
+        "Model defining the base type for external references for use instead
+        of an instance-identifier, which does not allow referencing entities
+        unknown in the model (due to imports, etc.).
+
+        Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+
+        This program and the accompanying materials are made available under the
+        terms of the Eclipse Public License v1.0 which accompanies this distribution,
+        and is available at http://www.eclipse.org/legal/epl-v10.html";
+
+    revision "2016-01-29" {
+        description "Initial model";
+    }
+
+    typedef external-reference {
+        description "Reference to a YANG-modeled node which resides outside
+            of this system. The format must use module names as namespace
+            prefixes -- in a similar fashion RESTCONF does. The reference
+            is evaluated from the root of the external system.
+
+            This data type does not hold the coordinates of the external
+            system, nor does it specify which data store on the external
+            system should be used to satisfy the reference. This information
+            should be described in the model which instantiates a leaf of
+            this type.";
+        type string;
+    }
+}
diff --git a/mappingservice/neutron/src/main/yang/v3po.yang b/mappingservice/neutron/src/main/yang/v3po.yang
new file mode 100644 (file)
index 0000000..58ef068
--- /dev/null
@@ -0,0 +1,785 @@
+module v3po {
+  yang-version 1;
+  namespace "urn:opendaylight:params:xml:ns:yang:v3po";
+  prefix "v3po";
+
+  revision "2017-06-07" {
+    description "Eliminated config leafrefs in operational tree";
+  }
+
+  revision "2017-03-15" {
+    description
+      "Revision changes:
+       - acl and ietf-acl moved to vpp-interface-acl
+       - vpp-state and rpc moved to vpp-management
+       - bridge domains moved to standalone container";
+  }
+
+  revision "2016-12-14" {
+    description
+      "This revision adds the following new features:
+       - ingress/egress ACLs support
+       - moved ACL definitions to vpp-acl module
+       - updated l2 container constraint (permit IP address on BVI interface)
+       - added PID of vpp process to vpp-state
+       - added support for Loopback interfaces
+       - added support for port mirroring";
+  }
+
+  revision "2015-01-05" {
+    description "Initial revision of v3po model";
+  }
+
+  import iana-if-type {
+    prefix "ianaift";
+  }
+  import ietf-interfaces {
+    prefix "if";
+  }
+  import ietf-yang-types {
+    prefix "yang";
+  }
+  import ietf-inet-types {
+    prefix "inet";
+  }
+  import ietf-ip {
+    prefix "ip";
+  }
+  import yang-ext {
+    prefix "ext";
+  }
+
+  typedef bridge-domain-ref {
+    type leafref {
+      path "/bridge-domains/bridge-domain/name";
+    }
+    description
+      "This type is used by to reference a bridge domain table";
+  }
+
+  typedef bridged-virtual-interface-ref {
+    type leafref {
+      path "/if:interfaces/if:interface/l2/bridged-virtual-interface";
+    }
+    description
+      "This type is used by to reference a bridged virtual interface";
+  }
+
+  identity vxlan-tunnel {
+    base if:interface-type;
+  }
+
+  identity gre-tunnel {
+    base if:interface-type;
+  }
+
+  identity vhost-user {
+    base if:interface-type;
+  }
+
+  identity tap {
+    base if:interface-type;
+  }
+
+  identity loopback {
+    base if:interface-type;
+  }
+
+  identity l2-fib-action {
+    description "Base identity for l2-fib actions";
+  }
+
+  identity l2-fib-forward {
+    base l2-fib-action;
+    description
+      "Forwards packet with configured mac address";
+  }
+
+  identity l2-fib-filter {
+    base l2-fib-action;
+    description
+      "Drops packet with configured mac address";
+  }
+
+  typedef l2-fib-action {
+    type identityref {
+      base "l2-fib-action";
+    }
+    description "Identifies a specific L2 FIB action";
+  }
+
+  typedef vxlan-vni {
+    // FIXME: should be in a vxlan-specific model
+    description "VNI used in a VXLAN tunnel";
+    type uint32 {
+      range "0..16777215";
+    }
+  }
+
+  typedef vhost-user-role {
+    type enumeration {
+      enum "server";
+      enum "client";
+    }
+  }
+
+  identity vxlan-gpe-tunnel {
+    base if:interface-type;
+  }
+
+  typedef vxlan-gpe-vni {
+    description "VNI used in a VXLAN-GPE tunnel";
+    type uint32 {
+      range "0..16777215";
+    }
+  }
+
+  typedef vxlan-gpe-next-protocol {
+    type enumeration {
+      enum "ipv4" {
+        value 1;
+      }
+      enum "ipv6" {
+        value 2;
+      }
+      enum "ethernet" {
+        value 3;
+      }
+      enum "nsh" {
+        value 4;
+      }
+    }
+  }
+
+
+  typedef span-state {
+    type enumeration {
+      enum "receive" {
+        value "1";
+        description
+            "Receive (Rx) SPAN—The goal of receive (or ingress) SPAN
+             is to monitor as much as possible all the packets received by the source interface.
+             A copy of each packet received by the source is sent to the destination port for that SPAN session.
+             You can monitor a series or range of ingress ports in a SPAN session.";
+      }
+
+      enum "transmit" {
+        value "2";
+        description
+            "Transmit (Tx) SPAN—The goal of transmit (or egress) SPAN is to monitor as much as possible all the packets
+             sent by the source interface after all modification and processing is performed by the switch.
+             A copy of each packet sent by the source is sent to the destination port for that SPAN session.
+             The copy is provided after the packet is modified. Monitors a range of egress ports in a SPAN session.";
+      }
+
+      enum "both" {
+        value "3";
+        description
+            "In a SPAN session, you can monitor a series or range of ports for both received and sent packets.";
+      }
+    }
+  }
+
+  grouping bridge-domain-attributes {
+    leaf flood {
+      type boolean;
+      default true;
+      description
+      "Enable/disable L2 flooding.";
+    }
+    leaf forward {
+      type boolean;
+      default true;
+      description
+      "Enable/disable L2 forwarding.";
+    }
+    leaf learn {
+      type boolean;
+      default true;
+      description
+      "Enable/disable L2 learning.";
+    }
+    leaf unknown-unicast-flood {
+      type boolean;
+      default true;
+    }
+    leaf arp-termination {
+      type boolean;
+      default false;
+    }
+
+    container arp-termination-table {
+      when "../v3po:arp-termination = 'true'";
+
+      // TODO(HONEYCOMB-133): add support for read (after VPP-230 is done)
+      list arp-termination-table-entry {
+        key "ip-address phys-address";
+        leaf ip-address {
+          // FIXME: change to ip-address-no-zone after https://bugs.opendaylight.org/show_bug.cgi?id=6413 is resolved
+          type inet:ip-address;
+        }
+        leaf phys-address {
+          type yang:phys-address;
+        }
+      }
+    }
+  }
+
+  // TODO express constraints for L2 FIB entries in YANG if possible
+  grouping l2-fib-attributes {
+    container l2-fib-table {
+      list l2-fib-entry {
+        key "phys-address";
+
+        leaf phys-address {
+          type yang:phys-address;
+        }
+
+        leaf outgoing-interface {
+          // either filter must be specified or interface(can't be both)
+          when "../action != 'l2-fib-filter'";
+          type if:interface-ref;
+          // mandatory true; - when is not actually resolved, so mandatory can't be in place
+          description
+            "One of interfaces assigned to the FIB table's bridge-domain.";
+        }
+        leaf static-config {
+          type boolean;
+          default false;
+          description
+            "Static entries cannot be overridden by mac learning.";
+        }
+        leaf action {
+          type l2-fib-action;
+          mandatory true;
+          description
+            "L2 FIB action. For filter action, entry must be configured as static.";
+        }
+        leaf bridged-virtual-interface {
+          when "../action = 'forward'";
+          type boolean;
+          config false; // FIXME setting bvi is currently not supported by VPP's binary api
+        }
+      }
+    }
+  }
+
+  grouping interface-tag {
+    leaf tag {
+      type string {
+        length 1..63;
+      }
+      description
+        "ASCII string placeholder for interface metadata. Value is stored in vpp,
+         and returned in read requests. No processing involved.";
+    }
+  }
+
+  grouping tap-interface-base-attributes {
+    leaf tap-name {
+      type string{
+        pattern "[a-zA-Z0-9\-;.+@$#^&*!_()=\[\]]*";
+      }
+    }
+    uses interface-tag;
+  }
+
+  grouping tap-interface-config-attributes {
+    leaf mac {
+      type yang:phys-address;
+      mandatory false;
+      description "Mac address to be set for the tap interface. Random will be used if not configured";
+    }
+
+    leaf device-instance {
+      type uint32;
+      mandatory false;
+      description "Custom device instance. Autogenerated will be used if not configured";
+    }
+  }
+
+  grouping loopback-interface-base-attributes {
+    leaf mac {
+      type yang:phys-address;
+      mandatory false;
+      description "Mac address of the loopback interface";
+    }
+  }
+
+  grouping ethernet-base-attributes {
+    leaf mtu {
+      type uint16 {
+        range "64..9216";
+      }
+      units "octets";
+      default 9216;
+      description
+      "The size, in octets, of the largest packet that the
+       hardware interface will send and receive.";
+    }
+  }
+
+  grouping routing-base-attributes {
+    leaf ipv4-vrf-id {
+      type uint32;
+    }
+    leaf ipv6-vrf-id {
+      type uint32;
+    }
+    description
+      "Defines VRF tables used for ipv4 and ipv6 traffic";
+  }
+
+  grouping ethernet-state-attributes {
+    leaf manufacturer-description {
+      type string;
+      config false;
+    }
+    leaf duplex {
+      type enumeration {
+        enum "half";
+        enum "full";
+      }
+      config false;
+    }
+  }
+
+  grouping vhost-user-interface-base-attributes {
+    leaf socket {
+      type string {
+        length 1..255;
+      }
+    }
+    leaf role {
+      type vhost-user-role;
+      default "server";
+    }
+    uses interface-tag;
+    description "vhost-user settings";
+  }
+
+  grouping vhost-user-interface-config-attributes {
+    leaf device-instance {
+      type uint32;
+      mandatory false;
+      description "Custom device instance. Autogenerated will be used if not configured";
+    }
+    description "vhost-user settings";
+  }
+
+  grouping vhost-user-interface-state-attributes {
+    leaf features {
+      type uint64;
+      config false;
+    }
+    leaf virtio-net-hdr-size {
+      type uint32;
+      config false;
+    }
+    leaf num-memory-regions {
+      type uint32;
+      config false;
+    }
+    leaf connect-error {
+      type string;
+      config false;
+    }
+  }
+
+  /*
+   * Defines the supported decap node for vxlan.
+   */
+  identity decap-node {
+    description
+    "Define the supported decap node";
+  }
+  identity l2-input {
+    base decap-node;
+    description
+    "The next decap node is l2-input";
+  }
+  identity nsh-proxy {
+    base decap-node;
+    description
+    "The next decap node is nsh-proxy";
+  }
+  typedef vxlan-decap-node {
+    type identityref {
+      base "decap-node";
+    }
+  }
+  grouping vxlan-base-attributes {
+    // FIXME: this should be in an vxlan-specific extension
+    leaf src {
+      /*mandatory true;*/
+      type inet:ip-address;
+    }
+    leaf dst {
+      /*mandatory true;*/
+      type inet:ip-address;
+    }
+    leaf vni {
+      /*mandatory true;*/
+      type vxlan-vni;
+    }
+    leaf encap-vrf-id {
+      type uint32;
+    }
+    leaf decap-next {
+      type vxlan-decap-node;
+      default "l2-input";
+    }
+  }
+
+  grouping gre-base-attributes {
+    leaf src {
+      /*mandatory true;*/
+      type inet:ip-address;
+    }
+    leaf dst {
+      /*mandatory true;*/
+      type inet:ip-address;
+    }
+    leaf outer-fib-id {
+      type uint32;
+    }
+  }
+
+  grouping vxlan-gpe-base-attributes {
+    leaf local {
+      /*mandatory true;*/
+      type inet:ip-address;
+    }
+    leaf remote {
+      /*mandatory true;*/
+      type inet:ip-address;
+    }
+    leaf vni {
+      /*mandatory true;*/
+      type vxlan-gpe-vni;
+    }
+    leaf next-protocol {
+      type vxlan-gpe-next-protocol;
+    }
+    leaf encap-vrf-id {
+      type uint32;
+    }
+    leaf decap-vrf-id {
+      type uint32;
+    }
+  }
+
+  grouping l2-config-attributes {
+      description
+      "Parameters for configuring Layer2 features on interfaces.";
+
+      choice interconnection {
+        case xconnect-based {
+          leaf xconnect-outgoing-interface {
+            /* Don't allow selection of this interface */
+            must "../../if:name != current()";
+            type if:interface-ref;
+            description
+              "L2 xconnect mode";
+          }
+        }
+        case bridge-based {
+          uses bridge-based-attributes;
+        }
+      }
+  }
+
+  grouping l2-state-attributes {
+    description
+    "Parameters for configuring Layer2 features on interfaces.";
+
+    choice interconnection {
+      case xconnect-based {
+        leaf xconnect-outgoing-interface {
+          /* Don't allow selection of this interface */
+          must "../../if:name != current()";
+          type if:interface-state-ref;
+          description
+            "L2 xconnect mode";
+        }
+      }
+      case bridge-based {
+        uses bridge-based-attributes;
+      }
+    }
+  }
+
+  grouping bridge-based-attributes {
+    leaf bridge-domain {
+      type bridge-domain-ref;
+      mandatory true;
+      description
+        "Interfaces in a bridge-domain forward packets to other
+         interfaces in the same bridge-domain based on
+         destination mac address.";
+    }
+    leaf split-horizon-group {
+      when "../bridge-domain";
+      type uint8 {
+        range "0..255";
+      }
+      default 0; //no split horizon group
+      description
+        "Interface's split-horizon group. Interfaces in the same
+         bridge-domain and split-horizon group can not forward
+         packets between each other. ";
+    }
+    leaf bridged-virtual-interface {
+      when "../bridge-domain";
+      type boolean;
+      default false;
+      description
+        "Interface forward packets in the bridge-domain
+         associated with the BVI.";
+    }
+  }
+
+  grouping span-attributes {
+    description "Parameters of the SPAN feature";
+
+    container mirrored-interfaces {
+      list mirrored-interface {
+        key "iface-ref";
+        leaf iface-ref {
+          type if:interface-ref;
+        }
+
+        leaf state {
+          type span-state;
+          mandatory true;
+        }
+      }
+    }
+  }
+
+  grouping span-state-attributes {
+      description "Parameters of the SPAN feature";
+
+      container mirrored-interfaces {
+        list mirrored-interface {
+          key "iface-ref";
+          leaf iface-ref {
+            type if:interface-state-ref;
+          }
+
+          leaf state {
+            type span-state;
+            mandatory true;
+          }
+        }
+      }
+    }
+
+  augment /if:interfaces/if:interface {
+    ext:augment-identifier "vpp-interface-augmentation";
+
+    // FIXME using ietf-interfaces model for vpp interfaces makes it hard to implement because:
+    // 1. The link between interface type and this augmentation is unclear
+    // 2. Only this augmentation with combination of ifc type is trigger to do something for vpp, what if user only configures base interface stuff ? + We need to get leaves defined by ietf-interfaces when we are processing this augment
+    // 3. The ietf-interfaces model does not define groupings which makes types reuse difficult
+
+    container tap {
+      when "../if:type = 'v3po:tap'";
+      uses tap-interface-base-attributes;
+      uses tap-interface-config-attributes;
+    }
+
+    container loopback {
+      presence "Presence of this container indicates loopback nature of the interface";
+      when "../if:type = 'v3po:loopback'";
+      uses loopback-interface-base-attributes;
+    }
+
+    container ethernet {
+      when "../if:type = 'ianaift:ethernetCsmacd'";
+      uses ethernet-base-attributes;
+    }
+
+    container routing {
+      uses routing-base-attributes;
+    }
+
+    container vhost-user {
+      when "../if:type = 'v3po:vhost-user'";
+      uses vhost-user-interface-base-attributes;
+      uses vhost-user-interface-config-attributes;
+    }
+
+    container vxlan {
+      when "../if:type = 'v3po:vxlan-tunnel'";
+      uses vxlan-base-attributes;
+    }
+
+    container gre {
+      when "../if:type = 'v3po:gre-tunnel'";
+      uses gre-base-attributes;
+    }
+
+    container l2 {
+      must "bridged-virtual-interface = 'true' or " +
+           "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
+           "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
+
+      uses l2-config-attributes;
+    }
+
+    container vxlan-gpe {
+      when "../if:type = 'v3po:vxlan-gpe-tunnel'";
+
+      uses vxlan-gpe-base-attributes;
+    }
+
+    container span {
+      uses span-attributes;
+    }
+  }
+
+  container bridge-domains {
+    presence "Bridge domains configuration";
+    list bridge-domain {
+      key "name";
+
+      leaf name {
+        type string;
+      }
+
+      uses bridge-domain-attributes;
+      uses l2-fib-attributes;
+
+      description
+        "bridge-domain configuration";
+    }
+  }
+
+  augment /if:interfaces-state/if:interface {
+    ext:augment-identifier "vpp-interface-state-augmentation";
+
+    leaf description {
+      type string;
+    }
+
+    container tap {
+      when "../if:type = 'v3po:tap'";
+      uses tap-interface-base-attributes;
+    }
+
+    container ethernet {
+      when "../if:type = 'ianaift:ethernetCsmacd'";
+      uses ethernet-base-attributes;
+      uses ethernet-state-attributes;
+    }
+
+    container routing {
+      uses routing-base-attributes;
+    }
+
+    container vhost-user {
+      when "../if:type = 'v3po:vhost-user'";
+      uses vhost-user-interface-base-attributes;
+      uses vhost-user-interface-state-attributes;
+    }
+
+    container vxlan {
+      when "../if:type = 'v3po:vxlan-tunnel'";
+      uses vxlan-base-attributes;
+    }
+    container vxlan-gpe {
+      when "../if:type = 'v3po:vxlan-gpe-tunnel'";
+
+      uses vxlan-gpe-base-attributes;
+    }
+
+    container gre {
+      when "../if:type = 'gre-tunnel'";
+      uses gre-base-attributes;
+    }
+
+    container l2 {
+      must "bridged-virtual-interface = 'true' or " +
+           "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
+           "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
+
+      uses l2-state-attributes;
+    }
+
+    container span {
+      uses span-state-attributes;
+    }
+  }
+
+  augment /if:interfaces-state/if:interface/if:statistics {
+    ext:augment-identifier "vpp-interface-statistics-augmentation";
+    leaf in-errors-no-buf {
+      type yang:counter64;
+    }
+    leaf in-errors-miss {
+      type yang:counter64;
+    }
+    leaf out-discards-fifo-full {
+      type yang:counter64;
+    }
+  }
+
+  container bridge-domains-state {
+      // FIXME: Should this live in bridge-domain.yang in a modular fashion ?
+      config "false";
+      list bridge-domain {
+
+        key "name";
+        leaf name {
+          type string;
+        }
+
+        uses bridge-domain-attributes;
+        uses l2-fib-attributes;
+
+        description
+          "bridge-domain operational data";
+      }
+  }
+
+  // VPP Notifications
+
+  typedef interface-status {
+    type enumeration {
+      enum up {
+        value 1;
+      }
+      enum down {
+        value 0;
+      }
+    }
+  }
+
+  typedef interface-name-or-index {
+    type union {
+      type string;
+      type uint32;
+    }
+  }
+
+  notification interface-state-change {
+    leaf name {
+        type interface-name-or-index;
+    }
+
+    leaf admin-status {
+        type interface-status;
+    }
+
+    leaf oper-status {
+        type interface-status;
+    }
+  }
+
+  notification interface-deleted {
+    leaf name {
+        type interface-name-or-index;
+    }
+  }
+}
diff --git a/mappingservice/neutron/src/main/yang/vbridge-topology.yang b/mappingservice/neutron/src/main/yang/vbridge-topology.yang
new file mode 100644 (file)
index 0000000..cbe682f
--- /dev/null
@@ -0,0 +1,174 @@
+module vbridge-topology {
+    // vi: set et smarttab sw=4 tabstop=4:
+
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:vbridge:topology";
+    prefix "vbridge";
+
+    organization "Cisco Systems, Inc.";
+
+    contact "Robert Varga <rovarga@cisco.com>";
+
+    description
+        "Base model describing a virtual bridge domain mapped expressed
+        as a network topology. Implementations of this model are expected
+        to map this topology onto an underlay transport/management topology,
+        such as a NETCONF topology talking to forwarding boxes
+
+        Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+
+        This program and the accompanying materials are made available under the
+        terms of the Eclipse Public License v1.0 which accompanies this distribution,
+        and is available at http://www.eclipse.org/legal/epl-v10.html";
+
+    revision "2016-01-29" {
+        description "Initial cut";
+    }
+
+    import network-topology { prefix nt; revision-date 2013-10-21; }
+    import odl-external-reference { prefix extref; }
+    import v3po { prefix "v3po"; revision-date "2017-06-07"; }
+    import yang-ext { prefix ext; revision-date "2013-07-09"; }
+
+    identity tunnel-type {
+        description "Type of tunneling technology";
+    }
+
+    typedef tunnel-type-ref {
+        description "Reference to a tunneling technology";
+        type identityref {
+            base tunnel-type;
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology/nt:topology-types" {
+        ext:augment-identifier "topology-types-vbridge-augment";
+        container vbridge-topology {
+            presence "Indicates that this topology is a virtual bridge domain topology";
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology" {
+        ext:augment-identifier "topology-vbridge-augment";
+        when "./nt:topology-types/vbridge-topology";
+
+        // Pointer to the NETCONF topology which supports this bridge domain
+        // FIXME: must "../../nt:underlay-topology";
+
+        leaf tunnel-type {
+            description "Tunnel technology to use for encapsulation";
+            type tunnel-type-ref;
+        }
+
+        choice tunnel-parameters {
+            description "Empty container which will be augmented with
+                         parameters specific to a particular underlay
+                         tunnel technology";
+        }
+
+        uses v3po:bridge-domain-attributes;
+    }
+
+    augment "/nt:network-topology/nt:topology/nt:node" {
+        ext:augment-identifier "node-vbridge-augment";
+        when "../nt:topology-types/vbridge-topology";
+
+
+        container bridge-member {
+            presence "Indicates this node is part of the bridge domain";
+
+            // Pointer to the NETCONF node which supports this bridge member
+            must "../../nt:supporting-node";
+
+            // FIXME: this is implementation specific, depends on whether
+            // the underlay has an a concept of a bridge domain.
+            leaf supporting-bridge-domain {
+                description
+                    "Reference to the network element bridge domain, which has
+                    been configured to support this virtual bridge domain on
+                    this bridge member.
+
+                    This reference needs to be resolved against the supporting
+                    node's configuration data store.";
+                config false;
+                type extref:external-reference;
+            }
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
+        ext:augment-identifier "termination-point-vbridge-augment";
+        when "../bridge-member";
+
+        choice interface-type {
+            leaf user-interface {
+                description
+                    "Reference to the network element interface, which is
+                    configured to be a member of this virtual bridge domain.
+
+                    This reference needs to be resolved against the supporting
+                    node's configuration data store.";
+                type extref:external-reference;
+                mandatory true;
+            }
+            leaf tunnel-interface {
+                description
+                    "Reference to the network element interface, which is
+                    configured to on the member to support exchange of packet
+                    passing through this virtual bridge domain towards other
+                    domain members.
+
+                    This reference needs to be resolved against the supporting
+                    node's configuration data store.";
+                config false;
+                type extref:external-reference;
+                mandatory true;
+            }
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology" {
+        ext:augment-identifier "topology-vbridge-cfg-augment";
+        when "class = 'vbridge-startup-config'";
+
+        container vbridge-startup-config {
+            presence "Label for startup config.";
+            description "Topology used for displaying startup
+            VBridge nodes configuration defined in ODL.";
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
+        ext:augment-identifier "termination-point-vbridge-cfg-augment";
+        when "../../vbridge-startup-config";
+
+        choice interface-type-cfg {
+            case virtual-domain-carrier-case {
+                container virtual-domain-carrier {
+                    presence "Label for startup config.";
+                    description
+                        "Reference to the physical network element interface, which
+                         can be used as a super interface for VLAN sub-interfaces
+                         or which IP address can be specified as a source or destination
+                         of encapsulated VXLAN traffic.";
+                    config false;
+                }
+            }
+        }
+    }
+
+    augment "/nt:network-topology/nt:topology/nt:link" {
+        when "../nt:topology-types/vbridge-topology";
+        ext:augment-identifier "link-vbridge-augment";
+        leaf tunnel {
+            description
+                "Reference to the network element tunnel interface supporting
+                cross-connect between two bridge members.
+
+                This reference needs to be resolved against the supporting
+                node's operational data store.";
+            config false;
+            type extref:external-reference;
+        }
+    }
+}