Prevent router being deleted if it is used by a floating IP

Fixes bug 1080638

Change-Id: I10768044aac3fe0ce994e42e798df754478d98d1
Move extension.py into quantum/api.

This change moves extensions.py out of the extensions module
and into the api module. This resolves an issue where the
following log WARNING message would occur each time the Quantum
API starts:

Did not find expected name "Extensions" in
/usr/lib/python2.7/site-packages/quantum/extensions/extensions.py

Fixes LP Bug #1074895.

Change-Id: Ia5ed206870551f9b33b74dcdc9d0503e447f298d
Improve openvswitch and linuxbridge agents' parsing of mappings

Created generic quantum.utils.parse_mappings function that detects
duplicate key or value strings, and changed openvswitch and
linuxbridge agents to use this to parse their mappings from physical
networks to bridges or interfaces. Fixes bug 1067669.

Also fixed some typos in comments.

Change-Id: I342eaeeb6ff4c6e25d57d631f250faac082011b8
Merge "Improve openvswitch and linuxbridge agents' parsing of mappings"
fix broken logic of only using hasattr to check for get_x_counts

bug 1081259

Change-Id: I1dad596830685968ae47394e0e85afe1b72ab544
bug 1057844: improve floating-ip association checks

allow multiple floating ips to be associated with the same internal port
as long as they map to different external nets (not yet supported in
Folsom) or different internal fixed IPs.  With Quantum, there is no
need to disallow either scenario.

Also improve check for a valid external network to router to internal
subnet path when a floating IP is bound.

Change-Id: Iced675e1f064172ee8a5bb6b9e37032e83af5711
Merge "fix broken logic of only using hasattr to check for get_x_counts"
Fix context problem

On plugin side, we use normal API context if any to call RPC methods.
We use our plugin dispatcher to convert RPC context into quantum admin
context. After that the callback's functions have the first argument context
as normal quantum context.

On agent side, we use admin context without session property as its
RPC calling context. Call back context is default RPCCommonContext in
Openstack common modules.

This patch also fixes the problem in the following bug:

Bug #1077012

Change-Id: I913b48dcd84d275cd7de30ca990be00c243e63ea
Merge "bug 1057844: improve floating-ip association checks"
Ensure that the expiration time for leased IP is updated correctly

Fixes bug 1081664

Change-Id: I77596ef65be817a874fad41b49e7ddbc0663c237
pass static to argv to quantum-debug config parser

fixes bug 1079609

The quantum-debug tests were using the test runners sys.argv instead of
creating a known value.  This fix passes a fake argv to parse.

Change-Id: Iaae7292057b839f64e172504a55034a0d9272918
Updates tearDown() to release instance objects

This change fixes the bug by releasing the objects of the instance
of class QuantumDbPluginV2TestCase. Removing unnecessary objects
explicitly reduces the memory required by unit tests.

Fixes bug 1065276

Change-Id: Ia003a7718e1aedc4e4c8fb02b723f4a511ebc319
Removes quantum.common.utils.str_uuid()

Replaced str_uuid() with openstack.common.uuidutils.generate_uuid()

Fixes bug #1082236

Change-Id: Ib09b070bfa1de4435c831d1d3c0fb0b0d12011bd
Correct i18n message

Part of bp make-string-localizable

Change-Id: I9020d7ef426602656fc198018c176eec813cd74b
Merge "pass static to argv to quantum-debug config parser"
Merge "Removes quantum.common.utils.str_uuid()"
Merge "Correct i18n message"
Replaces uuid.uuid4 with uuidutils.generate_uuid()

Fixes bug #1082248

Change-Id: I1be4ae129382585cecc4346e1e712ee0ab03bab5
Don't force run_tests.sh pep8 only to use -N.

Previously running run_tests.sh -p would *always* run
outside of the virtual environment. This commit makes -p
work equally well with -N (no-virtual-env) and -V (virtual-env).

Change-Id: I214404e85af2122b2ea7330e6496848a1e0d7ddf
Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()"