Fix "revertResize/confirmResize" for V2.1 API

"revertResize/confirmResize" server actions were missed for V2.1 API.

This patch converts "revertResize/confirmResize" server action
for V2.1 API

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

Change-Id: I24bdb5b28fafeb60ea7b4ff044b12a519498e592
Closes-Bug: #1367642
Fallback to legacy live migration if config error

Commit ea7da5152cdca7ba674e2137c3899909995e2287 added a path to using
migrateToURI2 for live migration if the version of libvirt used has the
VIR_DOMAIN_XML_MIGRATABLE flag set.

However, a bug in older versions of libvirt causes the live migration to
fail because it's incorrectly validating the old and new domain xml's
for ABI stability.

Not all distros are running with the patched version of libvirt so add a
check in place such that if we fail live migration on the new path with
VIR_ERR_CONFIG_UNSUPPORTED, assume it's due to this issue and attempt
the legacy migrateToURI call.

Closes-Bug: #1362929
Related-Bug: #1279563

Change-Id: Ie82566121c2ed3a6d55919bc111358f4129cb404
Fix hook documentation on entry_points config

The syntax suggested for adding hooks to nova via setup.py entrypoints is:

    entry_points = {
        'nova.hooks': [
            'resize_hook': your_package.hooks.YourHookClass,
        ]
    },

But this is incorrect. The proper syntax for an entry_points entry is:

    entry_points = {
        'nova.hooks': [
            'resize_hook=your_package.hooks:YourHookClass',
        ]
    },

Change-Id: Id7bc6891dc542d4317e82e15300c7293eb0d17a0
Closes-bug: #1374666
libvirt: consider vcpu_pin_set when choosing NUMA cells

When we get a single NUMA cell instance scheduled to a NUMA capable
host, we do not account for  cpu_pin_set when choosing viable cells for
the given instance. meaning we could choose a NUMA cell that has no
viable CPUs which we will try to pin to.

This patch changes that behaviour and also adds a test to prevent a
regression. We also fix up how some of the tests mock the random.choice
method, because now we give it a list of sets (of cpus), but also
because it is now easier to catch a regression since we actually use the
passed value.

Change-Id: I0d740170db52a4777924648683ac98de9cf4b3cf
Closes-bug: 1372845
Merge "Fallback to legacy live migration if config error"
Merge "Fix "revertResize/confirmResize" for V2.1 API"
Merge "libvirt: consider vcpu_pin_set when choosing NUMA cells"
Merge "Fix hook documentation on entry_points config"