Merge "BUG 1839 - HTTP delete of non existing data"
[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 opendaylight-port-types {prefix port;revision-date "2013-09-25";}
8     import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
9     import opendaylight-table-types {prefix table;revision-date "2013-10-26";}
10     import opendaylight-flow-types {prefix flow;revision-date "2013-10-26";}
11     import opendaylight-group-types {prefix group;revision-date "2013-10-18";}
12     import opendaylight-meter-types {prefix meter;revision-date "2013-09-18";}
13     
14     revision "2013-08-19" {
15         description "Flow Capable Node extensions to the Inventory model";
16     }
17     
18     identity feature-capability {
19     }
20     
21     identity flow-feature-capability-flow-stats {
22         description "Flow statistics"; 
23         base feature-capability;      
24     }
25     
26     identity flow-feature-capability-table-stats {
27         description "Table statistics";
28         base feature-capability;        
29     }
30     
31     identity flow-feature-capability-port-stats {
32         description "Port statistics";
33         base feature-capability;        
34     }
35     
36     identity flow-feature-capability-stp {
37         description "802.1d spanning tree";
38         base feature-capability;        
39     }
40     
41     identity flow-feature-capability-reserved {
42         description "Reserved, must be zero";
43         base feature-capability;        
44     }
45     
46     identity flow-feature-capability-ip-reasm {
47         description "Can reassemble IP fragments";
48         base feature-capability;        
49     }
50     
51     identity flow-feature-capability-queue-stats {
52         description "Queue statistics";
53         base feature-capability;        
54     }
55     
56     identity flow-feature-capability-arp-match-ip {
57         description "Match IP addresses in ARP pkts";
58         base feature-capability;        
59     }
60     
61     identity flow-feature-capability-group-stats {
62         description "Group statistics";
63         base feature-capability;        
64     }
65     
66     identity flow-feature-capability-port-blocked {
67         description "Switch will block looping ports";
68         base feature-capability;        
69     }
70     
71     grouping feature {
72         leaf support-state {
73             type inv:support-type;
74         }
75     }
76
77     grouping queue {
78          leaf queue-id {
79             type uint32;
80             description "id for the specific queue";
81             mandatory true; 
82         }
83         container properties {
84             leaf minimum-rate {
85                 type uint32;
86             }
87             leaf maximum-rate{
88                 type uint32;
89             }
90         }
91     }
92
93     typedef flow-id {
94         type inet:uri;
95     }
96
97     grouping tables {
98         list table {
99             key "id"; 
100     
101             leaf id {
102                     type uint8;
103             }            
104     
105             uses table:table-features;
106     
107             list flow {
108                 key "id"; 
109     
110                 leaf id {
111                     type flow-id;
112                 }           
113     
114                 uses flow:flow;
115             }
116         }
117     }
118     
119     grouping meters {
120         list meter {
121             key "meter-id";
122             uses meter:meter;
123         }
124     }
125
126     grouping ip-address-grouping {
127         leaf ip-address {
128             description "IP address of a flow capable node.";
129             type inet:ip-address;
130         }
131     }
132
133     grouping flow-node {
134         leaf manufacturer {
135             type string;
136         }
137         leaf hardware {
138             type string;
139         }
140         leaf software {
141             type string;
142         }
143         leaf serial-number {
144             type string;
145         }
146         leaf description {
147             type string;
148         }
149
150         uses tables;
151         uses group:groups;
152         uses meters;
153         uses ip-address-grouping;
154         // TODO: ports
155         
156         container supported-match-types {
157             list match-type {
158                 key "match";
159                 uses feature;
160                 leaf match {
161                     type string; // FIXME: Add identity
162                 }
163                 
164             }
165         }
166         
167         container supported-instructions {
168             list instruction-type {
169                 key "instruction";
170                 uses feature;
171                 leaf instruction {
172                     type string; // FIXME: Add identity
173                 }
174             }
175         }
176
177         container supported-actions {
178             list action-type {
179                 key "action";
180                 uses feature;
181
182                 leaf action {
183                     type string; // FIXME: Add identity
184                 }
185             }
186         }
187         
188         container switch-features {
189             
190             leaf max_buffers {
191                 type uint32;
192             }
193             
194             leaf max_tables {
195                 type uint8;
196             }
197             
198             leaf-list capabilities {
199                 type identityref {
200                     base feature-capability;
201                 }
202             }
203             
204         }
205     }
206
207     grouping flow-node-connector {
208
209         uses port:flow-capable-port;
210     }
211
212     augment "/inv:nodes/inv:node" {
213         ext:augment-identifier "flow-capable-node";
214         uses flow-node;
215     }
216
217     augment "/inv:nodes/inv:node/inv:node-connector" {
218         ext:augment-identifier "flow-capable-node-connector";
219         uses flow-node-connector;
220     }
221
222     augment "/inv:node-updated" {
223         ext:augment-identifier "flow-capable-node-updated";
224         uses flow-node;
225     }
226
227     augment "/inv:node-updated/inv:node-connector" {
228         //ext:identical-augment "flow-capable-node-connector";
229         ext:augment-identifier "flow-capable-node-connector-update-fields";
230         uses flow-node-connector;
231     }
232     
233     augment "/inv:node-connector-updated" {
234         ext:augment-identifier "flow-capable-node-connector-updated";
235         uses flow-node-connector;
236     }
237
238     augment "/inv:nodes/inv:node/table" {
239         ext:augment-identifier "flow-hash-id-mapping";
240     description "Flow is identified by match and priority on device. So Operational/DS
241         has to simulate that behavior and contract between FlowId and match+priority
242         identification should represent Flow hashCode. Flow has to contain only
243         match priority and flowCookie for create a hashCode";
244         list flow-hash-id-map {
245             key "hash";
246             leaf hash {
247                 type string;
248             }
249             leaf flow-id {
250                 type flow-id;
251             }
252         }
253     }
254 }