Revert "Add API for /v3/access_rules_config"
This reverts commit 8d31705806
.
In the Train PTG[1] we agreed to defer this feature until we had some
kind of traceability or discoverability for APIs and that this wasn't
feasible or useful until then.
This change was merged to master but never released, so I submit that
it is safe to revert.
[1] https://etherpad.openstack.org/p/keystone-train-ptg-application-credentials
Change-Id: Ibb48983f7edef1c2df50ba998f6a95741f933168
This commit is contained in:
parent
d2b5550214
commit
d7a2dd48e4
|
@ -10,7 +10,6 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystone.api import access_rules_config
|
||||
from keystone.api import auth
|
||||
from keystone.api import credentials
|
||||
from keystone.api import discovery
|
||||
|
@ -39,7 +38,6 @@ from keystone.api import trusts
|
|||
from keystone.api import users
|
||||
|
||||
__all__ = (
|
||||
'access_rules_config',
|
||||
'auth',
|
||||
'discovery',
|
||||
'credentials',
|
||||
|
@ -70,7 +68,6 @@ __all__ = (
|
|||
|
||||
__apis__ = (
|
||||
discovery,
|
||||
access_rules_config,
|
||||
auth,
|
||||
credentials,
|
||||
domains,
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This file handles all flask-restful resources for /v3/access_rules_config
|
||||
|
||||
from keystone.common import provider_api
|
||||
import keystone.conf
|
||||
from keystone.server import flask as ks_flask
|
||||
|
||||
|
||||
CONF = keystone.conf.CONF
|
||||
PROVIDERS = provider_api.ProviderAPIs
|
||||
|
||||
|
||||
class AccessRulesConfigResource(ks_flask.ResourceBase):
|
||||
collection_key = 'access_rules_config'
|
||||
|
||||
@ks_flask.unenforced_api
|
||||
def get(self, service=None):
|
||||
"""List all access rules config.
|
||||
|
||||
GET/HEAD /v3/access_rules_config
|
||||
"""
|
||||
refs = PROVIDERS.access_rules_config_api.list_access_rules_config(
|
||||
service=service)
|
||||
return refs
|
||||
|
||||
|
||||
class AccessRulesConfigAPI(ks_flask.APIBase):
|
||||
_name = 'access_rules_config'
|
||||
_import_name = __name__
|
||||
resources = []
|
||||
resource_mapping = [
|
||||
ks_flask.construct_resource_map(
|
||||
resource=AccessRulesConfigResource,
|
||||
url='/access_rules_config',
|
||||
resource_kwargs={},
|
||||
rel='access_rules_config')
|
||||
]
|
||||
|
||||
|
||||
APIs = (AccessRulesConfigAPI,)
|
|
@ -1,41 +0,0 @@
|
|||
# Copyright 2019 SUSE Linux GmbH
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves import http_client
|
||||
|
||||
from keystone.tests import unit
|
||||
from keystone.tests.unit.ksfixtures import access_rules_config
|
||||
from keystone.tests.unit import test_v3
|
||||
|
||||
|
||||
class AccessRulesConfigTestCase(test_v3.RestfulTestCase):
|
||||
"""Test list operation for access rules config."""
|
||||
|
||||
def setUp(self):
|
||||
super(AccessRulesConfigTestCase, self).setUp()
|
||||
rules_file = '%s/access_rules.json' % unit.TESTCONF
|
||||
self.useFixture(access_rules_config.AccessRulesConfig(
|
||||
self.config_fixture, rules_file=rules_file))
|
||||
self.load_backends()
|
||||
|
||||
def test_list_access_rules_config(self):
|
||||
with self.test_client() as c:
|
||||
token = self.get_scoped_token()
|
||||
resp = c.get('/v3/access_rules_config',
|
||||
expected_status_code=http_client.OK,
|
||||
headers={'X-Auth-Token': token})
|
||||
self.assertIn("identity", resp.json)
|
||||
self.assertIn("image", resp.json)
|
||||
self.assertIn("block-storage", resp.json)
|
||||
self.assertIn("compute", resp.json)
|
|
@ -641,9 +641,7 @@ V3_JSON_HOME_RESOURCES = {
|
|||
'href-template': APPLICATION_CREDENTIAL,
|
||||
'href-vars': {
|
||||
'application_credential_id': APPLICATION_CREDENTIAL_RELATION,
|
||||
'user_id': json_home.build_v3_parameter_relation('user_id')}},
|
||||
json_home.build_v3_resource_relation('access_rules_config'): {
|
||||
'href': '/access_rules_config'},
|
||||
'user_id': json_home.build_v3_parameter_relation('user_id')}}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue