File: neutron_single_network.pp

package info (click to toggle)
puppet-module-manila 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,804 kB
  • sloc: ruby: 4,767; python: 38; makefile: 10; sh: 10
file content (42 lines) | stat: -rw-r--r-- 1,557 bytes parent folder | download
1
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
# == define: manila::network::neutron_single_network
#
# Setup and configure the Neutron single network plugin
#
# === Parameters
#
# [*neutron_net_id*]
# (required) Default Neutron network that will be used for share server
# creation. This opt is used only with
# class 'NeutronSingleNetworkPlugin'.
#
# [*neutron_subnet_id*]
# (required) Default Neutron subnet that will be used for share server
# creation. Should be assigned to network defined in opt
# 'neutron_net_id'. This opt is used only with
# class 'NeutronSingleNetworkPlugin'.
#
# [*network_plugin_ipv4_enabled*]
# (optional) Whether to support Ipv4 network resource.
# Defaults to $facts['os_service_default'].
#
# [*network_plugin_ipv6_enabled*]
# (optional) whether to support IPv6 network resource.
# Defaults to $facts['os_service_default'].
#
define manila::network::neutron_single_network (
  $neutron_net_id,
  $neutron_subnet_id,
  $network_plugin_ipv4_enabled = $facts['os_service_default'],
  $network_plugin_ipv6_enabled = $facts['os_service_default'],
) {

  $neutron_single_plugin_name = 'manila.network.neutron.neutron_network_plugin.NeutronSingleNetworkPlugin'

  manila_config {
    "${name}/network_api_class":            value => $neutron_single_plugin_name;
    "${name}/neutron_net_id":               value => $neutron_net_id;
    "${name}/neutron_subnet_id":            value => $neutron_subnet_id;
    "${name}/network_plugin_ipv4_enabled":  value => $network_plugin_ipv4_enabled;
    "${name}/network_plugin_ipv6_enabled":  value => $network_plugin_ipv6_enabled;
  }
}