Cleanup horizon vars in hosts.yml

This patch cleans up the horizon variables in hosts.yml:

  * Simplifies Jinja logic for variables
  * Removes LBaaS v1 from horizon_enable_neutron_lbaas
  * Adds LBaaS v2 to horizon_enable_neutron_lbaas

Change-Id: I508f523dcbc0dcf7d9280ad8d6173526c289d686
This commit is contained in:
Major Hayden 2016-05-27 08:25:27 -05:00
parent dec04a2eae
commit 4303174c0e

@ -229,13 +229,13 @@ keystone_service_in_ldap: "{{ service_ldap_backend_enabled }}"
## Horizon
horizon_service_region: "{{ service_region }}"
horizon_enable_cinder_backup: "{% if cinder_service_backup_program_enabled is defined and cinder_service_backup_program_enabled | bool %}True{% else %}False{% endif %}"
# LBaaS panels are working only for LBaaS v1 at this time.
#TODO(odyssey4me): Remove the classpath from this conditional in the Newton cycle.
horizon_enable_neutron_lbaas: "{% if neutron_plugin_base is defined and ('lbaas' in neutron_plugin_base or 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin' in neutron_plugin_base) %}True{% else %}False{% endif %}"
horizon_enable_neutron_fwaas: "{% if neutron_plugin_base is defined and 'firewall' in neutron_plugin_base %}True{% else %}False{% endif %}"
horizon_enable_neutron_vpnaas: "{% if neutron_plugin_base is defined and 'vpnaas' in neutron_plugin_base %}True{% else %}False{% endif %}"
horizon_enable_ha_router: "{% if 'ml2' in neutron_plugin_type and (groups['neutron_l3_agent'] | length >= 2) %}True{% else %}False{% endif %}"
horizon_enable_cinder_backup: "{{ cinder_service_backup_program_enabled is defined and cinder_service_backup_program_enabled | bool }}"
# NOTE(mhayden): neutron-lbaas is a separate plugin and requires the full
# namespace to be specified. Also, LBaaS v1 was removed in Newton.
horizon_enable_neutron_lbaas: "{{ neutron_plugin_base is defined and 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2' in neutron_plugin_base }}"
horizon_enable_neutron_fwaas: "{{ neutron_plugin_base is defined and 'firewall' in neutron_plugin_base }}"
horizon_enable_neutron_vpnaas: "{{ neutron_plugin_base is defined and 'vpnaas' in neutron_plugin_base }}"
horizon_enable_ha_router: "{{ neutron_plugin_type.split('.')[0] == 'ml2' and (groups['neutron_l3_agent'] | length >= 2) }}"
horizon_rabbitmq_userid: horizon
horizon_rabbitmq_vhost: /horizon