Fix xmldsig import
After commit https://goo.gl/TjLQFz to pysaml2, xmldsig was moved under saml2, no longer being at the top level. Craeting a conditional import, so it can work now and when the pysaml2 commit is included in a new release. Conflicts: keystone/contrib/federation/idp.py keystone/tests/unit/test_v3_federation.py Change-Id: If01a93a18cef6159adad50496e6335e88f86024d (cherry picked from commitc90dd3a0f8
) (cherry picked from commitafaaf1180b
)
This commit is contained in:
parent
5ca4e59f28
commit
523cffaf24
|
@ -20,15 +20,19 @@ from saml2 import md
|
|||
from saml2 import saml
|
||||
from saml2 import samlp
|
||||
from saml2 import sigver
|
||||
import xmldsig
|
||||
|
||||
from keystone.common import config
|
||||
from keystone import exception
|
||||
from keystone.i18n import _, _LE
|
||||
from keystone.openstack.common import fileutils
|
||||
from keystone.openstack.common import importutils
|
||||
from keystone.openstack.common import log
|
||||
from keystone.openstack.common import timeutils
|
||||
|
||||
xmldsig = importutils.try_import("saml2.xmldsig")
|
||||
if not xmldsig:
|
||||
xmldsig = importutils.try_import("xmldsig")
|
||||
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
CONF = config.CONF
|
||||
|
|
|
@ -21,7 +21,6 @@ from oslotest import mockpatch
|
|||
import saml2
|
||||
from saml2 import saml
|
||||
from saml2 import sigver
|
||||
import xmldsig
|
||||
|
||||
from keystone.auth import controllers as auth_controllers
|
||||
from keystone.common import dependency
|
||||
|
@ -32,12 +31,17 @@ from keystone.contrib.federation import idp as keystone_idp
|
|||
from keystone.contrib.federation import utils as mapping_utils
|
||||
from keystone import exception
|
||||
from keystone import notifications
|
||||
from keystone.openstack.common import importutils
|
||||
from keystone.openstack.common import jsonutils
|
||||
from keystone.openstack.common import log
|
||||
from keystone.tests import federation_fixtures
|
||||
from keystone.tests import mapping_fixtures
|
||||
from keystone.tests import test_v3
|
||||
|
||||
xmldsig = importutils.try_import("saml2.xmldsig")
|
||||
if not xmldsig:
|
||||
xmldsig = importutils.try_import("xmldsig")
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
LOG = log.getLogger(__name__)
|
||||
|
|
Loading…
Reference in New Issue