1 # == Class: nova::network::neutron
3 # Configures Nova network to use Neutron.
7 # [*neutron_admin_password*]
8 # (required) Password for connecting to Neutron network services in
9 # admin context through the OpenStack Identity service.
11 # [*neutron_auth_strategy*]
12 # (optional) Should be kept as default 'keystone' for all production deployments.
13 # Defaults to 'keystone'
16 # (optional) URL for connecting to the Neutron networking service.
17 # Defaults to 'http://127.0.0.1:9696'
19 # [*neutron_url_timeout*]
20 # (optional) Timeout value for connecting to neutron in seconds.
23 # [*neutron_admin_tenant_name*]
24 # (optional) Tenant name for connecting to Neutron network services in
25 # admin context through the OpenStack Identity service.
26 # Defaults to 'services'
28 # [*neutron_default_tenant_id*]
29 # (optional) Default tenant id when creating neutron networks
30 # Defaults to 'default'
32 # [*neutron_region_name*]
33 # (optional) Region name for connecting to neutron in admin context
34 # through the OpenStack Identity service.
35 # Defaults to 'RegionOne'
37 # [*neutron_admin_username*]
38 # (optional) Username for connecting to Neutron network services in admin context
39 # through the OpenStack Identity service.
40 # Defaults to 'neutron'
42 # [*neutron_ovs_bridge*]
43 # (optional) Name of Integration Bridge used by Open vSwitch
44 # Defaults to 'br-int'
46 # [*neutron_extension_sync_interval*]
47 # (optional) Number of seconds before querying neutron for extensions
50 # [*neutron_ca_certificates_file*]
51 # (optional) Location of ca certicates file to use for neutronclient requests.
54 # [*neutron_admin_auth_url*]
55 # (optional) Points to the OpenStack Identity server IP and port.
56 # This is the Identity (keystone) admin API server IP and port value,
57 # and not the Identity service API IP and port.
58 # Defaults to 'http://127.0.0.1:35357/v2.0'
60 # [*network_api_class*]
61 # (optional) The full class name of the network API class.
62 # The default configures Nova to use Neutron for the network API.
63 # Defaults to 'nova.network.neutronv2.api.API'
65 # [*security_group_api*]
66 # (optional) The full class name of the security API class.
67 # The default configures Nova to use Neutron for security groups.
68 # Set to 'nova' to use standard Nova security groups.
69 # Defaults to 'neutron'
72 # (optional) Firewall driver.
73 # This prevents nova from maintaining a firewall so it does not interfere
74 # with Neutron's. Set to 'nova.virt.firewall.IptablesFirewallDriver'
75 # to re-enable the Nova firewall.
76 # Defaults to 'nova.virt.firewall.NoopFirewallDriver'
78 # [*vif_plugging_is_fatal*]
79 # (optional) Fail to boot instance if vif plugging fails.
80 # This prevents nova from booting an instance if vif plugging notification
81 # is not received from neutron.
84 # [*vif_plugging_timeout*]
85 # (optional) Number of seconds to wait for neutron vif plugging events.
86 # Set to '0' and vif_plugging_is_fatal to 'False' if vif plugging
87 # notification is not being used.
91 # (optional) domain to use for building the hostnames
92 # Defaults to 'novalocal'
94 class nova::network::neutron (
95 $neutron_admin_password,
96 $neutron_auth_strategy = 'keystone',
97 $neutron_url = 'http://127.0.0.1:9696',
98 $neutron_url_timeout = '30',
99 $neutron_admin_tenant_name = 'services',
100 $neutron_default_tenant_id = 'default',
101 $neutron_region_name = 'RegionOne',
102 $neutron_admin_username = 'neutron',
103 $neutron_admin_auth_url = 'http://127.0.0.1:35357/v2.0',
104 $neutron_ovs_bridge = 'br-int',
105 $neutron_extension_sync_interval = '600',
106 $neutron_ca_certificates_file = undef,
107 $network_api_class = 'nova.network.neutronv2.api.API',
108 $security_group_api = 'neutron',
109 $firewall_driver = 'nova.virt.firewall.NoopFirewallDriver',
110 $vif_plugging_is_fatal = true,
111 $vif_plugging_timeout = '300',
112 $dhcp_domain = 'novalocal',
116 'DEFAULT/dhcp_domain': value => $dhcp_domain;
117 'DEFAULT/firewall_driver': value => $firewall_driver;
118 'DEFAULT/network_api_class': value => $network_api_class;
119 'DEFAULT/security_group_api': value => $security_group_api;
120 'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal;
121 'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout;
122 'neutron/auth_strategy': value => $neutron_auth_strategy;
123 'neutron/url': value => $neutron_url;
124 'neutron/url_timeout': value => $neutron_url_timeout;
125 'neutron/admin_tenant_name': value => $neutron_admin_tenant_name;
126 'neutron/default_tenant_id': value => $neutron_default_tenant_id;
127 'neutron/region_name': value => $neutron_region_name;
128 'neutron/admin_username': value => $neutron_admin_username;
129 'neutron/admin_password': value => $neutron_admin_password, secret => true;
130 'neutron/admin_auth_url': value => $neutron_admin_auth_url;
131 'neutron/ovs_bridge': value => $neutron_ovs_bridge;
132 'neutron/extension_sync_interval': value => $neutron_extension_sync_interval;
135 if ! $neutron_ca_certificates_file {
136 nova_config { 'neutron/ca_certificates_file': ensure => absent }
138 nova_config { 'neutron/ca_certificates_file': value => $neutron_ca_certificates_file }