Initial Code commit for OVS Support for vpnservice
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / odl-interface-rpc.yang
diff --git a/interfacemgr/interfacemgr-api/src/main/yang/odl-interface-rpc.yang b/interfacemgr/interfacemgr-api/src/main/yang/odl-interface-rpc.yang
new file mode 100644 (file)
index 0000000..f95d52c
--- /dev/null
@@ -0,0 +1,175 @@
+module odl-interface-rpc {
+    namespace "urn:opendaylight:vpnservice:interfacemgr:rpcs";
+    prefix "odlifrpc";
+
+    import ietf-inet-types {
+        prefix inet;
+    }
+
+    import odl-interface {
+        prefix odlif; revision-date 2015-03-31;
+    }
+
+    import opendaylight-action-types {prefix action;}
+    import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
+
+    revision "2015-10-03" {
+        description "ODL Specific Interface Manager Rpcs Module";
+    }
+
+/* RPCs */
+    rpc get-interface-from-lporttag {
+        description "Used to retrieve the interface-name using lporttag";
+        input {
+            leaf lportag {
+                type uint32;
+            }
+        }
+        output {
+            leaf intf-name {
+                type string;
+            }
+        }
+    }
+
+    rpc get-lporttag-from-interface {
+        description "Used to retrieve the lporttag from interface-name";
+        input {
+            leaf intf-name {
+                type string;
+            }
+        }
+        output {
+            leaf lportag {
+                type uint32;
+            }
+        }
+    }
+
+    rpc get-interface-from-groupid {
+        description "Used to retrieve the interface-name using groupid";
+        input {
+            leaf groupid {
+                type uint32;
+            }
+        }
+        output {
+            leaf intf-name {
+                type string;
+            }
+        }
+    }
+
+    rpc get-groupid-from-interface {
+        description "Used to retrieve the interface-name using groupid";
+        input {
+            leaf intf-name {
+                type string;
+            }
+        }
+        output {
+            leaf groupid {
+                type uint32;
+            }
+        }
+    }
+
+    rpc get-dpid-from-interface {
+        description "used to retrieve dpid from interface name";
+        input {
+            leaf intf-name {
+                type string;
+            }
+        }
+        output {
+            leaf dpid {
+                type uint64;
+            }
+        }
+    }
+
+    rpc get-port-from-interface {
+        description "used to retrieve dpid from interface name";
+        input {
+            leaf intf-name {
+                type string;
+            }
+        }
+        output {
+            leaf dpid {
+                type uint64;
+            }
+            leaf portno {
+                type uint32;
+            }
+            leaf portname {
+                type string;
+            }
+        }
+    }
+
+    rpc get-interface-from-port {
+        description "used to retrieve interface from port details";
+        input {
+            leaf interface-type {
+                description "Type of the interface (vlan/gre or vxlan tunnel)";
+                type identityref {
+                    base odlif:tunnel-type-base;
+                }
+            }
+            leaf dpid {
+                type uint64;
+            }
+            leaf portno {
+                type uint32;
+            }
+            leaf interface-id {
+                description "Used to provide the interface specific differentiator information (vlanId/gre-key/vxlan-vni)";
+                type uint64;
+            }
+        }
+        output {
+            leaf interface-name {
+                type string;
+            }
+        }
+    }
+
+    rpc get-egress-actions-for-interface {
+        description "used to retrieve group actions to use from interface name";
+        input {
+            leaf intf-name {
+                type string;
+            }
+        }
+        output {
+            uses action:action-list;
+        }
+    }
+
+    rpc get-egress-instructions-for-interface {
+        description "used to retrieve flow instructions to use from interface name";
+        input {
+            leaf intf-name {
+                type string;
+            }
+        }
+        output {
+            uses offlow:instruction-list;
+        }
+    }
+
+    rpc get-endpoint-ip-for-dpn {
+        description "to get the local ip of the tunnel/trunk interface";
+        input {
+            leaf dpid {
+                type uint64;
+            }
+        }
+        output {
+            leaf-list local-ips {
+                type inet:ip-address;
+            }
+        }
+    }
+}
\ No newline at end of file