Merge "L2 Gw create changes related to ITM Tunnels creation in neutronvpn module"
[vpnservice.git] / interfacemgr / interfacemgr-api / src / main / yang / odl-interface-rpc.yang
index 0e4efca05eeca046b9e43ad7ea1d8ed462abc2c5..a6f3874deee92505874a4e790b4747e4081a2ac6 100644 (file)
@@ -10,6 +10,14 @@ module odl-interface-rpc {
         prefix odlif; revision-date 2015-03-31;
     }
 
+    import opendaylight-inventory {
+        prefix inv; revision-date 2013-08-19;
+    }
+
+    import ietf-interfaces {
+        prefix if; revision-date 2014-05-08;
+    }
+
     import opendaylight-action-types {prefix action;}
     import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
 
@@ -53,68 +61,147 @@ module odl-interface-rpc {
         }
     }
 
-    rpc get-interface-from-port {
-        description "used to retrieve interface from port details";
+    rpc get-egress-actions-for-interface {
+        description "used to retrieve group actions to use from interface name";
         input {
-            leaf interface-type {
-                description "Type of the interface (vlan/gre or vxlan tunnel)";
-                type identityref {
-                    base odlif:tunnel-type-base;
-                }
+            leaf intf-name {
+                type string;
+                mandatory true;
             }
-            leaf dpid {
-                type uint64;
+
+            leaf tunnel-key {
+                description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc.";
+                type uint32;
+                mandatory false;
             }
-            leaf portno {
+        }
+        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;
+                mandatory true;
+            }
+
+            leaf tunnel-key {
+                description "It can be VNI for VxLAN tunnel ifaces, Gre Key for GRE tunnels, etc.";
                 type uint32;
+                mandatory false;
             }
-            leaf interface-id {
-                description "Used to provide the interface specific differentiator information (vlanId/gre-key/vxlan-vni)";
+        }
+        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 interface-name {
-                type string;
+            leaf-list local-ips {
+                type inet:ip-address;
             }
         }
     }
 
-    rpc get-egress-actions-for-interface {
-        description "used to retrieve group actions to use from interface name";
+    rpc get-interface-type {
+    description "to get the type of the interface(vlan/vxlan or gre)";
         input {
             leaf intf-name {
                 type string;
             }
         }
         output {
-            uses action:action-list;
+            leaf interface-type {
+                type identityref {
+                    base if:interface-type;
+                }
+            }
         }
     }
 
-    rpc get-egress-instructions-for-interface {
-        description "used to retrieve flow instructions to use from interface name";
+    rpc get-tunnel-type {
+    description "to get the type of the tunnel interface(vxlan or gre)";
         input {
             leaf intf-name {
                 type string;
             }
         }
         output {
-            uses offlow:instruction-list;
+            leaf tunnel-type {
+                type identityref {
+                    base odlif:tunnel-type-base;
+                }
+            }
         }
     }
 
-    rpc get-endpoint-ip-for-dpn {
-        description "to get the local ip of the tunnel/trunk interface";
+
+    rpc get-nodeconnector-id-from-interface {
+    description "to get nodeconnector id associated with an interface";
         input {
-            leaf dpid {
-                type uint64;
+            leaf intf-name {
+                type string;
             }
         }
         output {
-            leaf-list local-ips {
-                type inet:ip-address;
+            leaf nodeconnector-id {
+                type inv:node-connector-id;
+            }
+        }
+    }
+
+    rpc get-interface-from-if-index {
+        description "to get interface associated with an if-index";
+            input {
+                leaf if-index {
+                    type int32;
+                }
+            }
+            output {
+                leaf interface-name {
+                    type string;
+                }
             }
         }
+
+    rpc create-terminating-service-actions {
+    description "create the ingress terminating service table entries";
+        input {
+             leaf dpid {
+                 type uint64;
+             }
+             leaf tunnel-key {
+                 type uint64;
+             }
+             leaf interface-name {
+                 type string;
+             }
+             uses offlow:instruction-list;
+        }
+    }
+
+    rpc remove-terminating-service-actions {
+    description "remove the ingress terminating service table entries";
+        input {
+             leaf dpid {
+                 type uint64;
+             }
+             leaf interface-name {
+                 type string;
+             }
+             leaf tunnel-key {
+                 type uint64;
+             }
+        }
     }
 }
\ No newline at end of file