From 568debe2707f001af55dfc0097c453522f3a4859 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 4 May 2016 15:38:42 -0500 Subject: [PATCH] Enable new LBaaS panel in Horizon The new LBaaS v2 panel for Horizon in Mitaka and Newton is installed as a plugin. This patch enables the plugin as long as `horizon_enable_neutron_lbaas` is set to True. The reference to the older built-in LBaaS dashboard has been removed since it only works with LBaaS v1. Release notes are included with the patch. Depends-On: I2d5300d4d5b02df3351ab52b1be32dd60241d34b Change-Id: I2b1d77983598fb14fbf9ff7f23870cf767135811 --- defaults/main.yml | 3 ++- .../notes/lbaasv2-horizon-panel-8f99026b025ca2fd.yaml | 9 +++++++++ tasks/horizon_post_install.yml | 9 +++++++++ templates/horizon_local_settings.py.j2 | 1 - 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/lbaasv2-horizon-panel-8f99026b025ca2fd.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 6afa8854..1279039d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -182,14 +182,15 @@ horizon_requires_pip_packages: horizon_pip_packages: - django-appconf + - django-openstack-auth - greenlet - horizon - keystonemiddleware - MySQL-python - PyMySQL + - neutron-lbaas-dashboard - oslo.config - ply - pycrypto - python-memcached - python-keystoneclient - - django-openstack-auth diff --git a/releasenotes/notes/lbaasv2-horizon-panel-8f99026b025ca2fd.yaml b/releasenotes/notes/lbaasv2-horizon-panel-8f99026b025ca2fd.yaml new file mode 100644 index 00000000..6b920d67 --- /dev/null +++ b/releasenotes/notes/lbaasv2-horizon-panel-8f99026b025ca2fd.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + The new LBaaS v2 dashboard is available in Horizon. Deployers can enable + the panel by setting the following Ansible variable: + + .. code-block:: yaml + + horizon_enable_neutron_lbaas: True diff --git a/tasks/horizon_post_install.yml b/tasks/horizon_post_install.yml index 42be3853..d447a8bf 100644 --- a/tasks/horizon_post_install.yml +++ b/tasks/horizon_post_install.yml @@ -56,6 +56,15 @@ tags: - horizon-branding +- name: Enable the neutron-lbaas-dashboard Horizon panel + file: + src: "{{ horizon_venv_lib_dir }}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py" + path: "{{ horizon_venv_lib_dir }}/openstack_dashboard/local/enabled/_1481_project_ng_loadbalancersv2_panel.py" + state: "{{ (horizon_enable_neutron_lbaas | bool) | ternary('link', 'absent') }}" + notify: Restart apache2 + tags: + - horizon-configs + - name: Create horizon links file: src: "{{ item.src }}" diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index e5573054..ca9b1b0b 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -269,7 +269,6 @@ OPENSTACK_NEUTRON_NETWORK = { 'enable_ipv6': False, 'enable_distributed_router': False, 'enable_ha_router': False, - 'enable_lb': {{ horizon_enable_neutron_lbaas | bool }}, 'enable_firewall': {{ horizon_enable_neutron_fwaas | bool }}, 'enable_vpn': {{ horizon_enable_neutron_vpnaas | bool }}, 'enable_fip_topology_check': True,