Use a copy of NEW_NETWORK for test_networks

In test_networks, NEW_NETWORK is used as a request body between unit
tests. "Create a network" API changes a request body internally, so
each test should use a copy of NEW_NETWORK to avoid affecting to the
other unit tests. However one test uses NEW_NETWORK directly.
This patch makes each test use a copy of NEW_NETWORK for avoiding
similar problem in the future.

Change-Id: I9e12fe89956d18dde54bec83c15af258d66e0682
Add a validation format "cidr"

Nova accepts CIDR attributes on network REST APIs and checks its format
on each API. On v2.1 API, the attributes will be checked with JSONSchema.
In addition, Neutron contains its own "cidr" check for its REST APIs.
This patch add a validation format "cidr" by porting Neutron's check from
https://github.com/openstack/neutron/blob/master/neutron/api/v2/attributes.py#L293

Partially implements blueprint v2-on-v3-api

Change-Id: I03601f8fa34fe7617e4f963cdfd4b178eae36565
Clean bdms and networks after deleting shelved VM

After deleting the shelved offloaded instance with user volumes,
the bdms and networks info should be cleanup. This patch use local
deleting to cleanup the instance info.

Change-Id: Id32385df5b20903d7a019c3590432f3fb1133f90
Closes-bug: #1307791
Fix cells RPC version 1.30 compatibility with dict-based Flavors

Version 1.30 of the cells RPC API changed the client to send Flavor
objects instead of dicts. This patch fixes the manager-side compatibility
for <=1.29 clients.

Related to blueprint kilo-objects

Change-Id: Ibde9763071c9bfcc1d7631cbf3452ed0948b4a62
Merge "Use a copy of NEW_NETWORK for test_networks"
Merge "Add a validation format "cidr""
Merge "Fix cells RPC version 1.30 compatibility with dict-based Flavors"
Merge "Clean bdms and networks after deleting shelved VM"