network/providers: create public network only from neutron-server
The puppet provider which creates the networks should be declared from the neutron-server node. The catalog would fail on other nodes, that's why it's better to ensure that the catalog contains neutron::server class if we want to manage the external public network. Closes-bug #564
This commit is contained in:
parent
ea76dbef74
commit
d7110a979c
@ -196,12 +196,14 @@ class cloud::network(
|
||||
vs_port {$external_int:
|
||||
ensure => present,
|
||||
bridge => $external_bridge
|
||||
} ->
|
||||
neutron_network {'public':
|
||||
provider_network_type => 'flat',
|
||||
provider_physical_network => 'public',
|
||||
shared => true,
|
||||
router_external => true
|
||||
}
|
||||
if defined('neutron::server') {
|
||||
neutron_network {'public':
|
||||
provider_network_type => 'flat',
|
||||
provider_physical_network => 'public',
|
||||
shared => true,
|
||||
router_external => true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,13 +438,8 @@ describe 'cloud::compute::hypervisor' do
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
it 'should not configure provider external network' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -131,13 +131,8 @@ describe 'cloud::network::dhcp' do
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
it 'should not configure provider external network' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -147,13 +147,8 @@ describe 'cloud::network::l3' do
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
it 'should not configure provider external network' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -146,13 +146,8 @@ describe 'cloud::network::lbaas' do
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
it 'should not configure provider external network' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -136,13 +136,8 @@ describe 'cloud::network::metadata' do
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
it 'should not configure provider external network' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -113,13 +113,8 @@ describe 'cloud::network::vpn' do
|
||||
:bridge => 'br-pub'
|
||||
)
|
||||
end
|
||||
it 'configure provider external network' do
|
||||
should contain_neutron_network('public').with(
|
||||
:provider_network_type => 'flat',
|
||||
:provider_physical_network => 'public',
|
||||
:shared => true,
|
||||
:router_external => true
|
||||
)
|
||||
it 'should not configure provider external network' do
|
||||
should_not contain__neutron_network('public')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user