Added vhost user interface type to v3po.yang
authorMartin Sunal <[email protected]>
Thu, 21 Apr 2016 13:53:54 +0000 (15:53 +0200)
committerMarek Gradzki <[email protected]>
Tue, 10 May 2016 06:18:20 +0000 (06:18 +0000)
Change-Id: I161260bf2ed1c4d750c3ce123ebb12420c697410
Signed-off-by: Martin Sunal <[email protected]>
v3po/api/src/main/yang/v3po.yang

index 5553cf6..9587cc6 100644 (file)
@@ -46,6 +46,10 @@ module v3po {
     base if:interface-type;
   }
 
+  identity vhost-user {
+    base if:interface-type;
+  }
+
   typedef vxlan-vni {
     // FIXME: should be in a vxlan-specific model
     description "VNI used in a VXLAN tunnel";
@@ -54,6 +58,13 @@ module v3po {
     }
   }
 
+  typedef vhost-user-role {
+    type enumeration {
+      enum "server";
+      enum "client";
+    }
+  }
+
   grouping bridge-domain-attributes {
     leaf flood {
       type boolean;
@@ -109,6 +120,20 @@ module v3po {
         default 0;
       }
     }
+    container vhost-user {
+      when "../if:type = 'v3po:vhost-user'";
+      leaf socket {
+        type string {
+          length 1..255;
+        }
+      }
+      leaf role {
+        type vhost-user-role;
+        default "server";
+      }
+      description
+        "vhost-user settings";
+    }
     container vxlan {
       // FIXME: this should be in an vxlan-specific extension
       when "../if:type = 'v3po:vxlan-tunnel'";
@@ -235,6 +260,27 @@ module v3po {
         }
       }
     }
+    container vhost-user {
+      when "../if:type = 'v3po:vhost-user'";
+      leaf socket {
+        type string;
+      }
+      leaf role {
+        type vhost-user-role;
+      }
+      leaf features {
+        type uint64;
+      }
+      leaf virtio-net-hdr-size {
+        type uint32;
+      }
+      leaf num-memory-regions {
+        type uint32;
+      }
+      leaf connect-error {
+        type string;
+      }
+    }
     container vxlan {
       when "../if:type = 'v3po:vxlan-tunnel'";