Add comment/doc about utils.mkfs in rootwrap

We call mkfs in nova/utils.py as well. Updates
the rootwrap file so we document this.

Change-Id: I58a3f4686735f45ee1aafe698f6662ff9d70e1f1
Replace assertEqual(None, *) with assertIsNone in tests

Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I0d38a82e78fbe94657ab9a71c08422007843d179
VMware: improve unit test time

A number of tests would invoke code that would sleep. This
patch adds a mocked function for the sleep.

Change-Id: I2d36bd456a11fcb7145baa5eb4c6875b9ec765d3
Closes-bug: #1280758
Convert add_fixed_ip_to_instance to objects

Related to blueprint icehouse-objects.
Related to blueprint compute-manager-objects.

Change-Id: I2c79b02e20347caaa2c0c67c46c22b818559aceb
Convert remove_fixed_ip_to_instance to objects

Related to blueprint icehouse-objects.
Related to blueprint compute-manager-objects.

Change-Id: I443784d95cf0556dc4e6f9ac7f91466c766819b6
Convert post_live_migration_at_destination to objects

Related to blueprint icehouse-objects.
Related to blueprint compute-manager-objects.

Change-Id: Icaf0346c852d2f6a804675c975e54a7df642c1ab
Ensure parent dir exists while injecting files

Currently, if we inject a file to a not existing path,
the injecting will be failed with error 'No such file
or directory'.
Nova will firstly execute `mkdir -p` in folsom before injecting,
but this operation is lost from commit
72918415f2b6a241d6097a563aba55a849936591

This patch fix this bug by adding the `mkdir -p` operation as folsom.

Closes-bug: #1272829

Change-Id: If33a79c538e07cb25300db64ac7a9dee3d3b19c2
Fix InstanceNotFound error in _delete_instance_files

Currently the cleanup_running_deleted_instances peroidic task
failed with InstanceNotFound exception, this is because the
db query is not including the deleted instance while
_delete_instance_files() in libvirt driver.

Closes-bug: #1280140

Change-Id: Ie65ff255ad3c582a71db93b07304a21d4976a193
Merge "Add "body=" argument to v3 API unit tests"
Merge "Update log message to support translations"
libvirt: support configurable wipe methods for LVM backed instances

Provide configurable methods to clear these volumes.
The new 'volume_clear' and 'volume_clear_size' options
are the same as currently supported by cinder.

* nova/virt/libvirt/imagebackend.py: Define the new options.
* nova/virt/libvirt/utils.py (clear_logical_volume): Support the
new options. Refactor the existing dd method out to
_zero_logic_volume().
* nova/tests/virt/libvirt/test_libvirt_utils.py: Add missing test cases
for the existing clear_logical_volume code, and for the new code
supporting the new clearing methods.
* etc/nova/nova.conf.sample: Add the 2 new config descriptions
to the [libvirt] section.

Change-Id: I5551197f9ec89ae2f9b051696bccdeb1af2c031f
Closes-Bug: #889299
XenAPI: Add the support for updating the status of the host.

  We added a function into the xenhost plugin to get information
about PCI devices. Roughly we run the lspci command on dom0. This
information will be used to get the list of pci devices  that are
passed on the pciback.hide dom0 command line.

  The hide option is used to hide the devices from the normal guest
drivers and assign them to the pciback kernel driver at boot on dom0
instead of their normal driver. We will parse the output of the lspci
command to find which device is using the pciback kernel driver and
thus to know if it has been passed to the pciback.hide option.

  This information will be used to perform the match with the
list of pci devices provided in pci_whitelist into /etc/nova/nova.conf.

Implements: blueprint pci-passthrough-xenapi

Change-Id: I465fc5d29f3c47ab0079adcfcc2d7d6501bd4b20
Remove underscore for the STATE_MAP variable

The STATE_MAP will be used by the V3 diagnostics support. Removing the
underscore will indicate that the dictionary is no longer local.

Change-Id: Ife13e179abf0c1b31dafdf19fb0f3b29054199f2
XenAPI: Add the mechanism to attach a pci device to a VM.

 Before booting a VM we check if there are PCI devices reserved
by this VM and if there are any we attach them.

 A PCI device can be asked by a VM by choosing a flavor that
request PCI devices. See the wiki about pci passthrough for more
details:

https://wiki.openstack.org/wiki/Pci_passthrough#Create_a_flavor

 We are attaching a PCI device by adding a key "pci" to the
"other-config" parameter of a VM.

Change-Id: I4aca96b11f931f70cf6442adac64e867ce1affb6
Implements: blueprint pci-passthrough-xenapi
Fix compute_node_update() compatibility with older clients

A recent change changed the format of the data passed to conductor's
compute_node_update() method. The 'stats' element of 'values' was
changed from a dict to a JSON-encoded string. When older clients
call this method with a dict, the newer conductor puts the actual
dict in the SQL instead of a string, which breaks.

Change-Id: Ida1ad76752b1944f33c1aa9436ce36790705d6a5
Closes-bug: 1280034
Merge "VMware: fix exception when using multiple compute nodes"
Refactor get_iscsi_initiator to a common location

Refactor get_iscsi_initiator to a common location so that other
drivers can use it, without reaching into virt/libvirt. This patch
updates the current baremetal volume driver to the new shared location.

Change-Id: I30539f4bb917e486739f797bb6a9579e1cdffd22
Merge "Remove underscore for the STATE_MAP variable"
Fix the indents of v3 API sample docs

There are some indent typos in v3 API sample docs.
Most API samples' indents are 4 spaces, but some samples' indents
are 2 spaces. This patch fixes them.

These typos have been found during the work for auto-generating API
API sample docs from API validation schemas. The auto-generator'll
output API sample docs with json.dumps() method and that would make
the difference between current docs which are fixed with this patch
because the generator would make API samples consistent.
This patch's purpose is also for preparing the generator.

Change-Id: Ieb6e587fcf4c01c128199950db93e1087bc43f41
Merge "Removes os-instance-usage-audit-log from the V3 API"