Itm:change in namespace, new RPCs, vpnmanager integration
[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     revision "2015-12-17" {
24         description "ODL Specific Itm Manager Rpcs Module";
25     }
26
27     /* RPCs */
28
29     rpc get-tunnel-interface-name {
30         description "used to retrieve tunnel interface id between Dpns";
31         input {
32             leaf source-dpid {
33                  type uint64;
34             }
35             leaf destination-dpid {
36                  type uint64;
37             }
38         }
39         output {
40             leaf interface-name {
41                 type string;
42             }
43         }
44     }
45
46     rpc get-external-tunnel-interface-name {
47         description "used to retrieve tunnel interface id between Dpns";
48         input {
49             leaf source-dpid {
50             type uint64;
51             }
52             leaf destination-ip {
53             type inet:ip-address;
54             }
55         }
56         output {
57             leaf interface-name {
58                 type string;
59             }
60         }
61     }
62
63     rpc build-external-tunnel-from-dpns {
64         description "used for building tunnels between a Dpn and external node";
65         input {
66             leaf-list dpn-id {
67                 type uint64;
68             }
69             leaf destination-ip {
70                 type inet:ip-address;
71             }
72             leaf tunnel-type {
73             type identityref {
74                 base odlif:tunnel-type-base;
75             }
76             }
77         }
78      }
79
80      rpc add-external-tunnel-endpoint { 
81         description "used for building tunnels between teps on all Dpns and external node";
82         input {
83             leaf destination-ip {
84                  type inet:ip-address;
85             }
86             leaf tunnel-type {
87             type identityref {
88                 base odlif:tunnel-type-base;
89             }
90             }
91         }
92      }
93     rpc remove-external-tunnel-from-dpns {
94         description "used for building tunnels between a Dpn and external node";
95         input {
96             leaf-list dpn-id {
97                 type uint64;
98             }
99             leaf destination-ip {
100                 type inet:ip-address;
101             }
102             leaf tunnel-type {
103             type identityref {
104                 base odlif:tunnel-type-base;
105             }
106             }
107         }
108      }
109
110      rpc remove-external-tunnel-endpoint { 
111         description "used for building tunnels between teps on all Dpns and external node";
112         input {
113             leaf destination-ip {
114                  type inet:ip-address;
115             }
116             leaf tunnel-type {
117             type identityref {
118                 base odlif:tunnel-type-base;
119             }
120             }
121         }
122      }
123 }