From 44348596ff0c675bf3b799f88288111d92d771e6 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Fri, 6 May 2016 09:41:51 +0200 Subject: HONEYCOMG-47: Tap interface CRUD support Tap interface specific configuration and state was added to V3po yang model. TapCustomizer added. Fixed customizers for Interfaces state. Fixed bug in Bridge domain customizers. Change-Id: I9dd47b8ada5153df8732c02cb59d331ab1adc71e Signed-off-by: Maros Marsalek --- v3po/api/src/main/yang/v3po.yang | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'v3po/api/src/main/yang') diff --git a/v3po/api/src/main/yang/v3po.yang b/v3po/api/src/main/yang/v3po.yang index 9587cc642..065ff6535 100644 --- a/v3po/api/src/main/yang/v3po.yang +++ b/v3po/api/src/main/yang/v3po.yang @@ -49,6 +49,10 @@ module v3po { identity vhost-user { base if:interface-type; } + + identity tap { + base if:interface-type; + } typedef vxlan-vni { // FIXME: should be in a vxlan-specific model @@ -94,6 +98,26 @@ module v3po { } } + grouping tap-interface-base-attributes { + leaf tap-name { + type string; + } + } + + 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"; + } + } + augment /if:interfaces/if:interface { ext:augment-identifier "vpp-interface-augmentation"; @@ -101,6 +125,14 @@ module v3po { // 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 + // TODO grouping + container tap { + when "../if:type = 'v3po:tap'"; + + uses tap-interface-base-attributes; + uses tap-interface-config-attributes; + } + container ethernet { when "../if:type = 'ianaift:ethernetCsmacd'"; leaf mtu { @@ -245,6 +277,12 @@ module v3po { leaf description { type string; } + + container tap { + when "../if:type = 'v3po:tap'"; + uses tap-interface-base-attributes; + } + container ethernet { when "../if:type = 'ianaift:ethernetCsmacd'"; leaf mtu { -- cgit 1.2.3-korg