From c43266768a87531bb5d8b99eb88f1f3c16aea7b6 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Mon, 8 Jul 2013 20:24:13 +0000 Subject: [PATCH] Add Quantum L2 agent configuration --- manifests/node/compute.pp | 3 +++ manifests/node/network.pp | 3 +++ manifests/quantum/agent/l2.pp | 36 +++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 manifests/node/compute.pp create mode 100644 manifests/node/network.pp create mode 100644 manifests/quantum/agent/l2.pp diff --git a/manifests/node/compute.pp b/manifests/node/compute.pp new file mode 100644 index 0000000..39ac71a --- /dev/null +++ b/manifests/node/compute.pp @@ -0,0 +1,3 @@ +class kickstack::node::compute inherits kickstack { + include kickstack::quantum::agent::l2 +} diff --git a/manifests/node/network.pp b/manifests/node/network.pp new file mode 100644 index 0000000..4a1af12 --- /dev/null +++ b/manifests/node/network.pp @@ -0,0 +1,3 @@ +class kickstack::node::network inherits kickstack { + include kickstack::quantum::agent::l2 +} diff --git a/manifests/quantum/agent/l2.pp b/manifests/quantum/agent/l2.pp new file mode 100644 index 0000000..d9cc01c --- /dev/null +++ b/manifests/quantum/agent/l2.pp @@ -0,0 +1,36 @@ +class kickstack::quantum::agent::l2 inherits kickstack { + + include kickstack::quantum::config + + $tenant_network_type = "$::kickstack::quantum_tenant_network_type" + + case "$::kickstack::quantum_plugin" { + 'ovs': { + case $tenant_network_type { + 'gre': { + $local_tunnel_ip = getvar("ipaddress_${nic_data}") + class { 'quantum::agents::ovs': + integration_bridge => 'br-int', + enable_tunneling => true, + local_ip => $local_tunnel_ip, + tunnel_bridge => 'br-tun', + } + } + 'vlan': { + class { 'quantum::agents::ovs': + bridge_mappings => ["default:br-${nic_data}"], + bridge_uplinks => ["br-${nic_data}:${nic_data}"], + integration_bridge => 'br-int', + enable_tunneling => false, + local_ip => '', + } + } + } + } + 'linuxbridge': { + class { "quantum::agents::linuxbridge": + physical_interface_mappings => "default:$nic_data" + } + } + } +}