Since some switch models will throw errors when multiple sessions
attempt to modify and commit system state, this patch introduces
a distributed lock to prevent more than a single ansible process
from running at any given time for each switch. This may be
refined in subsequent patches to improve exactly when this behavior
In addition, because requests are now required to wait for a lock
on the switch(es) they are intending to modify, requests may be
satisfied out of order. This means that each request now needs to
refresh its view of the state of the object it is modifying upon
acquisition of the lock, and may in fact not need to do anything.
An example of the latter would be if a vlan is added, removed and
then added again in quick succession. No matter which order these
requests are handled in, the final result will always be that the
vlan is present, since that was the last request and what will be
present in the neutron db.
If the ML2 driver's user doesn't have access to manage vlans on the
switch then create network will fail. A switch operator could predefine
vlans and expect us to use them. This config option allows us to skip
creating and deleting vlans.
Previous commit had ansible roles that will abstract actions in ML2 to
roles that can be handled per vendor in the roles
Also moving the ansible invocation out of the mech driver into its own