Add tag to package and service resources
In order to be able to take an action after all the packages of the module have been installed/updated or all the services have been started/restarted, we set a 'neutron-package' and 'neutron-service' tag for each package and service of this module. At the moment, there is a generic openstack tag that is not specific enough if one wants to take action upon a single module change. Use case : If an action needs to be taken after all the packages have been installed or updated : Package <| tag == 'neutron-package' |> -> X Change-Id: I63ac9b1d806565eb1847ed0e36d393c6c7ea98ad
This commit is contained in:
@@ -61,7 +61,7 @@ describe 'neutron::agents::dhcp' do
|
||||
is_expected.to contain_package('neutron-dhcp-agent').with(
|
||||
:name => platform_params[:dhcp_agent_package],
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-dhcp-agent\]/)
|
||||
is_expected.to contain_package('neutron-dhcp-agent').with_before(/Neutron_dhcp_agent_config\[.+\]/)
|
||||
@@ -76,7 +76,8 @@ describe 'neutron::agents::dhcp' do
|
||||
:name => platform_params[:dhcp_agent_service],
|
||||
:enable => true,
|
||||
:ensure => 'running',
|
||||
:require => 'Class[Neutron]'
|
||||
:require => 'Class[Neutron]',
|
||||
:tag => 'neutron-service',
|
||||
)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user