Bump versions by 0.1.0 for next dev cycle
[vpnservice.git] / itm / itm-api / src / main / yang / itm-rpc.yang
index 4779a2653269fc43cb8404d550f8bd8b09e2f99c..8136d080643b0b643e39a374b32e4eeb2785f575 100644 (file)
@@ -1,10 +1,10 @@
 module itm-rpc {
-    namespace "urn:opendaylight:params:xml:ns:yang:itm:rpcs";
+    namespace "urn:opendaylight:vpnservice:itm:rpcs";
     prefix "itmrpcs";
 
     import ietf-inet-types {
         prefix inet;
-        revision-date "2010-09-24";
+        revision-date "2013-07-15";
     }
 
     import ietf-yang-types {
@@ -15,47 +15,229 @@ module itm-rpc {
         prefix if; revision-date 2014-05-08;
     }
 
+    import odl-interface {
+        prefix odlif;
+        revision-date "2015-03-31";
+    }
+
+    import opendaylight-action-types {prefix action;revision-date "2013-11-12";}
+    import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
+
+
     revision "2015-12-17" {
         description "ODL Specific Itm Manager Rpcs Module";
     }
 
     /* RPCs */
 
-    rpc get-tunnel-interface-id {
+    rpc get-tunnel-interface-name {
         description "used to retrieve tunnel interface id between Dpns";
         input {
             leaf source-dpid {
-            type uint64;
+                 type uint64;
             }
             leaf destination-dpid {
-            type uint64;
+                 type uint64;
+            }
+            leaf tunnel-type {
+                type identityref {
+                    base odlif:tunnel-type-base;
+                }
             }
         }
         output {
-            leaf interfaceid {
-                type uint16;
+            leaf interface-name {
+                type string;
+            }
+        }
+    }
+
+    rpc get-internal-or-external-interface-name {
+        description "used to retrieve tunnel interface id with src Dpn and destination ip";
+            input {
+                leaf source-dpid {
+                type uint64;
+                }
+                leaf destination-ip {
+                type inet:ip-address;
+                }
+                leaf tunnel-type {
+                    type identityref {
+                        base odlif:tunnel-type-base;
+                    }
+                }
+            }
+            output {
+                leaf interface-name {
+                    type string;
+                }
+        }
+    }
+
+    rpc get-external-tunnel-interface-name {
+        description "used to retrieve external tunnel interface id between Dpns/TORs";
+        input {
+            leaf source-node {
+            type string;
+            }
+            leaf destination-node {
+            type string;
+            }
+            leaf tunnel-type {
+                type identityref {
+                    base odlif:tunnel-type-base;
+                }
+            }
+        }
+        output {
+            leaf interface-name {
+                type string;
             }
         }
     }
 
-    rpc build-tunnel-from-dpn-to-dcgateway {
-        description "used for building tunnels between a Dpn and DC Gateway";
+    rpc build-external-tunnel-from-dpns {
+        description "used for building tunnels between a Dpn and external node";
         input {
-            leaf dpid {
-            type uint64;
+            leaf-list dpn-id {
+                type uint64;
+            }
+            leaf destination-ip {
+                type inet:ip-address;
+            }
+            leaf tunnel-type {
+            type identityref {
+                base odlif:tunnel-type-base;
             }
-            leaf dcgwyid {
-            type inet:ip-address;
             }
         }
      }
 
-     rpc build-tunnel-to-dcgateway {
-        description "used for building tunnels between teps on all Dpns and DC Gateway";
+    rpc add-external-tunnel-endpoint {
+        description "used for building tunnels between teps on all Dpns and external node";
         input {
-            leaf dcgwyid {
-            type inet:ip-address;
+            leaf destination-ip {
+                 type inet:ip-address;
+            }
+            leaf tunnel-type {
+            type identityref {
+                base odlif:tunnel-type-base;
+            }
+            }
+        }
+    }
+    rpc remove-external-tunnel-from-dpns {
+        description "used for building tunnels between a Dpn and external node";
+        input {
+            leaf-list dpn-id {
+                type uint64;
+            }
+            leaf destination-ip {
+                type inet:ip-address;
+            }
+            leaf tunnel-type {
+            type identityref {
+                base odlif:tunnel-type-base;
+            }
             }
         }
      }
-}
\ No newline at end of file
+
+     rpc remove-external-tunnel-endpoint {
+        description "used for building tunnels between teps on all Dpns and external node";
+        input {
+            leaf destination-ip {
+                 type inet:ip-address;
+            }
+            leaf tunnel-type {
+            type identityref {
+                base odlif:tunnel-type-base;
+            }
+            }
+        }
+     }
+
+     rpc create-terminating-service-actions {
+         description  "used for programming the terminating service actions";
+         input {
+             leaf dpn-id {
+               type uint64;
+             }
+             leaf service-id {
+                type uint16;
+             }
+             uses offlow:instruction-list;
+         }
+     }
+
+    rpc remove-terminating-service-actions {
+        description  "used for removing the terminating service actions";
+        input {
+            leaf dpn-id {
+                    type uint64;
+            }
+            leaf service-id {
+                type uint16;
+            }
+        }
+    }
+
+    rpc add-l2-gw-device {
+        description "used for building tunnels between teps on all Dpns and hwVtep";
+        input {
+            leaf topology-id {
+                type string;
+            }
+            leaf node-id {
+                type string;
+            }
+            leaf ip-address {
+                type inet:ip-address;
+            }
+        }
+    }
+
+    rpc add-l2-gw-mlag-device {
+            description "used for building tunnels between teps on all Dpns and hwVtep";
+            input {
+                leaf topology-id {
+                    type string;
+                }
+                leaf-list node-id {
+                    type string;
+                }
+                leaf ip-address {
+                    type inet:ip-address;
+                }
+            }
+        }
+    rpc delete-l2-gw-device {
+        description "used for deleting tunnels between teps on all Dpns and hwVtep";
+        input {
+            leaf topology-id {
+                type string;
+            }
+            leaf node-id {
+                type string;
+            }
+            leaf ip-address {
+                type inet:ip-address;
+            }
+        }
+    }
+
+      rpc delete-l2-gw-mlag-device {
+            description "used for deleting tunnels between teps on all Dpns and hwVtep";
+            input {
+                leaf topology-id {
+                    type string;
+                }
+                leaf-list node-id {
+                    type string;
+                }
+                leaf ip-address {
+                    type inet:ip-address;
+                }
+            }
+        }
+}