Merge "Add test for generated code checking list of dependencies."
[controller.git] / opendaylight / md-sal / model / model-flow-service / src / main / yang / meter-service.yang
1 module sal-meter {
2     namespace "urn:opendaylight:meter:service";
3     prefix meter;
4
5     import yang-ext {prefix ext; revision-date "2013-07-09";}
6     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
7     import opendaylight-meter-types {prefix meter-type;revision-date "2013-09-18";}
8     import flow-capable-transaction {prefix tr;}
9
10     revision "2013-09-18" {
11         description "Initial revision of meter service";
12     }        
13     
14     grouping node-meter {
15         uses "inv:node-context-ref";
16         
17         uses meter-type:meter;
18     }
19
20     /** Base configuration structure **/
21     grouping meter-update {
22         uses "inv:node-context-ref";
23
24         container original-meter {
25             uses meter-type:meter;
26         }
27         container updated-meter {
28             uses meter-type:meter;
29         }
30     }
31
32     rpc add-meter {
33         input {
34             uses tr:transaction-metadata;            
35             leaf meter-ref {
36                 type meter-type:meter-ref;
37             }
38             uses node-meter;            
39         }
40         output {
41             uses tr:transaction-aware;
42         }
43     }
44
45     rpc remove-meter {
46         input {
47             uses tr:transaction-metadata;            
48             leaf meter-ref {
49                 type meter-type:meter-ref;
50             }
51             
52             uses node-meter;                       
53         }
54         output {
55             uses tr:transaction-aware;
56         }
57     }
58
59     rpc update-meter {
60         input {
61             uses tr:transaction-metadata;            
62             leaf meter-ref {
63                 type meter-type:meter-ref;
64             }
65             
66             uses meter-update;                       
67         }
68         output {
69             uses tr:transaction-aware;
70         }
71     }
72         
73     notification meter-added {
74         uses tr:transaction-metadata;
75         leaf meter-ref {
76             type meter-type:meter-ref;
77         }
78         uses node-meter;
79         uses tr:transaction-aware;
80     }
81
82     notification meter-updated {
83         uses tr:transaction-metadata;
84         leaf meter-ref {
85             type meter-type:meter-ref;
86         }
87         uses node-meter;
88         uses tr:transaction-aware;
89     }
90
91     notification meter-removed {
92         uses tr:transaction-metadata;
93         leaf meter-ref {
94             type meter-type:meter-ref;
95         }
96         uses node-meter;
97         uses tr:transaction-aware;
98     }
99 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.