HC2VPP-88: yang model for af_packet interface management 26/9926/4
authorMarek Gradzki <[email protected]>
Tue, 2 Jan 2018 14:38:44 +0000 (15:38 +0100)
committerMarek Gradzki <[email protected]>
Thu, 21 Jun 2018 11:03:12 +0000 (13:03 +0200)
Change-Id: Iaa21ad832d03f36d7d8a6f63a68a6a7ece7c9b8d
Signed-off-by: Marek Gradzki <[email protected]>
v3po/api/src/main/yang/[email protected]

index 6a1eb38..3d669e0 100644 (file)
@@ -149,6 +149,10 @@ module v3po {
     base if:interface-type;
   }
 
+  identity af-packet {
+    base if:interface-type;
+  }
+
   typedef vxlan-gpe-vni {
     description "VNI used in a VXLAN-GPE tunnel";
     type uint32 {
@@ -493,6 +497,23 @@ module v3po {
     }
   }
 
+  grouping af-packet-base-attributes {
+    leaf host-interface-name {
+      type string {
+        length "1..63";
+      }
+      /* mandatory true; */
+      description "Name of the host interface (veth end point).";
+    }
+    leaf mac {
+      type yang:phys-address;
+      mandatory false;
+      description "Mac address to be set for the af-packet interface. Random will be used if not configured.";
+    }
+    reference
+      "https://docs.fd.io/vpp/18.07/clicmd_src_vnet_devices_af_packet.html";
+  }
+
   grouping l2-config-attributes {
       description
       "Parameters for configuring Layer2 features on interfaces.";
@@ -658,6 +679,11 @@ module v3po {
       uses vxlan-gpe-base-attributes;
     }
 
+    container af-packet {
+      when "../if:type = 'v3po:af-packet'";
+      uses af-packet-base-attributes;
+    }
+
     container span {
       uses span-attributes;
     }
@@ -731,6 +757,11 @@ module v3po {
       uses l2-state-attributes;
     }
 
+    container af-packet {
+      when "../if:type = 'v3po:af-packet'";
+      uses af-packet-base-attributes;
+    }
+
     container span {
       uses span-state-attributes;
     }