Fix issue with filtering where a value is unicode.

This fixes an issue where if an attribute, such as name, for an instance
contains unicode and doing a list of instances filtering by that attribute
causes a 500 error.

fixes bug 1031846

Change-Id: I2e9e9a36194dad1326b0d7257308576f8553ef06
Fix typo in db test.

test_instance_get_all_by_filters was doing an assertTrue on two values when an
assertEquals was intended.

Change-Id: I335f873a27d1777309d6fb850d7f259b87ebcb0d
Merge "Send a full instance in terminate_instance."
Merge "Fix failed iscsi tgt delete errors with new tgtadm"
Merge "Fix traceback when using s3."
Merge "Fix issue with filtering where a value is unicode."
Merge "Avoid using logging in signal handler"
Merge "Fix typo in db test."
Merge "Don't pass kernel args to Xen HVM instances"
XenAPI: Add script to destroy cached images.

Operations will want the ability to clear out cached images when
disk-space becomes an issue.

This script allows ops to clear out all cached images or just cached
images that aren't in current use.

Change-Id: If87bd10ef3f893c416d2f0615358ba65aef17a2d
Audit log messages in nova/compute/manager.py

To include instance whereever possible. This resolves bug 977978.

Change-Id: Ic113489c464458f9b1859a21942b1bbe203698bd
Merge "Move tests.test_compute_utils into tests.compute."
Merge "Remove agent_update from the compute manager."
Merge "Pass a full instance to rotate_backups()."
Fix a comment typo in db api

Fix the comment for instance_type_get_by_flavor_id().

Change-Id: I6160c6d8e7a0160c01362f9a34550740600f8bc9
Signed-off-by: Shane Wang <shane.wang@intel.com>
Merge "Clarify TooManyInstances exception message."
Merge "Deprecate root_helper in favor of rootwrap_config"
Check instance lock in compute/api

This adds a check for the instance lock in compute/api.py, which:
1. Helps avoid the need to call into the manager just to be stopped
   by the lock there
2. Returns a failure to the user right away when an operation cannot
   be completed due to the lock
3. Avoids the potential for task_state to get into an unhappy state
   because a user unknowingly attempts an action whilst an instance
   is locked
4. Avoids the manager from having to re-do the lock check by
   stuffing a flag into RequestContext when the check has already
   been done by api.py

Various tests needed to be fixed up in order to pass fake instances
with the locked attribute. We could make the decorator ignore
instances without it, but I think it's more explicit to push that
requirement into the tests.

This fixes bug 872541

Change-Id: I1127e31d86a061a93a64ee1eb4a4d900d8bf49b5
Use function registration for policy checks

The original policy framework allowed new policy checks to be created
through inheritance.  This is somewhat clunky and unnecessary in
Python.  This change refactors policy.py to allow new policy checks
to be registered using an @register() decorator.  One consequence is
that HttpBrain is deprecated.

Care has been taken to ensure backwards compatibility; deprecation
warnings will be emitted for uses of HttpBrain or the inheritance-
based checks.

(Pull-up from openstack-common, with deprecation of HttpBrain.)

Change-Id: Ia9a6039a82fe4ebfa9b18e5eb93c21fffee90f09
Update usage of 'ip' to handle more return codes

Make sure that ip raises an exception.ProcessExecutionError unless
'ip' exits with a 0, 2, or 254.

0 = command executed correctly
2/254 = command has already been executed.

Change-Id: I55dd63ca7fc22bc133ab5fe722df4141c332a819
Signed-off-by: Chuck Short <chuck.short@canonical.com>