diff --git a/murano/common/policy.py b/murano/common/policy.py index 8759dd4c6..a648aabfb 100644 --- a/murano/common/policy.py +++ b/murano/common/policy.py @@ -96,16 +96,12 @@ def check(rule, ctxt, target=None, do_raise=True, exc=None): else: return result finally: - extra = {'policy': {'rule': rule, 'target': target}} - if result: LOG.debug("Policy check succeeded for rule {rule} on target " - "{target}".format(rule=rule, target=repr(target), - extra=extra)) + "{target}".format(rule=rule, target=repr(target))) else: LOG.debug("Policy check failed for rule {rule} on target: " - "{target}".format(rule=rule, target=repr(target), - extra=extra)) + "{target}".format(rule=rule, target=repr(target))) def check_is_admin(context): diff --git a/murano/tests/unit/api/v1/test_services.py b/murano/tests/unit/api/v1/test_services.py index ef97295f0..c75ba11ff 100644 --- a/murano/tests/unit/api/v1/test_services.py +++ b/murano/tests/unit/api/v1/test_services.py @@ -63,7 +63,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase): path = "/" request = self._post('/v1/environments/{0}/services'. - format(environment_id, session_id), b'', + format(environment_id), b'', **CREDENTIALS_1) request.headers['X-Configuration-Session'] = str(session_id) request.context.session = session_id @@ -105,7 +105,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase): path = "/" request = self._put('/v1/environments/{0}/services'. - format(environment_id, session_id), b'', + format(environment_id), b'', **CREDENTIALS_1) request.headers['X-Configuration-Session'] = str(session_id) request.context.session = session_id @@ -149,7 +149,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase): # Create service path = '/' request = self._post('/v1/environments/{0}/services'. - format(environment_id, session_id), b'', + format(environment_id), b'', **CREDENTIALS_1) request.headers['X-Configuration-Session'] = str(session_id) request.context.session = session_id @@ -202,7 +202,7 @@ class TestServicesApi(tb.ControllerTest, tb.MuranoApiTestCase): # Create service path = '/' request = self._post('/v1/environments/{0}/services'. - format(environment_id, session_id), b'', + format(environment_id), b'', **CREDENTIALS_1) request.headers['X-Configuration-Session'] = str(session_id) request.context.session = session_id