Fix assertEqual arguments order(catalog, cert_setup, etc)

assertEqual method's arguments should be in
('expected', 'actual') order.

Change-Id: Id591629a10e6e82c4eb607a9994071f16dd80d8b
Partial-Bug: #1277104
Convert test_backend_ldap to config fixture

The test_backend_ldap module wasn't using the config fixture for
setting config options.

Change-Id: I3f0e1ba13f0be3625db5a7eb275a3d7fd2bd41e5
Refactor: move federation functions to federation utils

Some of the functions created in keystone.auth.plugins.saml2 can be
re-used for other federation protocols that are supported in the future.
Propose moving them to keystone.contrib.federation.utils.

Change-Id: Ifb7adcda44a0eff2650198353393aff33b3eda7a
Adds style checks to ease reviewer burden

The following checks were added in this commit:

 - mutable default args are no longer allowed
 - block comments must begin with at least one space
 - enforce assertIsNone instead of assertEqual with a None

bp more-code-style-automation

Change-Id: I7dba0c8b45078a665d40993d751c79566aa7505f
Treat LDAP attribute names as case-insensitive

LDAP attribute names are case-insensitive, and different LDAP
server implementations behave differently when returning search
results.  Keystone attempts to use the attribute names as defined
in the mapping configuration when checking for values in the dict
that represents the search results.  If the case doesn't match,
we won't find the values which can lead to errors.

This patch converts the dictionary keys to lowercase to allow us
to perform a case-insensitive lookup when processing LDAP search
results.  When we create the model object, we still use the
attribute name case as defined in the mapping to allow predictable
lookups when we process the model object later.

Change-Id: Ib9a03b912bc7652dc6a61b1c97a950e263a9c6fa
Closes-bug: 1281216
Collapse SQL Migrations

SQL Migrations for Juno require the schema version to be at 036
which is the final verison for the Havana release. This limits the
change sets that could affect assumptions made in earlier migration
files. Migrating to before the Havana release migration is no longer
supported.

Change-Id: Ie58507473b92cb100a9d556985e7d7756f9649e4
bp: sql-migration-collapse-juno
Refactor: moved flatten function to utils

Previously, the keystone.common.authorization module contained the function
"flatten", which would transform a dictionary (possibly nested) into a
single level dictionary. Given that the "flattening" of a dictionary is
a more general concept, not related to authorization, I thought it would
be more intuitive to have it in the keystone.common.utils module.

Change-Id: Ic1f6fa70634ade41e392ee7c5cd8adac913fd0b8
Merge "Adds style checks to ease reviewer burden"
Merge "Convert test_backend_ldap to config fixture"
Merge "Treat LDAP attribute names as case-insensitive"
Merge "Fix assertEqual arguments order(catalog, cert_setup, etc)"
Merge "Refactor: move federation functions to federation utils"
Merge "Collapse SQL Migrations"