From 887fb8a181146390bccb6eaf5caeb0a84659c750 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Fri, 8 Jun 2018 11:54:53 +0200 Subject: HC2VPP-317 - Implement FIB table management support changes: - Added new custom model vpp-fib-table-management - allows management of IPv4 and IPv6 Fib tables for VPP Change-Id: I3647dd659dbefabab233eacef666c3835e69320d Signed-off-by: Michal Cmarada --- .../fib-management-api/asciidoc/Readme.adoc | 7 ++ fib-management/fib-management-api/pom.xml | 31 ++++++ .../yang/vpp-fib-table-management@2018-05-21.yang | 117 +++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 fib-management/fib-management-api/asciidoc/Readme.adoc create mode 100644 fib-management/fib-management-api/pom.xml create mode 100644 fib-management/fib-management-api/src/main/yang/vpp-fib-table-management@2018-05-21.yang (limited to 'fib-management/fib-management-api') diff --git a/fib-management/fib-management-api/asciidoc/Readme.adoc b/fib-management/fib-management-api/asciidoc/Readme.adoc new file mode 100644 index 000000000..618be1f36 --- /dev/null +++ b/fib-management/fib-management-api/asciidoc/Readme.adoc @@ -0,0 +1,7 @@ += fib-management-api + +Provides vpp-fib-table-management model to store configuration of FIB tables: + +- supports IPv4 and IPv6 Fib table configuration +- uses AddressFamily to distinguish between IPv4 and IPv6 FIB table type +- uses vni-reference type to store FIB table id diff --git a/fib-management/fib-management-api/pom.xml b/fib-management/fib-management-api/pom.xml new file mode 100644 index 000000000..c48cd3412 --- /dev/null +++ b/fib-management/fib-management-api/pom.xml @@ -0,0 +1,31 @@ + + + + + io.fd.hc2vpp.common + api-parent + 1.18.07-SNAPSHOT + ../../common/api-parent + + + 4.0.0 + io.fd.hc2vpp.fib.management + fib-management-api + 1.18.07-SNAPSHOT + ${project.artifactId} + bundle + diff --git a/fib-management/fib-management-api/src/main/yang/vpp-fib-table-management@2018-05-21.yang b/fib-management/fib-management-api/src/main/yang/vpp-fib-table-management@2018-05-21.yang new file mode 100644 index 000000000..7a80f912c --- /dev/null +++ b/fib-management/fib-management-api/src/main/yang/vpp-fib-table-management@2018-05-21.yang @@ -0,0 +1,117 @@ +module vpp-fib-table-management { + yang-version "1.1"; + namespace "urn:opendaylight:params:xml:ns:yang:vpp-fib-table-management"; + prefix "vpp-fib-table-management"; + + organization + "FD.io - The Fast Data Project"; + + contact + "Hc2vpp Wiki + Mailing List "; + + description + "This module contains a collection of YANG definitions + that extend hc2vpp-ietf-routing module + with VPP FIB table management features. + + Copyright (c) 2018 Bell Canada, Pantheon Technologies 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."; + + revision 2018-05-21 { + description "Initial revision."; + } + + typedef vni-reference { + type uint32; + description "VRF index reference"; + } + + identity address-family-identity { + description "Base identity from which identities describing address families are derived."; + } + + identity ipv4 { + base vpp-fib-table-management:address-family-identity; + description "This identity represents an IPv4 address family."; + } + + identity ipv6 { + base vpp-fib-table-management:address-family-identity; + description "This identity represents an IPv6 address family."; + } + + grouping vpp-fib-table-management { + container fib-tables { + description + "The FIB tables that are managed by control-plane-protocol"; + + list table { + key "table-id address-family"; + + description + "FIB table that is represented by VNI index (VRF reference index) and addres-family. + Each FIB table is uniquely identified by its index and addres family (e.g. IPv4 or IPv6). + Table cantains name for easier identification and description for a short summary of its + function. + In VPP this table is mapped to ip_table_add_del VPP API message: + Add/del table request + A table can be added multiple times, but need be deleted only once. + @param is_ipv6 - V4 or V6 table + @param table_id - table ID associated with the route + This table ID will apply to both the unicats and mlticast FIBs + @param name - A client provided name/tag for the table. If this is + not set by the client, then VPP will generate something meaningfull"; + leaf address-family { + type identityref { + base address-family-identity; + } + mandatory true; + description + "A reference to the address-family that the table represents (IPv4 or IPv6). + Mapped to is_ipv6 parameter of ip_table_add_del message."; + } + + leaf table-id { + type vni-reference; + mandatory true; + description + "VRF index reference. + Mapped to table_id parameter of ip_table_add_del message."; + } + + leaf name { + type string { + length "1..64"; + } + description + "Name of FIB table. + Mapped to name parameter of ip_table_add_del message."; + } + + leaf description { + type string; + config true; + description "Description of FIB table"; + } + } + } + } + + container fib-table-management { + description "Configuration parameters for FIB table management"; + + uses vpp-fib-table-management; + } +} -- cgit 1.2.3-korg