OVSDB SB model for port and interface 30/15630/7
authorEric Multanen <eric.w.multanen@intel.com>
Mon, 23 Feb 2015 13:19:08 +0000 (05:19 -0800)
committerSam Hague <shague@redhat.com>
Fri, 27 Feb 2015 14:11:12 +0000 (14:11 +0000)
Initial augmentation of termination-point to add
OVSDB port and interface support.  No doubt additional
fields will need to be added.

Looking for feedback on the approach.

v2 - flatten out the model so both ovsdb port and interface
attributes will be present in the ovsdb termination-point
augmentation.  More attributes to be added.

v3 - use identity types for the interface type

Change-Id: Ifbff6060c8f6dae3caa49c43fbaf18e5060031b1
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
southbound/southbound-api/src/main/yang/ovsdb.yang

index aea4501bc7d9689b69812f0184469552167e355f..a935d485778cad453f98695088e5756f1d10cf99 100644 (file)
@@ -51,6 +51,55 @@ module ovsdb {
         }
     }
 
+
+    identity interface-type-base {
+        description "Base identity for all OVSDB interface types";
+    }
+
+    identity interface-type-system {
+        description "Interface type for system interfaces";
+        base interface-type-base;
+    }
+
+    identity interface-type-internal {
+        description "Interface type for internal interfaces";
+        base interface-type-base;
+    }
+
+    identity interface-type-vxlan {
+        description "Interface type for vxlan interfaces";
+        base interface-type-base;
+    }
+
+    identity interface-type-patch {
+        description "Interface type for patch interfaces";
+        base interface-type-base;
+    }
+
+    grouping ovsdb-port-interface-attributes {
+        leaf port-uuid {
+            description "The unique identifier of the OVSDB port";
+            type yang:uuid;
+        }
+
+        leaf interface-uuid {
+            description "The unique identifier of the OVSDB interface";
+            type yang:uuid;
+        }
+
+        leaf name {
+            description "The name of the OVSDB port/interface";
+            type string;
+        }
+
+        leaf interface-type {
+            description "The type of the OVSDB interface";
+            type identityref {
+                base interface-type-base;
+            }
+        }
+    }
+
     augment "/topo:network-topology/topo:topology/topo:node" {
         description "Augmentation for bridge nodes managed by ovsdb";
         ext:augment-identifier "ovsdb-managed-node-augmentation";
@@ -62,4 +111,10 @@ module ovsdb {
         ext:augment-identifier "ovsdb-node-augmentation";
         uses ovsdb-node-attributes;
     }
-}
\ No newline at end of file
+
+    augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" {
+        description "Augment topology node termination-point for an ovsdb port/interface";
+        ext:augment-identifier "ovsdb-termination-point-augmentation";
+        uses ovsdb-port-interface-attributes;
+    }
+}