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 (
$name,
define vswitch::bridge (
$external_ids = "",
$ensure = "present"
) {
if $external_ids == "" {
vs_bridge { $name:
ensure => $ensure
} <- Class['vswitch']
}
} else {
vs_bridge { $name:
external_ids => $external_ids,
ensure => $ensure
} <- Class['vswitch']
}
}
}

View File

@ -20,4 +20,7 @@ class vswitch::ovs(
hasstatus => true,
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 (
$interface,
define vswitch::port (
$bridge,
$ensure = present
) {
vs_port { $interface:
vs_port { $name:
bridge => $bridge,
ensure => $ensure
} <- Class['vswitch']
}
}