PXE validate() to fail if no Ironic API URL

As part of the deploy process the conductor should pass the URL of the
Ironic API to the deploy ramdisk so that it can talk back to the Ironic
API, but if the URL is not present in the Ironic configuration file or
in the keystone catalog the deploy process will fail in the middle. This
patch adds a verification to the validate() method to make sure the URL
is present before the deploy starts.

Related-Bug: #1290482
Change-Id: I95472660deff0e23a19d0b744f711bbe3acc2191
Set the database.connection option default value

This was previously set right before ironic-api start, but the
default value must also be present for ironic-dbsync calls.

Note: the default value of database.connection is changed here - from
now on the sqlite database will be stored in ./ironic/ironic.sqlite
instead of ./ironic/openstack/common/db/ironic.sqlite.

Closes-Bug: #1290645

Change-Id: I2c2ab2f10a99ffd564611351e71c0b88adc20ba7
Use range instead xrange to keep python 3.X compatibility

xrange is replaced by range in python3. Lists that be created
in the test cases are short, so just use range instead.

closes-bug: #1291191

Change-Id: I8e604ea62150905563cb90aa0d227b11628e9ecc
Fix misspelled impi to ipmi

There was a function with the name misspelled which error was
carry on to other tests in the code due to code completion.

s/impi/ipmi/g

Change-Id: I92e4bb93a09f779f21ceb4f16e7f865976a42ec0
Make the Nova Ironic driver to wait for ACTIVE

After returning from spawn() Nova will set the status of the instance
to ACTIVE, but that's wrong because Ironic does the deploy in an async
fashion. So this patch makes the Nova spawn() method to wait for the
Node being provision by Ironic to be on the ACTIVE (or DEPLOYFAIL)
state before returning.

Change-Id: I057a6e2e9fc6f4c85b7b2b9c63f541248b1214ac
Merge "Set the database.connection option default value"
SeaMicro use device parameter for set_boot_device

To have consistency between the different drivers, we modify
SeaMicro to make use of the 'device' parameter instead of
'boot_device', as the other drivers are using, for the set_boot_device
vendorpassthru.

Change-Id: Id7e07924c4c028013db29566952d8dbd317a9f2c
Check BMC availability in ipmitool 'validate' method

Check that BMC is accessible with provided IPMI credentials added
to 'validate' method of ipmitool driver, simple command 'mc guid'
used.

Partial-Bug: #1255648
Change-Id: I8942163a80e2d76784fa973a349d6fdd6f0b8110
Delete node while waiting for deploy

During a deployment, some drivers set the node.provision_state to DEPLOYWAIT
-- eg, while waiting for a callback from the deploy ramdisk agent. This
change makes it possible to de-provision the node during this window (ie,
clean up the files and network env, and power it off).

Note that this state is explicitly included in the check within the
ConductorManager's do_node_tear_down; it was the API check that prevented
this.

Also modified a user message to indicate that the node is being
provisioned or decommissioned.

Change-Id: Ia67ec635c36f643d99795d91f9dfb10b577f033f
Closes-Bug: #1291056
Merge "Check BMC availability in ipmitool 'validate' method"
Merge "Use range instead xrange to keep python 3.X compatibility"
Merge "Fix misspelled impi to ipmi"
Driver utils should raise unsupported method

Instead of raising InvalidParameterValue when an unsupported vendor
extension is called, this patch causes the driver utils to raise
UnsupportedDriverExtension.

Change-Id: Id297639e67f444164b093c3f1f9731995319599f
Set boot device to PXE when deploying

When deploying a node using the PXE driver, we set the boot device to
'pxe' (both ipminative and ipmitool understand it), and set it as persistent,
so after the deployment, the node boots using the PXE selected kernel

Change-Id: I1d25023f5a0bd46a714395367ceb2ee60a680cff
Closes-Bug: #1264596
Merge "Make the Nova Ironic driver to wait for ACTIVE"
Merge "SeaMicro use device parameter for set_boot_device"
Merge "Driver utils should raise unsupported method"
Merge "Set boot device to PXE when deploying"
Stop logging paramiko's DEBUG and INFO messages

When ironic-conductor is run in debug mode with the SSH power driver,
Paramiko logs spurious DEBUG and INFO messages constantly. There is
already sufficient logging within the SSH power driver.

This patch adds paramiko to the list of modules who should only be
logged at or above a WARN level, even in debug mode.

Change-Id: Iccdfebbdc344c33c8fc0ab81f3ab5a176cd43a17
Fix typo tenet -> tenant

Change-Id: I1ad380f0352694e10050961cd90c68c58f65b226