Support for CreatingTerminatingService RPC
[vpnservice.git] / itm / itm-api / src / main / yang / itm-rpc.yang
1 module itm-rpc {
2     namespace "urn:opendaylight:vpnservice:itm:rpcs";
3     prefix "itmrpcs";
4
5     import ietf-inet-types {
6         prefix inet;
7         revision-date "2010-09-24";
8     }
9
10     import ietf-yang-types {
11               prefix yang;
12       }
13
14     import ietf-interfaces {
15         prefix if; revision-date 2014-05-08;
16     }
17
18     import odl-interface {
19         prefix odlif;
20         revision-date "2015-03-31";
21     }
22
23     import opendaylight-action-types {prefix action;revision-date "2013-11-12";}
24     import opendaylight-flow-types {prefix offlow;revision-date "2013-10-26";}
25
26         
27     revision "2015-12-17" {
28         description "ODL Specific Itm Manager Rpcs Module";
29     }
30
31     /* RPCs */
32
33     rpc get-tunnel-interface-name {
34         description "used to retrieve tunnel interface id between Dpns";
35         input {
36             leaf source-dpid {
37                  type uint64;
38             }
39             leaf destination-dpid {
40                  type uint64;
41             }
42         }
43         output {
44             leaf interface-name {
45                 type string;
46             }
47         }
48     }
49
50     rpc get-external-tunnel-interface-name {
51         description "used to retrieve tunnel interface id between Dpns";
52         input {
53             leaf source-dpid {
54             type uint64;
55             }
56             leaf destination-ip {
57             type inet:ip-address;
58             }
59         }
60         output {
61             leaf interface-name {
62                 type string;
63             }
64         }
65     }
66
67     rpc build-external-tunnel-from-dpns {
68         description "used for building tunnels between a Dpn and external node";
69         input {
70             leaf-list dpn-id {
71                 type uint64;
72             }
73             leaf destination-ip {
74                 type inet:ip-address;
75             }
76             leaf tunnel-type {
77             type identityref {
78                 base odlif:tunnel-type-base;
79             }
80             }
81         }
82      }
83
84      rpc add-external-tunnel-endpoint { 
85         description "used for building tunnels between teps on all Dpns and external node";
86         input {
87             leaf destination-ip {
88                  type inet:ip-address;
89             }
90             leaf tunnel-type {
91             type identityref {
92                 base odlif:tunnel-type-base;
93             }
94             }
95         }
96      }
97     rpc remove-external-tunnel-from-dpns {
98         description "used for building tunnels between a Dpn and external node";
99         input {
100             leaf-list dpn-id {
101                 type uint64;
102             }
103             leaf destination-ip {
104                 type inet:ip-address;
105             }
106             leaf tunnel-type {
107             type identityref {
108                 base odlif:tunnel-type-base;
109             }
110             }
111         }
112      }
113
114      rpc remove-external-tunnel-endpoint { 
115         description "used for building tunnels between teps on all Dpns and external node";
116         input {
117             leaf destination-ip {
118                  type inet:ip-address;
119             }
120             leaf tunnel-type {
121             type identityref {
122                 base odlif:tunnel-type-base;
123             }
124             }
125         }
126      }
127
128      rpc create-terminating-service-actions {
129          description  "used for programming the terminating service actions";
130          input {
131              leaf dpn-id {
132                type uint64;  
133              }
134              leaf service-id {
135                 type uint16;
136              }
137              uses offlow:instruction-list;
138          }
139      }
140
141      rpc remove-terminating-service-actions {
142               description  "used for removing the terminating service actions";
143               input {
144                   leaf dpn-id {
145                     type uint64;  
146                   }
147                   leaf service-id {
148                      type uint16;
149                   }
150               }
151      }
152
153 }