Adds Minimum Bandwidth Rule to the Qos Policy
[neutron.git] / model / src / main / yang / neutron-L3.yang
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 module neutron-L3 {
9
10     yang-version 1;
11
12     namespace "urn:opendaylight:neutron-L3";
13
14     prefix neutron-L3;
15
16     import ietf-yang-types { prefix "yang";}
17     import ietf-inet-types { prefix "inet"; revision-date 2013-07-15; }
18     import neutron-attrs { prefix "attrs"; }
19
20     organization "OpenDaylight Neutron Group";
21
22     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
23
24     description "This YANG module defines attributes used by Openstack Neutron L3 modules.";
25
26     revision "2015-07-12" {
27         description
28                 "OpenDaylight Beryllium release";
29     }
30
31     grouping L3-attributes {
32         leaf distributed {
33             description "whether this router is distributed or not.";
34             type boolean;
35             default "false";
36         }
37         leaf gateway-port-id {
38             description "the port uuid holding the router's gateway address.";
39             type yang:uuid;
40         }
41         list routes {
42             description "list of routes for this router.";
43             key "destination nexthop";
44             leaf destination {
45                 description "Specifies a destination in CIDR format";
46                 type inet:ip-prefix;
47             }
48             leaf nexthop {
49                 type inet:ip-address;
50             }
51         }
52         leaf router-status {
53             description "Contains the Router status.";
54             type string;
55         }
56     }
57
58     grouping L3-floatingip-attributes {
59         leaf router-id {
60             description "Contains the Router ID of this floatingip object.";
61             type yang:uuid;
62         }
63         leaf port-id {
64             description "Contains the Port ID of the fixed IP address that will be
65                 associated with this object.";
66             type yang:uuid;
67         }
68         leaf floating-network-id {
69             description "The ID of the network associated with the floating IP.";
70             type yang:uuid;
71         }
72         leaf floating-ip-address {
73             description "The floating IP address.";
74             type inet:ip-address;
75         }
76         leaf fixed-ip-address {
77             description "The fixed IP address associated with the floating IP.
78                 If you intend to associate the floating IP with a fixed IP at
79                 creation time, then you must indicate the identifier of the
80                 internal port(using port-id object). If an internal port has
81                 multiple associated IP addresses, the service chooses the first
82                 IP unless you explicitly specify the parameter fixed_ip_address
83                 to select a specific IP.";
84             type inet:ip-address;
85         }
86         leaf status {
87             type string;
88             description "The network status.";
89         }
90     }
91
92     grouping routers-attributes {
93         container routers {
94             list router {
95
96                 description "A logical entity for forwarding packets across internal subnets
97                     and NATting them on external networks through an appropriate external
98                     gateway.";
99
100                 key "uuid";
101                 uses attrs:base-attributes;
102                 uses attrs:admin-attributes;
103                 uses L3-attributes;
104                 container external_gateway_info {
105                     leaf external-network-id {
106                         description "The network_id, for the external gateways. If this is empty, then this
107                             network does not have external access";
108                         type yang:uuid;
109                     }
110                     leaf enable-snat {
111                         description "If true, it indicates that the router is performing snat on external access ";
112                         type boolean;
113                         default "true";
114                     }
115                     list external-fixed-ips {
116                         description "external fixed IPs for this router ";
117                         key "subnet-id ip-address";
118                         leaf subnet-id {
119                             type yang:uuid;
120                         }
121                         leaf ip-address {
122                             type inet:ip-address;
123                         }
124                     }
125                 }
126             }
127         }
128     }
129     grouping floatingips-attributes {
130         container floatingips {
131             list floatingip {
132
133                 description "An external IP address that is mapped to a port that is
134                     attached to an internal network.";
135
136                 key "uuid";
137                 uses attrs:id-attributes;
138                 uses L3-floatingip-attributes;
139             }
140         }
141     }
142 }