2d552f447d602358191a2a5de06c7d9473b4f6d4
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / model / src / main / yang / car.yang
1 module car {
2
3     yang-version 1;
4
5     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car";
6
7     prefix car;
8
9         import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
10         
11     organization "Netconf Central";
12
13     contact
14       "Harman Singh <harmasin@cisco.com>";
15
16     description
17       "YANG model for car for test application";
18
19     revision "2014-08-18" {
20       description
21         "Clustering sample app";
22     }
23     
24     typedef car-id {
25       type inet:uri;
26       description "An identifier for car entry.";
27     }
28
29     grouping car-entry {
30       description "Describes the contents of a car entry -
31                        Details of the car manufacturer, model etc";
32       leaf id {
33         type car-id;
34         description "identifier of single list of entries.";
35       }
36
37       leaf model {
38         type string;
39       }
40       leaf manufacturer {
41         type string;
42       }
43
44       leaf year {
45         type uint32;
46       }
47
48       leaf category {
49         type string;
50       }
51     }
52     
53     container cars {
54       description
55         "Top-level container for all car objects.";
56       list car-entry {
57         key "id";
58         description "A list of cars (as defined by the 'grouping car-entry').";
59         uses car-entry;
60       }
61     }
62     
63     rpc stress-test {
64         input {
65             leaf rate {
66               type uint16;
67               description "The rate is a measure of the number of car-entry(s) added per second.
68                            Thus the rate is measured in terms of transactions per second.  The
69                            rate is not necessary achievable;  the controller may not keep up with
70                            the specified value.  In this instance, rate is considered maximum rate.";
71             }
72
73             leaf count {
74               type uint32;
75               default 0;
76               description "Number of cars to create. Zero implies unlimited cars; use
77                            stop-stress-test rpc to stop the test.";
78             }
79         }
80     }
81     
82     rpc stop-stress-test {
83
84     }
85
86     rpc register-ownership {
87         input {
88             leaf car-id {
89                 type string;
90               }
91         }
92     }
93     
94     rpc unregister-ownership {
95         input {
96             leaf car-id {
97                 type string;
98               }
99         }
100     }
101
102     rpc register-logging-dcl {
103         description "Registers a basic logging DCL on the cars container.  This is useful
104                     for analyzing effects of DCL on a long, flat list.";
105     }
106
107     rpc unregister-logging-dcls {
108         description "Unregisters the logging DCL(s) for the cars container.";
109     }
110
111     rpc register-logging-dtcl {
112         description "Registers a basic logging DTCL on the cars container.  This is useful
113                             for analyzing the effects of DTCL on a long, flat list.";
114     }
115
116     rpc unregister-logging-dtcls {
117         description "Unregisters the logging DTCL(s) for the cars container.";
118     }
119 }