Merge "Bug 4789 - model allowed address pairs"
[neutron.git] / model / src / main / yang / neutron-lbaasv2.yang
index e12c914c38eab2ec93b1122d64cc041b5fef63f5..7d6bbff2161da4bde31cfee6a397d955057e5c07 100644 (file)
@@ -17,21 +17,20 @@ module neutron-lbaasv2 {
     // 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-constants { prefix "constants"; }
 
     organization "OpenDaylight Neutron Group";
 
     contact "Kiran Sreenivasa <kkoushik@brocade.com>";
 
-    description "This YANG module defines LBaaSV2.0 objects that are used by Openstack
-        Ice House Neutron YANG modules.";
+    description "This YANG module defines OpenStack Neutron LBaaSV2.0 modules";
 
-    revision "2014-10-02" {
+    revision "2015-07-12" {
         description
-                "Initial version of LBaaSV2.0 objects used by OpenStack Ice House Neutron
-                models";
+                "OpenDaylight Beryllium release";
     }
 
-    grouping loadbalancer-attrs {
+    grouping loadbalancer-attributes {
         description "LBaaSV2.0 load balancer attributes.";
         leaf descr {
             type string;
@@ -47,15 +46,15 @@ module neutron-lbaasv2 {
             description "The ID of the subnet on which to allocate the VIP address.";
         }
     }
-    grouping listener-attrs {
+    grouping listener-attributes {
         description "LBaaSV2.0 listener attributes.";
-        leaf default-pool-d {
+        leaf default-pool-id {
             type yang:uuid;
             description "ID of default pool. Must have compatible protocol with listener.";
         }
         leaf admin-state-up {
             type boolean;
-            description "The administrative state of the listner, which is up (true) or
+            description "The administrative state of the listener, which is up (true) or
                         down (false).";
             default "true";
         }
@@ -65,16 +64,8 @@ module neutron-lbaasv2 {
         }
         leaf protocol {
             description "The protocol the front end listens for.";
-            type enumeration {
-                enum http {
-                    description "HTTP protocol.";
-                }
-                enum https {
-                    description "HTTPS protocol.";
-                }
-                enum tcp {
-                    description "TCP protocol.";
-                }
+            type identityref {
+                base "constants:protocol-base";
             }
         }
         leaf protocol-port {
@@ -95,7 +86,7 @@ module neutron-lbaasv2 {
             default "-1";
         }
     }
-    grouping pool-attrs {
+    grouping pool-attributes {
         leaf admin-state-up {
             type boolean;
             description "The administrative state of the pool, which is up (true) or
@@ -107,16 +98,8 @@ module neutron-lbaasv2 {
         }
         leaf protocol {
             description "The protocol the front end listens for.";
-            type enumeration {
-                enum http {
-                    description "HTTP protocol.";
-                }
-                enum https {
-                    description "HTTPS protocol.";
-                }
-                enum tcp {
-                    description "TCP protocol.";
-                }
+            type identityref {
+                base "constants:protocol-base";
             }
         }
         leaf lb-algorithm {
@@ -126,14 +109,10 @@ module neutron-lbaasv2 {
                 is dependent on the load-balancer provider. Round-robin
                 must be supported.";
         }
-        leaf-list healthmonitor-ids {
+        leaf healthmonitor-id {
             type yang:uuid;
             description "List of healthmonitors associated with this pool.";
         }
-        leaf-list members {
-            type yang:uuid;
-            description "List of members that belong to the pool.";
-        }
         leaf-list listeners {
             type yang:uuid;
             description "List of listeners that belong to the pool.";
@@ -151,8 +130,8 @@ module neutron-lbaasv2 {
             }
         }
     }
-    grouping member-attrs {
-        leaf id {
+    grouping member-attributes {
+        leaf uuid {
             type yang:uuid;
             description "The unique ID for the member.";
         }
@@ -189,8 +168,8 @@ module neutron-lbaasv2 {
             default "true";
         }
     }
-    grouping healthmonitor-attrs {
-        leaf id {
+    grouping healthmonitor-attributes {
+        leaf uuid {
             type yang:uuid;
             description "The unique ID for the healthmonitor.";
         }
@@ -202,19 +181,8 @@ module neutron-lbaasv2 {
         leaf type {
             description "The type of probe, which is PING, TCP, HTTP, or HTTPS, that
                 is sent by the load balancer to verify the member state.";
-            type enumeration {
-                enum http {
-                    description "HTTP protocol.";
-                }
-                enum https {
-                    description "HTTPS protocol.";
-                }
-                enum tcp {
-                    description "TCP protocol.";
-                }
-                enum ping {
-                    description "ICMP protocol.";
-                }
+            type identityref {
+                base "constants:probe-base";
             }
         }
         leaf admin-state-up {
@@ -262,45 +230,49 @@ module neutron-lbaasv2 {
         }
     }
     grouping lbaas-attributes {
-        container loadbalancer {
+        container loadbalancers {
             description "Container for Loadbalancers.";
-            list loadbalancers {
-                uses attrs:base-attrs;
-                uses attrs:admin-attrs;
-                uses loadbalancer-attrs;
+            list loadbalancer {
+                key "uuid";
+                uses attrs:base-attributes;
+                uses attrs:admin-attributes;
+                uses loadbalancer-attributes;
                 description "List of Loadbalancers.";
             }
         }
-        container listener {
+        container listeners {
             description "Container for Listeners.";
-            list listeners {
-                uses attrs:base-attrs;
-                uses listener-attrs;
+            list listener {
+                key "uuid";
+                uses attrs:base-attributes;
+                uses listener-attributes;
                 description "List of Listeners";
             }
         }
-        container pool {
+        container pools {
             description "Container for LBaaSV2.0 pools.";
-            list pools {
-                uses attrs:base-attrs;
-                uses pool-attrs;
+            list pool {
+                key "uuid";
+                uses attrs:base-attributes;
+                uses pool-attributes;
                 description "List of Pools";
-                container member {
+                container members {
                     description "Container for pool members.";
-                    list members {
-                        uses member-attrs;
+                    list member {
+                        key "uuid";
+                        uses member-attributes;
                         description "List of members.";
                     }
                 }
             }
         }
-        container healthmonitor {
+        container healthmonitors {
             description "Container for LBaaSV2.0 healthmonitors.";
-            list healthmonitors {
-                key "id";
-                uses healthmonitor-attrs;
+            list healthmonitor {
+                key "uuid";
+                uses healthmonitor-attributes;
                 description "List of healthmonitors.";
             }
         }
     }
-}
\ No newline at end of file
+}