Merge "ArpHandler to ignore ip packet sent to default GW"
[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     identity feature-capability {
20     }
21     
22     identity flow-feature-capability-flow-stats {
23         description "Flow statistics"; 
24         base feature-capability;      
25     }
26     
27     identity flow-feature-capability-table-stats {
28         description "Table statistics";
29         base feature-capability;        
30     }
31     
32     identity flow-feature-capability-port-stats {
33         description "Port statistics";
34         base feature-capability;        
35     }
36     
37     identity flow-feature-capability-stp {
38         description "802.1d spanning tree";
39         base feature-capability;        
40     }
41     
42     identity flow-feature-capability-reserved {
43         description "Reserved, must be zero";
44         base feature-capability;        
45     }
46     
47     identity flow-feature-capability-ip-reasm {
48         description "Can reassemble IP fragments";
49         base feature-capability;        
50     }
51     
52     identity flow-feature-capability-queue-stats {
53         description "Queue statistics";
54         base feature-capability;        
55     }
56     
57     identity flow-feature-capability-arp-match-ip {
58         description "Match IP addresses in ARP pkts";
59         base feature-capability;        
60     }
61     
62     identity flow-feature-capability-group-stats {
63         description "Group statistics";
64         base feature-capability;        
65     }
66     
67     identity flow-feature-capability-port-blocked {
68         description "Switch will block looping ports";
69         base feature-capability;        
70     }
71     
72     grouping feature {
73         leaf support-state {
74             type inv:support-type;
75         }
76     }
77
78     grouping queue {
79          leaf queue-id {
80             type uint32;
81             description "id for the specific queue";
82             mandatory true; 
83         }
84         container properties {
85             leaf minimum-rate {
86                 type uint32;
87             }
88             leaf maximum-rate{
89                 type uint32;
90             }
91         }
92     }
93
94     typedef flow-id {
95         type inet:uri;
96     }
97
98     grouping tables {
99         list table {
100             key "id"; 
101     
102             leaf id {
103                     type uint8;
104             }            
105     
106             uses table:table-features;
107     
108             list flow {
109                 key "id"; 
110     
111                 leaf id {
112                     type flow-id;
113                 }           
114     
115                 uses flow:flow;
116             }
117         }
118     }
119     
120     grouping meters {
121         list meter {
122             key "meter-id";
123             uses meter:meter;
124         }
125     }
126     
127     
128     grouping flow-node {
129
130         leaf manufacturer {
131             type string;
132         }
133         leaf hardware {
134             type string;
135         }
136         leaf software {
137             type string;
138         }
139         leaf serial-number {
140             type string;
141         }
142         leaf description {
143             type string;
144         }
145
146         uses tables;
147         uses group:groups;
148         uses meters;
149         // TODO: ports
150         
151         container supported-match-types {
152             list match-type {
153                 uses feature;
154                 leaf match {
155                     type string; // FIXME: Add identity
156                 }
157                 
158             }
159         }
160         
161         container supported-instructions {
162             list instruction-type {
163                 uses feature;
164                 leaf instruction {
165                     type string; // FIXME: Add identity
166                 }
167             }
168         }
169
170         container supported-actions {
171             list action-type {
172                 uses feature;
173
174                 leaf action {
175                     type string; // FIXME: Add identity
176                 }
177             }
178         }
179         
180         container switch-features {
181             
182             leaf max_buffers {
183                 type uint32;
184             }
185             
186             leaf max_tables {
187                 type uint8;
188             }
189             
190             leaf-list capabilities {
191                 type identityref {
192                     base feature-capability;
193                 }
194             }
195             
196         }
197     }
198     
199     grouping flow-node-connector {
200
201         uses port:flow-capable-port;
202     }
203
204     augment "/inv:nodes/inv:node" {
205         ext:augment-identifier "flow-capable-node";
206         uses flow-node;
207     }
208
209     augment "/inv:nodes/inv:node/inv:node-connector" {
210         ext:augment-identifier "flow-capable-node-connector";
211         uses flow-node-connector;
212     }
213
214     augment "/inv:node-updated" {
215         ext:augment-identifier "flow-capable-node-updated";
216         uses flow-node;
217     }
218
219     augment "/inv:node-updated/inv:node-connector" {
220         //ext:identical-augment "flow-capable-node-connector";
221         ext:augment-identifier "flow-capable-node-connector-update-fields";
222         uses flow-node-connector;
223     }
224     
225     augment "/inv:node-connector-updated" {
226         ext:augment-identifier "flow-capable-node-connector-updated";
227         uses flow-node-connector;
228     }
229
230 }