Install openstack-neutron-lbaas-ui package on RHEL instead of from pip

RHEL finally includes a proper RPM package for the horizon LBaaS plugin in
Stein. This removes the dependency on poise.

Change-Id: If3d2729c013125bd75441c50fc7de5d5cc9c3221
This commit is contained in:
Lance Albertson 2020-03-30 12:08:06 -07:00
parent 57b9ab6138
commit 1ac136c63a
5 changed files with 24 additions and 17 deletions

View File

@ -39,7 +39,6 @@ The following cookbooks are dependencies:
- 'apache2', '~> 8.0'
- 'openstack-common', '>= 19.0.0'
- 'openstack-identity', '>= 19.0.0'
- 'poise-python'
Attributes
==========

View File

@ -224,5 +224,3 @@ default['openstack']['dashboard']['neutron']['enable_vpn'] = false
# 'varable2': 'value2',
# }
default['openstack']['dashboard']['misc_local_settings'] = nil
# version of python neutron-lbaas-dashboard package to install
default['openstack']['dashboard']['lbaas']['version'] = '5.0.0'

View File

@ -12,7 +12,6 @@ end
depends 'apache2', '~> 8.0'
depends 'openstack-common', '>= 19.0.0'
depends 'openstack-identity', '>= 19.0.0'
depends 'poise-python'
issues_url 'https://launchpad.net/openstack-chef'
source_url 'https://opendev.org/openstack/cookbook-openstack-dashboard'

View File

@ -23,17 +23,5 @@ case node['platform_family']
when 'debian'
package 'python3-neutron-lbaas-dashboard'
when 'rhel'
django_path = node['openstack']['dashboard']['django_path']
python_package 'neutron-lbaas-dashboard' do
version node['openstack']['dashboard']['lbaas']['version']
notifies :run, 'execute[openstack-dashboard collectstatic]'
end
remote_file "#{django_path}/openstack_dashboard/local/enabled/_1481_project_ng_loadbalancersv2_panel.py" do
source "https://opendev.org/openstack/neutron-lbaas-dashboard/raw/branch/stable/#{node['openstack']['release']}/neutron_lbaas_dashboard/enabled/_1481_project_ng_loadbalancersv2_panel.py"
owner 'root'
mode '644'
notifies :run, 'execute[openstack-dashboard collectstatic]'
end
package 'openstack-neutron-lbaas-ui'
end

View File

@ -0,0 +1,23 @@
# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-dashboard::neutron-lbaas-dashboard' do
describe 'redhat' do
cached(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
cached(:node) { runner.node }
cached(:chef_run) do
runner.converge('openstack-identity::server-apache', described_recipe)
end
include_context 'redhat_stubs'
include_context 'dashboard_stubs'
it do
expect(chef_run).to include_recipe('openstack-dashboard::horizon')
end
it do
expect(chef_run).to install_package('openstack-neutron-lbaas-ui')
end
end
end