1 # == Class: barometer::keystone::auth
3 # Configures barometer user, service and endpoint in Keystone.
8 # (required) Password for barometer user.
11 # (optional) Ensure state of keystone service identity. Defaults to 'present'.
14 # Username for barometer service. Defaults to 'barometer'.
17 # Email for barometer user. Defaults to 'barometer@localhost'.
20 # Tenant for barometer user. Defaults to 'services'.
22 # [*configure_endpoint*]
23 # Should barometer endpoint be configured? Defaults to 'true'.
26 # (Optional) Should the service user be configured?
29 # [*configure_user_role*]
30 # (Optional) Should the admin role be configured for the service user?
34 # Type of service. Defaults to 'key-manager'.
37 # Region for endpoint. Defaults to 'RegionOne'.
40 # (optional) Name of the service.
41 # Defaults to the value of 'barometer'.
43 # [*service_description*]
44 # (optional) Description of the service.
45 # Default to 'barometer NFV Service'
48 # (optional) The endpoint's public url. (Defaults to 'http://127.0.0.1:9890')
49 # This url should *not* contain any trailing '/'.
52 # (optional) The endpoint's admin url. (Defaults to 'http://127.0.0.1:9890')
53 # This url should *not* contain any trailing '/'.
56 # (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:9890')
58 class barometer::keystone::auth (
61 $auth_name = 'barometer',
62 $email = 'barometer@localhost',
64 $configure_endpoint = true,
65 $configure_user = true,
66 $configure_user_role = true,
67 $service_name = 'barometer',
68 $service_description = 'barometer NFV Service',
69 $service_type = 'nfv-orchestration',
70 $region = 'RegionOne',
71 $public_url = 'http://127.0.0.1:9890',
72 $admin_url = 'http://127.0.0.1:9890',
73 $internal_url = 'http://127.0.0.1:9890',
76 if $configure_user_role {
77 Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'barometer-server' |>
79 Keystone_endpoint["${region}/${service_name}::${service_type}"] ~> Service <| name == 'barometer-server' |>
81 keystone::resource::service_identity { 'barometer':
83 configure_user => $configure_user,
84 configure_user_role => $configure_user_role,
85 configure_endpoint => $configure_endpoint,
86 service_name => $service_name,
87 service_type => $service_type,
88 service_description => $service_description,
90 auth_name => $auth_name,
91 password => $password,
94 public_url => $public_url,
95 internal_url => $internal_url,
96 admin_url => $admin_url,