Adds verbosity to child cell update log messages

Child Cells frequently update their parents with their capabilities and
capacities. The debug log message contains the capabilities or capacities
that are being updated. This patch adds the names of the parent cells to
which the information is being sent to the debug log message.

Change-Id: Ic34191da191369e64a016c8300a8da294aaa9e07
Closes-Bug: 1351301
Lock attach_volume

There are some issues with instance and volume cleanup when the volume
is not in a fully attached state so it will be safer to not attempt a
terminate_instance while there are attachments in progress.

Change-Id: I4347794e51004a881bf4ef5ee30f65ac28773e51
Closes-Bug: #1355348
Allow forceDelete to delete running instances

Currently attempting to force delete a running instance
fails while a normal delete can succeed. This changes the
behaviour of force_delete so any instance can be deleted
and not just ones which have already been soft deleted.

Also catch InstanceIsLocked exceptions at the API layer
and now also don't need to catch InstanceInvalidState
exceptions since they are no longer raised

DocImpact: forceDelete will now delete any instance and not
  just ones which have already been soft deleted

Change-Id: I06a476701ccb47d8f7fd6e43c394ccb3fac2b3aa
Closes-Bug: 1351001
libvirt: fix bug when releasing port(s)

During the process of deleting an instance, if
serial_console is enabled it has to check domain for
allocated port(s) to be released - Currently this is doing
after the domain has been undefined from libvirt which creates
a bug. This patch fixes the problem by moving this part of code before
undefining the domain.

Also 5fa74bc0b2 moves that part of code inside the method
_detach_encrypted_volumes which has nothing to do here.

Change-Id: Ie187748deff7b0143d1ca26e767c6665746094c5
Closes-Bug: #1366832
Fix 'os-start/os-stop' server actions for V2.1 API

'os-start/os-stop' server actions were missed for V2.1 API.
This patch converts 'os-start/os-stop' server action for V2.1 API

The differences between v2 and v3 are described on the wiki page
https://wiki.openstack.org/wiki/NovaAPIv2tov3.

Closes-Bug: #1367575

Change-Id: I8b0f27fb639034d368bcc1fc51d20daf9c2cdeb5
libvirt: set pae for Xen PVM and HVM

The Physical Address Extension (PAE) enables paging to produce physical
addresses with more that 32 bit (2^32 bytes, 4 GBytes), namely it
extends the physical address space to 64 GBytes (2^36 bytes).

When spawning a 32 bit image in Xen PVM or HVM, PAE should be enabled in the
hypervisor so as to ensure that it is able to run properly. According to
the Xen documentation it can be enabled safely: "In general you should
leave this enabled and allow the guest Operating System to choose whether
or not to use PAE. " [1]

[1] http://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html#pae_boolean

Closes-Bug: #1100697
Change-Id: If8d8ebc38efd969d96a1953446d72e72691734b3
Fix race condition in update_dhcp

This modifies linux_net to only make one query for the fixed ips.
Previously it was getting the list of fixed ips twice. It also
merges the convoluted logic around single_default_gateway into
the single query so that it doesn't make a db request per fixed ip.
This prevents a race condition that could lead to ips not allocating
properly if an instance is deleted while the dhcp config was being
updated. Also, e274c45dcd37f49d66cc3cce72c2fd97f444151c missed a
call to obj_make_compatible for instance version. This adds it
since it will be in a conflicting spot.

Change-Id: Iffdc60063b26c9e3f6b8dbe5b67301cbc19b2564
Resolves-bug: #1359510
Fix incorrect exception when bdm with error state volume

When boot from an error state volume, compute api will raise
InvalidBDMVolume exception which is incorrect. It should raise
InvalidVolume exception with appropriate prompt message.

Note that the v2 API extension is not updated to handle the
InvalidVolume exception since the API already handles the
base exception Invalid. A unit test is added to verify the
coverage.

Change-Id: I9dbc3f68e68b6d452077bc47717ad0fafd5640ac
Closes-Bug: #1361517
Co-authored-by: Matt Riedemann <mriedem@us.ibm.com>
fix up assertEqual(None...) check to catch more cases

To finally close out bug #1280522 it turned out that our hacking check
to eliminate assertEqual(None, ...) was pretty sub optimal. The
perfect fix would actually use the tokenizer, however this is a better
regex which catches a few more missing bits in our codebase. It's
probably close enough for most of what we need.

Fix the relevant tests that would fail the updating hacking check.

Change-Id: Ic8cb1192e001409d827c8da55fe536681895944b
Closes-Bug: #1280522
default=None is unneeded in config definitions

It's not required for setting config options, as it's the default, and
there were only 2 final places where it was set in the code, so we
should just clear that out.

Change-Id: I33dd0c002e48a5f5d26047b7f87643fce67f9e64
Closes-Bug: #1323975
Merge "Fix race condition in update_dhcp"
Merge "Allow forceDelete to delete running instances"
Merge "Fix 'os-start/os-stop' server actions for V2.1 API"
Merge "libvirt: set pae for Xen PVM and HVM"
Merge "Fix incorrect exception when bdm with error state volume"
Merge "default=None is unneeded in config definitions"
Merge "fix up assertEqual(None...) check to catch more cases"
Merge "Lock attach_volume"
Merge "libvirt: fix bug when releasing port(s)"
Merge "Adds verbosity to child cell update log messages"