1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
13 # == Class: neutron::server::notifications
15 # Configure Notification System Options
19 # [*notify_nova_on_port_status_changes*]
20 # (optional) Send notification to nova when port status is active.
23 # [*notify_nova_on_port_data_changes*]
24 # (optional) Send notifications to nova when port data (fixed_ips/floatingips)
25 # change so nova can update its cache.
28 # [*send_events_interval*]
29 # (optional) Number of seconds between sending events to nova if there are
34 # (optional) URL for connection to nova (Only supports one nova region
36 # Defaults to 'http://127.0.0.1:8774/v2'
38 # [*nova_admin_auth_url*]
39 # (optional) Authorization URL for connection to nova in admin context.
40 # Defaults to 'http://127.0.0.1:35357/v2.0'
42 # [*nova_admin_username*]
43 # (optional) Username for connection to nova in admin context
46 # [*nova_admin_tenant_name*]
47 # (optional) The name of the admin nova tenant
48 # Defaults to 'services'
50 # [*nova_admin_tenant_id*]
51 # (optional) The UUID of the admin nova tenant. If provided this takes
52 # precedence over nova_admin_tenant_name.
54 # [*nova_admin_password*]
55 # (required) Password for connection to nova in admin context.
57 # [*nova_region_name*]
58 # (optional) Name of nova region to use. Useful if keystone manages more than
60 # Defaults to 'RegionOne'
63 class neutron::server::notifications (
64 $notify_nova_on_port_status_changes = true,
65 $notify_nova_on_port_data_changes = true,
66 $send_events_interval = '2',
67 $nova_url = 'http://127.0.0.1:8774/v2',
68 $nova_admin_auth_url = 'http://127.0.0.1:35357/v2.0',
69 $nova_admin_username = 'nova',
70 $nova_admin_tenant_name = 'services',
71 $nova_admin_tenant_id = undef,
72 $nova_admin_password = false,
73 $nova_region_name = 'RegionOne',
76 # Depend on the specified keystone_user resource, if it exists.
77 Keystone_user <| title == 'nova' |> -> Class[neutron::server::notifications]
79 if ! $nova_admin_password {
80 fail('nova_admin_password must be set.')
83 if ! ( $nova_admin_tenant_id or $nova_admin_tenant_name ) {
84 fail('You must provide either nova_admin_tenant_name or nova_admin_tenant_id.')
88 'DEFAULT/notify_nova_on_port_status_changes': value => $notify_nova_on_port_status_changes;
89 'DEFAULT/notify_nova_on_port_data_changes': value => $notify_nova_on_port_data_changes;
90 'DEFAULT/send_events_interval': value => $send_events_interval;
91 'DEFAULT/nova_url': value => $nova_url;
92 'DEFAULT/nova_admin_auth_url': value => $nova_admin_auth_url;
93 'DEFAULT/nova_admin_username': value => $nova_admin_username;
94 'DEFAULT/nova_admin_password': value => $nova_admin_password, secret => true;
95 'DEFAULT/nova_region_name': value => $nova_region_name;
98 if $nova_admin_tenant_id {
100 'DEFAULT/nova_admin_tenant_id': value => $nova_admin_tenant_id;
103 nova_admin_tenant_id_setter {'nova_admin_tenant_id':
105 tenant_name => $nova_admin_tenant_name,
106 auth_url => $nova_admin_auth_url,
107 auth_username => $nova_admin_username,
108 auth_password => $nova_admin_password,
109 auth_tenant_name => $nova_admin_tenant_name,