Another attempt at fixing the switch dependencies - ports and bridges cannot be classes, and Vs_* deps in place for vswitch rather than the wrappers

This commit is contained in:
Ian Wells 2013-01-15 01:41:01 -08:00
parent 649de2b128
commit ccef47d8cf
3 changed files with 9 additions and 8 deletions

View File

@ -1,16 +1,15 @@
class vswitch::bridge ( define vswitch::bridge (
$name,
$external_ids = "", $external_ids = "",
$ensure = "present" $ensure = "present"
) { ) {
if $external_ids == "" { if $external_ids == "" {
vs_bridge { $name: vs_bridge { $name:
ensure => $ensure ensure => $ensure
} <- Class['vswitch'] }
} else { } else {
vs_bridge { $name: vs_bridge { $name:
external_ids => $external_ids, external_ids => $external_ids,
ensure => $ensure ensure => $ensure
} <- Class['vswitch'] }
} }
} }

View File

@ -20,4 +20,7 @@ class vswitch::ovs(
hasstatus => true, hasstatus => true,
status => "/etc/init.d/openvswitch-switch status", status => "/etc/init.d/openvswitch-switch status",
} }
Service['openvswitch-switch'] -> Vs_port<||>
Service['openvswitch-switch'] -> Vs_bridge<||>
} }

View File

@ -1,10 +1,9 @@
class vswitch::port ( define vswitch::port (
$interface,
$bridge, $bridge,
$ensure = present $ensure = present
) { ) {
vs_port { $interface: vs_port { $name:
bridge => $bridge, bridge => $bridge,
ensure => $ensure ensure => $ensure
} <- Class['vswitch'] }
} }