Refactorise Keystone resources management
Refactorise the code of Keystone resources management with backward compatibility since we don't modify the unit tests. Change-Id: I745bca89bfa588df9dbeddc875f0be49975f638f Implements: blueprint common-openstack-identity-resource
This commit is contained in:
parent
6cf2a6dc8d
commit
6562ab43b5
@ -94,29 +94,19 @@ class tuskar::keystone::auth (
|
||||
$real_public_port = $public_port
|
||||
}
|
||||
|
||||
keystone_user { $auth_name:
|
||||
ensure => present,
|
||||
password => $password,
|
||||
email => $email,
|
||||
tenant => $tenant,
|
||||
}
|
||||
keystone_user_role { "${auth_name}@${tenant}":
|
||||
ensure => present,
|
||||
roles => 'admin',
|
||||
}
|
||||
keystone_service { $auth_name:
|
||||
ensure => present,
|
||||
type => $service_type,
|
||||
description => 'Tuskar Management Service',
|
||||
keystone::resource::service_identity { $auth_name:
|
||||
configure_user => true,
|
||||
configure_user_role => true,
|
||||
configure_endpoint => $configure_endpoint,
|
||||
service_type => $service_type,
|
||||
service_description => 'Tuskar Management Service',
|
||||
region => $region,
|
||||
password => $password,
|
||||
email => $email,
|
||||
tenant => $tenant,
|
||||
public_url => "${public_protocol}://${public_address}:${real_public_port}",
|
||||
internal_url => "${internal_protocol}://${internal_address}:${port}",
|
||||
admin_url => "${admin_protocol}://${admin_address}:${port}",
|
||||
}
|
||||
|
||||
if $configure_endpoint {
|
||||
keystone_endpoint { "${region}/${auth_name}":
|
||||
ensure => present,
|
||||
public_url => "${public_protocol}://${public_address}:${real_public_port}",
|
||||
internal_url => "${internal_protocol}://${internal_address}:${port}",
|
||||
admin_url => "${admin_protocol}://${admin_address}:${port}",
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user