Make create-parents in bulk-o-matic not required
[openflowplugin.git] / applications / bulk-o-matic / src / main / yang / sal-bulk-flow.yang
1 module sal-bulk-flow {
2     namespace "urn:opendaylight:bulk-flow:service";
3     prefix bflow;
4
5     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
6     import opendaylight-flow-types {prefix types;revision-date "2013-10-26";}
7     import flow-node-inventory {prefix flow-inv; revision-date "2013-08-19";}
8
9     description "Openflow bulk flow management.";
10
11     revision "2015-06-08" {
12         description "Initial revision of bulk flow service";
13     }
14
15     grouping bulk-flow-base-content-grouping {
16         uses inv:node-context-ref;
17         uses types:flow;
18     }
19
20     grouping bulk-flow-list-grouping {
21         description "Suitable for rpc way";
22         list bulk-flow-item {
23             uses bulk-flow-base-content-grouping;
24         }
25     }
26
27     grouping bulk-flow-ds-list-grouping {
28         description "Suitable for dataStore way - includes flowId";
29         list bulk-flow-ds-item {
30             uses bulk-flow-base-content-grouping;
31             leaf flow-id {
32                 mandatory true;
33                 type flow-inv:flow-id;
34             }
35         }
36     }
37
38     rpc register {
39         description "register mbean etc. via rpc invocation.";
40     }
41
42     rpc add-flows-rpc {
43         description "Adding multiple flows to openflow device via direct rpc invocation.";
44         input {
45             uses bulk-flow-list-grouping;
46         }
47     }
48
49     rpc remove-flows-rpc {
50         description "Removing multiple flows from openflow device via direct rpc invocation.";
51         input {
52             uses bulk-flow-list-grouping;
53         }
54     }
55
56     rpc add-flows-ds {
57         description "Adding multiple flows to openflow device via dataStore.";
58         input {
59             leaf always-create-parents {
60                 description "true if all items must take care of parent structure";
61                 type boolean;
62                 default false;
63             }
64             uses bulk-flow-ds-list-grouping;
65         }
66     }
67
68     rpc remove-flows-ds {
69         description "Removing multiple flows from openflow device via dataStore.";
70         input {
71             uses bulk-flow-ds-list-grouping;
72         }
73     }
74
75     rpc flow-test {
76         input {
77             leaf create-parents {
78                 type boolean;
79                 mandatory true;
80                 default true;
81                 status current;
82                 description "Create parents if doesn't exist";
83             }
84             leaf is-add {
85                 type boolean;
86                 mandatory true;
87                 status current;
88                 description "Add or delete";
89             }
90             leaf dpn-count {
91                 type uint32;
92                 mandatory true;
93                 status current;
94                 description "No of DPNs";
95             }
96             leaf flows-per-dpn {
97                 type uint32;
98                 mandatory true;
99                 status current;
100                 description "Flows to be pushed per DPN";
101             }
102             leaf start-table-id {
103                 type uint32;
104                 mandatory true;
105                 status current;
106                 description "Start adding flows from this table id";
107             }
108             leaf end-table-id {
109                 type uint32;
110                 mandatory true;
111                 status current;
112                 description "The last table to add flows to and then wrap around";
113             }
114             leaf batch-size {
115                 type uint32;
116                 mandatory true;
117                 status current;
118                 description "batch size";
119             }
120             leaf seq {
121                 type boolean;
122                 mandatory true;
123                 status current;
124                 description "Whether to use sequential or concurrent writer";
125             }
126             leaf tx-chain {
127                 type boolean;
128                 mandatory true;
129                 status current;
130                 description "Whether to use PingPong Broker or not. seq is ignored.";
131             }
132             leaf sleep-for {
133                 type uint32;
134                 mandatory true;
135                 status current;
136                 description "sleep for the given milliseconds";
137             }
138             leaf sleep-after {
139                 type uint32;
140                 mandatory true;
141                 status current;
142                 description "Sleep after the given number of iterations. Will be used in the concurrent case only";
143             }
144         }
145     }
146
147     rpc read-flow-test {
148         input {
149             leaf verbose {
150                 type boolean;
151                 mandatory true;
152                 status current;
153                 description "Add or delete";
154             }
155             leaf dpn-count {
156                 type uint32;
157                 mandatory true;
158                 status current;
159                 description "No of DPNs";
160             }
161             leaf is-config-ds {
162                 type boolean;
163                 mandatory true;
164                 status current;
165                 description "true for Config DS and false for Operational DS";
166             }
167             leaf flows-per-dpn {
168                 type uint32;
169                 mandatory true;
170                 status current;
171                 description "Flows to be pushed per DPN";
172             }
173             leaf start-table-id {
174                 type uint32;
175                 mandatory true;
176                 status current;
177                 description "Start reading from this table id";
178             }
179             leaf end-table-id {
180                 type uint32;
181                 mandatory true;
182                 status current;
183                 description "The last table id to read from and then wrap over";
184             }
185         }
186     }
187
188     rpc flow-rpc-add-test {
189         input {
190             leaf dpn-id {
191                 type string;
192                 mandatory true;
193                 status current;
194                 description "DPID to which flows are pushed";
195             }
196             leaf flow-count {
197                 type uint32;
198                 mandatory true;
199                 status current;
200                 description "Flows to be pushed per DPN";
201             }
202             leaf rpc-batch-size {
203                 type uint32;
204                 mandatory true;
205                 status current;
206                 description "Batch-size which would be sent continuously without any pause, If less than sal-bulk-flow:flow-count, a fixed pause of 40 ms would be introduced";
207             }
208         }
209     }
210
211     rpc flow-rpc-add-multiple {
212         input {
213             leaf flow-count {
214                 type uint32;
215                 mandatory true;
216                 status current;
217                 description "Flows to be pushed per DPN";
218             }
219             leaf rpc-batch-size {
220                 type uint32;
221                 mandatory true;
222                 status current;
223                 description "Batch-size which would be sent continuously without any pause, If less than sal-bulk-flow:flow-count, a fixed pause of 40 ms would be introduced";
224             }
225         }
226     }
227
228     rpc table-test {
229         input {
230             leaf operation {
231                 type enumeration {
232                     enum add;
233                     enum delete;
234                 }
235                 status current;
236                 description "Type of operation, add or delete";
237             }
238
239             leaf dpn-count {
240                 type uint32;
241                 mandatory true;
242                 status current;
243                 description "Total number of dpns to add these tables";
244             }
245
246             leaf start-table-id {
247                 type uint32;
248                 mandatory true;
249                 status current;
250                 description "Starting table id";
251             }
252
253             leaf end-table-id {
254                 type uint32;
255                 mandatory true;
256                 status current;
257                 description "Last table id";
258             }
259         }
260     }
261 }