From 0cada3c8ba80353935f17e0cfd4a929a43f1cfc7 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Wed, 3 Aug 2022 19:05:38 +0000 Subject: [PATCH] Fix zuul fail due to sysinv method signature change The sysinv method is no longer valid. The code needs to be updated to accomodate the new signature. Test Plan: PASS: upload/apply a patch PASS: Apply a patch using NFV Closes-Bug: #1983504 Signed-off-by: Al Bailey Change-Id: I12a8defabc64155dd085f028b12c2d67bb52d99d --- cgcs-patch/cgcs-patch/cgcs_patch/authapi/policy.py | 5 +++-- sw-patch/cgcs-patch/cgcs_patch/authapi/policy.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cgcs-patch/cgcs-patch/cgcs_patch/authapi/policy.py b/cgcs-patch/cgcs-patch/cgcs_patch/authapi/policy.py index 285c6a16..05ac343c 100755 --- a/cgcs-patch/cgcs-patch/cgcs_patch/authapi/policy.py +++ b/cgcs-patch/cgcs-patch/cgcs_patch/authapi/policy.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. # -# Copyright (c) 2014-2017 Wind River Systems, Inc. +# Copyright (c) 2014-2022 Wind River Systems, Inc. # """Policy Engine For Patching.""" @@ -51,7 +51,8 @@ def init(): def _set_rules(data): default_rule = "rule:admin_api" - policy.set_rules(policy.Rules.load_json(data, default_rule)) + rules = policy.Rules.load_rules(data, default_rule, []) + policy.set_rules(rules) def enforce(context, action, target, do_raise=True): diff --git a/sw-patch/cgcs-patch/cgcs_patch/authapi/policy.py b/sw-patch/cgcs-patch/cgcs_patch/authapi/policy.py index cb529c5e..496320aa 100755 --- a/sw-patch/cgcs-patch/cgcs_patch/authapi/policy.py +++ b/sw-patch/cgcs-patch/cgcs_patch/authapi/policy.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. # -# Copyright (c) 2014-2017 Wind River Systems, Inc. +# Copyright (c) 2014-2022 Wind River Systems, Inc. # """Policy Engine For Patching.""" @@ -52,7 +52,8 @@ def init(): def _set_rules(data): default_rule = "rule:admin_api" - policy.set_rules(policy.Rules.load_json(data, default_rule)) + rules = policy.Rules.load_rules(data, default_rule, []) + policy.set_rules(rules) def enforce(context, action, target, do_raise=True):