Fix utils.execute() for consistency with Oslo code

Oslo processutils.execute() can use non-string command line
arguments, they convert to strings internally.
This patch fix utils.execute(), non-string arguments can be
used as in Oslo execute without error.

Change-Id: I4f640582375b244e23a6641c3b94157c49c8ee3b
ipmitool driver raises DriverLoadError

When the 'ipmitool' utility is not present in the system path,
the IPMITool driver will now raise a DriverLoadError during
initialization.

Change-Id: Iba8c3ad7053c600487ce4eb829ef57c708d8f154
Virt driver logging improvements

Right now, there's no clue in nova logs whether or not we're still
polling nodes in ironic for state changes when provisioning or
unprovisioning. Let's add some log messages for this.

Also, make get_available_resources() log the number of nodes along with
the node uuids.

Change-Id: Ic83f4389ba1ca576deb87f46cde84ce414c5baeb
Test fake console driver

This patch adds a test case to test the FakeConsole in the fake
driver.

Change-Id: If12fad2a928683626fc66adc5e870f5c30357702
Cleanup virt driver tests and verify final spawn

This removes redundant mocking of the IronicClientWrapper._get_client() method
and instead relies on a local fake client wrapper. This allows us to verify
loopingcall usage in the final stage of instance spawn.

This also moves some client-specific tests out of the driver tests and into
the client wrapper tests where they belong.

Change-Id: I79b05773ff302057af6694bac4951470f8eb7c1a
Add 'context' parameter to get_console_output()

The get_console_output() that is called from 'nova'
have two parameters 'context' and 'instance'.

Change-Id: I56c8a01ad00f62e6be5fa525c8971c5e29fc5098
Closes-Bug: #1310132
Merge "Cleanup virt driver tests and verify final spawn"
Destroy instance to clear node state on failure

After a node has failed to deploy an instance, ensure the instance is
destroyed from the virt driver.  This clears the node state entirely before
the instance gets rescheduled.

Change-Id: I6a5d04f4c26c0910274783c0f686b0542af15f9c
Closes-bug: #1326364.
Merge "Add 'context' parameter to get_console_output()"
Mock time.sleep for the IPMI tests

The commit 53640a873000a12eebd627df555e7b2b0a27f659 introduced a interval
between IPMI commands to make sure that the BMC doesn't get bombarded
with requests, but not all tests are mocking the sleep command so now it
takes a lot more time to run. This patch is fixing this time problem by
mocking time.sleep at the class level.

Change-Id: I8810df1b59a0f650f68cc77b65667d59f1f6dd1e
Closes-Bug: #1332000
Clarify doc: API is admin only

Clarify wording in the architecture doc page that Ironic's API service
is intended only for privileged (admin) users and privileged
services in the control plane.

Change-Id: I2e660401c7e2ebe2f6dc89673236107727462fcc
Move PXE instance level parameters to instance_info

The commit 7735ad404bb2849f5be738c2f8a536b1f817c6b7 introduced a
new instance_info field to the Nodes so that all the instance level
information should live there and not mixed in the Node.driver_info
field. This patch is moving all the PXE instance level parameters from
the Node.driver_info to the Node.instance_info.

As all the data in the Node.instance_info is related to the instance,
this field will be completed erased as part of the node's tear down
process. For that reason the _removes_internal_attrs() function from
the PXE driver was removed.

These fields have changed from driver_info to instance_info and
their driver namespace ('pxe_') was removed because they are now
instance-specific parameters:

  'pxe_image_source' -> 'image_source'
  'pxe_root_gb' -> 'root_gb'
  'pxe_swap_mb' -> 'swap_mb'
  'pxe_ephemeral_gb' -> 'ephemeral_gb'
  'pxe_ephemeral_format' -> 'ephemeral_format'
  'pxe_preserve_ephemeral' -> 'preserve_ephemeral'

DocImpact

Implements: blueprint add-node-instance-info
Closes-Bug: #1320090
Change-Id: I608d2cdc6170d0bed826e532dedd120dd32a3b7e
Merge "Clarify doc: API is admin only"
Merge "Fix utils.execute() for consistency with Oslo code"
Merge "Mock time.sleep for the IPMI tests"
Merge "Move PXE instance level parameters to instance_info"
Updated from global requirements

Change-Id: I65748327d13953718abcc2dbe22325aa588b5c3c
Use temporary dir for image conversion

Image cache uses master_dir as temporary directory for images
conversion (pass tmp_path to fetch_to_raw()). This can cause
a problem because links created after conversion and
working files can be candidates for deletion.
This patch uses own temporary directory for image conversion.

Closes-bug: #1326556
Change-Id: I0ad1aeba95a177a5ea6a1d0a09ea37c5ff2b0837
Merge "Virt driver logging improvements"
Merge "Updated from global requirements"