Added Nuage Networks extensions

Partial-Bug: #1521065
Change-Id: If2c1a88a87d18fa0a079fb5e8a54629676341eab
This commit is contained in:
Remi Vichery 2015-11-17 11:20:02 -08:00 committed by XiaoPei Liu
parent 288dca354f
commit f8aa6f5f01
7 changed files with 43 additions and 1 deletions

View File

@ -200,6 +200,12 @@ default['openstack']['orchestration']['notification_topics'] = 'notifications'
# Array of options for `heat.conf` (e.g. ['option1=value1', 'option2=value2'])
default['openstack']['orchestration']['misc_heat'] = nil
# Array of plugins for heat.conf
default['openstack']['orchestration']['plugins'] = []
# Array of plugin resources dirs for heat.conf
default['openstack']['orchestration']['plugin_dirs'] = []
# platform-specific settings
case platform_family
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
@ -219,6 +225,9 @@ when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
'heat_api_process_name' => 'heat-api',
'package_overrides' => ''
}
default['openstack']['orchestration']['nuage']['path'] = '/usr/lib/python2.7/site-packages/nuage-heat/resources'
# Nuage Networks heat extensions packages
default['openstack']['orchestration']['nuage']['packages'] = ['nuage-openstack-heat']
when 'debian'
default['openstack']['orchestration']['user'] = 'heat'
default['openstack']['orchestration']['group'] = 'heat'
@ -235,4 +244,7 @@ when 'debian'
'heat_engine_service' => 'heat-engine',
'package_overrides' => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
}
default['openstack']['orchestration']['nuage']['path'] = '/usr/lib/python2.7/dist-packages/nuage-heat/resources'
# Nuage Networks heat extensions packages
default['openstack']['orchestration']['nuage']['packages'] = ['nuage-openstack-heat']
end

View File

@ -5,7 +5,7 @@ maintainer_email 'opscode-chef-openstack@googlegroups.com'
license 'Apache 2.0'
description 'Installs and configures the Heat Service'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '11.0.0'
version '11.1.0'
recipe 'openstack-orchestration::api', 'Start and configure the Heat API service'
recipe 'openstack-orchestration::api-cfn', 'Start and configure the Heat API CloudFormation service'
recipe 'openstack-orchestration::api-cloudwatch', 'Start and configure the Heat API CloudWatch service'

View File

@ -34,6 +34,16 @@ package 'python-keystoneclient' do
action :upgrade
end
node['openstack']['orchestration']['plugins'].each do |plugin|
node['openstack']['orchestration'][plugin]['packages'].each do |pkg|
package pkg do
options platform_options['package_overrides']
action :upgrade
end
end
node.default['openstack']['orchestration']['plugin_dirs'].push(node['openstack']['orchestration'][plugin]['path'])
end
platform_options['heat_common_packages'].each do |pkg|
package pkg do
options platform_options['package_overrides']

View File

@ -34,5 +34,11 @@ describe 'openstack-orchestration::common' do
expect(chef_run).not_to upgrade_package 'python-psycopg2'
expect(chef_run).not_to upgrade_package 'MySQL-python'
end
it 'installs Nuage Networks heat extensions packages if explicitly told' do
node.set['openstack']['orchestration']['plugins'] = ['nuage']
expect(chef_run).to upgrade_package 'nuage-openstack-heat'
end
end
end

View File

@ -32,6 +32,12 @@ describe 'openstack-orchestration::common' do
expect(chef_run).not_to upgrade_package 'python-ibm-db-sa'
end
it 'installs Nuage Networks heat extensions packages if explicitly told' do
node.set['openstack']['orchestration']['plugins'] = ['nuage']
expect(chef_run).to upgrade_package 'nuage-openstack-heat'
end
describe 'heat.conf' do
let(:file) { chef_run.template('/etc/heat/heat.conf') }

View File

@ -202,6 +202,11 @@ shared_examples 'expects to create heat conf' do
expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^auth_encryption_key=auth_encryption_key_secret$/)
end
it 'sets plugin_dirs' do
node.set['openstack']['orchestration']['plugins'] = ['nuage']
expect(chef_run).to render_file(file.name).with_content(/^plugin_dirs=#{node['openstack']['orchestration']['nuage']['path']}$/)
end
describe 'default values for certificates files' do
it 'has no such values' do
[

View File

@ -35,6 +35,9 @@
# List of directories to search for plug-ins. (list value)
#plugin_dirs=/usr/lib64/heat,/usr/lib/heat,/usr/local/lib/heat,/usr/local/lib64/heat
<% unless node['openstack']['orchestration']['plugin_dirs'].empty? -%>
plugin_dirs=<%= node['openstack']['orchestration']['plugin_dirs'].join(',') %>
<% end -%>
# The directory to search for environment files. (string
# value)