/* * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. 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-lbaasv2 { yang-version 1; namespace "urn:opendaylight:neutron-lbaasv2"; prefix neutron-lbaasv2; 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-constants { prefix "constants"; } organization "OpenDaylight Neutron Group"; contact "Kiran Sreenivasa "; description "This YANG module defines OpenStack Neutron LBaaSV2.0 modules"; revision "2015-07-12" { description "OpenDaylight Beryllium release"; } grouping loadbalancer-attributes { description "LBaaSV2.0 load balancer attributes."; leaf descr { type string; description "Load balancer description."; default ""; } leaf vip-address { type inet:ip-address; description "The IP address of the VIP."; } leaf vip-subnet-id { type yang:uuid; description "The ID of the subnet on which to allocate the VIP address."; } } grouping listener-attributes { description "LBaaSV2.0 listener attributes."; 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 listener, which is up (true) or down (false)."; default "true"; } leaf descr { type string; description "Detailed description of the listener."; } leaf protocol { description "The protocol the front end listens for."; type identityref { base "constants:protocol-base"; } } leaf protocol-port { description "The port on which the front end listens."; type uint16 { range 1..65535; } } leaf-list loadbalancers { type yang:uuid; description "List of loadbalancers on which this listener is provisioned."; } leaf connection-limit { description "Maximum connections this load balancer can have. Default is infinite."; type int32 { range -1..65535; } default "-1"; } } grouping pool-attributes { leaf admin-state-up { type boolean; description "The administrative state of the pool, which is up (true) or down (false)."; } leaf descr { type string; description "Detailed description of the listener."; } leaf protocol { description "The protocol the front end listens for."; type identityref { base "constants:protocol-base"; } } leaf lb-algorithm { type string; description "The load-balancer algorithm, which is round-robin, least-connections, and so on. This value, which must be supported, is dependent on the load-balancer provider. Round-robin must be supported."; } leaf healthmonitor-id { type yang:uuid; description "List of healthmonitors associated with this pool."; } leaf-list listeners { type yang:uuid; description "List of listeners that belong to the pool."; } container session-persistence { description "The session persistence algorithm. This algorithm is a dictionary with type and cookie_name keys."; leaf cookie-name { type string; description "Cookie Name."; } leaf type { type string; description "Cookie type."; } } } grouping member-attributes { leaf uuid { type yang:uuid; description "The unique ID for the member."; } leaf tenant-id { type yang:uuid; description "Owner of the member. Only an administrative user can specify a tenant ID other than its own."; } leaf subnet-id { type yang:uuid; description "Subnet in which to access this member."; } leaf address { type inet:ip-address; description "The IP address of the member."; } leaf protocol-port { description "The port on which the application is hosted."; type uint16 { range 1..65535; } } leaf weight { description "Weight of member."; type uint16 { range 1..65535; } default "1"; } leaf admin-state-up { type boolean; description "The administrative state of the member, which is up (true) or down (false)."; default "true"; } } grouping healthmonitor-attributes { leaf uuid { type yang:uuid; description "The unique ID for the healthmonitor."; } leaf tenant-id { type yang:uuid; description "Owner of the VIP. Only an administrative user can specify a tenant ID other than its own."; } 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 identityref { base "constants:probe-base"; } } leaf admin-state-up { type boolean; description "The administrative state of the VPI, which is up (true) or down (false)."; default "true"; } leaf delay { description "The time, in seconds, between sending probes to members."; type uint32; } leaf timeout { description "The maximum number of seconds for a monitor to wait for a connection to be established before it times out. This value must be less than the delay value."; type uint32; } leaf max-retries { description "Number of allowed connection failures before changing the status of the member to INACTIVE."; type uint16 { range 1..10; } } leaf http-method { type string; description "The HTTP method that the monitor uses for requests."; default ""; } leaf url-path { type string; description "The HTTP path of the request sent by the monitor to test the health of a member. Must be a string beginning with a forward slash (/)."; } leaf expected-codes { type string; description "Expected HTTP codes for a passing HTTP(S) monitor."; default ""; } leaf-list pools { type yang:uuid; description "List of pools associated with this healthmonitor."; } } grouping lbaas-attributes { container loadbalancers { description "Container for Loadbalancers."; list loadbalancer { key "uuid"; uses attrs:base-attributes; uses attrs:admin-attributes; uses loadbalancer-attributes; description "List of Loadbalancers."; } } container listeners { description "Container for Listeners."; list listener { key "uuid"; uses attrs:base-attributes; uses listener-attributes; description "List of Listeners"; } } container pools { description "Container for LBaaSV2.0 pools."; list pool { key "uuid"; uses attrs:base-attributes; uses pool-attributes; description "List of Pools"; container members { description "Container for pool members."; list member { key "uuid"; uses member-attributes; description "List of members."; } } } } container healthmonitors { description "Container for LBaaSV2.0 healthmonitors."; list healthmonitor { key "uuid"; uses healthmonitor-attributes; description "List of healthmonitors."; } } } }