From d3a95e0d358d15dc644b6d3f32f8d67fbb9155aa Mon Sep 17 00:00:00 2001 From: Ryan Goulding Date: Mon, 8 Jan 2018 12:18:17 -0500 Subject: [PATCH] Remove shiro.ini conversion script shiro.ini was done away with many releases ago. As part of its removal, the AAA team added a conversion script to convert the shiro.ini file into a format that could be recognized by the aaa clustered-app-config. Since the shiro.ini based approach has been gone for over a release, this patch removes the conversion script since it should no longer be needed. Change-Id: I6866ae1faea0362251ff26fabc8f6df360acde08 Signed-off-by: Ryan Goulding --- aaa-shiro/impl/pom.xml | 12 +--- .../convert-shiro-ini-to-rest-payload.py | 65 ------------------- .../main/resources/initial/aaa-app-config.xml | 5 -- artifacts/pom.xml | 7 -- features/odl-aaa-shiro/pom.xml | 10 +-- .../src/main/feature/feature.xml | 3 - 6 files changed, 4 insertions(+), 98 deletions(-) delete mode 100644 aaa-shiro/impl/src/main/resources/convert-shiro-ini-to-rest-payload.py diff --git a/aaa-shiro/impl/pom.xml b/aaa-shiro/impl/pom.xml index 8bc0657be..43d077417 100644 --- a/aaa-shiro/impl/pom.xml +++ b/aaa-shiro/impl/pom.xml @@ -327,16 +327,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html xml aaa-app-config - - ${project.build.directory}/classes/initial/aaa-datastore-config.xml - xml - aaa-datastore-config - - - ${project.build.directory}/classes/convert-shiro-ini-to-rest-payload.py - py - convert-shiro-ini + ${project.build.directory}/classes/initial/aaa-datastore-config.xml + xml + aaa-datastore-config diff --git a/aaa-shiro/impl/src/main/resources/convert-shiro-ini-to-rest-payload.py b/aaa-shiro/impl/src/main/resources/convert-shiro-ini-to-rest-payload.py deleted file mode 100644 index 6a2f72144..000000000 --- a/aaa-shiro/impl/src/main/resources/convert-shiro-ini-to-rest-payload.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/env python - -# -# Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License v1.0 which accompanies this distribution, -# and is available at http://www.eclipse.org/legal/epl-v10.html -# - -# -# convert-shiro-ini-to-rest-payload.py -# -# Used to help ease upgrades. In ODL Nitrogen, AAA related application config -# is now done via the datastore. This allows a more cohesive experience in -# line with the rest of the controller architecture. More information about -# this can be found here: -# -# https://bugs.opendaylight.org/show_bug.cgi?id=7793 -# -# This program assumes a correctly formatted shiro.ini file. No extra checks -# are done on shiro.ini. -# - -import sys, ConfigParser -from xml.etree.ElementTree import Element, SubElement, tostring -from xml.dom import minidom - - -SHIRO_CONFIGURATION = "shiro-configuration" -NS = "urn:opendaylight:aaa:app:config" -MAIN_SECTION = "main" -URLS_SECTION = "urls" - -def convert(filename): - ''' - convert shiro.ini to a XML based representation - ''' - config = ConfigParser.ConfigParser() - config.optionxform = str - config.read(filename) - root = Element(SHIRO_CONFIGURATION) - root.attrib['xmlns'] = NS - for section in config.sections(): - if MAIN_SECTION in section or URLS_SECTION in section: - for item in config.items(section): - child = SubElement(root, section) - k = SubElement(child, "pair-key") - k.text = item[0] - v = SubElement(child, "pair-value") - v.text = item[1] - return root - -def usage(): - print "Usage:" - print "> python convert-shiro-ini-to-rest " - -if __name__ == '__main__': - try: - filename = sys.argv[1] - et = convert(filename) - xmlstr = minidom.parseString(tostring(et)).toprettyxml(indent=" ") - print xmlstr - except(IndexError): - usage() diff --git a/aaa-shiro/impl/src/main/resources/initial/aaa-app-config.xml b/aaa-shiro/impl/src/main/resources/initial/aaa-app-config.xml index 51ad1317b..8645c2f4b 100644 --- a/aaa-shiro/impl/src/main/resources/initial/aaa-app-config.xml +++ b/aaa-shiro/impl/src/main/resources/initial/aaa-app-config.xml @@ -35,11 +35,6 @@ // 2) to allow bootstrap of the controller (first time start) since otherwise // // configuration becomes a chicken and the egg problem. // // // - // If you have an existing shiro.ini file, one way you can convert it is by // - // using the utilty script: // - // > python bin/upgrade/convert-shiro-ini-to-rest-payload // - // This will make a best attempt effort to create an XML payload from the given // - // shiro.ini file, and produce the results on stdout. // /////////////////////////////////////////////////////////////////////////////////// --> diff --git a/artifacts/pom.xml b/artifacts/pom.xml index f1b7285d4..3dba64409 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -135,13 +135,6 @@ config xml - - org.opendaylight.aaa - aaa-shiro - ${project.version} - py - convert-shiro-ini - ${project.groupId} features-aaa diff --git a/features/odl-aaa-shiro/pom.xml b/features/odl-aaa-shiro/pom.xml index 9064964d4..528d033dd 100644 --- a/features/odl-aaa-shiro/pom.xml +++ b/features/odl-aaa-shiro/pom.xml @@ -131,14 +131,6 @@ xml aaa-datastore-config - - - org.opendaylight.aaa - aaa-shiro - ${project.version} - py - convert-shiro-ini - @@ -244,4 +236,4 @@ config - \ No newline at end of file + diff --git a/features/odl-aaa-shiro/src/main/feature/feature.xml b/features/odl-aaa-shiro/src/main/feature/feature.xml index d80fba578..dcad39567 100644 --- a/features/odl-aaa-shiro/src/main/feature/feature.xml +++ b/features/odl-aaa-shiro/src/main/feature/feature.xml @@ -14,9 +14,6 @@ mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/xml/aaa-datastore-config - - mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/py/convert-shiro-ini - mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/py/idmtool -- 2.36.6