Ensure Nova Network-compatible provisioning
Change-Id: If5e05b54aa8cff01a6b48ee1c3bcb951758fff95 Closes-Bug: #1242668
This commit is contained in:
@@ -118,7 +118,10 @@ class openstack::provision(
|
||||
source => $image_source,
|
||||
}
|
||||
|
||||
## Networks
|
||||
## Neutron
|
||||
|
||||
if $neutron_available {
|
||||
$neutron_deps = [Neutron_network[$public_network_name]]
|
||||
|
||||
neutron_network { $public_network_name:
|
||||
ensure => present,
|
||||
@@ -161,10 +164,21 @@ class openstack::provision(
|
||||
subnet_name => $public_subnet_name,
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$neutron_deps = []
|
||||
#TODO(marun): Provision for nova network
|
||||
}
|
||||
|
||||
## Tempest
|
||||
|
||||
if $configure_tempest {
|
||||
$tempest_requires = concat([
|
||||
Keystone_user[$username],
|
||||
Keystone_user[$alt_username],
|
||||
Glance_image[$image_name],
|
||||
], $neutron_deps)
|
||||
|
||||
class { 'tempest':
|
||||
tempest_repo_uri => $tempest_repo_uri,
|
||||
tempest_clone_path => $tempest_clone_path,
|
||||
@@ -195,12 +209,7 @@ class openstack::provision(
|
||||
neutron_available => $neutron_available,
|
||||
nova_available => $nova_available,
|
||||
swift_available => $swift_available,
|
||||
require => [
|
||||
Keystone_user[$username],
|
||||
Keystone_user[$alt_username],
|
||||
Glance_image[$image_name],
|
||||
Neutron_network[$public_network_name],
|
||||
],
|
||||
require => $tempest_requires,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -38,4 +38,18 @@ describe 'openstack::provision' do
|
||||
|
||||
end
|
||||
|
||||
describe 'should be possible to provision with neutron disabled' do
|
||||
let :params do
|
||||
{
|
||||
:configure_tempest => true,
|
||||
:neutron_available => false,
|
||||
:tempest_repo_revision => 'stable/grizzly'
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_class('tempest').with(
|
||||
:tempest_repo_revision => 'stable/grizzly'
|
||||
) }
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user