X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-starlingx%2Fmeta-stx-integ%2Frecipes-devtools%2Fpython%2Ffiles%2Fpython-keystone%2Fconvert_keystone_backend.py;fp=meta-starlingx%2Fmeta-stx-integ%2Frecipes-devtools%2Fpython%2Ffiles%2Fpython-keystone%2Fconvert_keystone_backend.py;h=0000000000000000000000000000000000000000;hb=6fc6934434f70595536a387ece31bc30141cafb5;hp=eebd59d90f4af599149b60ab703c195ea49e009a;hpb=eb1e26510491ba49de693ab3b0498edcb06be6c5;p=pti%2Frtp.git diff --git a/meta-starlingx/meta-stx-integ/recipes-devtools/python/files/python-keystone/convert_keystone_backend.py b/meta-starlingx/meta-stx-integ/recipes-devtools/python/files/python-keystone/convert_keystone_backend.py deleted file mode 100755 index eebd59d..0000000 --- a/meta-starlingx/meta-stx-integ/recipes-devtools/python/files/python-keystone/convert_keystone_backend.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python - -import sys -import ConfigParser -import shutil - -path = "/etc/keystone/keystone.conf" - -if len(sys.argv) != 2: - sys.stderr.write("Usage: "+sys.argv[0]+" [sql|hybrid]\n") - sys.exit(1) - -backend = sys.argv[1] -if backend == "hybrid": - identity_backend = 'keystone.identity.backends.hybrid_identity.Identity' - assignment_backend = 'keystone.assignment.backends.hybrid_assignment.Assignment' -elif backend == "sql": - identity_backend = 'keystone.identity.backends.sql.Identity' - assignment_backend = 'keystone.assignment.backends.sql.Assignment' -else: - sys.stderr.write("Usage: "+sys.argv[0]+" [sql|hybrid]\n") - sys.exit(1) - -shutil.copyfile(path, path + ".bak") - -cfg = ConfigParser.ConfigParser() -c = cfg.read(path) - -if not cfg.has_section("identity"): - cfg.add_section("identity") - -cfg.set("identity", "driver", identity_backend) - -if not cfg.has_section("assignment"): - cfg.add_section("assignment") - -cfg.set("assignment", "driver", assignment_backend) - -fp = open(path, "w") -cfg.write(fp) -fp.close() - -exit(0)