| 1 |
# == Class: vmms::keystone::auth |
| 2 |
# |
| 3 |
# Configures vmms user, service and endpoint in Keystone. |
| 4 |
# |
| 5 |
# === Parameters |
| 6 |
# |
| 7 |
# [*password*] |
| 8 |
# (Required) Password for vmms user. |
| 9 |
# |
| 10 |
# [*auth_name*] |
| 11 |
# (Optional) Username for vmms service. |
| 12 |
# Defaults to 'vmms'. |
| 13 |
# |
| 14 |
# [*email*] |
| 15 |
# (Optional) Email for vmms user. |
| 16 |
# Defaults to 'vmms@localhost'. |
| 17 |
# |
| 18 |
# [*tenant*] |
| 19 |
# (Optional) Tenant for vmms user. |
| 20 |
# Defaults to 'services'. |
| 21 |
# |
| 22 |
# [*roles*] |
| 23 |
# (Optional) List of roles assigned to vmms user. |
| 24 |
# Defaults to ['admin'] |
| 25 |
# |
| 26 |
# [*system_scope*] |
| 27 |
# (Optional) Scope for system operations. |
| 28 |
# Defaults to 'all' |
| 29 |
# |
| 30 |
# [*system_roles*] |
| 31 |
# (Optional) List of system roles assigned to vmms user. |
| 32 |
# Defaults to [] |
| 33 |
# |
| 34 |
# [*configure_endpoint*] |
| 35 |
# (Optional) Should vmms endpoint be configured? |
| 36 |
# Defaults to true. |
| 37 |
# |
| 38 |
# [*configure_user*] |
| 39 |
# (Optional) Should the service user be configured? |
| 40 |
# Defaults to true. |
| 41 |
# |
| 42 |
# [*service_type*] |
| 43 |
# (Optional) Type of service. |
| 44 |
# Defaults to 'workflowv2'. |
| 45 |
# |
| 46 |
# [*public_url*] |
| 47 |
# (Optional) The endpoint's public url. |
| 48 |
# Defaults to 'http://127.0.0.1:9898/v2' |
| 49 |
# |
| 50 |
# [*internal_url*] |
| 51 |
# (Optional) The endpoint's internal url. |
| 52 |
# Defaults to 'http://127.0.0.1:9898/v2' |
| 53 |
# |
| 54 |
# [*admin_url*] |
| 55 |
# (Optional) The endpoint's admin url. |
| 56 |
# Defaults to 'http://127.0.0.1:9898/v2' |
| 57 |
# |
| 58 |
# [*region*] |
| 59 |
# (Optional) Region for endpoint. |
| 60 |
# Defaults to 'RegionOne'. |
| 61 |
# |
| 62 |
# [*service_name*] |
| 63 |
# (Optional) Name of the service. |
| 64 |
# Defaults to 'vmms'. |
| 65 |
# |
| 66 |
# [*configure_service*] |
| 67 |
# (Optional) Should vmms service be configured? |
| 68 |
# Defaults to true. |
| 69 |
# |
| 70 |
# [*service_description*] |
| 71 |
# (Optional) Description for keystone service. |
| 72 |
# Defaults to 'Openstack workflow Service'. |
| 73 |
|
| 74 |
# [*configure_user_role*] |
| 75 |
# (Optional) Whether to configure the admin role for the service user. |
| 76 |
# Defaults to true |
| 77 |
# |
| 78 |
class vmms::keystone::auth( |
| 79 |
String[1] $password, |
| 80 |
String[1] $email = 'vmms@localhost', |
| 81 |
String[1] $auth_name = 'vmms', |
| 82 |
String[1] $service_name = 'vmms', |
| 83 |
String[1] $service_type = 'vmms', |
| 84 |
Keystone::PublicEndpointUrl $public_url = 'http://127.0.0.1:9898/v2', |
| 85 |
Keystone::EndpointUrl $admin_url = 'http://127.0.0.1:9898/v2', |
| 86 |
Keystone::EndpointUrl $internal_url = 'http://127.0.0.1:9898/v2', |
| 87 |
String[1] $region = 'RegionOne', |
| 88 |
String[1] $tenant = 'services', |
| 89 |
Array[String[1]] $roles = ['admin'], |
| 90 |
String[1] $system_scope = 'all', |
| 91 |
Array[String[1]] $system_roles = [], |
| 92 |
Boolean $configure_endpoint = true, |
| 93 |
Boolean $configure_service = true, |
| 94 |
Boolean $configure_user = true, |
| 95 |
Boolean $configure_user_role = true, |
| 96 |
String[1] $service_description = 'OpenStack VM Migration Scheduler', |
| 97 |
) { |
| 98 |
|
| 99 |
include vmms::deps |
| 100 |
|
| 101 |
Keystone::Resource::Service_identity['vmms'] -> Anchor['vmms::service::end'] |
| 102 |
|
| 103 |
keystone::resource::service_identity { 'vmms': |
| 104 |
configure_user => $configure_user, |
| 105 |
configure_user_role => $configure_user_role, |
| 106 |
configure_endpoint => $configure_endpoint, |
| 107 |
service_type => $service_type, |
| 108 |
service_description => $service_description, |
| 109 |
service_name => $service_name, |
| 110 |
region => $region, |
| 111 |
auth_name => $auth_name, |
| 112 |
password => $password, |
| 113 |
email => $email, |
| 114 |
tenant => $tenant, |
| 115 |
roles => $roles, |
| 116 |
system_scope => $system_scope, |
| 117 |
system_roles => $system_roles, |
| 118 |
public_url => $public_url, |
| 119 |
admin_url => $admin_url, |
| 120 |
internal_url => $internal_url, |
| 121 |
} |
| 122 |
} |