AbstractConfigTest - exposed BundleContext and ServiceRegistration mock.
[controller.git] / opendaylight / md-sal / model / model-flow-base / src / main / yang / port-types.yang
1 module opendaylight-port-types {
2     namespace "urn:opendaylight:flow:types:port";
3     prefix port-types;
4
5     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
6     import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
7     
8     revision "2013-09-25" {
9         description "Initial revision of Port Inventory model";
10     }
11
12     
13     typedef port-config {
14         type bits {
15             bit PORT-DOWN;
16             bit NO-RECV;
17             bit NO-FWD;
18             bit NO-PACKET-IN;
19         }
20     }
21     
22     typedef port-state {
23         type enumeration {
24             enum link-down;
25             enum blocked;
26             enum live;
27         }
28     }
29
30     
31     typedef port-features {
32         type bits {
33             bit 10mb-hd;
34             bit 10mb-fd;
35             bit 100mb-hd;
36             bit 100mb-fd;
37             bit 1gb-hd;
38             bit 1gb-fd;
39             bit 10gb-fd;
40             bit 40gb-fd;
41             bit 100gb-fd;
42             bit 1tb-fd;
43             bit other;
44             bit copper;
45             bit fiber;
46             bit autoeng;
47             bit pause;
48             bit pause-asym;
49         }
50     }
51     
52     grouping common-port {
53
54         leaf port-number {
55             type uint32;
56         }
57         
58         leaf hardware-address {
59             type yang:mac-address;
60             description "MAC Address of the port";
61             
62         }
63         
64         leaf configuration {
65             type port-config;
66             description "Bit map of OFPPC-* flags";          
67         }
68         
69         leaf advertised-features {
70             type port-features;
71             description "Features being advertised by the port";            
72         }
73     }
74     
75     grouping flow-capable-port {    
76                 
77         uses common-port;
78         
79         leaf name {
80             type string;
81             description "Human readable name of the port";                    
82         }
83         
84         leaf state {
85             type port-state;
86             description "Bit map of OFPPS-* flags";            
87         }
88         
89         leaf current-feature {
90             type port-features;
91             description "Bit map of OFPPF-* flags";            
92         }       
93         
94         leaf supported {
95             type port-features;
96             description "Features supported by the port";           
97         }
98         
99         leaf peer-features {
100             type port-features;
101             description "Features advertised by peer";            
102         }
103         
104         leaf current-speed {
105             type uint32;
106             units "kbps";
107             description "Current port bit rate in kbps";            
108         }
109         
110         leaf maximum-speed {
111             type uint32;
112             units "kbps";
113             description "Max port bit rate in kbps";            
114         }
115     }    
116     
117     grouping ofp-port-mod {
118         container port {
119             list port {
120                 key "port-mod-order";
121                 leaf port-mod-order {
122                     type uint32;
123                 }    
124                 
125                 uses common-port;
126                 
127                 leaf mask {
128                     type port-config;
129                     description "Bitmap of OFPPC-* flags to be changed";
130                 }      
131                 
132                 leaf container-name {
133                     type string; 
134                 }
135             
136                 leaf port-name {
137                     type string; 
138                 } 
139
140                 leaf barrier {
141                     type boolean; 
142                 } 
143             }            
144         }    
145     }
146 }