During sync process only network segments that are bound to a port should be
sent to CVX when creating instances. For that reason, the PortBindingLevel
table should be used to get list of segments bind to a given port.
We can infer the set of tenants to provision from the neutron
networks and ports tables. This is part of a larger effort to
remove any use of arista specific tables and instead make use
of the same data stored in other neutron tables.
Error returns from JSON API calls are currently handled
identically to successful returns. We should differentiate
these cases by raising an exception on error return codes.
If a call to send_api_request hits an exception,
it will return None. However, our code that expects iterable
types are returned from many of our GETs. This change replaces
None returns with empty dicts in such cases.
arista_ml2.py was becoming quite large and a dumping ground for
code. This change begins the process of organizing the driver in
a more structured, and manageable way.