This patch improve the error handling by adding try except.
It also make sure that the response will send as json.
This also fix ugly error when delete port failed because
it doesn't not exist.
Fix mech driver initialization with physical_networks
This commit fixes SDNMechanismDriver._check_physnet_confs
to properly perform physical network config checks.
before the fix, we would fail mech driver initialization
when physical_networks config is provided with specific
networks, bind_normal_ports is set to true and
bind_normal_ports_physnets is a subset of the provided
physical_networks.
In addtion, unit tests were added to cover this.
Change-Id: I9baf3345f59832618ab229914fc634c18e9ced4f
(cherry picked from commit 4529e2b74596de16db16f96c90c203d7cf4c507d)