[Keystone] Fix keystone url

With switch to keystone::resource::service_identity we lost api version
string from keystone url. We now have CONFIG_KEYSTONE_API_VERSION option
which defaults to v2.0 but can be set to v3.

Change-Id: I6a8ebc18268a06c1eebffc78d9374e907cf92b4f
(cherry picked from commit 2d6e97c009)
This commit is contained in:
Lukas Bezdicka
2015-02-03 17:20:47 +01:00
parent 3562b2f88b
commit cfb45306df
2 changed files with 20 additions and 3 deletions

View File

@@ -116,6 +116,20 @@ def initConfig(controller):
"USE_DEFAULT": True,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "keystone-api-version",
"USAGE": "Keystone API version string",
"PROMPT": "Enter the Keystone API version string.",
"OPTION_LIST": ['v2.0', 'v3'],
"VALIDATORS": [validators.validate_options],
"DEFAULT_VALUE": 'v2.0',
"MASK_INPUT": False,
"LOOSE_VALIDATION": False,
"CONF_NAME": 'CONFIG_KEYSTONE_API_VERSION',
"USE_DEFAULT": True,
"NEED_CONFIRM": False,
"CONDITION": False},
]
group = {"GROUP_NAME": "KEYSTONE",
"DESCRIPTION": "Keystone Config parameters",

View File

@@ -4,6 +4,9 @@ $keystone_cfg_ks_db_pw = hiera('CONFIG_KEYSTONE_DB_PW')
$keystone_cfg_mariadb_host = hiera('CONFIG_MARIADB_HOST')
$keystone_endpoint_cfg_ctrl_host = hiera('CONFIG_CONTROLLER_HOST')
$keystone_token_provider_str = downcase(hiera('CONFIG_KEYSTONE_TOKEN_FORMAT'))
$keystone_api_version_str = hiera('CONFIG_KEYSTONE_API_VERSION')
$keystone_url = "http://${keystone_endpoint_cfg_ctrl_host}:5000/${keystone_api_version_str}"
$keystone_admin_url = "http://${keystone_endpoint_cfg_ctrl_host}:35357/${keystone_api_version_str}"
class { 'keystone':
admin_token => hiera('CONFIG_KEYSTONE_ADMIN_TOKEN'),
@@ -30,9 +33,9 @@ class { 'keystone::roles::admin':
}
keystone::resource::service_identity { 'keystone':
public_url => "http://${keystone_endpoint_cfg_ctrl_host}:5000",
internal_url => "http://${keystone_endpoint_cfg_ctrl_host}:5000",
admin_url => "http://${keystone_endpoint_cfg_ctrl_host}:35357",
public_url => $keystone_url,
internal_url => $keystone_url,
admin_url => $keystone_admin_url,
region => hiera('CONFIG_KEYSTONE_REGION'),
service_type => 'identity',
service_description => 'OpenStack Identity Service',