Fix bug for neutron network-name

There may be cases when the network-name is not updated correctly
due to the requested networks not being owned by the tenant.

In the case when there is no matched network we use the details
from the used port.

A failed deletion of a port will raise an exception. If the
port is not found no exception will be raised.

Co-authored-by: Evgeny Fedoruk <EvgenyF@Radware.com>

Change-Id: Ie28e88ec9a9c7a180410ae5e57f84b1f653bbffc
Closes-Bug: #1246258
Update nova_ipam_lib to use VirtualInterface

Update nova.network.nova_ipam_lib to use the VirtualInterface object.
Also fix related tests.

Part of blueprint nova-network-objects

Change-Id: I5115eee1f2f6454688ea1d006c6a39e3096e5c29
Update linux_net to use VirtualInterface

Update nova.network.linux_net to use the VirtualInterface object.  Also
update tests as needed.

Part of blueprint nova-network-objects

Change-Id: I4bbf4c82efe8475d5e1f2823d52087362d851f3e
Add db.dnsdomain_get_all() method

Add a dnsdomain_get_all() method to the db API.  This method returns the
full model for each dnsdomain in the database.  There is a method
similar to this, dnsdomain_list(), but it doesn't return all of the
data, just one column from each of the rows.  That doesn't really map
well to objects, so make a new method that will be used by the
DNSDomainList object.

Part of blueprint nova-network-objects

Change-Id: I8753cf1e641a1a6040a32a9a43e8b29f2d32182f
Add DNSDomain object

Add a new object, DNSDomain, along with a DNSDomainList object.  This is
needed for converting nova-network to use objects so that we can have it
using conductor.

Part of blueprint nova-network-objects

Change-Id: I2e337ccdf9a23a3536ef6bdcd9bf3e4b825d4d74
Remove some dead dnsdomain code

Remove a method that was not used anywhere.  It also called a db API
method that doesn't exist.

Related to blueprint nova-network-objects

Change-Id: Ic4fafded3068e5d769ed68dce07f9c8b58954cc3
Update nova.network to use DNSDomain object

Update nova.network to make use of the DNSDomain and DNSDomainList
objects.  This removes more direct db API usage from nova-network.

This patch includes one really nice optimization, as well.  The method
get_dns_domains() used to call nova.db.dnsdomain_list(), which would
return a list of all domains in the database.  It would then call
_prepare_domain_entry() on each one, which would go back and query the
database again for each one to get the rest of the data associated with
it.  All of this data was actually returned from the db originally, but
the db API didn't return it.  Instead, it now gets all of this data
from the original db query for the list, eliminating N db queries each
time this code runs.

Part of blueprint nova-network-objects

Change-Id: I4b682affbbe988638c0c834b12a121e6a871080a
Remove get_network from nova.network.rpcapi

Remove the get_network() method from nova.network.rpcapi.  It's not
actually used, so help make that clear by removing it from the client
rpc class.

This also helps us clarify what changes we have to be careful about with
respect to rpc versioning.

Related to nova-network-objects

Change-Id: Ibfcc90499fb6c20b7f14597ea360ed55bb34e058
Remove get_all_networks from nova.network.rpcapi

Remove the get_all_networks() method from nova.network.rpcapi.  It's not
actually used, so help make that clear by removing it from the client
rpc class.

This also helps us clarify what changes we have to be careful about with
respect to rpc versioning.

Related to nova-network-objects

Change-Id: I21747958bff6330b100a9fd66d855a72aeabfab8
Merge "Update nova_ipam_lib to use VirtualInterface"
Merge "Fix bug for neutron network-name"
Merge "Update linux_net to use VirtualInterface"
Merge "Add db.dnsdomain_get_all() method"
Merge "Add DNSDomain object"
Merge "Remove some dead dnsdomain code"
Merge "Update nova.network to use DNSDomain object"
Merge "Remove get_network from nova.network.rpcapi"
Merge "Remove get_all_networks from nova.network.rpcapi"