]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/barbican: dont copy policy files 49999/head 50000/head
authorTobias Urdin <tobias.urdin@binero.se>
Thu, 22 Sep 2022 19:26:14 +0000 (19:26 +0000)
committerShilpa Jagannath <smanjara@redhat.com>
Mon, 6 Feb 2023 08:17:18 +0000 (03:17 -0500)
In newer versions the policies is inside the code
so we don't need these files for default policy
anymore.

Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
(cherry picked from commit d6f5e49f3b7af110f5a18fca918d7ba3de1b3d31)

qa/tasks/barbican.py

index 7e2b77a42f1e4e63b209aaff053338921698190d..70bd734053aee66f5ee1a2d9119e6dd5003dc239 100644 (file)
@@ -8,7 +8,6 @@ import http
 import json
 import time
 import math
-import os
 
 from urllib.parse import urlparse
 
@@ -158,16 +157,6 @@ def fix_barbican_api(ctx, cclient):
                          '/prop_dir =/ s#etc/barbican#{}/etc/barbican#'.format(get_barbican_dir(ctx)),
                          'bin/barbican-api'])
 
-def copy_policy_file(ctx, cclient):
-    policy_json_path = get_barbican_dir(ctx)+'/etc/barbican/policy.json'
-    if os.path.exists(policy_json_path):
-        run_in_barbican_dir(ctx, cclient,
-                            ['cp', policy_json_path, get_barbican_dir(ctx)])
-    policy_yaml_path = get_barbican_dir(ctx)+'/etc/barbican/policy.yaml'
-    if os.path.exists(policy_yaml_path):
-        run_in_barbican_dir(ctx, cclient,
-                            ['cp', policy_yaml_path, get_barbican_dir(ctx)])
-
 def create_barbican_conf(ctx, cclient):
     barbican_host, barbican_port = ctx.barbican.endpoints[cclient]
     barbican_url = 'http://{host}:{port}'.format(host=barbican_host,
@@ -202,7 +191,6 @@ def configure_barbican(ctx, config):
     set_authtoken_params(ctx, cclient, cconfig)
     fix_barbican_api(ctx, cclient)
     fix_barbican_api_paste(ctx, cclient)
-    copy_policy_file(ctx, cclient)
     create_barbican_conf(ctx, cclient)
     try:
         yield