Clean up read_deleted support in host aggregates code

tl;dr - this is a cleaner fix for bug #949038

It seems clear to me that all of the DB APIs should not explicitly pass
read_deleted='no' or read_deleted='yes' to model_query without good
reason.

We want to allow callers to specify read_deleted via the context and
that only works if we don't explicitly pass it to model_query().

If we don't explicitly specify it to model_query(), we use the value
from the context which defaults to 'no'.

Given all that, there is no need to support read_deleted to any of the
DB API calls because they should support specifying the flag via the
context. There should also be no need to pass read_deleted='no' because
that is the default.

Really, the only place there should be any mention of read_deleted is
where we want read_deleted='yes' behaviour e.g.

  - In tests, where we want to check the operational_state of an
    aggregate after it has been deleted

  - Where we want to support undeleting an aggregate or aggreate host

Change-Id: I916a8d189a33d7f30838cccb26531a024066ef96
remove unused flag:
baremetal_injected_network_template
baremetal_uri
baremetal_allow_project_net_traffic

Change-Id: I9766924cc7621e14fc52088a558b95cfd5d7ce8d
fix TypeError with unstarted threads in nova-network

(nova): TRACE: File "/usr/lib64/python2.6/site-packages/nova/utils.py",
line 860, in __init__
(nova): TRACE: self.tname = "-%x-%x" % (ident & 0xffffffff, gident &
0xffffffff)
(nova): TRACE: TypeError: unsupported operand type(s) for &: 'NoneType'
and 'int'

Fixes: bug 971629

Change-Id: I3d34816c36a11cd6fc2dd9c889c93c5872133a2c
add libvirt_inject_key flag
fix bug #971640

Change-Id: I48efc5babdd9b233342a33c87c461aabf5f5915b
Add validation on quota limits (negative numbers).

Quotas should not accept negative numbers other than -1.

Fixes LP Bug #973034.

Change-Id: Icc647d80df42d09928717d48ae95dfc8b76c4795
Use thread local storage from openstack.common.

nova.local was recently added to openstack-common.  Remove nova.local
and use openstack.common.local instead.

One benefit of this change is that it is another step toward decoupling
nova.rpc from the rest of nova.

Change-Id: I0240f4291a81f8390d3f329a11f207a1453d7cab
Add the serialization of exceptions for RPC calls.

This change uses json to serialize an exception so that it can be sent
through RPC calls to be reconstructed on the other side. The traceback is added
to the exception message. If recreating the exception fails for whatever reason
then a RemoteError is created containing all of the exception information.

Adds flag 'allowed_rpc_exception_modules' to prevent dangerous modules from
being accessed and allowing arbitrary code to be run.

Fixes bug 920705
Fixes bug 940500

Change-Id: Ife3b64b19fe8abbc730184d4ee7d9fcabfd29db3
Imported Translations from Launchpad

Change-Id: I1eac99495dc2ed1b23ce12377aa93534ef4eb527
Change Diablo document reference to trunk

Change-Id: I1e43668ec8624f722c32e2ffebc81a387551cebc
Update doc to mention nova tool for type creation

Change-Id: I5ce1b4b7032f6f82dfaa7a8f60139e148a250db8
Run tools/hacking.py instead of pep8 mandatory.

Change-Id: I81db73588ece36dec4dba90b9841ed6d0fac6a8f
migration_get_all_unconfirmed() now uses lowercase "finished" Fixes bug
977719

status set in _finish_resize is lower case, but
migration_get_all_unconfirmed() was filtering using FINISHED
Also updated corresponding test case to use lower case "finished"
Updated Authors file

Change-Id: Ia30e66e541bba91a9dd3d3af1429b2312870793a
Remove nova Direct API

blueprint remove-nova-direct-api

Change-Id: I3229f8d7f37d66fcd6b978966f3a428a69e08bb1
Standardize quota flag format

Only three quota flags used max_ even though all quotas are max

Change-Id: I0eb26bdca863d96df2bd00e59f7e8b9827308be7
Merge "Change Diablo document reference to trunk"
Merge "migration_get_all_unconfirmed() now uses lowercase "finished" Fixes bug 977719"
Log kwargs on a failed String Format Operation

fixes bug 971552

If the string format operation in NovaException raises an exception be sure to
log the kwargs at log level error

Change-Id: Idfc54b8c05256bd7c849c86dc45f0b493727fe58
Merge "Use thread local storage from openstack.common."
Merge "Add validation on quota limits (negative numbers)."
Merge "Run tools/hacking.py instead of pep8 mandatory."