From a5c5f5bce812fad3c6c88a23203bd6c00451e7b3 Mon Sep 17 00:00:00 2001 From: Brad Topol Date: Thu, 7 Jul 2016 14:49:30 -0700 Subject: [PATCH] Mark the domain config via API as stable The domain config via API is marked stable. Tests are updated and the cli for updating domain configs is marked deprecated. implements bp domain-config-as-stable Change-Id: I7bf0a914be13f88313c14bc196369de49cc7413f --- doc/source/configuration.rst | 6 ++++++ keystone/cmd/cli.py | 5 +++++ keystone/resource/routers.py | 12 ++++++------ keystone/tests/unit/test_versions.py | 18 ++++++------------ ...main-config-as-stable-716ca5ab33c0cc42.yaml | 12 ++++++++++++ 5 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 releasenotes/notes/bp-domain-config-as-stable-716ca5ab33c0cc42.yaml diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 1fcdd7edfa..f37aa91e9b 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -225,6 +225,12 @@ specifying the domain name: domain-specific backend, perhaps for storing service users in a predominantly LDAP installation. +.. NOTE:: + + Keystone has deprecated the ``keystone-manage domain_config_upload`` + option. The keystone team recommends setting domain config options via the + API instead. + Due to the need for user and group IDs to be unique across an OpenStack installation and for Keystone to be able to deduce which domain and backend to use from just a user or group ID, it dynamically builds a persistent identity diff --git a/keystone/cmd/cli.py b/keystone/cmd/cli.py index b31875437d..d4d329425a 100644 --- a/keystone/cmd/cli.py +++ b/keystone/cmd/cli.py @@ -812,6 +812,11 @@ class DomainConfigUpload(BaseApp): @staticmethod def main(): + versionutils.report_deprecated_feature( + LOG, + _LW("keystone-manage domain_config_upload is deprecated as of " + "Newton in favor of setting domain config options via the API " + "and may be removed in 'P' release.")) dcu = DomainConfigUploadFiles() status = dcu.run() if status is not None: diff --git a/keystone/resource/routers.py b/keystone/resource/routers.py index d58474e224..7de3d3d2c2 100644 --- a/keystone/resource/routers.py +++ b/keystone/resource/routers.py @@ -53,7 +53,7 @@ class Routers(wsgi.RoutersBase): patch_action='update_domain_config_only', delete_action='delete_domain_config', rel=json_home.build_v3_resource_relation('domain_config'), - status=json_home.Status.EXPERIMENTAL, + status=json_home.Status.STABLE, path_vars={ 'domain_id': json_home.Parameters.DOMAIN_ID }) @@ -67,7 +67,7 @@ class Routers(wsgi.RoutersBase): patch_action='update_domain_config_group', delete_action='delete_domain_config', rel=json_home.build_v3_resource_relation('domain_config_group'), - status=json_home.Status.EXPERIMENTAL, + status=json_home.Status.STABLE, path_vars={ 'domain_id': json_home.Parameters.DOMAIN_ID, 'group': config_group_param @@ -80,7 +80,7 @@ class Routers(wsgi.RoutersBase): patch_action='update_domain_config', delete_action='delete_domain_config', rel=json_home.build_v3_resource_relation('domain_config_option'), - status=json_home.Status.EXPERIMENTAL, + status=json_home.Status.STABLE, path_vars={ 'domain_id': json_home.Parameters.DOMAIN_ID, 'group': config_group_param, @@ -93,7 +93,7 @@ class Routers(wsgi.RoutersBase): path='/domains/config/default', get_action='get_domain_config_default', rel=json_home.build_v3_resource_relation('domain_config_default'), - status=json_home.Status.EXPERIMENTAL) + status=json_home.Status.STABLE) self._add_resource( mapper, config_controller, @@ -101,7 +101,7 @@ class Routers(wsgi.RoutersBase): get_action='get_domain_config_default', rel=json_home.build_v3_resource_relation( 'domain_config_default_group'), - status=json_home.Status.EXPERIMENTAL, + status=json_home.Status.STABLE, path_vars={ 'group': config_group_param }) @@ -112,7 +112,7 @@ class Routers(wsgi.RoutersBase): get_action='get_domain_config_default', rel=json_home.build_v3_resource_relation( 'domain_config_default_option'), - status=json_home.Status.EXPERIMENTAL, + status=json_home.Status.STABLE, path_vars={ 'group': config_group_param, 'option': json_home.build_v3_parameter_relation( diff --git a/keystone/tests/unit/test_versions.py b/keystone/tests/unit/test_versions.py index 7d2bed1e7c..61cb77c650 100644 --- a/keystone/tests/unit/test_versions.py +++ b/keystone/tests/unit/test_versions.py @@ -583,37 +583,31 @@ V3_JSON_HOME_RESOURCES = { 'href-template': '/domains/{domain_id}/config', 'href-vars': { - 'domain_id': json_home.Parameters.DOMAIN_ID}, - 'hints': {'status': 'experimental'}}, + 'domain_id': json_home.Parameters.DOMAIN_ID}}, json_home.build_v3_resource_relation('domain_config_group'): { 'href-template': '/domains/{domain_id}/config/{group}', 'href-vars': { 'domain_id': json_home.Parameters.DOMAIN_ID, - 'group': json_home.build_v3_parameter_relation('config_group')}, - 'hints': {'status': 'experimental'}}, + 'group': json_home.build_v3_parameter_relation('config_group')}}, json_home.build_v3_resource_relation('domain_config_option'): { 'href-template': '/domains/{domain_id}/config/{group}/{option}', 'href-vars': { 'domain_id': json_home.Parameters.DOMAIN_ID, 'group': json_home.build_v3_parameter_relation('config_group'), - 'option': json_home.build_v3_parameter_relation('config_option')}, - 'hints': {'status': 'experimental'}}, + 'option': json_home.build_v3_parameter_relation('config_option')}}, json_home.build_v3_resource_relation('domain_config_default'): { - 'href': '/domains/config/default', - 'hints': {'status': 'experimental'}}, + 'href': '/domains/config/default'}, json_home.build_v3_resource_relation('domain_config_default_group'): { 'href-template': '/domains/config/{group}/default', 'href-vars': { - 'group': json_home.build_v3_parameter_relation('config_group')}, - 'hints': {'status': 'experimental'}}, + 'group': json_home.build_v3_parameter_relation('config_group')}}, json_home.build_v3_resource_relation('domain_config_default_option'): { 'href-template': '/domains/config/{group}/{option}/default', 'href-vars': { 'group': json_home.build_v3_parameter_relation('config_group'), - 'option': json_home.build_v3_parameter_relation('config_option')}, - 'hints': {'status': 'experimental'}}, + 'option': json_home.build_v3_parameter_relation('config_option')}} } diff --git a/releasenotes/notes/bp-domain-config-as-stable-716ca5ab33c0cc42.yaml b/releasenotes/notes/bp-domain-config-as-stable-716ca5ab33c0cc42.yaml new file mode 100644 index 0000000000..aecc4e9dc2 --- /dev/null +++ b/releasenotes/notes/bp-domain-config-as-stable-716ca5ab33c0cc42.yaml @@ -0,0 +1,12 @@ +--- +features: + - > + [`blueprint domain-config-as-stable `_] + The domain config via API is now marked as stable. +deprecations: + - > + [`blueprint domain-config-as-stable `_] + Deprecated ``keystone-manage domain_config_upload``. The keystone team recommends + setting domain config options via the API instead. The ``domain_config_upload`` + command line option may be removed in the 'P' release. +