147b64689e8d879cf2f998c6be0ba1ee62ce28a6
[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;}
6     import opendaylight-inventory {prefix inv;}
7     import ietf-inet-types {prefix inet;}
8     import opendaylight-flow-types {prefix types;}
9
10
11     revision "2013-08-19" {
12         description "Initial revision of flow service";
13     }
14
15
16     typedef flow-table-ref {
17         type instance-identifier;
18     }
19     
20     grouping node-flow {
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;
29     }
30
31     /** Base configuration structure **/
32     grouping flow-update {
33         container original-flow {
34             uses types:flow;
35         }
36         container updated-flow {
37             uses types:flow;
38         }
39     }
40
41     rpc add-flow {
42         input {
43             uses node-flow;
44         }
45     }
46
47     rpc remove-flow {
48         input {
49             uses node-flow;
50         }
51     }
52
53     rpc update-flow {
54         input {
55             leaf node {
56                 ext:context-reference "inv:node-context";
57                 type inv:node-ref;
58             }
59             uses flow-update;
60         }
61     }
62
63     notification flow-added {
64         uses node-flow;
65     }
66
67     notification flow-updated {
68         uses node-flow;
69     }
70
71     notification flow-removed {
72         uses node-flow;
73     }
74
75     augment "/inv:nodes/inv:node" {
76         ext:augment-identifier "flow-capable-node";
77         container flow-tables {
78             list table {
79                 key "id";
80                 leaf "id" {
81                     type inet:uri;
82                 }
83             }
84         }
85     }
86 }