summaryrefslogtreecommitdiffstats
path: root/v3po/api
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-01-10 06:15:18 -0800
committerRobert Varga <nite@hq.sk>2016-01-30 00:01:07 +0100
commit36424f46ff5543c2ae475c60bb3e08f299c55799 (patch)
tree604e5edce7433e8fb4c0fbd16f1bf1ffdfd997bb /v3po/api
parentbca403e3d9abfd87a8eeffa88f4a1eb823e6780f (diff)
Initial honeycomb code commit.
This commit drops the basic structure with disabled integration tests. The tests will be enabled in a follow-up patch, which sorts out the current .so loading problems. Change-Id: If70f2f13b2cf49af82996f884218ac05d335c2ed Signed-off-by: Ed Warnicke <eaw@cisco.com> Signed-off-by: Robert Varga <nite@hq.sk>
Diffstat (limited to 'v3po/api')
-rw-r--r--v3po/api/pom.xml64
-rw-r--r--v3po/api/src/main/yang/ietf-ip.yang742
-rw-r--r--v3po/api/src/main/yang/v3po.yang366
3 files changed, 1172 insertions, 0 deletions
diff --git a/v3po/api/pom.xml b/v3po/api/pom.xml
new file mode 100644
index 000000000..e31deea1f
--- /dev/null
+++ b/v3po/api/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015 Cisco and/or its affiliates.
+ 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">
+ <parent>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>api-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../common/api-parent</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>io.fd.honeycomb.v3po</groupId>
+ <artifactId>v3po-api</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>mdsal-model-artifacts</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>iana-if-type-2014-05-08</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-yang-types-20130715</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-interfaces</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types-2013-07-15</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>yang-ext</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/v3po/api/src/main/yang/ietf-ip.yang b/v3po/api/src/main/yang/ietf-ip.yang
new file mode 100644
index 000000000..f6c59edea
--- /dev/null
+++ b/v3po/api/src/main/yang/ietf-ip.yang
@@ -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/v3po/api/src/main/yang/v3po.yang b/v3po/api/src/main/yang/v3po.yang
new file mode 100644
index 000000000..785e48146
--- /dev/null
+++ b/v3po/api/src/main/yang/v3po.yang
@@ -0,0 +1,366 @@
+module v3po {
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:v3po";
+ prefix "v3po";
+
+ 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 "/vpp/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;
+ }
+
+ augment /if:interfaces/if:interface {
+ ext:augment-identifier "vpp-interface-augmentation";
+ container ethernet {
+ when "../if:type = 'ianaift:ethernetCsmacd'";
+ 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.";
+ }
+ }
+ container routing {
+ leaf vrf-id {
+ type uint32;
+ default 0;
+ }
+ }
+ container vxlan {
+ when "../if:type = 'v3po:vxlan-tunnel'";
+
+ leaf src {
+ /* mandatory true; */
+ type inet:ipv4-address;
+ }
+ leaf dst {
+ /* mandatory true; */
+ type inet:ipv4-address;
+ }
+ leaf vni {
+ /* mandatory true; */
+ type uint32;
+ }
+ leaf encap-vrf-id {
+ type uint32;
+ }
+ }
+ container l2 {
+ description
+ "Parameters for configuring Layer2 features on interfaces.";
+ must "(not (../if:ipv4[if:enabled = 'true']/if:address/if:ip) and " +
+ "not (../if:ipv6[if:enabled = 'true']/if:address/if:ip))";
+
+ 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 {
+ leaf bridge-domain {
+ type bridge-domain-ref;
+ 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;
+ 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.";
+ }
+ }
+ }
+ }
+ }
+
+ container vpp {
+ description
+ "VPP config data";
+
+ container bridge-domains {
+ list bridge-domain {
+ key "name";
+ max-elements 1024;
+
+ leaf name {
+ type string;
+ }
+ 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;
+ }
+ list l2-fib {
+ key "phys-address";
+
+ leaf phys-address {
+ type yang:phys-address;
+ }
+ leaf action {
+ type enumeration {
+ enum "forward";
+ enum "filter";
+ }
+ mandatory true;
+ }
+ leaf outgoing-interface {
+ type if:interface-ref;
+ }
+ }
+ }
+ }
+ }
+
+ augment /if:interfaces-state/if:interface {
+ ext:augment-identifier "vpp-interface-state-augmentation";
+
+ leaf description {
+ type string;
+ }
+ container ethernet {
+ when "../if:type = 'ianaift:ethernetCsmacd'";
+ leaf mtu {
+ type uint16;
+ }
+ leaf manufacturer-description {
+ type string;
+ }
+ leaf duplex {
+ type enumeration {
+ enum "half";
+ enum "full";
+ }
+ }
+ }
+ container vxlan {
+ when "../if:type = 'v3po:vxlan-tunnel'";
+
+ leaf src {
+ type inet:ipv4-address;
+ }
+ leaf dst {
+ type inet:ipv4-address;
+ }
+ leaf vni {
+ type uint32;
+ }
+ leaf encap-vrf-id {
+ type uint32;
+ }
+ }
+ container l2 {
+ choice interconnection {
+ case xconnect-based {
+ leaf xconnect-outgoing-interface {
+ type if:interface-ref;
+ }
+ }
+ case bridge-based {
+ leaf bridge-domain {
+ type bridge-domain-ref;
+ }
+ leaf split-horizon-group {
+ type uint8;
+ }
+ leaf bridged-virtual-interface {
+ type boolean;
+ }
+ }
+ }
+ }
+ }
+
+ 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 vpp-state {
+ config false;
+
+ description
+ "VPP operational data";
+
+ container bridge-domains {
+ list bridge-domain {
+
+ key "name";
+ leaf name {
+ type string;
+ }
+ leaf flood {
+ type boolean;
+ }
+ leaf unknown-unicast-flood {
+ type boolean;
+ }
+ leaf arp-termination {
+ type boolean;
+ }
+ leaf forward {
+ type boolean;
+ }
+ leaf learn {
+ type boolean;
+ }
+ list interface {
+ key "name";
+
+ leaf name {
+ type if:interface-state-ref;
+ }
+
+ leaf split-horizon-group {
+ type uint8;
+ }
+
+ leaf bridged-virtual-interface {
+ type boolean;
+ }
+ }
+ list l2-fib {
+ key "phys-address";
+
+ leaf phys-address {
+ type yang:phys-address;
+ }
+ leaf static-config {
+ type boolean;
+ }
+ leaf outgoing-interface {
+ when "../v3po:action = 'forward'";
+ type if:interface-state-ref;
+ }
+ leaf action {
+ type enumeration {
+ enum "forward";
+ enum "filter";
+ }
+ mandatory true;
+ }
+ leaf bridged-virtual-interface {
+ when "../v3po:action = 'forward'";
+ type boolean;
+ }
+ }
+ description
+ "bridge-domain operational data";
+ }
+ }
+
+ container version {
+ leaf name {
+ type string;
+ }
+ leaf build-directory {
+ type string;
+ }
+ leaf build-date {
+ type string;
+ }
+ leaf branch {
+ type string;
+ }
+ description
+ "vlib version info";
+ }
+ }
+
+ rpc vpp-poll-oper-data {
+ output {
+ leaf status {
+ type uint32;
+ }
+ }
+ }
+}