Merge "Add test for generated code checking list of dependencies."
[controller.git] / opendaylight / md-sal / model / model-flow-service / src / main / yang / flow-service.yang
1 module sal-flow {
2     namespace "urn:opendaylight:flow:service";
3     prefix flow;
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-flow-types {prefix types;revision-date "2013-10-26";}
9     import flow-capable-transaction {prefix tr;}
10     import flow-errors {prefix error;}
11
12     revision "2013-08-19" {
13         description "Initial revision of flow service";
14     }
15
16     typedef flow-table-ref {
17         type instance-identifier;
18     }
19     
20     grouping node-flow-removed {
21         leaf node {
22             ext:context-reference "inv:node-context";
23             type inv:node-ref;
24         }
25         leaf flow-table {
26             type flow-table-ref;
27         }
28         uses types:flow-mod-removed;
29     }
30     
31     grouping node-flow {
32         uses "inv:node-context-ref";
33
34         leaf flow-table {
35             type flow-table-ref;
36         }
37         uses types:flow;
38     }
39
40     /** Base configuration structure **/
41     grouping flow-update {
42         uses "inv:node-context-ref";
43
44         container original-flow {
45             uses types:flow;
46         }
47         container updated-flow {
48             uses types:flow;
49         }
50     }
51
52     rpc add-flow {
53         input {
54             uses tr:transaction-metadata;
55             leaf flow-ref {
56                 type types:flow-ref;
57             }
58             uses node-flow;            
59         }
60         output {
61             uses tr:transaction-aware;
62         }
63     }
64
65     rpc remove-flow {
66         input {
67             uses tr:transaction-metadata;
68             leaf flow-ref {
69                 type types:flow-ref;
70             }
71             uses node-flow;            
72         }
73         output {
74             uses tr:transaction-aware;
75         }
76     }
77
78     rpc update-flow {
79         input {
80             uses tr:transaction-metadata;
81             leaf flow-ref {
82                 type types:flow-ref;
83             }
84             uses flow-update;           
85         }
86         output {
87             uses tr:transaction-aware;
88         }
89     }
90
91     notification flow-added {
92         uses tr:transaction-metadata;
93         leaf flow-ref {
94             type types:flow-ref;
95         }
96         uses node-flow;
97         uses tr:transaction-aware;
98     }
99
100     notification flow-updated {
101         uses tr:transaction-metadata;
102         leaf flow-ref {
103             type types:flow-ref;
104         }
105         uses node-flow;
106         uses tr:transaction-aware;        
107     }
108
109     notification flow-removed {
110         uses tr:transaction-metadata;
111         leaf flow-ref {
112             type types:flow-ref;
113         }
114         uses node-flow;
115         uses tr:transaction-aware;
116     }
117     
118     notification switch-flow-removed {
119         uses node-flow-removed;
120     }
121     
122     notification node-error-notification {
123         uses error:error-message;
124         uses tr:transaction-aware;
125         uses tr:transaction-metadata;
126     }
127     
128     notification node-experimenter-error-notification {
129         uses error:experimenter-error-message;
130         uses tr:transaction-aware;
131     }
132 }

©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.