Remove shiro.ini conversion script 49/66949/1
authorRyan Goulding <ryandgoulding@gmail.com>
Mon, 8 Jan 2018 17:18:17 +0000 (12:18 -0500)
committerRyan Goulding <ryandgoulding@gmail.com>
Mon, 8 Jan 2018 17:39:32 +0000 (12:39 -0500)
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 <ryandgoulding@gmail.com>
aaa-shiro/impl/pom.xml
aaa-shiro/impl/src/main/resources/convert-shiro-ini-to-rest-payload.py [deleted file]
aaa-shiro/impl/src/main/resources/initial/aaa-app-config.xml
artifacts/pom.xml
features/odl-aaa-shiro/pom.xml
features/odl-aaa-shiro/src/main/feature/feature.xml

index 8bc0657be114fdae99a4d0895d8c107da77440a1..43d0774171f75ad563ebc4c5153ae348e73a4552 100644 (file)
@@ -327,16 +327,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
                                     <type>xml</type>
                                     <classifier>aaa-app-config</classifier>
                                 </artifact>
-                <artifact>
-                  <file>${project.build.directory}/classes/initial/aaa-datastore-config.xml</file>
-                  <type>xml</type>
-                  <classifier>aaa-datastore-config</classifier>
-                </artifact>
-                                <!-- attach convert-shiro-ini-to-rest-payload.py as an artifact -->
                                 <artifact>
-                                    <file>${project.build.directory}/classes/convert-shiro-ini-to-rest-payload.py</file>
-                                    <type>py</type>
-                                    <classifier>convert-shiro-ini</classifier>
+                                    <file>${project.build.directory}/classes/initial/aaa-datastore-config.xml</file>
+                                    <type>xml</type>
+                                    <classifier>aaa-datastore-config</classifier>
                                 </artifact>
                             </artifacts>
                         </configuration>
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 (file)
index 6a2f721..0000000
+++ /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 <filename>"
-
-if __name__ == '__main__':
-    try:
-        filename = sys.argv[1]
-        et = convert(filename)
-        xmlstr = minidom.parseString(tostring(et)).toprettyxml(indent="    ")
-        print xmlstr
-    except(IndexError):
-        usage()
index 51ad1317b552dd8e3251624bba27ddd565748ac0..8645c2f4b9045ece7aae569f30f380019912fc6d 100644 (file)
       // 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 <filename>             //
-      // This will make a best attempt effort to create an XML payload from the given  //
-      // shiro.ini file, and produce the results on stdout.                            //
       ///////////////////////////////////////////////////////////////////////////////////
     -->
 
index f1b7285d44419c64142d18d63e3a4e3f4130bcde..3dba6440997539a539b9ca15e464634abb052f8c 100644 (file)
                 <classifier>config</classifier>
                 <type>xml</type>
             </dependency>
-            <dependency>
-                <groupId>org.opendaylight.aaa</groupId>
-                <artifactId>aaa-shiro</artifactId>
-                <version>${project.version}</version>
-                <type>py</type>
-                <classifier>convert-shiro-ini</classifier>
-            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>features-aaa</artifactId>
index 9064964d4ff941f968e7422d0caede59fe61f416..528d033dd61b178bcbc01c8aab9360a98e9847d2 100644 (file)
             <type>xml</type>
             <classifier>aaa-datastore-config</classifier>
         </dependency>
-        <!-- a conversion utility for upgrades -->
-        <dependency>
-            <groupId>org.opendaylight.aaa</groupId>
-            <artifactId>aaa-shiro</artifactId>
-            <version>${project.version}</version>
-            <type>py</type>
-            <classifier>convert-shiro-ini</classifier>
-        </dependency>
         <!-- add in standard jetty servlets bundle which exposes all sorts of useful filters
              that can be added in front of RESTCONF. -->
         <dependency>
             <classifier>config</classifier>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
index d80fba57808fb368e1f8dc88e27cf98571deaebd..dcad39567cd72aca69f06a65a6ba708adc18077f 100644 (file)
@@ -14,9 +14,6 @@
         <configfile finalname="etc/opendaylight/datastore/initial/config/aaa-datastore-config.xml">
             mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/xml/aaa-datastore-config
         </configfile>
-        <configfile finalname="bin/upgrade/convert-shiro-ini-to-rest-payload">
-            mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/py/convert-shiro-ini
-        </configfile>
         <configfile finalname="bin/idmtool">
             mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/py/idmtool
         </configfile>