summaryrefslogtreecommitdiffstats
path: root/base/common/python/pki
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2015-10-27 02:56:21 +0100
committerEndi S. Dewata <edewata@redhat.com>2015-10-30 19:02:56 +0100
commitc7bc6eb94aa64c89467f9394554f860dc485ad94 (patch)
treec2de2f28f0195a2d4c0744f660252ebb5a568fb1 /base/common/python/pki
parent8b5c3cf9b37e5b3be44b777545fb1887c2fb75d2 (diff)
downloadpki-c7bc6eb94aa64c89467f9394554f860dc485ad94.tar.gz
pki-c7bc6eb94aa64c89467f9394554f860dc485ad94.tar.xz
pki-c7bc6eb94aa64c89467f9394554f860dc485ad94.zip
Added automatic Tomcat migration.
The pki-core.spec has been modified to execute pki-server migrate when the package is installed. This way when upgrading from F22 to F23 all PKI instances will be migrated automatically to Tomcat 8. The pki-server migrate command has been modified such that if there is no specific Tomcat version specified it will use the current Tomcat version. The top attribute in the CLI class was not functioning properly, so it has been replaced with get_top_module() method. The getopt() invocations in pki-server subcommands have been replaced with gnu_getopt() to allow intermixing options and arguments. https://fedorahosted.org/pki/ticket/1310
Diffstat (limited to 'base/common/python/pki')
-rw-r--r--base/common/python/pki/cli.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/base/common/python/pki/cli.py b/base/common/python/pki/cli.py
index 802ef01aa..6c51c2384 100644
--- a/base/common/python/pki/cli.py
+++ b/base/common/python/pki/cli.py
@@ -34,7 +34,6 @@ class CLI(object):
self.name = name
self.description = description
self.parent = None
- self.top = self
self.verbose = False
self.debug = False
@@ -62,11 +61,15 @@ class CLI(object):
def add_module(self, module):
self.modules[module.name] = module
module.parent = self
- module.top = self.top
def get_module(self, name):
return self.modules.get(name)
+ def get_top_module(self):
+ if self.parent:
+ return self.parent.get_top_module()
+ return self
+
def print_message(self, message):
print('-' * len(message))
print(message)