Puppet Class: profile::openstack::base::neutron::common

Defined in:
modules/profile/manifests/openstack/base/neutron/common.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • version (Any) (defaults to: lookup('profile::openstack::base::version'))
  • region (Any) (defaults to: lookup('profile::openstack::base::region'))
  • dhcp_domain (Any) (defaults to: lookup('profile::openstack::base::nova::dhcp_domain'))
  • db_user (Any) (defaults to: lookup('profile::openstack::base::neutron::db_user'))
  • db_pass (Any) (defaults to: lookup('profile::openstack::base::neutron::db_pass'))
  • db_host (Any) (defaults to: lookup('profile::openstack::base::neutron::db_host'))
  • openstack_control_nodes (Array[OpenStack::ControlNode]) (defaults to: lookup('profile::openstack::base::openstack_control_nodes'))
  • openstack_control_node_interface (String) (defaults to: lookup('profile::openstack::base::neutron::openstack_control_node_interface', {default_value => 'cloud_private_fqdn'}))
  • rabbitmq_nodes (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::openstack::base::rabbitmq_nodes'))
  • haproxy_nodes (Array[Stdlib::Host]) (defaults to: lookup('profile::openstack::base::haproxy_nodes'))
  • keystone_api_fqdn (Stdlib::Fqdn) (defaults to: lookup('profile::openstack::base::keystone_api_fqdn'))
  • ldap_user_pass (Any) (defaults to: lookup('profile::openstack::base::ldap_user_pass'))
  • rabbit_user (Any) (defaults to: lookup('profile::openstack::base::neutron::rabbit_user'))
  • rabbit_pass (Any) (defaults to: lookup('profile::openstack::base::neutron::rabbit_pass'))
  • enforce_policy_scope (Boolean) (defaults to: lookup('profile::openstack::base::keystone::enforce_policy_scope'))
  • enforce_new_policy_defaults (Boolean) (defaults to: lookup('profile::openstack::base::keystone::enforce_new_policy_defaults'))
  • agent_down_time (Any) (defaults to: lookup('profile::openstack::base::neutron::agent_down_time'))
  • log_agent_heartbeats (Any) (defaults to: lookup('profile::openstack::base::neutron::log_agent_heartbeats'))
  • bind_port (Stdlib::Port) (defaults to: lookup('profile::openstack::base::neutron::bind_port'))
  • use_ovs (Boolean) (defaults to: lookup('profile::openstack::base::neutron::use_ovs', {default_value => false}))
  • type_drivers (Array[String[1]]) (defaults to: lookup('profile::openstack::base::neutron::type_drivers', {default_value => ['flat', 'vlan', 'vxlan']}))
  • tenant_network_types (Array[String[1]]) (defaults to: lookup('profile::openstack::base::neutron::tenant_network_types', {default_value => ['vxlan']}))
  • mechanism_drivers (Array[String[1]]) (defaults to: lookup('profile::openstack::base::neutron::mechanism_drivers', {default_value => ['linuxbridge', 'openvswitch', 'l2population']}))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'modules/profile/manifests/openstack/base/neutron/common.pp', line 2

class profile::openstack::base::neutron::common(
    $version = lookup('profile::openstack::base::version'),
    $region = lookup('profile::openstack::base::region'),
    $dhcp_domain = lookup('profile::openstack::base::nova::dhcp_domain'),
    $db_user = lookup('profile::openstack::base::neutron::db_user'),
    $db_pass = lookup('profile::openstack::base::neutron::db_pass'),
    $db_host = lookup('profile::openstack::base::neutron::db_host'),
    Array[OpenStack::ControlNode] $openstack_control_nodes = lookup('profile::openstack::base::openstack_control_nodes'),
    String $openstack_control_node_interface = lookup('profile::openstack::base::neutron::openstack_control_node_interface', {default_value => 'cloud_private_fqdn'}),
    Array[Stdlib::Fqdn] $rabbitmq_nodes = lookup('profile::openstack::base::rabbitmq_nodes'),
    Array[Stdlib::Host] $haproxy_nodes = lookup('profile::openstack::base::haproxy_nodes'),
    Stdlib::Fqdn $keystone_api_fqdn = lookup('profile::openstack::base::keystone_api_fqdn'),
    $ldap_user_pass = lookup('profile::openstack::base::ldap_user_pass'),
    $rabbit_user = lookup('profile::openstack::base::neutron::rabbit_user'),
    $rabbit_pass = lookup('profile::openstack::base::neutron::rabbit_pass'),
    Boolean $enforce_policy_scope = lookup('profile::openstack::base::keystone::enforce_policy_scope'),
    Boolean $enforce_new_policy_defaults = lookup('profile::openstack::base::keystone::enforce_new_policy_defaults'),
    $agent_down_time = lookup('profile::openstack::base::neutron::agent_down_time'),
    $log_agent_heartbeats = lookup('profile::openstack::base::neutron::log_agent_heartbeats'),
    Stdlib::Port $bind_port = lookup('profile::openstack::base::neutron::bind_port'),
    Boolean $use_ovs = lookup('profile::openstack::base::neutron::use_ovs', {default_value => false}),
    Array[String[1]] $type_drivers = lookup('profile::openstack::base::neutron::type_drivers', {default_value => ['flat', 'vlan', 'vxlan']}),
    Array[String[1]] $tenant_network_types = lookup('profile::openstack::base::neutron::tenant_network_types', {default_value => ['vxlan']}),
    Array[String[1]] $mechanism_drivers = lookup('profile::openstack::base::neutron::mechanism_drivers', {default_value => ['linuxbridge', 'openvswitch', 'l2population']}),
    ) {

    class {'::openstack::neutron::common':
        version                     => $version,
        memcached_nodes             => $openstack_control_nodes.map |$node| { $node[$openstack_control_node_interface] },
        rabbitmq_nodes              => $rabbitmq_nodes,
        keystone_fqdn               => $keystone_api_fqdn,
        db_pass                     => $db_pass,
        db_user                     => $db_user,
        db_host                     => $db_host,
        region                      => $region,
        dhcp_domain                 => $dhcp_domain,
        ldap_user_pass              => $ldap_user_pass,
        rabbit_pass                 => $rabbit_pass,
        rabbit_user                 => $rabbit_user,
        agent_down_time             => $agent_down_time,
        log_agent_heartbeats        => $log_agent_heartbeats,
        bind_port                   => $bind_port,
        enforce_policy_scope        => $enforce_policy_scope,
        enforce_new_policy_defaults => $enforce_new_policy_defaults,
        firewall_driver             => $use_ovs.bool2str('openvswitch', 'iptables'),
        type_drivers                => $type_drivers,
        tenant_network_types        => $tenant_network_types,
        mechanism_drivers           => $mechanism_drivers,
    }
    contain '::openstack::neutron::common'

    # TODO: move to the service profile
    openstack::db::project_grants { 'neutron':
        access_hosts => $haproxy_nodes,
        db_name      => 'neutron',
        db_user      => $db_user,
        db_pass      => $db_pass,
        require      => Package['neutron-common'],
    }
}