Fix dependency references

With the deps migration, we left some of the dependency references in
place which was previously ignored by puppet unit tests. The latest
version of puppet now reports these as catalog failures so this change
removes the unnecessary Package and Service references since those are
already handled by manila::deps and fixes the invalid anchor reference
for the manila::type and manila::type_set resources.

Change-Id: Ie4dc0ae559e8f9bc9657fa6ed8ecf53ccda7852d
Closes-Bug: #1702964
This commit is contained in:
Alex Schultz 2017-07-07 15:20:47 -06:00
parent 6544a3ff01
commit a981c38c16
5 changed files with 4 additions and 10 deletions

View File

@ -92,11 +92,7 @@ class manila::api (
warning('service port is deprecated and will be removed in a future release')
}
Manila_config<||> ~> Service['manila-api']
Manila_api_paste_ini<||> ~> Service['manila-api']
if $::manila::params::api_package {
Package['manila-api'] -> Service['manila-api']
package { 'manila-api':
ensure => $package_ensure,
name => $::manila::params::api_package,
@ -123,7 +119,6 @@ class manila::api (
name => $::manila::params::api_service,
enable => $enabled,
hasstatus => true,
require => Package['manila'],
tag => 'manila-service',
}
@ -157,5 +152,4 @@ class manila::api (
}
}
}
}

View File

@ -69,7 +69,7 @@ define manila::type (
command => "manila type-create ${volume_name} ${driver_handles_share_servers}",
unless => "manila type-list | grep ${volume_name}",
environment => concat($manila_env, $region_env),
require => Package['python-manilaclient'],
require => Anchor['manila::install::end'],
path => ['/usr/bin', '/bin'],
}

View File

@ -62,6 +62,6 @@ define manila::type_set (
path => ['/usr/bin', '/bin'],
command => "manila type-key ${type} set ${key}=${name}",
environment => concat($manila_env, $region_env),
require => Anchor['manila-support-package'],
require => Anchor['manila::install::end'],
}
}

View File

@ -27,7 +27,7 @@ describe 'manila::type_set' do
'OS_USERNAME=admin',
'OS_PASSWORD=asdf',
'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'],
:require => 'Anchor[manila-support-package]')
:require => 'Anchor[manila::install::end]')
end
end

View File

@ -29,7 +29,7 @@ describe 'manila::type' do
'OS_PASSWORD=asdf',
'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'],
:unless => 'manila type-list | grep hippo',
:require => 'Package[python-manilaclient]')
:require => 'Anchor[manila::install::end]')
is_expected.to contain_exec('manila type-key hippo set volume_backend_name=name1')
is_expected.to contain_exec('manila type-key hippo set volume_backend_name=name2')
end