From 3ddcbe95e0035299701905f8efe0e09c56ae9076 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 30 May 2016 14:51:14 +0200 Subject: Implementation of the new vlan model. Missing features that will be added in subsequent commits: - initializers update - unit test update - postman collection update Change-Id: Iff01f6f9b4347261a504fe1a1d7840060cae367f Signed-off-by: Marek Gradzki --- v3po/api/src/main/yang/vpp-vlan.yang | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'v3po/api/src/main/yang/vpp-vlan.yang') diff --git a/v3po/api/src/main/yang/vpp-vlan.yang b/v3po/api/src/main/yang/vpp-vlan.yang index d4e3b64af..fdf878b75 100644 --- a/v3po/api/src/main/yang/vpp-vlan.yang +++ b/v3po/api/src/main/yang/vpp-vlan.yang @@ -32,6 +32,35 @@ module vpp-vlan { } } + // todo add 802dot1ad support to dot1q-types.yang + /* + * Defines the supported IEEE 802.1Q types that can be used for + * VLAN tag matching. + */ + identity vlan-type { + description "Base identity from which all VLAN types + are derived from"; + } + + identity 802dot1q { + base vlan-type; + description + "An 802.1Q VLAN type"; + } + + identity 802dot1ad { + base vlan-type; + description + "An 802.1ad VLAN type"; + } + + typedef vlan-type { + type identityref { + base "vlan-type"; + } + description "Identifies a specific VLAN type"; + } + grouping match-attributes { choice match-type { mandatory true; @@ -78,6 +107,11 @@ module vpp-vlan { // TODO VPP does not allow to change subinterface nor delete it (except for tag-rewrite operation) grouping sub-interface-base-attributes { + leaf vlan-type { + type vlan-type; + default 802dot1q; + } + container tags { list tag { key "index"; @@ -164,6 +198,12 @@ module vpp-vlan { */ grouping tag-rewrite { description "Flexible rewrite"; + + leaf vlan-type { // todo rename to push_dot1q, mandatory(?) with default true + type vlan-type; + default 802dot1q; + } + leaf pop-tags { type uint8 { range 1..2; -- cgit 1.2.3-korg