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