diff options
| author | Ade Lee <alee@redhat.com> | 2013-05-04 02:47:49 -0400 |
|---|---|---|
| committer | Ade Lee <alee@redhat.com> | 2013-05-04 14:50:39 -0400 |
| commit | 9d00ecc4005ce029525512ab4cdcfe1e26065bfa (patch) | |
| tree | 36477396389e69dfe62e2a9b3f70c821b136e4de /base/common/python | |
| parent | 328f0b843ca7ec274ac965839b9a03cd81f6844f (diff) | |
| download | pki-9d00ecc4005ce029525512ab4cdcfe1e26065bfa.tar.gz pki-9d00ecc4005ce029525512ab4cdcfe1e26065bfa.tar.xz pki-9d00ecc4005ce029525512ab4cdcfe1e26065bfa.zip | |
Fix tests in pkispawn to use legacy URLs as fallback
When setting up clones or non-CA subsystems, pkispawn checks if
the security domain is accessible and if the user can log in.
These calls invoke REST URIs, which are not available on older
subsystems. To support these subsystems, we need to attempt the
older legacy servlets if the REST APIs are not available.
Ticket #604
Diffstat (limited to 'base/common/python')
| -rw-r--r-- | base/common/python/pki/system.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/common/python/pki/system.py b/base/common/python/pki/system.py index 3c54e0015..5b4caf7f3 100644 --- a/base/common/python/pki/system.py +++ b/base/common/python/pki/system.py @@ -20,6 +20,7 @@ # import pki.encoder as encoder +import xml.etree.ElementTree as ET class SecurityDomainInfo: @@ -40,6 +41,15 @@ class SecurityDomainClient: return info + def getOldSecurityDomainInfo(self): + r = self.connection.get('/admin/ca/getDomainXML') + root = ET.fromstring(r.text) + domaininfo = ET.fromstring(root.find("DomainInfo").text) + info = SecurityDomainInfo() + info.name = domaininfo.find("Name").text + + return info + class ConfigurationRequest: def __init__(self): |
