Use platform_family instead of platform

This will allow the ibm_powerkvm platform to be recognized and will
simplify uses of multiple platforms from the same family.

Change-Id: Iebf2aad9f3b4649fb5c27d2fc93ee60c67e42737
Partially-Implements: blueprint add-ibm-powerkvm-enablement
Implements: blueprint platform-family
This commit is contained in:
Luis A. Garcia 2014-04-08 13:51:38 -07:00
parent 961fea8eb9
commit 43ff489cef
4 changed files with 9 additions and 10 deletions

View File

@ -327,10 +327,10 @@ default['openstack']['ceph']['key-url'] = 'https://ceph.com/git/?p=ceph.git;a=bl
# Default OpenStack Network Type: nova (optional: neutron)
default['openstack']['compute']['network']['service_type'] = 'nova'
case platform
when 'ubuntu'
case platform_family
when 'debian'
default['openstack']['ceph']['platform']['uri'] = 'http://ceph.com/debian-emperor'
when 'fedora', 'redhat', 'centos', 'suse' # :pragma-foodcritic: ~FC024 - won't fix this
when 'fedora', 'rhel', 'suse' # :pragma-foodcritic: ~FC024 - won't fix this
default['openstack']['ceph']['platform']['uri'] = 'http://ceph.com/rpm-emperor'
end

View File

@ -20,15 +20,15 @@
return unless node['openstack']['ceph']['setup_client']
case node['platform']
when 'ubuntu'
case node['platform_family']
when 'debian'
apt_repository 'ceph' do
uri node['openstack']['ceph']['platform']['uri']
distribution node['lsb']['codename']
components ['main']
key node['openstack']['ceph']['key-url']
end
when 'fedora', 'redhat', 'centos', 'suse' # :pragma-foodcritic: ~FC024 - won't fix this
when 'fedora', 'rhel', 'suse' # :pragma-foodcritic: ~FC024 - won't fix this
# TODO
end

View File

@ -21,7 +21,7 @@ describe 'openstack-common::default' do
.with(:node, '(chef_environment:_default AND roles:role) OR (chef_environment:_default AND recipes:role)')
.and_return([chef_run.node])
resp = subject.search_for('role')
expect(resp[0]['fqdn']).to eq('chefspec.local')
expect(resp[0]['fqdn']).to eq('fauxhai.local')
end
it 'returns empty results' do

View File

@ -20,9 +20,8 @@ SUSE_OPTS = {
version: '11.03',
log_lovel: LOG_LEVEL
}
CHEFSPEC_OPTS = {
log_level: LOG_LEVEL
}
# We set a default platform for non-platform specific test cases
CHEFSPEC_OPTS = UBUNTU_OPTS
shared_context 'library-stubs' do
before do