libvirt: Close opened file explicitly

Every opened file should be closed properly.

Change-Id: I5405638ba033f75957461c0ad33be9f0c6a17e3b
Remove bdms from run_instance RPC conductor call

After the move to build_and_run_instance in change
Iefab71047996b7cc08107794d5bc628c11680a70 we get the block device
mapping out from the DB on the conductor side. We need to do this since
there is not enough data in the RPC call from the API (we don't have DB
id's so compute can't use that data to update block devices in the boot
process).

Based on this - we should stop sending block devices to the conductor.

Change-Id: Ic7a5da3f0d58093c3b249025b9fcd36a1321f2b3
Initialize objects field in ObjectsListBase class

Normally the underlying value of an object attribute is set upon first
attempt to set it and would not exist otherwise. This causes the object
attribute access mechanism to fall back to obj_load_attr.

This is mostly fine for a lot of use cases, but it also means that for
ObjectListBase subclasses, it is not possible to construct them empty
and then call list methods on them without resorting to something like:

  myListObject(objects=[])

This patch makes ObjectListBase default it's objects filed to [] if it's
not passed in allowing us to have a cleaner API and call list methods
such as len() on objects constructed on the fly..

Change-Id: Iad1301cc4f88018f10f3dd6c76e35275cd0c51f6
Merge "Remove bdms from run_instance RPC conductor call"
Merge "Initialize objects field in ObjectsListBase class"
Merge "libvirt: Close opened file explicitly"