Simplify L3 HA unit test structure

Previously we had two fake test plugins: With and without agents.
I removed the one without agents and merged two test cases.
This allows test writers to add additional tests more easily
without mocking things that should not be mocked.

Change-Id: I6f899f86034145ac88b5c2e0f3036f7477f9702f
L3 Agent restructure - observer hierarchy

This commit creates the basic observer hierarchy for advanced
services, as part of a multi-step refactoring effort of the L3 agent.

The change set has these modifications:

- Device drivers for VPN and FW services are loaded.
- AdvancedService child instances are created for VPN and FW.
- L3EventObservers is created by the L3 agent and the VPN and FW
  service objects are registered for notifications of events.
- VPN device driver event handlers moved to VPN service instance.
- VPN device driver callbacks to VPN agent, moved to VPN service.
  to service from the VPN device driver.
- Test cases updated and moved related to these changes.
- UT updated to test new methods and refactoring changes.

Future commits will massage the event notification points in the
L3 agent, and implement handlers.

Please keep these things in mind, when reviewing:
- The goal is to refactor the code and not 'improve/change'
  functionality (other than broken tests).
- This is one step of a series of steps to move to the 'final'
  restructuring.
- Because we're incrementally changing the code, there may be
  temporary changes to allow existing code to continue to work.

Co-Authored-By: Assaf Muller

Change-Id: I674c72e37b56aa1f729110310e6f697297c47c09
Partially-implements: blueprint restructure-l3-agent
openvswitch/ofagent: Remove OVS.enable_tunneling option

The option has been marked deprecated in IceHouse.
Please use AGENT.tunnel_types=gre instead.

DocImpact
Related-Bug: #1195374
Change-Id: Iea6159c5949a63a0b680818a3fd0928d470115bd
Improve performance of get_active_networks_info

RPC 'get_active_networks_info' currently uses nested loop to fill
the network structure with subnet and port info. Speed up this
operation by using itertools.groupby.

Change-Id: If765dd8f2f8010b79eb168179a64dccf940e9cbb
Closes-Bug: #1390356
Removed unused iso8601 dependency

It should have been removed when migrating to oslo.utils when we dropped
timeutils module from our tree.

Change-Id: I4093a3c8faf3da5790ee31fdebec0b8ed70f84f3
Remove locking from network and subnet delete op

delete_subnet in Ml2 plugin instead of using SELECT FOR
UPDATE deletes the IPAllocations that can be auto-deleted
straight away.
An exception is raised if there are ports that cannot be
autodeleted.

delete_network in ML2 plugin tries to delete all ports
and subnets before performing the network deletion.
No lock is needed here - if some other process modifies
the Port or Subnet table, adding new items, the network
deletion will fail because of a violation of a foreign
key contraint.
In that case the operation will be retried.

Change-Id: Ib4e9441a95d6c80b92a43d55fdeb18d7b51a1cf3
Closes-bug: #1332917
Advanced services support in neutron-db-manage

Partially-Implements: blueprint services-split

Change-Id: Ib8cd77e5e777be83c44b69edc0a6d2d2ba5d2ab1
Correct arguments to logging function

ofctl_arg_supported contains a bad call to LOG.debug in an exception
path.

    LOG.debug("...%s. Exception: %s", (full_args, e))

This throws "TypeError: not enough arguments for format string" and
should be:

    LOG.debug("...%s. Exception: %s", full_args, e)

(Found via pylint)

Change-Id: Ib14666f60b16584f225b1e0c4fed82ef7e941aac
Closes-Bug: #1403296
Cisco: unsupported format character in log format

CiscoCfgAgent.hosting_devices_removed() contains an error in the
format string used to log errors:

    LOG.error(_LE("Invalid payload format for received RPC message "
		"`hosting_devices_removed`. Error is %{error}s. "
		"Payload is %(payload)s"),
	      {'error': e, 'payload': payload})

"%{error}s" should be "%(error)s"

The existing version raises "ValueError: unsupported format character
'{' (0x7b)" when invoked.

(found via pylint)

Change-Id: Ic5e9db2a19aa7652cbbd1ee04d7e02914e8d0093
Closes-Bug: #1403304
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: Ia7bcef7a0efacc79c467b18863cb8180b6a89a28
Cleanup req_format in test_api_v2_resource

Since XML support has been removed test cases in test_api_v2_resource
no longer need to specify req_format.

Change-Id: Ic6572abc3121535e19d21e9a34d70bb42b9782de
Related-Bug: #1380787
Merge "Correct arguments to logging function"
Add OVS status and fix OVS crash

OVS crash/restart is unpredictable, so neutron-ovs-agent should be
robust enough under that situation. But currently ovs-agent doesn't
figure out this error status(only check ovs restart/normal status)
and still continue to apply subsequent operations(set br/add patch
port/...) till causing exceptions/crash. Add flag to fully represent
ovs status. Base on that, we can add proper fail-over code in method
rpc_loop, to treat ovs dead/restart gracefully to prevent agent
crashes while it is running.
Closes-bug: #1296202

Change-Id: Id058b7ddef2ed337627dc692d0418786ad14f4b4
Merge "Remove locking from network and subnet delete op"
Merge "Cleanup req_format in test_api_v2_resource"
Merge "Simplify L3 HA unit test structure"
Merge "L3 Agent restructure - observer hierarchy"
Merge "Add OVS status and fix OVS crash"
Merge "openvswitch/ofagent: Remove OVS.enable_tunneling option"
Updated from global requirements

Change-Id: I181fc4f2b066eca08f2f23c5d2ff996aa46795ab