rename templated.TemplatedCatalog to templated.Catalog

This addresses a long standing TODO for consistency across catalog
drivers, making it more intuitive to switch drivers.

UpgradeImpact

Change-Id: I109513695e60867d1111795ab958a3cc4240e831
Improve forbidden checks

New functions were created to check 'allowed' access because the previous design
was checking after changes were possibly made.

Changed the unit test to use an already created user to simulate the original
error that was reported.

Change-Id: I9f7e56a5afd9624070fffef6672ef88cd549f210
Closes-Bug: #1174451
Correct sample config default log levels

The documentation of the default_log_levels default value in the
sample keystone.conf file was out of date. The default value has
been updated to the current value in keystone.openstack.common.log.

Change-Id: I3edf2d5375413250de41f8cebb98a826dc5df8ce
Update the default_log_levels defaults

The default for default_log_levels didn't set the log levels
for some packages that Keystone uses (for example, dogpile). This
caused the server to output a lot of extra logs when debug=True
is used.

You can get the debug output for dogpile and routes by setting
default_log_levels explicitly in your keystone.conf file.

Change-Id: Ib797fa7b98f0e501047b72b094d07ad204385cc6
Related-bug: #1245629
Closes-Bug: #1269987
Tests initialize database

Many tests (for example the backend_kvs tests) failed to run
individually. This is because the tests made the assumption that
because the system is configured for the KVS (or non-SQL) backend
that the database isn't required. The problem with this assumption
is that different backends can use different storage mechanisms,
and the credential backend only supports SQL. So any test that
requires that backends are loaded is required to initialize the
database.

Change-Id: I109b83bf512598952346bef01dc33c57802c7f60
cleaned up extension development docs

- added a copyright header
- applied the same order of titles/headers used in other docs (typically
  === underline+overline for top level, === underline for second level,
  --- underline for third level, ~~~ underline for fourth level, etc)
- used ``double backticks`` around literals
- removed excessive whitespace
- replaced a plaintext link with an embedded link

Change-Id: Ic2bf8ed65433c82d0bdfb8dc2d8a18a0b62d6c30
Fix assignment to not require user or group existence

The assignment code was requiring the existence of users and
groups before performing different operations. With federation,
the users and groups may legitimately not be defined in keystone,
so these checks cannot be done.

Implements: bp no-check-id
Change-Id: Ib9d0188ae2a436617bad90bf936e7b3dbf296885
Fix indentation errors found by Pep8 1.4.6+

As a preparation in order to switch to a newer
Pep8 version in the future, fix the indentation errors
that are missed by Pep8 1.4.5 due to bugs.

Change-Id: I19af0bdc9c3c9681a2bf60eb6d86f45c4fb11bc6
Closes-Bug: #1267994
clean up keystone-manage man page

- wrap literals with double backticks so things render in RST
- replace triple line breaks with double line breaks for consistency
- replace 'REST api' with 'HTTP API' because 2x pedantic

Change-Id: Ib28d0cea06f81b32ef985dfa74333693ef32ae46
Adds tcp_keepalive and tcp_keepidle config options

Currently the wsgi server will not close connections once requests
complete and will not enable keepalive on it's wsgi sockets. This can
be a problem for those who need to align the server keepalive with
load balancer timeouts without modifying system keepalive settings.

To remedy this we add new config options tcp_keepalive and
tcp_keepidle which are disabled by default to remain backwards
compatible.

DocImpact: "new config options for wsgi tcp_keepalive & tcp_keepidle"
Closes-bug: bug 1260406
Co-authored-by: Hirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>
Change-Id: Ic53402c57e1ebe44cde4c18e5e15200dcbbcb04b
Move v3_to_v2_user from manager to controller

Managers should have no knowledge of v2 or v3, only the controllers
should, so this moves the v3_to_v2_user function from the identity
manager to common.controller.V2Controller.

Change-Id: I0c111245965a2578cfe1d7c9f1ca2df2f612b0d9
Mock sys.exit in testing

If exit is called during subunit then it exits the subunit process which
makes the test suite fail with no information.

Change-Id: I7c189fad05f0d38c35e4014ff414d91841bc7632
Closes-Bug: #1276885
Remove default_notification_level from conf

This config option is used when you use the notify_wrapper wrapper
function from openstack.common. As we don't use the wrapper we don't
ever require the config option so we shouldn't show it to users.

blueprint oslo-messaging

Change-Id: I95280af37a84c71131fb2fc92c9302b8926c95bd
Merge "Fix indentation errors found by Pep8 1.4.6+"
Merge "Improve forbidden checks"
Merge "Tests initialize database"
Merge "Mock sys.exit in testing"
Remove host from per notification options

Specifying host allows you to set the sender so that messages come from
'identity.%(host)s' however this is something you are far more likely to
want to set up per keystone instance than modify when actually emitting
a notification.

It is also incompatible with the way oslo.messaging expects to be called
where you setup a publisher_id once at startup and then all future
messages will reuse this value.

As there is nothing so far using this parameter remove it.

Change-Id: Ie70c313bcebd67cc8c6a3d25eba95405089bd44a
blueprint: oslo-messaging
Removes use of fake_notify and fixes notify test

The test against keystone.notifications._send_notification was badly
broken, and the stubbed fake_notify method was masking this issue.

The operation and resource parameters to _send_notification() were
mistakenly reversed in the test case's call to that method, but because
the fake_notify() method was not looking for the parameters in the right
way, the test was failing.

This patch removes the unnecessary use of mox stubout and replaces with
a simple call to mock.patch() and a follow-up assertion that the mocked
notify() call was being passed expected arguments.

Change-Id: I1f3e66c7b92e176520c7627151a02d4b35594aea
Blueprint: oslo-messaging
Merge "Adds tcp_keepalive and tcp_keepidle config options"