Rely on autorequire for config resource ordering
Currently we specify the ordering of config resources wherever it is necessary based on the presence of the file it will write to, or the presence of the package in charge of providing the file it will write to. Those kind of ordering can be specified directly at the resource level using the autorequire mechanism. With this patch, any config resource will make sure the package in charge of providing the file will be installed first. Change-Id: I5542165142516fcd8fd3969c24ca92ac221452bd
This commit is contained in:
parent
1d5de18348
commit
2c21af85da
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_agent_linuxbridge) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-linuxbridge-agent'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_agent_ovs) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-ovs-agent'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -44,4 +44,8 @@ Puppet::Type.newtype(:neutron_config) do
|
||||
provider.create
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_dhcp_agent_config) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_fwaas_service_config) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-fwaas'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_l3_agent_config) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_lbaas_agent_config) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-lbaas-agent'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -40,4 +40,8 @@ Puppet::Type.newtype(:neutron_metadata_agent_config) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_metering_agent_config) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
['neutron', 'neutron-metering-agent']
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,10 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_cisco) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -44,4 +40,12 @@ Puppet::Type.newtype(:neutron_plugin_cisco) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-cisco'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,10 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_cisco_credentials) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -44,4 +40,13 @@ Puppet::Type.newtype(:neutron_plugin_cisco_credentials) do
|
||||
defaultto false
|
||||
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-cisco'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,10 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_cisco_db_conn) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -19,4 +15,13 @@ Puppet::Type.newtype(:neutron_plugin_cisco_db_conn) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-cisco'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,10 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_cisco_l2network) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -19,4 +15,13 @@ Puppet::Type.newtype(:neutron_plugin_cisco_l2network) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/cisco']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-cisco'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -46,4 +46,9 @@ Puppet::Type.newtype(:neutron_plugin_midonet) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'python-neutron-plugin-midonet'
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
@ -7,8 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_ml2) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:package) do ['neutron'] end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -17,4 +15,9 @@ Puppet::Type.newtype(:neutron_plugin_ml2) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
['neutron', 'neutron-plugin-ml2']
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -40,4 +40,8 @@ Puppet::Type.newtype(:neutron_plugin_nvp) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-nvp'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,12 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_opencontrail) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/opencontrail']
|
||||
end
|
||||
|
||||
autorequire(:package) do ['neutron'] end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -46,4 +40,12 @@ Puppet::Type.newtype(:neutron_plugin_opencontrail) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/opencontrail']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-opencontrail'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,10 +7,6 @@ Puppet::Type.newtype(:neutron_plugin_plumgrid) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/plumgrid']
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -44,4 +40,12 @@ Puppet::Type.newtype(:neutron_plugin_plumgrid) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/plumgrid']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plugin-plumgrid'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -7,10 +7,6 @@ Puppet::Type.newtype(:neutron_plumlib_plumgrid) do
|
||||
newvalues(/\S+\/\S+/)
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/plumgrid']
|
||||
end
|
||||
|
||||
newproperty(:value) do
|
||||
desc 'The value of the setting to be defined.'
|
||||
munge do |value|
|
||||
@ -44,4 +40,12 @@ Puppet::Type.newtype(:neutron_plumlib_plumgrid) do
|
||||
defaultto false
|
||||
end
|
||||
|
||||
autorequire(:file) do
|
||||
['/etc/neutron/plugins/plumgrid']
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
'neutron-plumlib-plumgrid'
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -15,4 +15,9 @@ Puppet::Type.newtype(:neutron_vpnaas_agent_config) do
|
||||
value
|
||||
end
|
||||
end
|
||||
|
||||
autorequire(:package) do
|
||||
['neutron', 'neutron-vpnaas-agent']
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -88,8 +88,6 @@ class neutron::agents::lbaas (
|
||||
}
|
||||
|
||||
Package['neutron'] -> Package['neutron-lbaas-agent']
|
||||
Package['neutron-lbaas-agent'] -> Neutron_config<||>
|
||||
Package['neutron-lbaas-agent'] -> Neutron_lbaas_agent_config<||>
|
||||
package { 'neutron-lbaas-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::lbaas_agent_package,
|
||||
|
@ -94,7 +94,6 @@ class neutron::agents::metadata (
|
||||
|
||||
include ::neutron::params
|
||||
|
||||
Package['neutron'] -> Neutron_metadata_agent_config<||>
|
||||
Neutron_config<||> ~> Service['neutron-metadata']
|
||||
Neutron_metadata_agent_config<||> ~> Service['neutron-metadata']
|
||||
|
||||
@ -144,7 +143,6 @@ class neutron::agents::metadata (
|
||||
}
|
||||
|
||||
if $::neutron::params::metadata_agent_package {
|
||||
Package['neutron-metadata'] -> Neutron_metadata_agent_config<||>
|
||||
Package['neutron-metadata'] -> Service['neutron-metadata']
|
||||
package { 'neutron-metadata':
|
||||
ensure => $package_ensure,
|
||||
|
@ -90,16 +90,11 @@ class neutron::agents::metering (
|
||||
|
||||
if $::neutron::params::metering_agent_package {
|
||||
Package['neutron'] -> Package['neutron-metering-agent']
|
||||
Package['neutron-metering-agent'] -> Neutron_config<||>
|
||||
Package['neutron-metering-agent'] -> Neutron_metering_agent_config<||>
|
||||
package { 'neutron-metering-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::metering_agent_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
} else {
|
||||
# Default dependency if the system does not provide a neutron metering agent package.
|
||||
Package['neutron'] -> Neutron_metering_agent_config<||>
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
@ -78,7 +78,6 @@ class neutron::agents::ml2::linuxbridge (
|
||||
|
||||
include ::neutron::params
|
||||
|
||||
Package['neutron-plugin-linuxbridge-agent'] -> Neutron_agent_linuxbridge<||>
|
||||
Neutron_agent_linuxbridge<||> ~> Service['neutron-plugin-linuxbridge-agent']
|
||||
|
||||
if ('vxlan' in $tunnel_types) {
|
||||
|
@ -122,7 +122,6 @@ class neutron::agents::ml2::ovs (
|
||||
fail('L2 population must be enabled when DVR and tunneling are enabled')
|
||||
}
|
||||
|
||||
Package['neutron-ovs-agent'] -> Neutron_agent_ovs<||>
|
||||
Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service']
|
||||
|
||||
if ($bridge_mappings != []) {
|
||||
|
@ -92,14 +92,11 @@ class neutron::agents::vpnaas (
|
||||
|
||||
if $::neutron::params::vpnaas_agent_package {
|
||||
Package['neutron'] -> Package['neutron-vpnaas-agent']
|
||||
Package['neutron-vpnaas-agent'] -> Neutron_vpnaas_agent_config<||>
|
||||
package { 'neutron-vpnaas-agent':
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::vpnaas_agent_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
} else {
|
||||
Package['neutron'] -> Neutron_vpnaas_agent_config<||>
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
@ -316,7 +316,6 @@ class neutron (
|
||||
|
||||
include ::neutron::params
|
||||
|
||||
Package['neutron'] -> Neutron_config<||>
|
||||
Package['neutron'] -> Nova_Admin_Tenant_Id_Setter<||>
|
||||
|
||||
if $use_ssl {
|
||||
|
@ -93,11 +93,6 @@ class neutron::plugins::midonet (
|
||||
Package['neutron'] -> Neutron_plugin_midonet<||>
|
||||
}
|
||||
|
||||
# Although this manifest does not install midonet plugin package because it
|
||||
# is not available in common distro repos, this statement forces you to
|
||||
# have an orchestrator/wrapper manifest that does that job.
|
||||
Package[$::neutron::params::midonet_server_package] -> Neutron_plugin_midonet<||>
|
||||
|
||||
neutron_plugin_midonet {
|
||||
'MIDONET/midonet_uri': value => "http://${midonet_api_ip}:${midonet_api_port}/midonet-api";
|
||||
'MIDONET/username': value => $keystone_username;
|
||||
|
@ -174,11 +174,9 @@ class neutron::plugins::ml2 (
|
||||
name => $::neutron::params::ml2_server_package,
|
||||
tag => 'openstack',
|
||||
}
|
||||
Package['neutron-plugin-ml2'] -> Neutron_plugin_ml2<||>
|
||||
Package['neutron-plugin-ml2'] -> File['/etc/neutron/plugin.ini']
|
||||
Package['neutron-plugin-ml2'] -> File['/etc/default/neutron-server']
|
||||
} else {
|
||||
Package <| title == 'neutron-server' |> -> Neutron_plugin_ml2<||>
|
||||
Package['neutron'] -> File['/etc/neutron/plugin.ini']
|
||||
Package['neutron'] -> File['/etc/default/neutron-server']
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ class neutron::plugins::nvp (
|
||||
include ::neutron::params
|
||||
|
||||
Package['neutron'] -> Package['neutron-plugin-nvp']
|
||||
Package['neutron-plugin-nvp'] -> Neutron_plugin_nvp<||>
|
||||
Neutron_plugin_nvp<||> ~> Service<| title == 'neutron-server' |>
|
||||
Package['neutron-plugin-nvp'] -> Service<| title == 'neutron-server' |>
|
||||
|
||||
|
@ -68,9 +68,7 @@ class neutron::plugins::plumgrid (
|
||||
|
||||
include ::neutron::params
|
||||
|
||||
Package[neutron-plugin-plumgrid] -> Neutron_plugin_plumgrid<||>
|
||||
Neutron_plugin_plumgrid<||> ~> Service['neutron-server']
|
||||
Package[neutron-plumlib-plumgrid] -> Neutron_plumlib_plumgrid<||>
|
||||
Neutron_plumlib_plumgrid<||> ~> Service['neutron-server']
|
||||
|
||||
ensure_resource('file', '/etc/neutron/plugins/plumgrid', {
|
||||
|
@ -55,19 +55,19 @@ class neutron::services::fwaas (
|
||||
Package[$::neutron::params::vpnaas_agent_package] -> Neutron_fwaas_service_config<||>
|
||||
}
|
||||
else {
|
||||
ensure_resource( 'package', $::neutron::params::fwaas_package, {
|
||||
ensure_resource( 'package', 'neutron-fwaas' , {
|
||||
'name' => $::neutron::params::fwaas_package,
|
||||
'ensure' => $neutron::package_ensure,
|
||||
'tag' => 'openstack'
|
||||
})
|
||||
Package[$::neutron::params::fwaas_package] -> Neutron_fwaas_service_config<||>
|
||||
}
|
||||
} elsif($::osfamily == 'Redhat') {
|
||||
# RH platforms
|
||||
ensure_resource( 'package', $::neutron::params::fwaas_package, {
|
||||
ensure_resource( 'package', 'neutron-fwaas', {
|
||||
'name' => $::neutron::params::fwaas_package,
|
||||
'ensure' => $neutron::package_ensure,
|
||||
'tag' => 'openstack'
|
||||
})
|
||||
Package[$::neutron::params::fwaas_package] -> Neutron_fwaas_service_config<||>
|
||||
}
|
||||
|
||||
neutron_fwaas_service_config {
|
||||
|
@ -52,8 +52,6 @@ describe 'neutron::agents::lbaas' do
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-lbaas-agent\]/)
|
||||
is_expected.to contain_package('neutron-lbaas-agent').with_before(/Neutron_lbaas_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-lbaas-agent').with_before(/Neutron_config\[.+\]/)
|
||||
end
|
||||
|
||||
it 'configures neutron lbaas agent service' do
|
||||
|
@ -71,10 +71,6 @@ describe 'neutron::agents::metering' do
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-metering-agent\]/)
|
||||
is_expected.to contain_package('neutron-metering-agent').with_before(/Neutron_metering_agent_config\[.+\]/)
|
||||
is_expected.to contain_package('neutron-metering-agent').with_before(/Neutron_config\[.+\]/)
|
||||
else
|
||||
is_expected.to contain_package('neutron').with_before(/Neutron_metering_agent_config\[.+\]/)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -55,7 +55,6 @@ describe 'neutron::agents::ml2::linuxbridge' do
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
|
||||
is_expected.to contain_package('neutron-plugin-linuxbridge-agent').with_before(/Neutron_agent_linuxbridge\[.+\]/)
|
||||
end
|
||||
|
||||
it 'configures neutron linuxbridge agent service' do
|
||||
|
@ -58,7 +58,6 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron-ovs-agent').with_before(/Neutron_agent_ovs\[.+\]/)
|
||||
else
|
||||
end
|
||||
end
|
||||
|
@ -81,9 +81,6 @@ describe 'neutron::agents::vpnaas' do
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
)
|
||||
is_expected.to contain_package('neutron').with_before(/Package\[neutron-vpnaas-agent\]/)
|
||||
is_expected.to contain_package('neutron-vpnaas-agent').with_before(/Neutron_vpnaas_agent_config\[.+\]/)
|
||||
else
|
||||
is_expected.to contain_package('neutron').with_before(/Neutron_vpnaas_agent_config\[.+\]/)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -85,7 +85,6 @@ describe 'neutron::plugins::ml2' do
|
||||
:ensure => p[:package_ensure],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
is_expected.to contain_package('neutron-plugin-ml2').with_before(/Neutron_plugin_ml2\[.+\]/)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -62,9 +62,10 @@ describe 'neutron::services::fwaas' do
|
||||
it_configures 'neutron fwaas service plugin'
|
||||
|
||||
it 'installs neutron fwaas package' do
|
||||
is_expected.to contain_package('python-neutron-fwaas').with(
|
||||
is_expected.to contain_package('neutron-fwaas').with(
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack'
|
||||
:tag => 'openstack',
|
||||
:name => 'python-neutron-fwaas',
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -79,9 +80,10 @@ describe 'neutron::services::fwaas' do
|
||||
it_configures 'neutron fwaas service plugin'
|
||||
|
||||
it 'installs neutron fwaas package' do
|
||||
is_expected.to contain_package('python-neutron-fwaas').with(
|
||||
is_expected.to contain_package('neutron-fwaas').with(
|
||||
:ensure => 'present',
|
||||
:tag => 'openstack'
|
||||
:tag => 'openstack',
|
||||
:name => 'python-neutron-fwaas',
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -113,7 +115,10 @@ describe 'neutron::services::fwaas' do
|
||||
it_configures 'neutron fwaas service plugin'
|
||||
|
||||
it 'installs neutron fwaas service package' do
|
||||
is_expected.to contain_package('openstack-neutron-fwaas').with_ensure('present')
|
||||
is_expected.to contain_package('neutron-fwaas').with(
|
||||
:ensure => 'present',
|
||||
:name => 'openstack-neutron-fwaas',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
20
spec/unit/type/neutron_agent_linuxbridge_spec.rb
Normal file
20
spec/unit/type/neutron_agent_linuxbridge_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_agent_linuxbridge'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_agent_linuxbridge)' do
|
||||
|
||||
before :each do
|
||||
@neutron_agent_linuxbridge = Puppet::Type.type(:neutron_agent_linuxbridge).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-linuxbridge-agent')
|
||||
catalog.add_resource package, @neutron_agent_linuxbridge
|
||||
dependency = @neutron_agent_linuxbridge.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_agent_linuxbridge)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_agent_ovs_spec.rb
Normal file
20
spec/unit/type/neutron_agent_ovs_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_agent_ovs'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_agent_ovs)' do
|
||||
|
||||
before :each do
|
||||
@neutron_agent_ovs = Puppet::Type.type(:neutron_agent_ovs).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-ovs-agent')
|
||||
catalog.add_resource package, @neutron_agent_ovs
|
||||
dependency = @neutron_agent_ovs.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_agent_ovs)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_config_spec.rb
Normal file
20
spec/unit/type/neutron_config_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_config = Puppet::Type.type(:neutron_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron')
|
||||
catalog.add_resource package, @neutron_config
|
||||
dependency = @neutron_config.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_config)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_dhcp_agent_config_spec.rb
Normal file
20
spec/unit/type/neutron_dhcp_agent_config_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_dhcp_agent_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_dhcp_agent_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_dhcp_agent_config = Puppet::Type.type(:neutron_dhcp_agent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron')
|
||||
catalog.add_resource package, @neutron_dhcp_agent_config
|
||||
dependency = @neutron_dhcp_agent_config.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_dhcp_agent_config)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_fwaas_service_config_spec.rb
Normal file
20
spec/unit/type/neutron_fwaas_service_config_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_fwaas_service_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_fwaas_service_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_fwaas_service_config = Puppet::Type.type(:neutron_fwaas_service_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-fwaas')
|
||||
catalog.add_resource package, @neutron_fwaas_service_config
|
||||
dependency = @neutron_fwaas_service_config.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_fwaas_service_config)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_l3_agent_config_spec.rb
Normal file
20
spec/unit/type/neutron_l3_agent_config_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_l3_agent_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_l3_agent_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_fwaas_service_config = Puppet::Type.type(:neutron_l3_agent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron')
|
||||
catalog.add_resource package, @neutron_fwaas_service_config
|
||||
dependency = @neutron_fwaas_service_config.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_fwaas_service_config)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_lbaas_agent_config_spec.rb
Normal file
20
spec/unit/type/neutron_lbaas_agent_config_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_lbaas_agent_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_lbaas_agent_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_lbaas_agent_config = Puppet::Type.type(:neutron_lbaas_agent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-lbaas-agent')
|
||||
catalog.add_resource package, @neutron_lbaas_agent_config
|
||||
dependency = @neutron_lbaas_agent_config.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_lbaas_agent_config)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_metadata_agent_config_spec.rb
Normal file
20
spec/unit/type/neutron_metadata_agent_config_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_metadata_agent_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_metadata_agent_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_metadata_agent_config = Puppet::Type.type(:neutron_metadata_agent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron')
|
||||
catalog.add_resource package, @neutron_metadata_agent_config
|
||||
dependency = @neutron_metadata_agent_config.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_metadata_agent_config)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
23
spec/unit/type/neutron_metering_agent_config_spec.rb
Normal file
23
spec/unit/type/neutron_metering_agent_config_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_metering_agent_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_metering_agent_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_metering_agent_config = Puppet::Type.type(:neutron_metering_agent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package1 = Puppet::Type.type(:package).new(:name => 'neutron')
|
||||
package2 = Puppet::Type.type(:package).new(:name => 'neutron-metering-agent')
|
||||
catalog.add_resource package1, package2, @neutron_metering_agent_config
|
||||
dependency = @neutron_metering_agent_config.autorequire
|
||||
expect(dependency.size).to eq(2)
|
||||
expect(dependency[0].target).to eq(@neutron_metering_agent_config)
|
||||
expect(dependency[0].source).to eq(package1)
|
||||
expect(dependency[1].target).to eq(@neutron_metering_agent_config)
|
||||
expect(dependency[1].source).to eq(package2)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_cisco_credentials_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_cisco_credentials_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_cisco_credentials'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_cisco_credentials)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_cisco_credentials = Puppet::Type.type(:neutron_plugin_cisco_credentials).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-cisco')
|
||||
catalog.add_resource package, @neutron_plugin_cisco_credentials
|
||||
dependency = @neutron_plugin_cisco_credentials.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_cisco_credentials)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_cisco_db_conn_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_cisco_db_conn_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_cisco_db_conn'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_cisco_db_conn)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_cisco_db_conn = Puppet::Type.type(:neutron_plugin_cisco_db_conn).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-cisco')
|
||||
catalog.add_resource package, @neutron_plugin_cisco_db_conn
|
||||
dependency = @neutron_plugin_cisco_db_conn.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_cisco_db_conn)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_cisco_l2network_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_cisco_l2network_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_cisco_l2network'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_cisco_l2network)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_cisco_l2network = Puppet::Type.type(:neutron_plugin_cisco_l2network).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-cisco')
|
||||
catalog.add_resource package, @neutron_plugin_cisco_l2network
|
||||
dependency = @neutron_plugin_cisco_l2network.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_cisco_l2network)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_cisco_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_cisco_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_cisco'
|
||||
|
||||
describe 'Puppet::Type.type(:nova_plugin_cisco)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_cisco = Puppet::Type.type(:neutron_plugin_cisco).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-cisco')
|
||||
catalog.add_resource package, @neutron_plugin_cisco
|
||||
dependency = @neutron_plugin_cisco.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_cisco)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_midonet_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_midonet_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_midonet'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_midonet)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_midonet = Puppet::Type.type(:neutron_plugin_midonet).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'python-neutron-plugin-midonet')
|
||||
catalog.add_resource package, @neutron_plugin_midonet
|
||||
dependency = @neutron_plugin_midonet.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_midonet)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_ml2_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_ml2_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_ml2'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_ml2)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_ml2 = Puppet::Type.type(:neutron_plugin_ml2).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-ml2')
|
||||
catalog.add_resource package, @neutron_plugin_ml2
|
||||
dependency = @neutron_plugin_ml2.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_ml2)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_nvp_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_nvp_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_nvp'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_nvp)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_nvp = Puppet::Type.type(:neutron_plugin_nvp).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-nvp')
|
||||
catalog.add_resource package, @neutron_plugin_nvp
|
||||
dependency = @neutron_plugin_nvp.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_nvp)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_opencontrail_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_opencontrail_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_opencontrail'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_opencontrail)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_opencontrail = Puppet::Type.type(:neutron_plugin_opencontrail).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-opencontrail')
|
||||
catalog.add_resource package, @neutron_plugin_opencontrail
|
||||
dependency = @neutron_plugin_opencontrail.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_opencontrail)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plugin_plumgrid_spec.rb
Normal file
20
spec/unit/type/neutron_plugin_plumgrid_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plugin_plumgrid'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plugin_plumgrid)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plugin_plumgrid = Puppet::Type.type(:neutron_plugin_plumgrid).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-plumgrid')
|
||||
catalog.add_resource package, @neutron_plugin_plumgrid
|
||||
dependency = @neutron_plugin_plumgrid.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plugin_plumgrid)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
20
spec/unit/type/neutron_plumlib_plumgrid_spec.rb
Normal file
20
spec/unit/type/neutron_plumlib_plumgrid_spec.rb
Normal file
@ -0,0 +1,20 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_plumlib_plumgrid'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_plumlib_plumgrid)' do
|
||||
|
||||
before :each do
|
||||
@neutron_plumlib_plumgrid = Puppet::Type.type(:neutron_plumlib_plumgrid).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package = Puppet::Type.type(:package).new(:name => 'neutron-plumlib-plumgrid')
|
||||
catalog.add_resource package, @neutron_plumlib_plumgrid
|
||||
dependency = @neutron_plumlib_plumgrid.autorequire
|
||||
expect(dependency.size).to eq(1)
|
||||
expect(dependency[0].target).to eq(@neutron_plumlib_plumgrid)
|
||||
expect(dependency[0].source).to eq(package)
|
||||
end
|
||||
|
||||
end
|
23
spec/unit/type/neutron_vpnaas_agent_config_spec.rb
Normal file
23
spec/unit/type/neutron_vpnaas_agent_config_spec.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'puppet'
|
||||
require 'puppet/type/neutron_vpnaas_agent_config'
|
||||
|
||||
describe 'Puppet::Type.type(:neutron_vpnaas_agent_config)' do
|
||||
|
||||
before :each do
|
||||
@neutron_vpnaas_agent_config = Puppet::Type.type(:neutron_vpnaas_agent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||
end
|
||||
|
||||
it 'should autorequire the package that install the file' do
|
||||
catalog = Puppet::Resource::Catalog.new
|
||||
package1 = Puppet::Type.type(:package).new(:name => 'neutron')
|
||||
package2 = Puppet::Type.type(:package).new(:name => 'neutron-vpnaas-agent')
|
||||
catalog.add_resource package1, package2, @neutron_vpnaas_agent_config
|
||||
dependency = @neutron_vpnaas_agent_config.autorequire
|
||||
expect(dependency.size).to eq(2)
|
||||
expect(dependency[0].target).to eq(@neutron_vpnaas_agent_config)
|
||||
expect(dependency[0].source).to eq(package1)
|
||||
expect(dependency[1].target).to eq(@neutron_vpnaas_agent_config)
|
||||
expect(dependency[1].source).to eq(package2)
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user