Align YANG model with POJO updates for Juno 95/17395/2
authorRyan Moats <rmoats@us.ibm.com>
Tue, 31 Mar 2015 02:54:31 +0000 (21:54 -0500)
committerRyan Moats <rmoats@us.ibm.com>
Wed, 1 Apr 2015 17:02:22 +0000 (12:02 -0500)
Bring the YANG model into line with Juno object model.
Break out binding extension into separate model.

Change-Id: I527c5625d14f991afd9030847e7b4d8d8b020f06
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
model/src/main/yang/neutron-L3.yang
model/src/main/yang/neutron-attrs.yang
model/src/main/yang/neutron-binding.yang [new file with mode: 0644]
model/src/main/yang/neutron-metering.yang
model/src/main/yang/neutron-network.yang
model/src/main/yang/neutron-ports.yang
model/src/main/yang/neutron-provider.yang
model/src/main/yang/neutron-secgroups.yang
model/src/main/yang/neutron-subnets.yang

index aa2a99d9175aee6b66a1d69e92393a50a8ee554f..90015df8bb15ca241f3f67695b3ebf35ce6a2fab 100644 (file)
@@ -24,7 +24,7 @@ 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
-        Ice House Neutron modules.";
+        Juno House Neutron modules.";
 
     revision "2014-10-02" {
         description
@@ -33,12 +33,19 @@ module neutron-L3 {
     }
 
     grouping L3-attrs {
-
-        leaf-list external_network_id {
-            description "The network_id, for the external gateways. If this is empty, then this
-                network does not have external access";
+        leaf distribted {
+            description "whether this router is distributed or not.";
+            type boolean;
+            default "false";
+        }
+        leaf gateway-port-id {
+            description "the port uuid holding the router's gateway address.";
             type yang:uuid;
         }
+        leaf-list routes {
+            description "list of routes for this router.";
+            type string;
+        }
         leaf router-status {
             description "Contains the Router status.";
             type string;
@@ -50,7 +57,6 @@ module neutron-L3 {
             type yang:uuid;
             description "UUID to index this object.";
         }
-
         leaf tenant-id {
             type yang:uuid;
             description "The Tenant ID of this object.";
@@ -72,7 +78,7 @@ module neutron-L3 {
             description "The floating IP address.";
             type inet:ip-address;
         }
-        leaf fixed-ip-address {
+        list 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
@@ -80,7 +86,13 @@ 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.";
-            type inet:ip-address;
+            key subnet-id;
+            leaf subnet-id {
+                type yang:uuid;
+            }
+            leaf ip-address {
+                type inet:ip-address;
+            }
         }
         leaf status {
             type string;
@@ -89,6 +101,14 @@ module neutron-L3 {
     }
 
     grouping interface-attrs {
+        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;
@@ -111,6 +131,28 @@ module neutron-L3 {
                 uses attrs:base-attrs;
                 uses attrs:admin-attrs;
                 uses L3-attrs;
+                container external_gateway_info {
+                    leaf external-network-id {
+                        description "The network_id, for the external gateways. If this is empty, then this
+                            network does not have external access";
+                        type yang:uuid;
+                    }
+                    leaf enable-snat {
+                        description "If true, it indicates that the router is performing snat on external access ";
+                        type boolean;
+                        default "true";
+                    }
+                    list external-fixed-ips {
+                        description "external fixed IPs for this router ";
+                        key subnet-id;
+                        leaf subnet-id {
+                            type yang:uuid;
+                        }
+                        leaf ip-address {
+                            type inet:ip-address;
+                        }
+                    }
+                }
                 list interfaces {
                     description "List of interfaces associated with this router object.";
                     uses interface-attrs;
index eb63eadd8cd60ee1d56d8fb8788793e04d73ad05..b4e87ee7bb61f0f07b45f4f30607778df1409f19 100644 (file)
@@ -22,11 +22,11 @@ module neutron-attrs {
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
     description "This YANG module defines groupings that are used by Openstack
-        Ice House Neutron YANG modules.";
+        Juno House Neutron YANG modules.";
 
     revision "2014-10-02" {
         description
-                "Initial version of attributes used by OpenStack Ice House Neutron
+                "Initial version of attributes used by OpenStack Icehouse House Neutron
                 models";
     }
 
diff --git a/model/src/main/yang/neutron-binding.yang b/model/src/main/yang/neutron-binding.yang
new file mode 100644 (file)
index 0000000..9e871bd
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2015 IBM Corporation.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+module neutron-binding {
+
+    yang-version 1;
+
+    namespace "urn:opendaylight:neutron-binding";
+
+    prefix neutron-binding;
+
+    import ietf-yang-types { prefix "yang"; }
+    // It requires rfc6991 (revision 2013-07-15), but odl don't have it, so this patch verify build will fail.
+    import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
+    import neutron-attrs { prefix "attrs"; }
+    import neutron-ports { prefix "ports"; }
+    import neutron { prefix "neutron"; }
+
+
+    organization "OpenDaylight Neutron Group";
+
+    contact "Ryan Moats <rmoats@us.ibm.com>";
+
+    description "This YANG module defines binding attributes that are used by Openstack
+        Juno Port YANG modules.";
+
+    grouping binding-attrs {
+        leaf host-id {
+            type yang:uuid;
+            description "The ID of the host where the port is allocated. In some cases,
+                        different implementations can run on different hosts.";
+        }
+
+        list vif-details {
+            description "A dictionary that enables the application to pass information
+                        about functions that the Networking API provides. To enable or
+                        disable port filtering features such as security group and anti-MAC/IP
+                        spoofing, specify port-filter: True or port-filter: False ";
+            leaf port-filter {
+                type boolean;
+            }
+            leaf ovs-hybrid-plug {
+                type boolean;
+            }
+        }
+        leaf vif-type {
+            type string;
+        }
+        leaf vnic-type {
+            type string;
+        }
+        leaf profile {
+            type string;
+        }
+    }
+
+    augment "/neutron:neutron/neutron:ports/neutron:port"{
+        description "
+          This module augments the ports container in the neutron-ports
+          module with binding information.
+          ";
+        uses binding-attrs;
+    }
+}
index 73acc13bf1ee2bd5ba8bed143bd243806770e75e..c695469277916032db7696bedf2c127b54dd14eb 100644 (file)
@@ -23,7 +23,7 @@ module neutron-metering {
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
     description "This YANG module defines metering attributes that are used by Openstack
-        Ice House Neutron YANG modules.";
+        Juno House Neutron YANG modules.";
 
     revision "2014-10-02" {
         description
@@ -93,4 +93,4 @@ module neutron-metering {
             }
         }
     }
-}
\ No newline at end of file
+}
index 3d37b1fb67e53aae477885a841fa71300a53c7c9..cf6f5ba665f723a7619ed97002bef4790afc31b9 100644 (file)
@@ -22,7 +22,7 @@ module neutron-networks {
 
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
-    description "This YANG module defines Openstack Ice House Neutron Network model";
+    description "This YANG module defines Openstack Juno House Neutron Network model";
 
     revision "2014-10-02" {
         description
index 39ae5c621568751f36bf39f84da417da073991c1..a7ae07f78d16d9efb578044dd3e2d3850de16ad8 100644 (file)
@@ -22,7 +22,7 @@ module neutron-ports {
 
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
-    description "This YANG module defines Openstack Ice House Neutron Ports model";
+    description "This YANG module defines Openstack Juno House Neutron Ports model";
 
     revision "2014-10-02" {
         description
@@ -30,19 +30,22 @@ module neutron-ports {
     }
 
     grouping port-attrs {
-        leaf binding-host-id {
-            type yang:uuid;
-            description "The ID of the host where the port is allocated. In some cases,
-                        different implementations can run on different hosts.";
-        }
-        leaf-list allowed-address-pairs {
-            type string;
+        list allowed-address-pairs {
             description "Allowed address pairs for this port. For example: neutron port-create
                         net1 --allowed-address-pairs type=dict list=true mac_address=<mac_address>,ip_address=<ip_cidr>
                         Setting an allowed-address-pair that matches the mac_address and
                         ip_address of a port is prevented. This is because that would
                         have no effect since traffic matching the mac_address and ip_address
                         is already allowed to pass through the port";
+            leaf port-id {
+                type string;
+            }
+            leaf mac-address {
+                type string;
+            }
+            leaf ip-address {
+                type string;
+            }
         }
 
         leaf network-id {
@@ -51,10 +54,6 @@ module neutron-ports {
         list extra-dhcp-opts {
             description "Extra DHCP options";
             reference "http://developer.openstack.org/api-ref-networking-v2.html";
-            key id ;
-            leaf id {
-                type string;
-            }
             leaf opt-name {
                 type string;
             }
@@ -62,31 +61,6 @@ module neutron-ports {
                 type string;
             }
         }
-
-        list binding-vif-details {
-            description "A dictionary that enables the application to pass information
-                        about functions that the Networking API provides. To enable or
-                        disable port filtering features such as security group and anti-MAC/IP
-                        spoofing, specify port-filter: True or port-filter: False ";
-
-            key id;
-            leaf id {
-                type string;
-            }
-
-            leaf port-filter {
-                type boolean;
-            }
-            leaf ovs-hybrid-plug {
-                type boolean;
-            }
-        }
-        leaf binding-vif-type {
-            type string;
-        }
-        leaf binding-vnic-type {
-            type string;
-        }
         leaf device-owner {
             type string;
         }
index ec4de09f2287e786c5eb110b30a805850021d620..9a285ffd0cd62ac1c69903c910acbb873ead4ca8 100644 (file)
@@ -24,7 +24,7 @@ module neutron-provider {
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
     description "This YANG module defines provider attributes that are used by Openstack
-        Ice House Neutron YANG modules.";
+        Juno House Neutron YANG modules.";
 
     revision "2014-10-02" {
         description
index de60080cbd30ad4652b93b80ec6f13266585472d..755f026d68e62bb2b8c6f649f563df64727458bd 100644 (file)
@@ -23,7 +23,7 @@ module neutron-secgroups {
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
     description "This YANG module defines Security group objects that are used by Openstack
-        Ice House Neutron YANG modules.";
+        Juno House Neutron YANG modules.";
 
     revision "2014-10-02" {
         description
@@ -129,6 +129,9 @@ module neutron-secgroups {
                 uses attrs:base-attrs;
                 uses security-group-attrs;
                 description "List of Metering Labels.";
+                leaf-list security-rules {
+                    type yang:uuid;
+                }
             }
         }
     }
@@ -142,4 +145,4 @@ module neutron-secgroups {
             }
         }
     }
-}
\ No newline at end of file
+}
index 3902952a2ee4523d22fcf3e0d063c554d27f1fa1..b75c896475a5c2adcf3c593f55388aa7a9eed978 100644 (file)
@@ -22,7 +22,7 @@ module neutron-subnets {
 
     contact "J. Gregory Hall <ghall@brocade.com>, Kiran Sreenivasa <kkoushik@brocade.com>";
 
-    description "This YANG module defines Openstack Ice House Neutron Subnets model";
+    description "This YANG module defines Openstack Juno House Neutron Subnets model";
 
     revision "2014-10-02" {
         description
@@ -107,6 +107,7 @@ module neutron-subnets {
         leaf enable-dhcp {
             type boolean;
             description "Specifies whether DHCP is enabled for this subnet or not.";
+            default "true";
         }
     }
     grouping subnets-attributes {
@@ -118,4 +119,4 @@ module neutron-subnets {
             }
         }
     }
-}
\ No newline at end of file
+}