965b335c4536c868e5c1b5efe77c3f26acf2973d
[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 is-add {
78                 type boolean;
79                 mandatory true;
80                 status current;
81                 description "Add or delete";
82             }
83             leaf dpn-count {
84                 type uint32;
85                 mandatory true;
86                 status current;
87                 description "No of DPNs";
88             }
89             leaf flows-per-dpn {
90                 type uint32;
91                 mandatory true;
92                 status current;
93                 description "Flows to be pushed per DPN";
94             }
95             leaf start-table-id {
96                 type uint32;
97                 mandatory true;
98                 status current;
99                 description "Start adding flows from this table id";
100             }
101             leaf end-table-id {
102                 type uint32;
103                 mandatory true;
104                 status current;
105                 description "The last table to add flows to and then wrap around";
106             }
107             leaf batch-size {
108                 type uint32;
109                 mandatory true;
110                 status current;
111                 description "batch size";
112             }
113             leaf seq {
114                 type boolean;
115                 mandatory true;
116                 status current;
117                 description "Whether to use sequential or concurrent writer";
118             }
119             leaf tx-chain {
120                 type boolean;
121                 mandatory true;
122                 status current;
123                 description "Whether to use PingPong Broker or not. seq is ignored.";
124             }
125             leaf sleep-for {
126                 type uint32;
127                 mandatory true;
128                 status current;
129                 description "sleep for the given milliseconds";
130             }
131             leaf sleep-after {
132                 type uint32;
133                 mandatory true;
134                 status current;
135                 description "Sleep after the given number of iterations. Will be used in the concurrent case only";
136             }
137         }
138     }
139
140     rpc read-flow-test {
141         input {
142             leaf verbose {
143                 type boolean;
144                 mandatory true;
145                 status current;
146                 description "Add or delete";
147             }
148             leaf dpn-count {
149                 type uint32;
150                 mandatory true;
151                 status current;
152                 description "No of DPNs";
153             }
154             leaf is-config-ds {
155                 type boolean;
156                 mandatory true;
157                 status current;
158                 description "true for Config DS and false for Operational DS";
159             }
160             leaf flows-per-dpn {
161                 type uint32;
162                 mandatory true;
163                 status current;
164                 description "Flows to be pushed per DPN";
165             }
166             leaf start-table-id {
167                 type uint32;
168                 mandatory true;
169                 status current;
170                 description "Start reading from this table id";
171             }
172             leaf end-table-id {
173                 type uint32;
174                 mandatory true;
175                 status current;
176                 description "The last table id to read from and then wrap over";
177             }
178         }
179     }
180
181     rpc flow-rpc-add-test {
182         input {
183             leaf dpn-id {
184                 type string;
185                 mandatory true;
186                 status current;
187                 description "DPID to which flows are pushed";
188             }
189             leaf flow-count {
190                 type uint32;
191                 mandatory true;
192                 status current;
193                 description "Flows to be pushed per DPN";
194             }
195             leaf rpc-batch-size {
196                 type uint32;
197                 mandatory true;
198                 status current;
199                 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";
200             }
201         }
202     }
203
204     rpc flow-rpc-add-multiple {
205         input {
206             leaf flow-count {
207                 type uint32;
208                 mandatory true;
209                 status current;
210                 description "Flows to be pushed per DPN";
211             }
212             leaf rpc-batch-size {
213                 type uint32;
214                 mandatory true;
215                 status current;
216                 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";
217             }
218         }
219     }
220 }