From c316aaad3b4a0c244b435b9c19a317e8eca0d1dc Mon Sep 17 00:00:00 2001 From: Diana Clarke Date: Fri, 30 Dec 2016 14:27:15 -0600 Subject: [PATCH] Remove Rules.load_json warning The following warning appears in the nova unit test output (via PlacementLoggingTest.test_404_no_error_log). oslo_policy/policy.py:373: DeprecationWarning: The load_json() method is deprecated as of the 1.5.0 release in favor of load() and may be removed in the 2.0 release. Change-Id: I9f50027c73c8387c51aef73f0c8fd34976583b89 --- nova/api/openstack/placement/policy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nova/api/openstack/placement/policy.py b/nova/api/openstack/placement/policy.py index c1a3eacc06..bec4ce1a57 100644 --- a/nova/api/openstack/placement/policy.py +++ b/nova/api/openstack/placement/policy.py @@ -35,8 +35,7 @@ def placement_init(): # convenient for initial exploration. We will need to # determine how to manage authorization/policy and # implement that, probably per handler. - rules = policy.Rules.load_json( - jsonutils.dumps({'placement': 'role:admin'})) + rules = policy.Rules.load(jsonutils.dumps({'placement': 'role:admin'})) # Enforcer is initialized so that the above rule is loaded in and no # policy file is read. # TODO(alaski): Register a default rule rather than loading it in like