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:
|
vs_port {$external_int:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
bridge => $external_bridge
|
bridge => $external_bridge
|
||||||
} ->
|
}
|
||||||
neutron_network {'public':
|
if defined('neutron::server') {
|
||||||
provider_network_type => 'flat',
|
neutron_network {'public':
|
||||||
provider_physical_network => 'public',
|
provider_network_type => 'flat',
|
||||||
shared => true,
|
provider_physical_network => 'public',
|
||||||
router_external => true
|
shared => true,
|
||||||
|
router_external => true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,13 +438,8 @@ describe 'cloud::compute::hypervisor' do
|
|||||||
:bridge => 'br-pub'
|
:bridge => 'br-pub'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'configure provider external network' do
|
it 'should not configure provider external network' do
|
||||||
should contain_neutron_network('public').with(
|
should_not contain__neutron_network('public')
|
||||||
:provider_network_type => 'flat',
|
|
||||||
:provider_physical_network => 'public',
|
|
||||||
:shared => true,
|
|
||||||
:router_external => true
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -131,13 +131,8 @@ describe 'cloud::network::dhcp' do
|
|||||||
:bridge => 'br-pub'
|
:bridge => 'br-pub'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'configure provider external network' do
|
it 'should not configure provider external network' do
|
||||||
should contain_neutron_network('public').with(
|
should_not contain__neutron_network('public')
|
||||||
:provider_network_type => 'flat',
|
|
||||||
:provider_physical_network => 'public',
|
|
||||||
:shared => true,
|
|
||||||
:router_external => true
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -147,13 +147,8 @@ describe 'cloud::network::l3' do
|
|||||||
:bridge => 'br-pub'
|
:bridge => 'br-pub'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'configure provider external network' do
|
it 'should not configure provider external network' do
|
||||||
should contain_neutron_network('public').with(
|
should_not contain__neutron_network('public')
|
||||||
:provider_network_type => 'flat',
|
|
||||||
:provider_physical_network => 'public',
|
|
||||||
:shared => true,
|
|
||||||
:router_external => true
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -146,13 +146,8 @@ describe 'cloud::network::lbaas' do
|
|||||||
:bridge => 'br-pub'
|
:bridge => 'br-pub'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'configure provider external network' do
|
it 'should not configure provider external network' do
|
||||||
should contain_neutron_network('public').with(
|
should_not contain__neutron_network('public')
|
||||||
:provider_network_type => 'flat',
|
|
||||||
:provider_physical_network => 'public',
|
|
||||||
:shared => true,
|
|
||||||
:router_external => true
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -136,13 +136,8 @@ describe 'cloud::network::metadata' do
|
|||||||
:bridge => 'br-pub'
|
:bridge => 'br-pub'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'configure provider external network' do
|
it 'should not configure provider external network' do
|
||||||
should contain_neutron_network('public').with(
|
should_not contain__neutron_network('public')
|
||||||
:provider_network_type => 'flat',
|
|
||||||
:provider_physical_network => 'public',
|
|
||||||
:shared => true,
|
|
||||||
:router_external => true
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -113,13 +113,8 @@ describe 'cloud::network::vpn' do
|
|||||||
:bridge => 'br-pub'
|
:bridge => 'br-pub'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
it 'configure provider external network' do
|
it 'should not configure provider external network' do
|
||||||
should contain_neutron_network('public').with(
|
should_not contain__neutron_network('public')
|
||||||
:provider_network_type => 'flat',
|
|
||||||
:provider_physical_network => 'public',
|
|
||||||
:shared => true,
|
|
||||||
:router_external => true
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user