Refactorise Keystone resources management
Refactorise the code of Keystone resources management with backward compatibility since we don't modify the unit tests. Change-Id: I8fc27ea6cc49a4c0c518f7314b3277d6980491b4 Implements: blueprint common-openstack-identity-resource
This commit is contained in:
parent
bbecaab2ff
commit
552d55fe5d
@ -94,37 +94,24 @@ class neutron::keystone::auth (
|
|||||||
|
|
||||||
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'neutron-server' |>
|
Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| name == 'neutron-server' |>
|
||||||
|
|
||||||
if $configure_user {
|
|
||||||
keystone_user { $auth_name:
|
|
||||||
ensure => present,
|
|
||||||
password => $password,
|
|
||||||
email => $email,
|
|
||||||
tenant => $tenant,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $configure_user_role {
|
if $configure_user_role {
|
||||||
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'neutron-server' |>
|
Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| name == 'neutron-server' |>
|
||||||
|
|
||||||
keystone_user_role { "${auth_name}@${tenant}":
|
|
||||||
ensure => present,
|
|
||||||
roles => 'admin',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
keystone_service { $real_service_name:
|
keystone::resource::service_identity { $auth_name:
|
||||||
ensure => present,
|
configure_user => $configure_user,
|
||||||
type => $service_type,
|
configure_user_role => $configure_user_role,
|
||||||
description => 'Neutron Networking Service',
|
configure_endpoint => $configure_endpoint,
|
||||||
|
service_type => $service_type,
|
||||||
|
service_description => 'Neutron Networking Service',
|
||||||
|
service_name => $real_service_name,
|
||||||
|
region => $region,
|
||||||
|
password => $password,
|
||||||
|
email => $email,
|
||||||
|
tenant => $tenant,
|
||||||
|
public_url => "${public_protocol}://${public_address}:${real_public_port}/",
|
||||||
|
admin_url => "${admin_protocol}://${admin_address}:${port}/",
|
||||||
|
internal_url => "${internal_protocol}://${internal_address}:${port}/",
|
||||||
}
|
}
|
||||||
|
|
||||||
if $configure_endpoint {
|
|
||||||
keystone_endpoint { "${region}/${real_service_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…
x
Reference in New Issue
Block a user