fix log message in APIRouter

In _setup_ext_routes(...) and _setup_extensions(...)[0], there are three
logs telling that I'm setuping extensions routes, and these are done,
those failed. At line3 in [0], every resource woulld be logged before
the line 6-7 skip (conintue in Python). So here should be that I'm
'extending' resource, not 'extended'. Similiar in line 38 and line 43,
these two should be what is done and what is failed.

So this patch fix the first log from 'Extended' to 'Entending', and in
third log, 'extending' to 'extended' instend which makes context log
more reasonable.

[0] http://paste.openstack.org/show/60246/

Change-Id: I2de66f1a8e09945e1915b61771a55af6b630369c
Merge same db calls for some quota methods

db.quota_get_all_by_project is called twice in method limit_check()
and reserve(),
db.quota_get_all_by_project_and_user is called twice in method
get_settable_quotas() in nova/quota.py

Change-Id: Ie5e3a414d3d52964c16613f44fe60a7f68bc0c66
Closes-bug: 1277068
VMware: improve exception logging in driver.py

Change-Id: Id46860d269462673bc935653b2ce1ea1036db002
Remove unused methods

The following methods are not used.
 o name() in nova/compute/power_state.py
    name() has been deleted in the following commit.

      commit 5270b0a565ec26d2f7de3a7d95be86433d8c6bd2
      Author: Dan Prince <dan.prince@rackspace.com>
      Date:   Wed Aug 17 11:46:28 2011 -0400

          Split set state into vm, task, and power state functions.

 o valid_states() in nova/compute/power_state.py
    valid_states() has been deleted in the following commit.

      commit 84e069b8d637c08f0434038ff2a2b272254e4a0e
      Author: Dan Prince <dprince@redhat.com>
      Date:   Mon Aug 6 12:09:23 2012 -0400

          Remove unused InstanceInfo class.

Change-Id: I85051d27834f166d5a3596e31ea4f78b82809fda
Make os-service API return correct error messages

webob.exc.HTTPBadRequest() can't return the error message
by passing 'detail' parameter.
This patch fixes this bug in nova service_update.

Change-Id: I889d7d1caddd1f0b0dc63292c3ceac7e493b6b79
Make nova-network use FixedIP for host and instance queries

This makes nova-network manager use the FixedIP object for the
get_by_network_and_host() and get_by_instance_uuid() queries.

Related to blueprint nova-network-objects

Change-Id: Ifa26ba1db6a9975e21a5a1c4b8742d82ca6d0772
Make it possible to disable polling for bandwidth usage

Bandwidth usage is only supported by some hypervisor drivers, but
the period task always runs and asks conductor for a list of
instances before it gets a NotImplementedError from the virt driver.

This change allows this to be disabled by setting bandwidth_poll_interval
to 0 which is consistent with other periodic task interval settings,
avoiding the wasted conductor call.

It also will automatically disable bandwidth polling if the driver raises
NotImplemented.

Change-Id: I2ac9c967c5ceafffc39a0a372146c762891a08b8
Fix auto instance unrescue after poll period

We were seeing massive amounts on instance faults from failed automatic
unrescue. It was coming from the instance not having system metadata
populated.

While the route cause is a combination of using non-object instances
that were not populated with system metadata. With an object, the system
metadata would lazyload as required, but clearly not with a pure dict.

This fix ensures the non-object instance has system_metadata, so the
extraction of the flavor from the instance, during notifications sent
during unrescue, now succeed.

Closes-Bug: #1277054
Change-Id: I63bdd6c49505557829241869fd3efd2b2754530b
Break out the meat of the object hydration  process

Since we call the NovaObject base class to hydrate an object, the
subclass implementation does not get a chance to run specific code
during or after hydration. Things like Instance that keep local data for
change tracking need a chance to update themselves after hydration
is complete. This breaks out the meat into a separate method which
can be easily overridden in a subclass.

This also makes Instance use this to ensure metadata tracking is
up-to-date after hydration.

Related to blueprint compute-manager-objects

Change-Id: Ie070c17495f7a4cc6210d256a3170ac9c06e198f
Make delete_instance_metadata() use objects

This adds an optimized Instance.delete_metadata_key() method
and makes compute_api use it instead of calling directly to the
database.

This changes a test that previously verified that the notification
was missing instance.metadata (because of the rpc calling convention)
since we can now include the updated metadata in the notification
easily.

Related to blueprint compute-manager-objects

Change-Id: I827cb98d004e7a612b839dd5a8bbe26cc91c692d
Fix instance metadata tracking during resets

The Instance object tracks its metadata and system_metadata dicts for
changes by maintaining a mirror. This patch fixes the obj_reset_changes()
method which previously would always reset both of those tracking
mirrors anytime any single field was reset.

Change-Id: I496184e3ddaa56b8709f4338fd8cdc2342198273
Drop unused dump_ SQL tables.

Drop the following tables which are no longer
used in Icehouse:
 -dump_compute_node_stats
 -dump_compute_nodes
 -dump_instance_actions
 -dump_instance_actions_events
 -dump_instance_faults
 -dump_migrations

Includes a new test to ensure the tables are dropped.

Change-Id: Ifa70b8dedebd074353560ac46d42a9cc5d133be2
Closes-bug: 1266538
Make consoleauth token verification pass an Instance object

The consoleauth manager looks up and passes a SQLite model to the
compute_rpcapi.validate_console_port() method, which is expecting
an Instance object now. This fixes that by replacing the direct call
with an object lookup.

Change-Id: I48a63805e4691899396559f48b29bef3030d5ef8
Removes XML support from security_groups v3 API

The XML namespace was removed from the V3 API plugins,
this part of the code does not work again.

Partially implements blueprint remove-v3-xml-api

Change-Id: Ib30f5f690f8088ed63dd82782698f975024a5b6e
Removes os-simple-tenant-usage from the V3 API

The extension pre-dates ceilometer and equivalent
functionality is now much better managed using
ceilometer. So we're removing this before the V3 API
is officially released.

Partially implements blueprint v3-api-remove-extensions

Change-Id: Ia8fd475e6f0c4dbc67f3c47279cbaa2280b3af0b
VMware: improve unit test performance

There were a few test classes that we using test.TestCase
instead of test.NoDBTestCase.

Change-Id: Icc359e5454c232b544452527ab64751ca38c7e78
Remove tox locale overrides

* tox.ini: The LANG, LANGUAGE and LC_ALL environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug. Also, having
these in the configuration actively causes older pip to have
problems with non-ASCII content in some package metadata files under
Python 3, so drop it now.

Change-Id: I5353dd318ce0bfdc85d6468750fb4c2a2690cde1
Closes-Bug: #1277495
Fix trivial typo in libvirt test comment

Change-Id: I88eb686de1c54f6380ab60aa7e4d3e4e36da33fb
Allow operators to customize max header size

HTTP messages max header line size has been increased from 8K to 16K
by default to allow using tokens including up to 14-15 catalog
entries. The same issue (https://bugs.launchpad.net/swift/+bug/119014)
may occur again in the future, if Keystone's catalog grows further.

Allowing operators to customize the max header size, will allow them
to have Nova working whatever the size of the catalog (if the option
is properly set).

Related-Bug: #1190149
DocImpact

Change-Id: I96694ac9bc242267cfc9f4d0c18b2b7fe0000460
Adds tests to sqlachemy.api._retry_on_deadlock

This methods needs tests.

Change-Id: I908daf9e280e25c2ad535bca96b558c19c507e4c