Added the 'number of data changes' parameter to dsbenchmark test start outputs
[controller.git] / benchmark / api / src / main / yang / dsbenchmark.yang
1 module dsbenchmark {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:dsbenchmark";
4     prefix "dsbenchmark";
5
6     revision "2015-01-05" {
7         description "Initial revision of dsbenchmark model";
8     }
9     container test-exec {
10         config true;
11
12         list outer-list {
13             key id;
14             leaf id {
15                 type int32;
16             }
17             choice outer-choice {
18                 case one {
19                     leaf one {
20                         type string;
21                     }
22                 }
23                 case two-three {
24                     leaf two {
25                         type string;
26                     }
27                     leaf three {
28                         type string;
29                     }
30                }
31            }
32            list inner-list {
33                 key name;
34                 leaf name {
35                     type int32;
36                 }
37                 leaf value {
38                     type string;
39                 }
40             }
41         }
42     }
43
44     container test-status {
45         leaf execStatus {
46             type enumeration {
47                 enum "idle" {
48                     value 1;
49                 }
50                 enum "executing" {
51                     value 2;
52                 }
53             }
54             config false;
55             mandatory true;
56             description
57                 "Indicates whether a test run is in progress; only one test can run at a time";
58         }
59         leaf testsCompleted {
60             type uint32;
61             default 1;
62             description
63                 "Number of completed test runs";
64           }
65     }
66
67     rpc start-test {
68         description
69           "Start a new data store write test run";
70
71         input {
72             leaf operation {
73                 mandatory true;
74                 type enumeration {
75                     enum "PUT" {
76                         value 1;
77                         description
78                           "The put operation";
79                     }
80                     enum "MERGE" {
81                         value 2;
82                         description
83                           "The merge operation";
84                     }
85                     enum "DELETE" {
86                         value 3;
87                         description
88                             "Delete items from a list sotred in the data store";
89                     }
90                     enum "READ" {
91                         value 4;
92                         description
93                         "The read operation";
94                     }
95                 }
96                 description
97                     "Type of the transaction operation to benchmark";
98             }
99
100             leaf data-format {
101                 mandatory true;
102                 type enumeration {
103                     enum "BINDING-AWARE" {
104                         value 1;
105                     }
106                     enum "BINDING-INDEPENDENT" {
107                         value 2;
108                     }
109                 }
110                 description
111                     "Data format:-binding-aware or binding-independent";
112             }
113
114             leaf transaction-type {
115                 mandatory true;
116                 type enumeration {
117                     enum "SIMPLE-TX" {
118                         value 1;
119                     }
120                     enum "TX-CHAINING" {
121                         value 2;
122                     }
123                 }
124                 description
125                     "Data format:-binding-aware or binding-independent";
126             }
127
128             leaf data-store {
129                 mandatory true;
130                 type enumeration {
131                     enum "CONFIG" {
132                         value 1;
133                     }
134                     enum "OPERATIONAL" {
135                         value 2;
136                     }
137                     enum "BOTH" {
138                         value 3;
139                     }
140                 }
141             }
142             leaf outerElements {
143                 type uint32;
144                 default 100000;
145                 description
146                   "Number of elements in the OuterList";
147             }
148             leaf innerElements {
149                 type uint32;
150                 default 1;
151                 description
152                   "Number of elements in the InnerList";
153             }
154             leaf putsPerTx {
155                 type uint32;
156                 default 1;
157                 description
158                   "Number of write operations (PUT, MERGE, or DELETE)
159                    per transaction submit";
160             }
161             leaf listeners {
162                 type uint32;
163                 default 0;
164                 description
165                     "Number of data tree change listeners listening for
166                     changes on the test exec tree.";
167             }
168         }
169         output {
170             leaf status {
171                 mandatory true;
172                 type enumeration {
173                     enum "OK" {
174                         value 1;
175                     }
176                     enum "FAILED" {
177                         value 2;
178                     }
179                     enum "TEST-IN-PROGRESS" {
180                         value 3;
181                     }
182                 }
183                 description
184                     "Indicates whether the test finished successfuly";
185             }
186             leaf listBuildTime {
187                 type uint32;
188                 description
189                   "The time it took to build the list of lists";
190             }
191             leaf execTime {
192                 type uint32;
193                 description
194                   "The time it took to execute all transactions";
195             }
196             leaf txOk {
197                 type uint32;
198                 description
199                   "The number of successful transactions";
200             }
201             leaf txError {
202                 type uint32;
203                 description
204                   "The number of failed transactions";
205             }
206             leaf ntfOk {
207                 type uint32;
208                 description
209                   "The number of successfully received data tree change
210                    notifications";
211             }
212             leaf dataChangeEventsOk {
213                 type uint32;
214                 description
215                   "The number of data change events received in data tree
216                    change notifications";
217             }
218         }
219     }
220
221     rpc cleanup-store {
222         description
223           "Delete data in the test-exec container that may have been left behind from a previous test run";
224     }
225 }