Fix l2pop regression
Patch https://review.openstack.org/#/c/236970/ introduced an issue
where get_agent_by_host can return a random host (Including L3,
DHCP or metadata agents), not only L2 agents. The caller then
tries to get tunneling_ip, which might not exist on the returned
agent, causing l2pop code to bail out with a WARNING:
'Unable to retrieve the agent ip...'.
The issue was found by manual introspection of the code, and
verified by modifying the l2pop fullstack test to register L3
agents. Both a unit test was added, as well as modifying the
fullstack connectivity test to register L3 agents if l2pop
is enabled.
The code will now check for agents with a tunneling_ip key
in their configurations dict, which is required for l2pop
to work correctly, essentially a form of duck typing.
Change-Id: Ib3072966140b7f6ca954d7847ad9835aa1191998
Closes-Bug: #
1508205