summaryrefslogtreecommitdiffstats
path: root/v3po/api
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/api')
-rw-r--r--v3po/api/src/main/yang/v3po.yang38
1 files changed, 38 insertions, 0 deletions
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 {