Update instance.node on evacuate

The evacuate API works like a migration from a dead node. As part of
migration, the instance.node property is updated to reflect the target
node that the instance is migrating to. This is later used when the
migration is confirmed/reverted. The problem is when an instance is
being evacuated, the node property isn't getting updated and the
instance will have the old (dead) node value set on it after it's
evacuated. This patch updates instance.node when the instance is
evacuated.

Fixes bug 1198284

Change-Id: I4901fb937160e955df7c97c37265783e844fdbef
Add a VIF driver for IOVisor engine

Implements blueprint iovisor-vif-driver

Unit Test is included
Follows the same structure that OVS and Qbh drivers
Includes the rootwrap config to allow calls to ifc-ctl for managing IOVisor engine.

Change-Id: I346b4d84a6e48d56f307349ed681355d26710ecd
Sync db.models.Instance* with migrations.

This patch syncs models with migrations for:
    - InstanceIdMapping
    - InstanceMetadata
    - InstanceSystemMetadata
    - InstanceTypeExtraSpecs
    - InstanceTypeProjects
    - InstanceTypes
    - InstanceGroupMember
    - InstanceGroupPolicy
    - InstanceGroupMetadata

Blueprint: db-sync-models-with-migrations

Change-Id: Ice28b9d545f60f7df381e3fcf2c86a2b8e7350d3
Sync db.models.Security* and db.models.Volume*.

This patch syncs models with migrations.

Change-Id: I2e4a4cf28376d933be47bc496933e6964e19a56e
Clarify flavorid vs instance_type_id in db

And add comment about future direction.

Partially implements bp flavor-instance-type-dedup

Change-Id: Ia6c1bad5c3cc35e772c32803c27a50a7728045e5
Sort output for unit tests in test_describe_tags before compare

There's no guarantees on what order the output from describe_tags
comes back in, so it needs to be sorted.

Partially fixes bug #1192715

Change-Id: Ibb2619e8077ea8b8bd4796f9ffe89c2376d047f6
Allow ::/0 for IPv6 security group rules

Nova fails to create a security group rule if ::/0 is used as
value for the cidr field

Fixes: LP bug #1199943

Change-Id: Ifce53dbc9f0740337921491aa752900892f47052
Signed-off-by: Rosario Di Somma <rosario.disomma@dreamhost.com>
Sync 10 DB models and migrations.

This patch syncs models with migrations for:
- BlockDeviceMapping
- IscsiTarget
- FixedIp
- FloatingIp
- KeyPair
- Migration
- Network
- ProviderFirewallRule
- Reservation
- S3Image

Blueprint: db-sync-models-with-migrations

Change-Id: I8e16375fe48744513167272e956cdbfdbfd8af23
Change force_dhcp_release default to True

Historically it was was false because it requires the dnsmasq binary
'dhcp_release' which was not present in all distros.

Related to bug 970893

DocImpact

Change-Id: I4975d85a66fb930d6a56900dd569cec2a1874439
xenapi: enable attach volumes to non-running VM

Similar to when detaching a volume, ensure we only attempt to
plug a VBD when the server is running, otherwise it will fail.
This also fixes up the existing unit test that was not working.

Fixes bug 1199477
Change-Id: I32d85ca09849b63b815cc3daba3bb02c31d92e8d
Unimplemented pause should not change vm state on PowerVM

The instance of PowerVM does not support pause, but
after pause the instance, the state change to PAUSED,
it's unreasonable.

Change-Id: I4fb184388c37ea8708cdacc173dc1b2dbd4d1597
Fixes: bug #1202082
Fix extensions os-remote-consoles to follow API v3 rules

* Add extensions.expected_errors decorator
* Correct the action naming style
* Catch exception ConsoleTypeInvalid explicit

Partially implements bp v3-api-extension-versioning

Change-Id: Ie07751b2db72c43af23936e2e8c00ee3c861428a
Handle instance being deleted while in filter scheduler

Adds handling of InstanceNotFound when trying to update the
scheduled_at time of an instance.

Users can delete an instance at any time (and many test
cases delete very quickly), so this should be a warning
not an error

Fixes bug 1191126

Change-Id: I72b296668f60b1de71ff8c6d7bbb749023d89f12
Passing volume ID as id to InvalidBDMVolume exception

Passing volume ID as positional argument causes error
 when formatting exception message.

Fixes bug 1200584

Change-Id: Iac49c8b5c13d3807e8bb744151300418b121bd5c
Remove unused recreate-db options from run_test.sh

run_tests.sh had an option to delete tests.sqlite, but that file is not
used anymore so the run_test options don't do anything.

Change-Id: I1abb257579da34c9dd7698543d8297268276bbc5
Sync v2/v3 console_output API extensions

Synchronises changes made to the v2 version of the console_output
API extension to v3 in commit c651f4928c65407cff86a9f9efc046a0f76a9519
which fixed bug  #1194032

Partially implements blueprint nova-v3-api

Change-Id: Ie28d771d25636decb7b1f17756654be56762b35f
Unify duplicate code for powering on an instance

Moves duplicate code to a common method

Change-Id: I9809e654df8602c00a18cbb7be3a4cf4498b274b
port disk_config API into v3 part1

This changeset only copies the v2 files into the appropriate v3
directories unchanged. The copy as-is will not be loaded by either
the v2 or v3 extension loaders. The second changeset will then
make the changes required for it to work as a v3 extension.

This is being tried in order to make reviewing of extension
porting easier as gerrit will display only what is actually
changed for v3 rather than entirely new files.

Partially implements: bp v3-api-extension-versioning

Change-Id: Ia2ef4ab8cb63878d16360378c61e5182f4593200
Makes _PATH_CELL_SEP a public global variable

_PATH_CELL_SEP is used outside of cells.utils so it should be not be private

Change-Id: I0b06a223b50f7d90007bb44ec7897174ed836ad4
Port used limits extension to v3 API Part 1

This changeset only copies the v2 implementation file into the
appropriate v3 directory unchanged. The copy as-is will not be
loaded by either the v2 or v3 extension loaders. The second
changeset will then make the changes required for it to work as a
v3 extension.

This is being done in order to make reviewing of extension porting
easier as gerrit will display only what is actually changed for v3
rather than entirely new files.

Partially implements blueprint nova-v3-api

Change-Id: I34214370f53d481346eb11fec6b8fd0ddeb42918