Merge "Add method to manage 'put' requests in api-sample tests"
Merge "Add API samples to images api"
Merge "Adds API sample test for limits"
Speed up creating floating ips.

Previously, we would make two separate DB calls for each floating ip
we created in floating_ip_bulk_create. This was just a little slow
(several hours to create a /16). This patch speeds up floating ip
creation just a little:

$ time bin/nova-manage floating create --ip_range=10.250.0.0/16

real	0m48.766s
user	0m34.342s
sys	0m1.984s

Resolves bug 1023560.

Change-Id: Ie3663440d414b102111178899db0c571769edba8
Re-attach volumes after instance resize

Fixes bug 1051600.

Update the compute manager to pass block_device_info to three
additional driver entry points and update all virtualization drivers
to accept it as an optional argument.

Within libvirt, migrate_disk_and_power_off() will now iterate and disconnect
any existing connections.  finish_migration() simply updates its use
of to_xml(), passing block_device_info, which returns a libvirt XML
fully populated with volumes.  Finally, finish_revert_migration() no
longer uses the on-disk XML file, instead generating it via to_xml; as
the former lacks volume configuration.

Change-Id: I7dccd03ef9cc7d2848f07764d4def3787e41e202
Fix xml metadata for volumes api in nova-volume.

Fixes bug 1040891

Change-Id: I6295e4084adc33999bfdf66728623b278895b2d6
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Allow admins to de-allocate any floating IPs

Fix bug 1045508

Change-Id: Ie5be3748c16a592209934cc85777f534e84842bc
Skip tests in OSX due to readlink compat

Although greadlink can be installed on OSX, there is not
compatibility in the code so the tests should be skipped until
OpenStack supports running this code on OSX/BSD.

Fixes bug 1037835

Change-Id: Iddaba950f9f8b3823bd62b59b36e08aff4a979f8
Escape ec2 XML error responses

Fixes bug 978439

XML error responses to ec2 calls include user supplied data that is not
escaped. This could result in returning invalid XML.

This is addressed by using utils.xhtml_escape() on purposeful eC2 error
responses and when handling webob.exc.HTTPException.

Extended the tests for utils.xhtml_escape() to cover '&', '>', '<' and a tag
look-alike. These conversions are implicit to saxutils.escape().

Change-Id: Icb3e861c6c06c0d9c3b9e2ab1a658581a0fb39c6
Merge "Skip tests in OSX due to readlink compat"
Optimizes flavor_access to not make a db request

We are now caching the flavor object in the request so we don't
need to make another db request. Note that there is further refactoring
possible but I wanted to keep the changes small to minimize chance for
regression. Also, no need to check for not found since we will have
errored much earlier if the flavor doesn't exist.

This change is necessary to create a failing test for bug 1046040

Change-Id: I718203b33a192575288057dd4631a9aa3086b567
Makes sure new flavors default to is_public=True

The default for is_public is true in the database, but new flavors
created through the extension was defaulting is_public=None and passing
it through to the db layer where it gets converted to False.

This patch fixes the issue by defaulting is_public to True at the api
layer. Incldes a broken test to verify.

Fixes bug 1046040

Change-Id: I4c361c0055a14de29e364868074e17cf3ec23220
Fix creation of iscsi targets

Previously when creating iscsi volumes, we were using

tgt-admin -e -c <config file> --update volume-id

Unfortunately the side affect of this is that tgt-admin
removed other volumes that wasnt connected to an iscsi
connector. Which is obvlously not what we want.

In order to fix this we create the targets.conf for the
volume but we call tgt-admin --update icssi qualified name.
We also set the tid in the configuration file now as well.

Fixes LP: #1038062

Change-Id: I23719390fbfaea5b55389a5c8ebaa8966cc283a8
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Automatically convert device names

In the past, users have been able to specify xvda or xvdb and it
has worked. We are now validating device names against the expected
name from the backend, and this causes confusion, especially for lxc
which expecting device names to be /dev/a /dev/b /dev/c etc.

This patch addresses the issue by automatically converting between
different formats. The proper format for the backend will be returned
by the api. Includes tests to verify that the conversion works and
that the lxc values work as expected.

Fixes bug 1046020

Change-Id: Iffa552ba05f89f70b6fb93043edf8882c8412215
Yield to another greenthread when some time-consuming task finished.

Partially addresses bug #1045152

On a heavily loaded compute node, it can be observed that periodic tasks
take so long to run that the report_state() looping call can be blocked from
running long enough that the scheduler thinks the host is dead.

Reduce the chance of this happening by yielding to another greenthread
after each periodic task has completed and each loop in some methods
that has linear relationship with the number of instances.

Change-Id: If2b125708da8298b20497e2e08e52280c102f1e1
Merge "Optimizes flavor_access to not make a db request"
Merge "Makes sure new flavors default to is_public=True"
Merge "Allow hard reboot of a soft rebooting instance"
Fix simple_tenant_usage's handing of future end times

Fixes bug #1043999

simple_tenant_usage returns the usage in the range between the supplied
start and end query parameters. The _hours_for() method calculates the
number of hours the instance was running in this range, even if the end time
is in the future.

By default, python-novaclient requests usage between 4 weeks ago and tomorrow.
This means we a report which accounts for 24 hours of extra running time for
each currently running instance. Fix this by clamping the period of the
returned report at the current time.

Change-Id: I61c211fd85b729aaeaac6ef24644ee19eb5bb6b0
Sync some updates from openstack-common

Syncs the latest code from the stable/folsom branch.

Includes:

  5a56539 Allow non-string items in the creds dict.
  769ec65 Don't trap then re-raise ImportError.
  202b8b7 Fix spelling typos

Change-Id: I6473358c743ce77b90dfb1282f3e257e6fd3dbf6