Initial Code commit for OVS Support for vpnservice
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / odl-interface-service-bindings.yang
diff --git a/interfacemgr/interfacemgr-api/src/main/yang/odl-interface-service-bindings.yang b/interfacemgr/interfacemgr-api/src/main/yang/odl-interface-service-bindings.yang
new file mode 100644 (file)
index 0000000..cebf3bd
--- /dev/null
@@ -0,0 +1,79 @@
+module interface-service-bindings {
+    namespace "urn:opendaylight:params:xml:ns:yang:servicebinding";
+    prefix ifservicebindings;
+
+    import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
+
+    import yang-ext {
+        prefix ext;
+    }
+
+    revision "2015-10-15" {
+        description "This YANG module defines the service binding model.";
+    }
+
+    identity service-type-base {
+       description "Base identity for all service-types";
+    }
+
+    identity service-type-flow-based {
+       description "Service type for flow-based services";
+       base service-type-base;
+    }
+
+    container service-bindings {
+        list services-info {
+            key interface-name;
+            leaf interface-name {
+                type string;
+            }
+
+            list bound-services {
+                key "service-priority";
+                max-elements "2";
+                min-elements "0";
+                leaf service-priority {
+                    type uint8;
+                }
+
+                leaf service-type {
+                    type identityref {
+                        base service-type-base;
+                    }
+                }
+
+                leaf interface-name {
+                    type string;
+                }
+
+                leaf service-name {
+                    type string;
+                }
+            }
+        }
+    }
+
+    grouping service-openflow-info {
+        description "openflow specific information for services info.";
+
+        leaf dispatcher-table-id {
+            type uint8;
+        }
+
+        leaf flow-priority {
+            type uint16;
+        }
+
+        leaf flow-cookie {
+            type uint64;
+        }
+
+        uses offlow:instruction-list;
+    }
+
+    augment "/service-bindings/services-info/bound-services" {
+        ext:augment-identifier "stype-openflow";
+        when "service-type = 'service-type-flow-based'";
+        uses service-openflow-info;
+    }
+}
\ No newline at end of file