Revert "Add requests requirement capped <1.2.1."

Fixes bug 1182271.

This reverts commit c39687edb9138c6eac675b8781a5d4bf5a51c968. The
original workaround is no longer needed, as pip is now configured to
install with the --upgrade flag and will therefore pull a new enough
python-jinja2 into the tox virtualenv even though site packages is
enabled in nova and an older distribution package of the same
library is still present on CentOS 6.4.

Change-Id: I33335314c7c1b26d630137edfa0cdc2d1947432e
Code dedup in class InstanceTypeExtraSpecsTestCase

Moved expected specs to setUp()

bp nova-tests-code-duplication

Change-Id: Id5326ad5445688a806b6667e2189e45c8dcdc69b
Speed up test BareMetalPduTestCase.test_exec_pdutool

The test .test_tilera_pdu.BareMetalPduTestCase.test_exec_pdutool had a 9
second sleep in it from tile_power_wait. Set this to 0 for testing.

Change-Id: I294e16b49a11fdfd3b590b3bb970f69a655c75d9
return 429 on API rate limiting occur

Currently nova will return 413 instead of 429 on API rate limiting.
Fix it so that the V3 API will not be influenced.

fixes bug 1187676

Change-Id: I25e3f6766597c2475b4fc3203a43b159f0e99739
Move tests test_verify_checksum_* to separate class

Moved tests in virt.libvirt.test_imagecache.test_verify_checksum_*
to separate class.

Removed _intercept_log_messages() from ImageCacheManagerTestCase
and VerifyChecksumTestCase classes and turned it into a
module method.

This commit is the first step in refactoring the file.
It is followed by the commit which removes duplicated code.

bp nova-tests-code-duplication

Change-Id: Ie5bffcabb83ec2208ced343cdf75bf1197b7d5c3
Code dedup in virt.libvirt.test_imagecache.test_verify_checksum_*

Moved shared image and flags values to setUp()

Moved common code to separate functions:
    -_write_file()
    -_check_body()

bp nova-tests-code-duplication

Change-Id: Ic87475075312cbe8c7d7d04c23d394e09b80779e
Remove sleep from service group db and mc tests

Before servicegroup.test_db_servicegroup and test_mc_servicegroup used
eventlet to put the test to sleep and waited for the service to run its
periodic _report_state instead of using timeutils and explicitly calling
_report_state.
 By switching to a timeutils fixture The following tests, are removed
from the list of top 10 lowest tests:

nova.tests.servicegroup.test_db_servicegroup.DBServiceGroupTestCase.test_DB_driver
nova.tests.servicegroup.test_mc_servicegroup.MemcachedServiceGroupTestCase.test_memcached_driver

Change-Id: I091a9975cc7e4fccb26700359d1e3b5c165034d3
Add notification for live migration call

Fix bug 1183657

Add notification for two live migration API calls:
1) _rollback_live_migration
2) _post_live_migration

Change-Id: Ibb092eae40801f0f7f78876e60dabfaf0e1aab6f
add vendor_data to the md service and config drive

There was not previously any way for a vendor to extend the metadata
service to include vendor specific or site specific information.

This adds an entry named 'vendor_data.json' to the metadata service, and also
to the rendering on config-drive.  vendor_data is intended to be a un-managed
place for cloud providers to put custom data that will then be available to the
instances.

The class used to generate the data is configurable via the flag
'vendordata_driver'.  The default class, JsonFileVendorData simply
loads data from a file that is configurable via 'vendordata_jsonfile_path'.
If that variable is not set, a empty dictionary is returned.

By setting
 vendordata_jsonfile_path = /etc/nova/vendor_data.json

The cloud provider can then expose custom data to all instances.

blueprint vendor-data
DocImpact

Change-Id: Ie2aceff1bf68edab124cd5f889aa9a8adcdc73c0
Remove * import from xenserver plugins

Recently a change was made to how/where the '_' method is imported. This
seems to have broken most xenserver plugins. These plugins shouldn't be
doing * imports anyway so I've gone in and cleaned up all places where
"from pluginlib_nova import *" was used and replaced with "import
pluginlib_nova".

Fixes bug 1207107

Change-Id: I3b2a299cf60543e0f766becfeb4740af791b3576
Use cached nwinfo for secgroup rules

This stops a potential DOS with source security groups by using the
db cached version of the network info instead of calling out to
the network api multiple times.

Fixes bug 1184041

Change-Id: Id5f24ecf0e8cce60c27a9aecbc6e606c4c44d6b6
Remove generic exception catching for admin_actions API v3

* Remove generic exception catching
* Add exceptions InstanceNotFound, InstanceIsLocked, FlavorNotFound,
CannotResizeToSameFlavor, TooManyInstances catching
* Add decorator extensions.expected_errors

Partially implements bp v3-api-extension-versioning

Change-Id: I4e1d15a080e904e83e930fe15060b60c488a2f1f
Merge "add vendor_data to the md service and config drive"
Merge "Speed up test BareMetalPduTestCase.test_exec_pdutool"
Merge "Remove sleep from service group db and mc tests"
Merge "return 429 on API rate limiting occur"
Merge "Code dedup in class InstanceTypeExtraSpecsTestCase"
Merge "Revert "Add requests requirement capped <1.2.1.""
Merge "Add notification for live migration call"
Merge "Remove * import from xenserver plugins"