changed models to include XID in add/update/delete service notification
[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 node-flow;
55             uses tr:transaction-aware;
56         }
57         output {
58             uses tr:transaction-aware;
59         }
60     }
61
62     rpc remove-flow {
63         input {
64             uses node-flow;
65             uses tr:transaction-aware;
66         }
67         output {
68             uses tr:transaction-aware;
69         }
70     }
71
72     rpc update-flow {
73         input {
74             uses flow-update;
75             uses tr:transaction-aware;
76         }
77         output {
78             uses tr:transaction-aware;
79         }
80     }
81
82     notification flow-added {
83         uses node-flow;
84         uses tr:transaction-aware;
85     }
86
87     notification flow-updated {
88         uses node-flow;
89         uses tr:transaction-aware;
90     }
91
92     notification flow-removed {
93         uses node-flow;
94         uses tr:transaction-aware;
95     }
96     
97     notification switch-flow-removed {
98         uses node-flow-removed;
99     }
100     
101     notification node-error-notification {
102         uses error:error-message;
103         uses tr:transaction-aware;
104     }
105     
106     notification node-experimenter-error-notification {
107         uses error:experimenter-error-message;
108         uses tr:transaction-aware;
109     }
110 }