Merge "Bug 211 - Fixed codec generation when transitive dependencies (parents) are...
[controller.git] / opendaylight / md-sal / model / model-flow-service / src / main / yang / flow-node-inventory.yang
1 module flow-node-inventory {
2     namespace "urn:opendaylight:flow:inventory";
3     prefix flownode;
4
5     import yang-ext {prefix ext; revision-date "2013-07-09";}
6     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
7     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
8     import opendaylight-port-types {prefix port;revision-date "2013-09-25";}
9     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
10     import opendaylight-table-types {prefix table;revision-date "2013-10-26";}
11     import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
12     import opendaylight-group-types {prefix group;revision-date "2013-10-18";}
13     import opendaylight-meter-types {prefix meter;revision-date "2013-09-18";}
14     
15     revision "2013-08-19" {
16         description "Flow Capable Node extensions to the Inventory model";
17     }
18
19     grouping feature {
20         leaf support-state {
21             type inv:support-type;
22         }
23     }
24
25     grouping queue {
26          leaf queue-id {
27             type uint32;
28             description "id for the specific queue";
29             mandatory true; 
30         }
31         container properties {
32             leaf minimum-rate {
33                 type uint32;
34             }
35             leaf maximum-rate{
36                 type uint32;
37             }
38         }
39     }
40
41     typedef flow-id {
42         type uint32; // Note: This doesn't really belong here, and not sure if unint32 is right
43     }
44
45     grouping tables {
46         list table {
47             key "id"; 
48     
49             leaf id {
50                     type uint8;
51             }            
52     
53             uses table:table-features;
54     
55             list flow {
56                 key "id"; 
57     
58                 leaf id {
59                     type flow-id;
60                 }           
61     
62                 uses flow:flow;
63             }
64         }
65     }
66     
67     grouping meters {
68         list meter {
69             key "meter-id";
70             uses meter:meter;
71         }
72     }
73
74     grouping flow-node {
75
76         leaf manufacturer {
77             type string;
78         }
79         leaf hardware {
80             type string;
81         }
82         leaf software {
83             type string;
84         }
85         leaf serial-number {
86             type string;
87         }
88         leaf description {
89             type string;
90         }
91
92         uses tables;
93         uses group:groups;
94         uses meters;
95         // TODO: ports
96         
97         container supported-match-types {
98             list match-type {
99                 uses feature;
100                 leaf match {
101                     type string; // FIXME: Add identity
102                 }
103                 
104             }
105         }
106         
107         container supported-instructions {
108             list instruction-type {
109                 uses feature;
110                 leaf instruction {
111                     type string; // FIXME: Add identity
112                 }
113             }
114         }
115
116         container supported-actions {
117             list action-type {
118                 uses feature;
119
120                 leaf action {
121                     type string; // FIXME: Add identity
122                 }
123             }
124         }
125     }
126     
127     grouping flow-node-connector {
128
129         uses port:flow-capable-port;
130     }
131
132     augment "/inv:nodes/inv:node" {
133         ext:augment-identifier "flow-capable-node";
134         uses flow-node;
135     }
136
137     augment "/inv:nodes/inv:node/inv:node-connector" {
138         ext:augment-identifier "flow-capable-node-connector";
139         uses flow-node-connector;
140     }
141
142     augment "/inv:node-updated" {
143         ext:augment-identifier "flow-capable-node-updated";
144         uses flow-node;
145     }
146
147     augment "/inv:node-updated/inv:node-connector" {
148         //ext:identical-augment "flow-capable-node-connector";
149         ext:augment-identifier "flow-capable-node-connector-update-fields";
150         uses flow-node-connector;
151     }
152
153     augment "/inv:node-connector-updated" {
154         ext:augment-identifier "flow-capable-node-connector-updated";
155         uses flow-node-connector;
156     }
157 }