Fix for multiple external fixedIPs under router-ext-gw-info
[neutron.git] / model / src / main / yang / neutron-L3.yang
index e1d8d9b0fefd75917f12546888073a38f436fdf1..1a42dbf6dbb959a2ab9a8401675441f128a31a24 100644 (file)
@@ -22,17 +22,15 @@ module neutron-L3 {
 
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
-    description "This YANG module defines L3 attributes that are used by Openstack
-        Juno House Neutron modules.";
+    description "This YANG module defines attributes used by Openstack Neutron L3 modules.";
 
-    revision "2014-10-02" {
+    revision "2015-07-12" {
         description
-                "Initial version of L3 attributes used by OpenStack Ice House Neutron
-                models";
+                "OpenDaylight Beryllium release";
     }
 
     grouping L3-attributes {
-        leaf distribted {
+        leaf distributed {
             description "whether this router is distributed or not.";
             type boolean;
             default "false";
@@ -41,9 +39,16 @@ module neutron-L3 {
             description "the port uuid holding the router's gateway address.";
             type yang:uuid;
         }
-        leaf-list routes {
+        list routes {
             description "list of routes for this router.";
-            type string;
+            key "destination nexthop";
+            leaf destination {
+                description "Specifies a destination in CIDR format";
+                type inet:ip-prefix;
+            }
+            leaf nexthop {
+                type inet:ip-address;
+            }
         }
         leaf router-status {
             description "Contains the Router status.";
@@ -77,7 +82,7 @@ module neutron-L3 {
             description "The floating IP address.";
             type inet:ip-address;
         }
-        list fixed-ip-address {
+        leaf fixed-ip-address {
             description "The fixed IP address associated with the floating IP.
                 If you intend to associate the floating IP with a fixed IP at
                 creation time, then you must indicate the identifier of the
@@ -85,13 +90,7 @@ module neutron-L3 {
                 multiple associated IP addresses, the service chooses the first
                 IP unless you explicitly specify the parameter fixed_ip_address
                 to select a specific IP.";
-            key subnet-id;
-            leaf subnet-id {
-                type yang:uuid;
-            }
-            leaf ip-address {
-                type inet:ip-address;
-            }
+            type inet:ip-address;
         }
         leaf status {
             type string;
@@ -99,25 +98,6 @@ module neutron-L3 {
         }
     }
 
-    grouping interface-attributes {
-        leaf uuid {
-            type yang:uuid;
-            description "UUID to index this object.";
-        }
-        leaf tenant-id {
-            type yang:uuid;
-            description "The Tenant ID of this object.";
-        }
-        leaf subnet-id {
-            description "Contains the Subnet ID of the interface.";
-            type yang:uuid;
-        }
-        leaf port-id {
-            description "Contains the Port ID of the interface.";
-            type yang:uuid;
-        }
-    }
-
     grouping routers-attributes {
         container routers {
             list router {
@@ -143,7 +123,7 @@ module neutron-L3 {
                     }
                     list external-fixed-ips {
                         description "external fixed IPs for this router ";
-                        key subnet-id;
+                        key "subnet-id ip-address";
                         leaf subnet-id {
                             type yang:uuid;
                         }
@@ -152,11 +132,6 @@ module neutron-L3 {
                         }
                     }
                 }
-                list interfaces {
-                    description "List of interfaces associated with this router object.";
-                    key "uuid";
-                    uses interface-attributes;
-                }
             }
         }
     }