2 * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
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
12 namespace "urn:opendaylight:neutron-L3";
16 import ietf-yang-types { prefix "yang";}
17 // It requires rfc6991 (revision 2013-07-15), but odl don't have it, so this patch verify build will fail.
18 import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
19 import neutron-attrs { prefix "attrs"; }
21 organization "OpenDaylight Neutron Group";
23 contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
25 description "This YANG module defines attributes used by Openstack Neutron L3 modules.";
27 revision "2015-07-12" {
29 "OpenDaylight Beryllium release";
32 grouping L3-attributes {
34 description "whether this router is distributed or not.";
38 leaf gateway-port-id {
39 description "the port uuid holding the router's gateway address.";
43 description "list of routes for this router.";
45 description "Specifies a destination in CIDR format";
53 description "Contains the Router status.";
58 grouping L3-floatingip-attributes {
61 description "UUID to index this object.";
65 description "The Tenant ID of this object.";
68 description "Contains the Router ID of this floatingip object.";
72 description "Contains the Port ID of the fixed IP address that will be
73 associated with this object.";
76 leaf floating-network-id {
77 description "The ID of the network associated with the floating IP.";
80 leaf floating-ip-address {
81 description "The floating IP address.";
84 leaf fixed-ip-address {
85 description "The fixed IP address associated with the floating IP.
86 If you intend to associate the floating IP with a fixed IP at
87 creation time, then you must indicate the identifier of the
88 internal port(using port-id object). If an internal port has
89 multiple associated IP addresses, the service chooses the first
90 IP unless you explicitly specify the parameter fixed_ip_address
91 to select a specific IP.";
96 description "The network status.";
100 grouping interface-attributes {
103 description "UUID to index this object.";
107 description "The Tenant ID of this object.";
110 description "Contains the Subnet ID of the interface.";
114 description "Contains the Port ID of the interface.";
119 grouping routers-attributes {
123 description "A logical entity for forwarding packets across internal subnets
124 and NATting them on external networks through an appropriate external
128 uses attrs:base-attributes;
129 uses attrs:admin-attributes;
131 container external_gateway_info {
132 leaf external-network-id {
133 description "The network_id, for the external gateways. If this is empty, then this
134 network does not have external access";
138 description "If true, it indicates that the router is performing snat on external access ";
142 list external-fixed-ips {
143 description "external fixed IPs for this router ";
149 type inet:ip-address;
154 description "List of interfaces associated with this router object.";
156 uses interface-attributes;
161 grouping floatingips-attributes {
162 container floatingips {
165 description "An external IP address that is mapped to a port that is
166 attached to an internal network.";
169 uses L3-floatingip-attributes;