assertTableColumns method is used to asserts that the table contains
the expected set of columns. There is a assert in assertTableColumns:
self.assertEqual(expected_cols.sort(), actual_cols.sort()).
However, the return of List.sort is None. So, this assert always
passes.
Change-Id: I4b5e48044cb466b1660484043b475ac6e2d9b35e
Closes-Bug: #1421092
This sync is crucial to adopting oslo.log, the bulk of the changes
are for the oslo modules to use python standard logging instead of
relying on oslo.log.
from keystone:
rm -rf keystone/openstack/common
from oslo-incubator:
python update.py ../keystone
Had to undo the changes to local.py and log.py since they are still
being used throughout keystone.
Also, with the sync came a change to versionutils, which now
emits a deprecation exception from versionutils instead of
the incubator's log.py. This meant that a test had to be updated
to catch the appropriate exception.
Sync'ed to level 03143669d2c996f7c20d2d75f6c67827d2db216a
Change-Id: If10eb5e2ea9c93dd22763f37faf465e103d9815d
This is the final part of the more comprehensive split of
assignments, which rationalizes both the backend and controllers.
In order to make this change easier for reviewers, it is divided
into a number of smaller patches. This patch divides up the
assignment controller, giving resource its own controller.
Previous patches have:
- Moved role management into its own manager and drivers
- Fixed incorrect doc strings for grant driver methods
- Updated controllers to call the new role manager
- Updated unit tests to call the new role manager
- Refactored the assignment manager and drivers enabling
projects/domains to be split out
- Fixed incorrect comment about circular dependency between
assignment and identity
- Moved the logically separated project and domain
functionality into their own manager/backend (called resource).
- Removes unused pointer to assignment from identity driver
- Uddated controllers and managers to call the new resource
manager
- Updated tests to call the new resource manager
Partially implements: bp pluggable-assignments
Change-Id: Ic7a4dbe9e39c1910ecc23b37d0b798955544fde4
Seems like a few tests are failing randomly failing since the
expected and returned data may be in different order.
Change-Id: Ic067f4228d5e2fb0e0f7156325179b0ee3cfc8c4
Closes-Bug: #1420141
The tests are all corrected to work with any PYTHONHASHSEED, so this
setting in tox.ini can be removed. This will ensure that new tests
work with any hash seed.
Change-Id: Ibb118d9b7ba6984797e3f258e4116542e31f74fb
Closes-Bug: #1348818
The order of elements in the versions response depends on how the dict
is ordered which may differ. This can be seen by setting the
PYTHONHASHSEED value to something other than 0.
With this fix, code is written that compares the version elements so
that the order as returned doesn't matter.
Change-Id: I24f7fd2fb5e5fc6518c284ce728d2a84e1549272
Partial-Bug: #1348818
The attribute picked by this test may not be one that causes an
Unauthorized exception to be raised since the order of attributes in
the list is random. This can be seen by setting the PYTHONHASHSEED
value to something other than 0.
With this fix, all the attributes are tested so the order doesn't
matter and the test coverage is improved.
Change-Id: I61f9efc5c60271c7ddf75eb4f4eedc66f6f4d67f
Partial-Bug: #1348818
The order of the catalog links list will vary depending on how a query
returns results and the order of the keys returned by keys() may also
vary. This can be seen by setting the PYTHONHASHSEED value to
something other than 0.
With this fix, the links and response keys are compared using a set
equals so the order doesn't matter.
Change-Id: If4a606ce45425c5fa51c6e76bf9172cccaf7a427
Partial-Bug: #1348818
The order of the endpoints and interfaces lists will vary depending on
how a query returns results, so the endpoints and interfaces may not
be in the same order as the expected dict. This can be seen by setting
the PYTHONHASHSEED value to something other than 0.
With this fix, searches are done rather than using the built-in dict
equal method.
Change-Id: I4623401e93c4dd2e9347eb485dc701891af79a44
Partial-Bug: #1348818
The order of the roles in the authenticate result will vary depending
on how a query returns results, so the target role may not be the
first one. This can be seen by setting the PYTHONHASHSEED value
to something other than 0.
With this fix, a search is done rather than checking only the first
element so that the test works even when the order of the roles is
different.
Change-Id: I9ea13a2a7a242336d3658e6027d305f7371e7654
Partial-Bug: #1348818
Migration of `endpoint_filter` to version 2 will fail when the backend
DB is MYSQL instead of SQLite, `primary_key` need to be explicitly specified
in order to setup the ForeignKey relationship between two tables.
Current testcase `keystone.tests.test_sql_migrate_extensions.
EndpointFilterExtension.test_upgrade` can pass the verification since SQLite
don't check this when emitting CREATE statements for tables.
Closes-Bug: #1399768
Change-Id: I82b3fddb921c7c2d2fdecf8add981da37f5319f7
The hacking check was verifying that specific oslo imports
weren't using the oslo-namespaced package. Since all the oslo
libraries used are now changed to use the new package name the
hacking check can be simplified.
bp drop-namespace-packages
Change-Id: I6466e857c6eda0add6918e9fb14dc9296ed98600
The oslo.* libraries are moving away from namespace packages.
A hacking check is added to enforce use of the new location.
bp drop-namespace-packages
Change-Id: Ic0d4053875da0628f2359c109f2779d12aadc3eb
The oslo libraries are moving away from namespace packages.
A hacking check is added to enforce use of the new location.
bp drop-namespace-packages
Change-Id: I9b4b1ff0abde2084d3645825d08dab5670ae7979
Getting a user's roles isn't going to be implemted according to bug reports
(bug 1418015 and bug 933565). This commit removes the test case from
test_content_types.py and removes documentation from example curl calls.
Change-Id: Id317cc28d961316be6a7b8278c5242382784f10f
Related-Bug: 933565
Related-Bug: 1418015
Idenitity id mapping is used to create public ids for local entities,
typically stored in LDAP backends. Part of the mapping involves
creating a hash of the local identifiers - but this hashing did
not correctly handle unicode. This patch fixes this.
Change-Id: Icc2a6bc4a7e88004bbe6f86d3a96cff07be4c6f9
Closes-Bug: 1419187
We currently don't test that our id mapping correctly supports
unicode - and in fact, it doesn't. This patch adds a test that
demonstrates this. A follow-on patch will fix the issue.
Change-Id: Ief0597bbd0f1486f23eb799b68a85b590b7e35ef
Partial-Bug: 1419187
Previously there was a random debug logging of the wsgi params,
disconnected from the requests coming in. This isn't useful to
anyone. Even though in an Apache env the access logs include the top
level requests, logging the wsgi requests, with params in the horizon
log is good form, and fits within the log guidelines.
Change-Id: I268b8b4b424f60c8bf4b3fb93bd8804c8f7bc65a
In add_user_to_project() it checks if the default role exists before
trying to add the role to the user and project. If it doesn't exist it
will attempt to create the role. However if 2 requests happen at
roughly the same time the 2 role creations will race causing one to
fail with a conflict error. This patch addresses this issue by catching
the conflict exception and treating it as the create succeeded (which it
did just elsewhere)
Change-Id: Iab95ed8b3913c020eafa919231d764ba8b780571
Closes-Bug: #1419043