Send proper exception info as expected by the neutron client

The python neutron client for the V2 API expects the neutron API
to send information back such as the type and detail of the exception
in the body of the message

Change-Id: I9486d757258c4be72799c41102babe1f7923121c
Closes-bug: #1226400
Fix adding identical metering rules on two labels

Fixes: Bug #1229075

Change-Id: Id86c83ec9c7af78fc08e662bb0a9202f0f759c0c
Allowed Address Pairs support in NEC plugin

Closes-Bug: #1230184
Change-Id: I84d4dda9f88f7bbb524e173b0274db013f69b7e3
Fixes Hyper-V agent RPC calls for ML2 support

Adds support for the RPC report status in the Hyper-V
agent and plugin.

Fixes bug: #1226654

Change-Id: Ie5eee875afc062c536856589d6a3fd0414190f6d
Ensure router exists when auto_schedule_routers

Currently, the auto_schedule_routers() accepts parameter router_ids,
which may contain invalid router ids, since we've already filtered
them via plugin.get_routers(), we can directly use that safe object.

Closes-Bug: #1217998
Closes-Bug: #1210877

Change-Id: I6196f16cca65fee4e848173d0a0a10fde967195d
Add an option for always synchronizing status

This patch adds an option for always synchronizing operational status
on a show operation; regardless of the synchronization thread, when
this option is enabled, the resource status is always fetched from
the backend.

The patch also fixes an issue observed when running test_nvp_sync
alone.

Bug #1229149
Bug #1229243

Change-Id: Ifef52ac1c48e32f413d51fc04fd926073335665d
Pythonic method names for l3_agent unit tests

When review https://review.openstack.org/#/c/46863/, i find there
are some unconsistent method names in test_l3_agent.py, this patch
fixes this code style problem.

Change-Id: I0e657e02155e1fcd580f083f4b5ba56274eadf88
Partial-Bug: #1229155
Redefine behavior for NvpAdvancedPlugin during network creation

When using the NvpAdvancedPlugin, *all* logical switches should
be created through VCNS. VCNS will then proxy the requests to
NVP. This patch implements such a behavior. This is achieved by
replacing the use of nvplib.create_lswitch with the one of the
vcns driver, as the remaining logic can be left as it is.

Fixes bug #1225011

Change-Id: I6c276f747d02ac0d4934c38bf2858cf9b73c5e24
Raise an exception if no router_id provided

IF both service neutron-l3-agent and neutron-server are up,
but no router id configured in /etc/neutron/l3_agent.ini, an
exception will be raised on DB as "DBError: IntegrityError",
because the variable router_ids has a default '' value that
doesn't match the DB grammar.

    * Check router id is specified in _init_() of l3 when
      not using namespace.
    * Move part of checking config params actions to new function
      _check_config_params()
    * Add corresponding unit tests.

Closes-Bug: #1226366

Change-Id: I905f8a4061c5b250782e025681dfefcc41c8c03c
Merge "Ensure router exists when auto_schedule_routers"
Merge "Add an option for always synchronizing status"
Add host routes and dns nameservers to Midonet DHCP

In the Midonet plugin, the host routes and dns nameserver information
was not being passed down to the midonet client API. This fix addresses
this by passing down the correct information.

Change-Id: I142ad4ceccdcf8b0e13db55fa54513f82995efc5
Closes-Bug: #1229655
Merge "Allowed Address Pairs support in NEC plugin"
Merge "Send proper exception info as expected by the neutron client"
Merge "Redefine behavior for NvpAdvancedPlugin during network creation"
Merge "Raise an exception if no router_id provided"
Add error log for SystemExit in l3-agent

The SystemExit exception should be logged in l3-agent, the
operator may miss the useful exception messages to debug.

    * Add error log for SystemExit in l3-agent.
    * Add unit test for None and Wrong interface_driver.

Closes-Bug #1229105

Change-Id: I9ac60a528c1e88827078d552a30c8d571066d21c
Fix auto-deletion of ports and subnets in ML2

When a network is deleted, certain ports and any subnets referencing
it are auto-deleted. The implementation of
NeutronDBPluginV2.delete_network() does this at the DB level, so ML2's
mechanism drivers were not being called.

Ml2Plugin.delete_network() is changed to not use the base class's
method, and to auto-delete ports and subnets by calling its own
delete_port() and delete_subnet() methods outside of the
transaction. A loop avoids race conditions with ports or subnets being
asynchronously added to the network.

Closes-Bug: 1230330
Change-Id: Icf21400c9938eec29d70da8497b9ef92642131e2
Merge "Add host routes and dns nameservers to Midonet DHCP"
Merge "Fix adding identical metering rules on two labels"