Improve ODL ML2 Exception Handling

Raise a MechanismDriverError when authentication with ODL fails.
Re-raise HTTPError in "sync_resources" for exceptions whose status code is not 404.

Closes-Bug: #1311758
Change-Id: I99d2c4f270007c369024525ba4e6188d232a0b13
NSX: pass the right argument during metadata setup

The NSX cluster was erroneously passed instead of context.
This patch addressed that and tweaks UT to verify the right
parameter is passed instead.

Change-Id: Ife660b3a23705342043d121c7dcecad43e22abc1
Closes-bug: #1315538
Allow DHCPv6 solicit from VM

DHCPv6 solicit UDP package is currently dropped because
there is no security group rule to allow it like IPv4.

This fix allows UDP DHCPv6 solicit from client port 546 to
server port 547. This fix also drops DHCP reply from VM.

Change-Id: I4941d401576e2c8bad37859d2cba227afde9e764
Closes-Bug: 1316515
Perform policy checks only once on list responses

The policy engine is currently being called for every attribute
of every resource to be returned by a list response. This is
harming the API performance; moreover such a high number of checks
is also unnecessary.

This patch therefore slightly changes the API logic so that list
response first determine the list of attributes which should be
returned querying the policy engine and then use this list for
all resource items to be returned.

To this aim a few methods in base.py needed to be refactored.
This patch also removes the routine check_if_exists from policy.py
and the related PolicyNotFound exception.

Finally, this patch also removes unnecessary admin_or_owner rules
when applied to attributes. This kind of rule indeed has no effect
anyway because of Neutron's ownership checks. The rules were removed
because this change won't allow anymore for having attribute-level
policies whose evaluation result depends on the resource value.

Implements blueprint faster-list-responses

Change-Id: I21b8273add5d5984f512ad94af5a99cf0b0a5d93
Upgrade failure for DB2 at ml2_binding_vif_details

50d5ba354c23_ml2_binding_vif_details fails during upgrade
when DB2 is used as the DB backend of neutron because
Boolean type is not supported by DB2.

This fix uses "1" instead of "true" in sql when db2 is engine.
This fix also changes context creation to op.execute.

Change-Id: I82d2141007894342c634f2c5e62344e20d876d8f
Closes-Bug: 1311589
Merge "Allow DHCPv6 solicit from VM"
Imported Translations from Transifex

Change-Id: Id03cc0a2d92654f617cd99465f81c5523a016c96
Merge "NSX: pass the right argument during metadata setup"
Merge "Upgrade failure for DB2 at ml2_binding_vif_details"
Merge "Perform policy checks only once on list responses"
Merge "Improve ODL ML2 Exception Handling"