Reassign MAC address for vm  when resize_revert

In the case of a resize or migrate on the same host, we need to assign
a temp mac address to the source LPAR so we don't have a conflict when
another LPAR is booted with the same mac address as the original LPAR.
We need reassign the original mac address, replacing the temp mac on
the old instance during revert resize. The new instance has been
destroyed before this method, so remove the precondition to make sure
original mac address be set.

Fixes bug #1196404

Change-Id: I709292a7725f0a21f04f1c3c79f2fafc4437e402
Fix debug message for GroupAntiAffinityFilter

Fix bug 1198109

The log message in not accurate for GroupAntiAffinityFilter, it
should be fixed as "Group anti affinity"

Change-Id: Ib58c2934626c28349dd49bafd1b3e781fcbe9cb9
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
Replace get_instance_metadata call in api.ec2.cloud._format_instances

The _format_instances method in api.ec2.cloud populates an instance
dictionary from the sqlalchemy instance model objects, and populates the
metadata by calling compute.api.get_instance_metadata.

This is unnecessary, since the instance objects already have metadata
attached. The helper class is needed until the migration to nova objects
is complete.

Partially fixes bug #1192715

Change-Id: Ib5a593bd36c8d6a531b9494b9861cca9a40ed08a
Validate volume_size in block_device_mapping

Reject invalid values for volume_size upfront.
For compatibility with old python-novaclient, an
empty volume_size is ignored.

Create a common _validate_int_value() function for
validating that a parameter is an integer in a given
range. Use it also for min_count/max_count to share code.

Fixes LP Bug#1199539

Change-Id: I18ac285d5b3c8200d7706c7d577809b15d6ab9e8
Fix duplicate fping_path config option

This is causing an error in the config file tool generator. Just use
the config option in the original copy of this code.

Change-Id: I5e7c3069913eea11633f35273183c3c3b46f4969
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>
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
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
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
Fix aggregate update.

Bug description: when update 'availability_zone'
value existing aggregate metadata cleared.

Method aggregate_update() in sqlalchemy api updated.

Fix bug 1200369.

Change-Id: Ie1dffa90b1e339b81883dc14037f7817f1cec15d
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
Unify duplicate code for powering on an instance

Moves duplicate code to a common method

Change-Id: I9809e654df8602c00a18cbb7be3a4cf4498b274b
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
Prompt error message when creating aggregate without aggregate name

When using API to create an availability zone via aggregate, the
prompt message will be "There was a conflict when trying to complete
your request" if the request body looks like below.
{"aggregate": {"name": "", "availability_zone": "zy1_zone53335"}}

The message is not accurate, aggregate name should not be null.

Fixes bug 1188032
Change-Id: I1fb74186886283a9b6763abb665b8ce42e4bb24c
Fix blocking issue when powervm calculate checksum

In powervm driver, it takes long time to calculate file checksum
before and after transferring image file. Because nova-compute is
a single thread, it won't process any other work at the same time.
Here give other threads chance to run by using time.sleep(0), that
acts as a yield of the thread for eventlet.

Fixes bug #1181895

Change-Id: I79fbd9d7d4fb7791ca599b136cf9945dec8996e2
Support scoped keys in aggregate extra specs filter

Update AggregateInstanceExtraSpecs to support scoped keys in flavor
extra_specs.  Otherwise, you can't use this filter in combination with
other filters that act on un-scoped extra specs, because they may
conflict.

This recently came up on the mailing list:

http://lists.openstack.org/pipermail/openstack-dev/2013-July/011421.html

Fix bug 1198290.

DocImpact - See updates to filter_scheduler.rst.

Change-Id: I03d1d3268c800dc6982ffa4b13f8b9489428b991
Don't ignore 'capabilities' flavor extra_spec

The ComputeCapabilitiesFilter would improperly ignore an extra spec of
'capabilities' since it matched the scope name.  When it's not scoped,
it should be treated as an unscoped extra_spec.

Fix bug 1198941.

Change-Id: I781754ae0cb9b2a9f7e7e973f4531f2a99a98d86