Add Quantum plugin configuration
This commit is contained in:
parent
c2b2507b97
commit
a2172e7ed6
@ -40,6 +40,9 @@ class kickstack (
|
||||
$cinder_rbd_user = $kickstack::params::cinder_rbd_user,
|
||||
$quantum_network_type = $kickstack::params::quantum_network_type,
|
||||
$quantum_plugin = $kickstack::params::quantum_plugin,
|
||||
$quantum_tenant_network_type = $kickstack::params::quantum_tenant_network_type,
|
||||
$quantum_network_vlan_ranges = $kickstack::params::quantum_network_vlan_ranges,
|
||||
$quantum_tunnel_id_ranges = $kickstack::params::quantum_tunnel_id_ranges,
|
||||
) inherits kickstack::params {
|
||||
|
||||
include exportfact
|
||||
|
@ -10,4 +10,5 @@ class kickstack::node::api inherits kickstack {
|
||||
|
||||
include kickstack::quantum::server
|
||||
include kickstack::quantum::endpoint
|
||||
include kickstack::quantum::plugin
|
||||
}
|
||||
|
@ -104,4 +104,14 @@ class kickstack::params {
|
||||
# linuxbridge
|
||||
# ovs (default)
|
||||
$quantum_plugin = pick(getvar("::${variable_prefix}quantum_plugin"),"ovs")
|
||||
|
||||
# The tenant network type to use with the Quantum ovs and linuxbridge plugins
|
||||
# Supported: vlan (default), gre
|
||||
$quantum_tenant_network_type = pick(getvar("::${variable_prefix}quantum_tenant_network_type"),"vlan")
|
||||
|
||||
# The network VLAN ranges to use with the Quantum ovs and linuxbridge plugins
|
||||
$quantum_network_vlan_ranges = pick(getvar("::${variable_prefix}quantum_network_vlan_ranges"),"default:2000:3999")
|
||||
|
||||
# The tunnel ID ranges to use with the Quantum ovs plugin, when in gre mode
|
||||
$quantum_tunnel_id_ranges = pick(getvar("::${variable_prefix}quantum_tunnel_id_ranges"),"1:1000")
|
||||
}
|
||||
|
33
manifests/quantum/plugin.pp
Normal file
33
manifests/quantum/plugin.pp
Normal file
@ -0,0 +1,33 @@
|
||||
class kickstack::quantum::plugin inherits kickstack {
|
||||
|
||||
include kickstack::quantum::config
|
||||
|
||||
$sql_conn = getvar("${fact_prefix}quantum_sql_connection")
|
||||
$tenant_network_type = "$::kickstack::quantum_tenant_network_type"
|
||||
$network_vlan_ranges = $tenant_network_type ? {
|
||||
'vlan' => "$::kickstack::quantum_network_vlan_ranges",
|
||||
'gre' => ''
|
||||
}
|
||||
$tunnel_id_ranges = $tenant_network_type ? {
|
||||
'vlan' => '',
|
||||
'gre' => "$::kickstack::quantum_tunnel_id_ranges"
|
||||
}
|
||||
|
||||
case "$::kickstack::quantum_plugin" {
|
||||
'ovs': {
|
||||
class { "quantum::plugins::ovs":
|
||||
sql_connection => $sql_conn,
|
||||
tenant_network_type => $tenant_network_type,
|
||||
network_vlan_ranges => $network_vlan_ranges,
|
||||
tunnel_id_ranges => $tunnel_id_ranges
|
||||
}
|
||||
}
|
||||
'linuxbridge': {
|
||||
class { "quantum::plugins::linuxbridge":
|
||||
sql_connection => $sql_conn,
|
||||
tenant_network_type => $tenant_network_type,
|
||||
network_vlan_ranges => $network_vlan_ranges,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user