libvirt: Review of the code to use module units

In some places we do not use the module units to refer
bytes type.

Change-Id: Ia89684bb6531bfdcee565cb1bdd33ed943ec3971
xenapi: clean up step decorator fake steps

In vmops.py there are some fake methods to adjust the number
of steps used for a resize up/down.

 + This patch adds to the method used to create steps a new parameter
   'total_offset' to adjust the offset of total steps.
 + This patch also adds a missing test for a successful resize down.

Change-Id: I506045442d893e91b03ce33e4aab9930966c8ec2
Closes-Bug: 1235108
Make nova-network a "conductor-using service"

In order for a service to reliably use conductor at startup, it must
wait for conductor to become available before making any requests.
This is indirectly controlled by the "db_allowed" flag to the service
startup. This should be equivalent to the "use_local" setting in
the conductor group, so this patch sets this for network so that a
subsequent patch can introduce a conductor-using call in init_host().

Note that compute was incorrectly passing this flag always as False,
so this patch fixes that up as well.

Related to blueprint nova-network-objects

Change-Id: I9a98fb943895d0d2d359e0d9d38f09fb0f6ddd5a
Make nova-network use Network object for get-all-by-host query

This makes nova-network use the NetworkList.get_by_host() instead
of the direct-to-database query.

Related to blueprint nova-network-objects

Change-Id: Id94415ea650bce8009ea2db98f5d175206f7e509
Make nova-network use NetworkList for remaining "all" queries

This makes nova-network manager use NetworkList for the remaining
get_all and get_all_by_uuids queries.

Related to blueprint nova-network-objects

Change-Id: Ic3e53bb4dc7b6930ceed14e214bbf66d0cc09f53
Make nova-network use Network object for remaining "get" queries

This makes nova-network manager use the Network object for the
remaining single-item "get" queries.

Related to blueprint nova-network-objects

Change-Id: I6b1764e3c95337982cf4fbf503ddcb755e33cf2b
Make nova-network use Network object for updates

This makes nova-network manager use the Network object (which is
already present in most places) for update operations, in the form
of save().

Related to blueprint nova-network-objects

Change-Id: Icd1a41f1da67d08ecccf8ef9ebc5b9d1e7b28eab
Make nova-network use Network object for set_host() operation

This makes nova-network manager use the Network object instead
of the direct-to-database call.

Related to blueprint nova-network-objects

Change-Id: I109aa8fe3589100cf32a40ce90f7b28ca2e5440a
Make nova-network use Network for associations

This makes nova-network use the Network object for associate
and disassociate operations instead of direct database calls.

Related to blueprint nova-network-objects

Change-Id: Ia1615a83af102a527d82c4b22e1dcec2e9364c28
Merge "xenapi: clean up step decorator fake steps"
Merge "libvirt: Review of the code to use module units"
Merge "Make nova-network a "conductor-using service""
Merge "Make nova-network use Network object for get-all-by-host query"
Merge "Make nova-network use NetworkList for remaining "all" queries"
Merge "Make nova-network use Network object for remaining "get" queries"
Merge "Make nova-network use Network object for updates"
Merge "Make nova-network use Network object for set_host() operation"
Merge "Make nova-network use Network for associations"