Add tests for LinuxBridge and OVS agents

Fixes bug 988067

Patch introduces some more unit tests for LinuxBridge
and OVS agents.

Change-Id: I95b8856e75b303520af654b08854c6bd0bc5d7ea
Use Query instances as iterables when possible

A Query.all() call creates a list of a DB query results.
We can actually use a Query instance as an iterable and
thus avoid creation of a list if we just need to iterate
over those values only once.

Fixes bug 1173133

Change-Id: I06d8eaa9eaba4c71aa0c98000735cb9d83ea19a3
Docstrings formatted according to pep257

Bug #1020184

quantum/agent/*
quantum/api/*

Change-Id: I206206b66b4adf5cda73a6bb709a0935d7efa821
Docstrings formatted according to pep257

Bug #1020184

quantum/common/*
quantum/db/*
quantum/debug/*
quantum/extensions/*

Change-Id: I8fdf72ae1702ef2a2652a1db683d8b31e09e6f84
Improve Python 3.x compatibility

Replace the deprecated except x,y: construct with
except x as y:, as that one works with all Python
versions starting with 2.6.x

Change-Id: I13080cfdad32eaef21aa2707fe5d2818bda68535
Remove calls to policy.enforce from plugin and db logic

Blueprint make-authz-orthogonal

This patch implementes item #2 of the blueprint
Remove calls to policy.enforce when the policy check can be performed
safely at the API level, and modify policy.json to this aim.
This patch does not address enforce calls in the agent scheduler
extension, as that extension is currently not defined as a quantum.v2.api
resource class.
This patch also adds an API-level test case for the provider networks
extension, which was missing in Quantum and was necessary to validate
the API behaviour with the default policy settings.

Change-Id: I1c20a5870279bc5fce4470c90a210eae59675b0c
Merge "Add tests for LinuxBridge and OVS agents"
Merge "Remove calls to policy.enforce from plugin and db logic"
Merge "Docstrings formatted according to pep257"
Stub out get_networks_count properly for pnet unit tests

Bug 1174457

Change-Id: I30a5c549d5d236124a7798a757601e970067b284
Imported Translations from Transifex

Change-Id: I7f8f822413f4e11310700882540c6e276016b75f
Merge "Improve Python 3.x compatibility"
Docstrings formatted according to pep257

Bug #1020184

quantum/plugins/bigswitch/*
quantum/plugins/brocade/*

Change-Id: I9bf4381738319551a5993d4b279a5cec3425b7ef
Merge "Imported Translations from Transifex"
Merge "Use Query instances as iterables when possible"
Docstrings formatted according to pep257

Bug #1020184

quantum/plugins/hyperv/*
quantum/plugins/linuxbridge/*
quantum/plugins/nec/*
quantum/plugins/nicira/*
quantum/plugins/plumgrid/*
quantum/plugins/ryu/*
quantum/plugins/services/*

Change-Id: I3525aa57235935d90ec7b70c65ba15012ce575a3
Docstrings formatted according to pep257

Bug #1020184

quantum/tests/*

Change-Id: I5c31a70e80c7fd448b92b43d34341301533b59ba
Docstrings formatted according to pep257

Bug #1020184

quantum/plugins/cisco/*

Change-Id: Ibb6a865a17de0ea4f1865972624e4c5da0e96b34
Merge "Docstrings formatted according to pep257"
Fix 'null' response on router-interface-remove operation

To avoid a 'null' response body, the delete operation returns a response
that is consistent with its add counterpart, i.e. we return the router
id with details about the interface being affected by the operation, as
well as the tenant id.

A unit test is added to ensure that the right body is returned and minor
adjustments have been made to the plugins affected by the change.

Long-term, a delete operation should really return 204 w/o a body, but
this requires some major rework of the WSGI handling within Quantum.
This is an interim solution that deals with an 'ugly' response body,
whilst keeping backward compatibility.

Fixes bug 1173284

Change-Id: Icaab87ad0c8561c0690c8f0a14db815d8886bc71