Creates multiple worker processes for API server

This change to the WSGI code uses openstack.common.service to create
multiple worker processes to handle API load.  The main process will
start up a configurable (workers=??) number of child processes which
will all listen on the bind port.  The main process becomes the parent
and manages the children.  The parent is not a worker.

Backwards compatibility is preserved by setting api_workers to 0, the
default.  In this case, no separate worker processes are spawned and
the worker threads run in the main process.

Implement blueprint multi-workers-for-api-server

Change-Id: Iffa76041d0055840ccca852814b0e71f17a950ac
Simplify using external routers and metadata

The dhcp agent only pushes out the metadata
static route when the subnet is isolated, and it
determines that by checking if the gateway_ip is
not set. This makes it tricky to use external
routers and metadata from dhcp at the same time.

This patch changes how the dhcp agent determines
that the subnet is isolated. It now considers it
isolated if there is no Neutron router on it.
This makes it straightforward to use an external
router on a provider network and get the
metadata from the dhcp namespace.

Change-Id: I0e29a2f058564c267176dab26da00f6ef579808b
Closes-Bug: 1236783
Correct handling mock.patch.stop method

Correct calling the right stop method of mock.patch object.

Change-Id: I53cffd78f7597a9a0dc8ec7dbc176d958c85be83
Fix incorrect indentations found by Pep 1.4.6+

Pep 1.4.5 had several bugs with checking indentation of
hanging and nested sets. Fix fallout.

Change-Id: Ibcb1679e0bd283feb3c1568ba214bc525575fd43
Support uncompressed ipv6 address and abbreviated ipv4 address

Now neutron supports zero-compressed ipv6 address like
'2001:db8::10:10:10:0/120' and unabbreviated ipv4 address
like '10.0.0.0/24'.
This path will make neutron also support uncompressed ipv6
address and abbreviated ipv4 address. for example:
1, uncompressed ipv6 address like 'fe80:0:0:0:0:0:0:0/128'
2, ipv6 address with multiple consecutive zero like
   '2001:0db8:0:0:1::1/128' or '2001::0:1:0:0:1100/120'
3, abbreviated ipv4 address like '10/24'

Change-Id: I755e38ea11c139e15488ec60e7d5682a244ab114
Closes-Bug: #1240790
Fix required enum's name in migration

Enums must contain name parameter for PostgreSQL and need to be
deleted after dropping table.

Closes-Bug: #1243652
Closes-Bug: #1243213

Change-Id: I01d18ff25572bbe9e6a8b8c6ae27f250ab154734
LBaaS: when returning VIP include session_persistence even if None

Closes-Bug: #1231915
Change-Id: I3dc5e17118995fb49dd381d08c9d92cb60b80abb
Remove deprecated fields in keystone auth middleware

This commit makes the following changes:

Use X_PROJECT_ID instead of X_TENANT_ID:
  In the latest keystone auth_token middleware it is recommended to
  use X_PROJECT_ID instead of X_TENANT_ID. X_PROJECT_ID is supported
  in auth_token middleware for both keystone v2 and v3 API.
  The corresponding change was done in keystoneclient before Grizzly
  release, so we don't need to take care of X_TENANT_ID now.

USE X_ROLES instead of X_ROLE:
  X_ROLES is now recommended.
  X_ROLE exists just for diablo backward compatibility.

Remove X_TENANT and X_USER:
  X_TENANT and X_USER are for diablo backward compatibility.
  We no longer need take care of them in Icehouse Neutron.

Change-Id: Ie714b1323ff8c44dbee66b54e683226cf675b104
Closes-Bug: #1242447
Avoid dhcp agent race condition on subnet and network delete

This patch ensures that, when the dhcp agent queries the server
to retrieve and delete its DHCP port, it does so by selecting
for update. This has been done by introducing a new method
that combines the get and delete in one shot.

Closes-Bug:1197627

Change-Id: I1e8a87d7dc1a1cb9309aeefd41619e20f49f95a6
Modified configuration group name to lowercase

Most of the OpenStack project makes use of lower case for
configuration group names. But, 'neutron' was having group
names in either cases. Bug states it is fine to have group
name in upper case for [DEFAULT] but needs to be changed
for others. It was noted that [PLUMgridDirector] was having
characters.

Change-Id: I95f2dad6d5ae17f722202f4917b6ef460cd41e15
Closes-Bug: #1176683
LBaaS UT: use constants vs magic numbers for http error codes

Closes-Bug: #1245388
Change-Id: I4192b577182891f6d777a5a5eac237c9961e41bb
Merge "Fix incorrect indentations found by Pep 1.4.6+"
Merge "Modified configuration group name to lowercase"
Merge "Fix required enum's name in migration"
Use correct device_manager member in dhcp driver

* The DHCP driver used to use device_delegate, but that has
  changed to device_manager. referencing device_delegate
  caused the cleanup of the dhcp agent namespaces to fail.
  This fixes the issue by using the correct member name,
  device_manager

Change-Id: Iab8ea0549383335ff66f3f13df1953d206eeb28f
Closes-Bug: #1245408
Imported Translations from Transifex

Change-Id: Ib0481b92221f1bb398d7888cb3da68d8a824c5f7
Merge "Creates multiple worker processes for API server"
sync log from oslo

5fef5a8105 allow keeping of existing loggers with fileConfig
fb8075a19d Add amqp=WARN,qpid=WARN to default_log_levels
4654a5d247 Don't override default value for eventlet.wsgi.server logging
41ddd7a975 _get_log_file_path explictly return, when logfile/logdire unset
e12e6b45f8 Make openstack.common.log Python 3 compatible
572cfecb4d Make Messages unicode before hitting logging
3243cdfbe9 python3: handle module moves in log

DocImpact

Change-Id: I63e21a4fbcc633e68a37a549508f971ac0704a6f
Merge "Avoid dhcp agent race condition on subnet and network delete"
Fix query error on dhcp release port for postgresql

This is achieved by disabling eager loading and
hence by avoiding incurring in left outer joins
that cannot be applied because of a nullable
side.

Closes-bug: #1246788

Change-Id: I16bcc738a43609f715c2561413c6387f443bd99c