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
|
$real_public_port = $public_port
|
||||||
}
|
}
|
||||||
|
|
||||||
keystone_user { $auth_name:
|
keystone::resource::service_identity { $auth_name:
|
||||||
ensure => present,
|
configure_user => true,
|
||||||
password => $password,
|
configure_user_role => true,
|
||||||
email => $email,
|
configure_endpoint => $configure_endpoint,
|
||||||
tenant => $tenant,
|
service_type => $service_type,
|
||||||
}
|
service_description => 'Tuskar Management Service',
|
||||||
keystone_user_role { "${auth_name}@${tenant}":
|
region => $region,
|
||||||
ensure => present,
|
password => $password,
|
||||||
roles => 'admin',
|
email => $email,
|
||||||
}
|
tenant => $tenant,
|
||||||
keystone_service { $auth_name:
|
public_url => "${public_protocol}://${public_address}:${real_public_port}",
|
||||||
ensure => present,
|
internal_url => "${internal_protocol}://${internal_address}:${port}",
|
||||||
type => $service_type,
|
admin_url => "${admin_protocol}://${admin_address}:${port}",
|
||||||
description => 'Tuskar Management Service',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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