Puppet Class: profile::openstack::base::neutron::l3_agent

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

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • version (Any) (defaults to: lookup('profile::openstack::base::version'))
  • report_interval (Any) (defaults to: lookup('profile::openstack::base::neutron::report_interval'))
  • base_interface (Any) (defaults to: lookup('profile::openstack::base::neutron::base_interface'))
  • network_flat_interface_vlan_external (Any) (defaults to: lookup('profile::openstack::base::neutron::network_flat_interface_vlan_external'))
  • network_flat_interface_vlan (Any) (defaults to: lookup('profile::openstack::base::neutron::network_flat_interface_vlan'))
  • legacy_vlan_naming (Boolean) (defaults to: lookup('profile::openstack::base::neutron::legacy_vlan_naming', {default_value => true}))
  • interface_driver (Enum['linuxbridge', 'openvswitch']) (defaults to: lookup('profile::openstack::base::neutron::interface_driver'))


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
# File 'modules/profile/manifests/openstack/base/neutron/l3_agent.pp', line 2

class profile::openstack::base::neutron::l3_agent(
    $version = lookup('profile::openstack::base::version'),
    $report_interval = lookup('profile::openstack::base::neutron::report_interval'),
    $base_interface = lookup('profile::openstack::base::neutron::base_interface'),
    $network_flat_interface_vlan_external = lookup('profile::openstack::base::neutron::network_flat_interface_vlan_external'),
    $network_flat_interface_vlan = lookup('profile::openstack::base::neutron::network_flat_interface_vlan'),
    Boolean $legacy_vlan_naming  = lookup('profile::openstack::base::neutron::legacy_vlan_naming', {default_value => true}),
    Enum['linuxbridge', 'openvswitch'] $interface_driver = lookup('profile::openstack::base::neutron::interface_driver'),
) {

    if $legacy_vlan_naming {
        $wan_nic  = "${base_interface}.${network_flat_interface_vlan_external}"
        $virt_nic = "${base_interface}.${network_flat_interface_vlan}"
    } else {
        $wan_nic  = "vlan${network_flat_interface_vlan_external}"
        $virt_nic = "vlan${network_flat_interface_vlan}"
    }

    interface::tagged { $wan_nic:
        base_interface     => $base_interface,
        vlan_id            => $network_flat_interface_vlan_external,
        method             => 'manual',
        up                 => 'ip link set $IFACE up',
        down               => 'ip link set $IFACE down',
        legacy_vlan_naming => $legacy_vlan_naming,
    }

    interface::tagged { $virt_nic:
        base_interface     => $base_interface,
        vlan_id            => $network_flat_interface_vlan,
        method             => 'manual',
        up                 => 'ip link set $IFACE up',
        down               => 'ip link set $IFACE down',
        legacy_vlan_naming => $legacy_vlan_naming,
    }

    class {'::openstack::neutron::l3_agent':
        version          => $version,
        report_interval  => $report_interval,
        wan_nic          => $wan_nic,
        virt_nic         => $virt_nic,
        interface_driver => $interface_driver,
    }
    contain '::openstack::neutron::l3_agent'

    class { '::prometheus::node_neutron_namespace':
        ensure => 'present',
    }
}