Create a separate manifest for ovs and ovs bridge
... so that we can reuse the same implementation in acceptance tests for puppet-vswitch and puppet-ovn. Change-Id: Ie6084e8b7de9e0279a67d74146bf461e3e7d5d73
This commit is contained in:
parent
c8c85b1222
commit
84fe2bacef
@ -108,31 +108,7 @@ class openstack_integration::neutron (
|
||||
|
||||
case $driver {
|
||||
'openvswitch', 'ovn': {
|
||||
include vswitch::ovs
|
||||
# Functional test for Open-vSwitch:
|
||||
# create dummy loopback interface to exercise adding a port to a bridge
|
||||
vs_bridge { 'br-ex':
|
||||
ensure => present,
|
||||
notify => Exec['create_loop1_port'],
|
||||
}
|
||||
exec { 'create_loop1_port':
|
||||
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
provider => shell,
|
||||
command => 'ip link add name loop1 type dummy && ip addr add 127.2.0.1/24 dev loop1',
|
||||
refreshonly => true,
|
||||
}
|
||||
-> vs_port { 'loop1':
|
||||
ensure => present,
|
||||
bridge => 'br-ex',
|
||||
notify => Exec['create_br-ex_vif'],
|
||||
}
|
||||
# creates br-ex virtual interface to reach floating-ip network
|
||||
exec { 'create_br-ex_vif':
|
||||
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
provider => shell,
|
||||
command => 'ip addr add 172.24.5.1/24 dev br-ex && ip link set br-ex up',
|
||||
refreshonly => true,
|
||||
}
|
||||
include openstack_integration::ovs
|
||||
}
|
||||
'linuxbridge': {
|
||||
exec { 'create_dummy_iface':
|
||||
|
38
manifests/ovs.pp
Normal file
38
manifests/ovs.pp
Normal file
@ -0,0 +1,38 @@
|
||||
# Configure the openvswitch service
|
||||
#
|
||||
# [*manage_bridge*]
|
||||
# (Optional) Set up br-ex bridge.
|
||||
# Defaults to true.
|
||||
#
|
||||
class openstack_integration::ovs(
|
||||
$manage_bridge = true
|
||||
) {
|
||||
include vswitch::ovs
|
||||
|
||||
if $manage_bridge {
|
||||
# Functional test for Open-vSwitch:
|
||||
# create dummy loopback interface to exercise adding a port to a bridge
|
||||
vs_bridge { 'br-ex':
|
||||
ensure => present,
|
||||
notify => Exec['create_loop1_port'],
|
||||
}
|
||||
exec { 'create_loop1_port':
|
||||
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
provider => shell,
|
||||
command => 'ip link add name loop1 type dummy && ip addr add 127.2.0.1/24 dev loop1',
|
||||
refreshonly => true,
|
||||
}
|
||||
-> vs_port { 'loop1':
|
||||
ensure => present,
|
||||
bridge => 'br-ex',
|
||||
notify => Exec['create_br-ex_vif'],
|
||||
}
|
||||
# creates br-ex virtual interface to reach floating-ip network
|
||||
exec { 'create_br-ex_vif':
|
||||
path => '/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
provider => shell,
|
||||
command => 'ip addr add 172.24.5.1/24 dev br-ex && ip link set br-ex up',
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user