Update 'unlimited' quota value to '-1' in db

Updates quota value to -1 in db rather than None
if the user specify the quota limit as "unlimited".

Fixes bug 979087
Change-Id: I0ec412189ad9630c4a875655294c1e77886108f5
Fix over rate limit error response

Fixes bug 1046021

Changing overLimitFault element in response to overLimit and setting
the returned Content-Type appropriately. Also adding retryAfter
attribute to provide the same information as the Retry-after header.

Change-Id: I8c32fe7075b918afa62da3f84f1d3b35315e2b9b
Add lookup by ip via Quantum for metadata service.

 * The Nova network API's get_fixed_ip_by_address() is used by the
   metadata service in determining which instance to return metadata
   for.
 * This change implements support for the function in the Quantum
   v2 implementation of the network API to ensure that the
   metadata service can return results when Nova is configured to
   use Quantum.
 * Overlapping network spaces are not supported at this time.
 * Addresses bug 1052196

Change-Id: Iaa5d78c4de92313e93ee9008a2c26052a4f60602
Added script to find unused config options.

The script analyze_opts.py is added to identify unused options
and options which are set to default values in the nova.conf file.

Change-Id: Iec42781a56f73b7d0960bdd569f5dd06edbb88df
xapi: fix create hypervisor pool

Fixes bug 1049099.

Fixing problems with the rpc api when creating hypervisor pools with
xenapi. Rpc calls were not using the compute_rpcapi approach, thus were
not properly versioned. Apart from that, the slave parameters were not
forwarded to the master. A new (2.2) version is introduced where the rpc
calls have the slave_info payload. Added tests to cover the pool cases.
Some trivial extract methods performed on pool, to decouple the pool
functionality from its dependencies.

Change-Id: Ie44a1c09ef204affc4a657c71557691e83b22c22
Merge "xapi: fix create hypervisor pool"
  Cleanup unused import in manager.py

Change-Id: I86be592fc0ee8ddb81417b737702c4201442d0df
Correct IetAdm remove_iscsi_target

Remove logical units should be done before delete the target while
unexport iSCSI volume. Or ietd will show "No such file or directory"
error.

Fix bug 1043107

Change-Id: I06ac561898dbcee078c807ea5368c03e558b4fa9
Don't include auto_assigned ips in usage

Fix a regression - auto_assigned floating ips should not be included in
the quota_usages table.

Fixes bug 1052997

Change-Id: Ifa98a5d44cf2a8a8d4c73b4f56b9615dd74b8383
fix unused import

fix unused import in nova/compute/manager.py

Change-Id: If5f9222365ed5814a6c288eb0507e6ba922cd4b4
Merge "Fix over rate limit error response"
Always yield to other greenthreads after database calls

Since common database backends (eg MySQLdb and sqlite) are implemented
in C extensions, eventlet cannot monkey patch the socket calls to ensure
greenthread context switches occur during network I/O.

Previously, this was done by sprinkling explicit greenthread.sleep(0)
calls in areas known to cause problems. Switch that to always do a
yield after execute.

Change-Id: If91e49fbe212a02710b6ba4abd456222552e2575
Send api.fault notification on API service faults.

Exceptions caught by the API middleware will now send "api.fault"
notifications indicating the offending URL and the underlying exception.
The allows the billing/usage systems to track requests end-to-end without
having to monitor log files. Disabled by default.
Enable with --notify_api_faults

Change-Id: Ied2783259413ba12d686b44b33e0707645e51afb
Fix marker pagination for /servers

Fixes bug 1053028.

Recent changes to pagination required passing in full sqlalchemy objects
into paginate_query. However, calls to paginate_query were passing in
strings.

Change-Id: Ib1396a78a12aef1a9cdc31f3624af30f19da44b5
Merge "Added script to find unused config options."
Adds deserialization for block_device_mapping

The os-volumes extension adds the ability to boot from a volume
or snapshot by including block_device_mapping in the server create
request. This patch adds code to the xml deserializer so
block_device_mapping can be specified via xml as well.

Fixes bug 1052695

Change-Id: I3e586abb32976df98d70c29b6a021fd01c4c186b
Call compute manager methods with instance as keyword argument

reverts_task_state and wrap_instance_fault both expect to be able to
find an instance keyword argument if an exception is raised while
executing the wrapped function.

Fix stop_instance and start_instance to call other compute manager
methods with instance as a keyword argument to ensure the decorators
correctly function.

Only the nested call to the decorated function didn't have the instance
keyword argument. As a result, the initial call would correctly
perform the decorated functions. This fix will ensure that spurious
and confusing log messages don't get generated.

Change-Id: Id4268150f7bea8c52ecc539e1b9ea19b19967ae4
Fix aggregate_hosts.host migration for sqlite

* Make sure data is not lost during migration
* Changes migration 111_general_aggregates
* Adds test for change

Fix bug 1053131

Change-Id: Idbf0cbd5fdb7758ea1794019807d83d159270cba
Clean up test_state_revert

While the test is simply to ensure that the state is reverted, no
matter what the failure, it did so a bit bluntly. The use of Exception
on both the raising side and the catching side ended up masking a
variety of other unintended failures.

stop_instance and start_instance had bugs (fixed in parent patch)
which ended up raising a KeyError exception. This still ended up
resetting the state correctly because only the nested call to the
decorator did not use the keyword argument for instance.

rebuild_instance, revert_resize, prep_resize and resize_instance all
required multiple extra arguments that weren't passed. This raised
a TypeError exception.

revert_resize and resize_instance also required an elevated context
or nova.db.api.migration_get() would raise a exception.AdminRequired
exception.

Even with these unintended problems, the test still performed it's
intended purpose, to test that task state is reverted. However,
the use of Exception makes auditing the test harder.

Change-Id: I5150957375ab3e57e7971f5e15daba531bb58803
No stack trace on bad nova aggregate-* command

When a 'nova aggregate-*; command is run with a bad parameter, Nova-api
should not throw a stack trace.  For example:

'nova aggregate-details badID' shouldn't cause a stack trace

fix bug 1053150

Change-Id: Iab6059f44b7cfb5428a2b55cea53d63809d7a575