Remove the unused _validate_device_name()

Since the commit I898ae56539c6101680983d1eca4bce6d92bd5ce6,
_validate_device_name() method has been unused.
This patch removes the method.

Change-Id: I642b71385432801eb8fdd35484fbcb3ed5efa795
Recover from POWERING-* state on compute manager start-up

If a compute manager is stopped / fails during POWERING-ON or
POWERING-OFF operations then the instance will be left stuck in
a transitional task_state.

This change handles both these states by simply either retriggering
the power on or power off request on start-up of the compute manager.
If the operation had previously completed then retrying will
essentially be a no-op so it is safe to handle instances in this
state in this way.

Closes bug: #1304333
Change-Id: I262be6b13a764bc1355be34cdc0180e8e87f260b
Merge "Revert "Use debug level logging during unit tests""
Missing catch InstanceNotFound in v3 API

After apply instance look helper, some compute api
will invoke instance.save(), it will raise
InstanceNotFound also.
This patch adds them.

Closes-Bug: #1280067
Change-Id: I73cb35c90f1e46a447ae1807a997713105e08bde
Merge "Fix description of ServerGroupAffinityFilter"
xenapi: Cleanup tar process on glance error

Currently, when the network connection to glance is interrupted, there
is different behaviour on upload and download.

This change ensures the behaviour between the two code paths is more
consistent.

Uploads generally need to be given more time before they timeout, so
to keep a single timeout between upload and download, the timeout is
increased to 90 seconds.

At the same time, it ensures the tar process gets killed when any
issues occur with the communication between the hypervisor and
glance.

Change-Id: Id5396e5d3c1052dc2979476a886412da65e08670
Closes-Bug: #1284596
Merge "Correct test boundary for libvirt_driver.get_info"
Merge "Add return value to some network API methods"
Merge "Fix anti-affinity server-group boot failure"
Check image exists before calling inject_data

os.stat removal is needed for network-based image backends

Partly revert Change-Id: I264540de736c2bcb92567826fe5ba672e1244ba2
Partly fixes bug #1257674

Change-Id: I83e95fec6f08bc36f0e2b299fb269ceaa3500243
XenAPI: Add host information to glance download logs

This change adds a context field to the xenapi session
call_plugin_serialized_with_retry method to provide better
logging information.  This is then used by the glance image
downloading to provide the host IP we are contacting.  This
saves having to dig through other logs to get this information.

I added a mock unit test to test_glance to verify the download
retry mechanism works since this wasn't verified before.
It is the first mock test in test_glance.py

Change-Id: I4de2b9e61ce25fb8ab693eac2f67559d0eb01a77
Merge "Update docs to reflect new default filters"
Merge "Fixes messages logged on Glance plugin retries"
Merge "Add tests for remaining expected conductor exceptions"
Remove mention of nova-manage.conf from nova-manage.rst

As of commit 07ee9639 three years ago nova-manage.conf is no longer
used, so let's clean up the man page.

Closes-Bug: #1304580

Change-Id: Ie061733da4bd0337f510e17b6dd7ca5bae14b7de
Xen: Do not resize root volumes

Boot from volume on Xen wants to resize the volume
when the image size doesn't jive with the volume size.
This patch doesn't attempt the resize.

Closes-Bug: #1296839
Change-Id: Ic03b7997f61f1a22362dafd86664db681e54087e
Fix straggling uses of direct-to-database queries in nova-network

There were a few remaining calls directly to the database module
left in nova-network. These would fail because of the wedge we
put in place specifically to catch this case. However, we don't
test VlanManager in the gate, which means we didn't catch them
until now.

This required adding two more methods, one each to Network and
NetworkList, but they are both extremely simple.

Change-Id: Iecc382074f060da1bd6f740d7bde0b20a0be2fcf
Closes-bug: #1304724
Merge "Make example 'entry_points' parameter a dictionary"
Merge "Fix straggling uses of direct-to-database queries in nova-network"
Fix bug detach volume fails with "KeyError" in EC2

Modified volume['instance_uuid'] to volume.get('instance_uuid'),
to avoid "KeyError", when detach a volume with "attaching" status.

Change-Id: Ic1aacab212c2a2026d18ef57ad9d77fdc6d86b47
Closes-Bug: #1280532