magnum: Drop outdated default value of image_source
The current default value no longer exists. Drop the outdated default and require a valid value because of no stable URL to obtain the latest Fedora Core OS image available. Change-Id: I39688f7bcf12ec93a201632899a46ed47774eb6a
This commit is contained in:
@@ -11,8 +11,9 @@
|
|||||||
# Defaults to true
|
# Defaults to true
|
||||||
#
|
#
|
||||||
# [*image_source*]
|
# [*image_source*]
|
||||||
# (Optional) If provision_image is true, the location of the image
|
# (Optional) If provision_image is true, the location of the image. Required
|
||||||
# Defaults to 'https://fedorapeople.org/groups/magnum/fedora-atomic-latest.qcow2'
|
# when provision_image is true
|
||||||
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
# [*image_os_distro*]
|
# [*image_os_distro*]
|
||||||
# (Optional) If provision_image is true, the os_distro propery of the image
|
# (Optional) If provision_image is true, the os_distro propery of the image
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
#
|
#
|
||||||
class tempest::magnum (
|
class tempest::magnum (
|
||||||
Boolean $provision_image = true,
|
Boolean $provision_image = true,
|
||||||
String[1] $image_source = 'https://fedorapeople.org/groups/magnum/fedora-atomic-latest.qcow2',
|
Optional[String[1]] $image_source = undef,
|
||||||
String[1] $image_name = 'fedora-atomic-latest',
|
String[1] $image_name = 'fedora-atomic-latest',
|
||||||
String[1] $image_os_distro = 'fedora-atomic',
|
String[1] $image_os_distro = 'fedora-atomic',
|
||||||
Boolean $provision_flavors = true,
|
Boolean $provision_flavors = true,
|
||||||
@@ -108,6 +109,10 @@ Use the keypair_name parameter.")
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $provision_image {
|
if $provision_image {
|
||||||
|
if $image_source == undef {
|
||||||
|
fail('The image_source parameter must be set when provision_image is true')
|
||||||
|
}
|
||||||
|
|
||||||
$image_properties = { 'os_distro' => $image_os_distro }
|
$image_properties = { 'os_distro' => $image_os_distro }
|
||||||
glance_image { $image_name:
|
glance_image { $image_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@@ -10,7 +10,10 @@ describe 'tempest::magnum' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :nic_id => 'b2e6021a-4956-4a1f-8329-790b9add05a9', }
|
{
|
||||||
|
:image_source => 'https://fedorapeople.org/groups/magnum/fedora-atomic-latest.qcow2',
|
||||||
|
:nic_id => 'b2e6021a-4956-4a1f-8329-790b9add05a9',
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'tempest magnum' do
|
shared_examples 'tempest magnum' do
|
||||||
@@ -19,7 +22,7 @@ describe 'tempest::magnum' do
|
|||||||
is_expected.to contain_glance_image('fedora-atomic-latest').with(
|
is_expected.to contain_glance_image('fedora-atomic-latest').with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:source => 'https://fedorapeople.org/groups/magnum/fedora-atomic-latest.qcow2',
|
:source => 'https://fedorapeople.org/groups/magnum/fedora-atomic-latest.qcow2',
|
||||||
:properties => '{"os_distro"=>"fedora-atomic"}'
|
:properties => {'os_distro' => 'fedora-atomic'}
|
||||||
)
|
)
|
||||||
is_expected.to contain_nova_flavor('s1.magnum').with_ensure('present')
|
is_expected.to contain_nova_flavor('s1.magnum').with_ensure('present')
|
||||||
is_expected.to contain_nova_flavor('m1.magnum').with_ensure('present')
|
is_expected.to contain_nova_flavor('m1.magnum').with_ensure('present')
|
||||||
@@ -53,6 +56,10 @@ describe 'tempest::magnum' do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should not provision the image' do
|
||||||
|
is_expected.to_not contain_glance_image('coreos')
|
||||||
|
end
|
||||||
|
|
||||||
it 'configures tempest for magnum' do
|
it 'configures tempest for magnum' do
|
||||||
is_expected.to contain_tempest_config('magnum/image_id').with_value('coreos')
|
is_expected.to contain_tempest_config('magnum/image_id').with_value('coreos')
|
||||||
is_expected.to contain_tempest_config('magnum/nic_id').with_value('b2e6021a-4956-4a1f-8329-790b9add05a9')
|
is_expected.to contain_tempest_config('magnum/nic_id').with_value('b2e6021a-4956-4a1f-8329-790b9add05a9')
|
||||||
|
Reference in New Issue
Block a user