Skip to content

Commit

Permalink
Merge pull request #92 from bodepd/dev
Browse files Browse the repository at this point in the history
Specify platform specific names for numpy package
  • Loading branch information
bodepd committed Apr 25, 2012
2 parents 7f4b4b9 + d8c9d05 commit 1d777b4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$doc_package_name = 'openstack-nova-doc'
$libvirt_package_name = 'libvirt'
$network_package_name = false
$numpy_package_name = 'numpy'
$objectstore_package_name = false
$scheduler_package_name = false
$tgt_package_name = 'scsi-target-utils'
Expand Down Expand Up @@ -45,6 +46,7 @@
$doc_package_name = 'nova-doc'
$libvirt_package_name = 'libvirt-bin'
$network_package_name = 'nova-network'
$numpy_package_name = 'python-numpy'
$objectstore_package_name = 'nova-objectstore'
$scheduler_package_name = 'nova-scheduler'
$tgt_package_name = 'tgt'
Expand Down
3 changes: 3 additions & 0 deletions manifests/vncproxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
$path = '/vnc_auto.html'
) {

include nova::params

$novncproxy_base_url = "${protocol}://${host}:${port}${path}"

# TODO make this work on Fedora
Expand All @@ -15,6 +17,7 @@
nova_config { 'novncproxy_base_url': value => $novncproxy_base_url }

package { 'python-numpy':
name => $::nova::params::numpy_package_name,
ensure => present,
}

Expand Down
19 changes: 18 additions & 1 deletion spec/classes/nova_vnc_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
{ :osfamily => 'Debian' }
end

it { should contain_package('python-numpy').with_ensure('present') }
it { should contain_package('python-numpy').with(
:ensure => 'present',
:name => 'python-numpy'
)}

it { should contain_nova_config('novncproxy_base_url').with(
:value => 'http://127.0.0.1:6080/vnc_auto.html'
Expand All @@ -26,4 +29,18 @@
# )}
#end
end

describe 'on Redhatish platforms' do

let :facts do
{ :osfamily => 'Redhat' }
end

it { should contain_package('python-numpy').with(
:name => 'numpy',
:ensure => 'present'
)}

end

end

0 comments on commit 1d777b4

Please sign in to comment.