diff --git a/src/spaceone/config/conf/global_conf.py b/src/spaceone/config/conf/global_conf.py index fee3330..f175814 100644 --- a/src/spaceone/config/conf/global_conf.py +++ b/src/spaceone/config/conf/global_conf.py @@ -1,5 +1,5 @@ DATABASE_AUTO_CREATE_INDEX = True -DATABASE_SUPPORT_AWS_DOCUMENT_DB = False +DATABASE_CASE_INSENSITIVE_INDEX = False DATABASES = { 'default': { 'db': 'config', diff --git a/src/spaceone/config/service/domain_config_service.py b/src/spaceone/config/service/domain_config_service.py index b8cb358..2cf1291 100644 --- a/src/spaceone/config/service/domain_config_service.py +++ b/src/spaceone/config/service/domain_config_service.py @@ -15,7 +15,7 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.domain_config_mgr: DomainConfigManager = self.locator.get_manager('DomainConfigManager') - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'data', 'domain_id']) def create(self, params): """Create config map @@ -35,7 +35,7 @@ def create(self, params): return self.domain_config_mgr.create_domain_config(params) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'domain_id']) def update(self, params): """Update config map @@ -54,7 +54,7 @@ def update(self, params): """ return self.domain_config_mgr.update_domain_config(params) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'domain_id']) def delete(self, params): """Delete config map @@ -71,7 +71,7 @@ def delete(self, params): self.domain_config_mgr.delete_domain_config(params['name'], params['domain_id']) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'domain_id']) def get(self, params): """Get config map @@ -89,7 +89,7 @@ def get(self, params): return self.domain_config_mgr.get_domain_config(params['name'], params['domain_id'], params.get('only')) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['domain_id']) @append_query_filter(['name', 'domain_id']) @change_tag_filter('tags') @@ -112,7 +112,7 @@ def list(self, params): query = params.get('query', {}) return self.domain_config_mgr.list_domain_configs(query) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['query', 'domain_id']) @append_query_filter(['domain_id']) @change_tag_filter('tags') diff --git a/src/spaceone/config/service/user_config_service.py b/src/spaceone/config/service/user_config_service.py index 041806d..d7ca20a 100644 --- a/src/spaceone/config/service/user_config_service.py +++ b/src/spaceone/config/service/user_config_service.py @@ -15,7 +15,7 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.user_config_mgr: UserConfigManager = self.locator.get_manager('UserConfigManager') - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'data', 'domain_id']) def create(self, params): """Create config map @@ -34,7 +34,7 @@ def create(self, params): return self.user_config_mgr.create_user_config(params) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'domain_id']) def update(self, params): """Update config map @@ -52,7 +52,7 @@ def update(self, params): """ return self.user_config_mgr.update_user_config(params) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'domain_id']) def delete(self, params): """Delete config map @@ -69,7 +69,7 @@ def delete(self, params): self.user_config_mgr.delete_user_config(params['name'], params['domain_id']) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['name', 'domain_id']) def get(self, params): """Get config map @@ -87,7 +87,7 @@ def get(self, params): return self.user_config_mgr.get_user_config(params['name'], params['domain_id'], params.get('only')) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['domain_id']) @append_query_filter(['name', 'domain_id']) @change_tag_filter('tags') @@ -110,7 +110,7 @@ def list(self, params): query = params.get('query', {}) return self.user_config_mgr.list_user_configs(query) - @transaction + @transaction(append_meta={'authorization.scope': 'DOMAIN'}) @check_required(['query', 'domain_id']) @append_query_filter(['domain_id']) @change_tag_filter('tags') diff --git a/test/service/test_domain_config_service.py b/test/service/test_domain_config_service.py index 2137f8e..500aa3e 100644 --- a/test/service/test_domain_config_service.py +++ b/test/service/test_domain_config_service.py @@ -20,8 +20,6 @@ class TestDomainConfigService(unittest.TestCase): @classmethod def setUpClass(cls): config.init_conf(package='spaceone.config') - config.set_service_config() - config.set_global(DATABASE_SUPPORT_AWS_DOCUMENT_DB=True) connect('test', host='mongomock://localhost') cls.domain_id = utils.generate_id('domain') diff --git a/test/service/test_user_config_service.py b/test/service/test_user_config_service.py index cecb132..7711898 100644 --- a/test/service/test_user_config_service.py +++ b/test/service/test_user_config_service.py @@ -20,8 +20,6 @@ class TestUserConfigService(unittest.TestCase): @classmethod def setUpClass(cls): config.init_conf(package='spaceone.config') - config.set_service_config() - config.set_global(DATABASE_SUPPORT_AWS_DOCUMENT_DB=True) connect('test', host='mongomock://localhost') cls.domain_id = utils.generate_id('domain')