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
adjust logging levels for linux_net

Change-Id: Ifb199d644ce47c5a222f1f1bfc22a14a42f75686
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
Use -1 end-to-end for unlimited quotas

Dispense with the mapping of -1 to None for unlimited quota and
quota-class thresholds.

Now -1 is persisted directly in the quotas table to represent unlimited.

Avoids the asymmetry of -1 representing unlimited on quotas create/update
versus None for quotas show.

Change-Id: Ic9d3e22c4d68447af6a7f79a9703fa6ac26f01cc
Remove unused user_id and project_id parameters to fetch_image()

Change-Id: I36d3b5d849b23cd4ebf55c5a2ef8ba14e3808ee6
Stop libvirt test from deleting instances dir

 * fixes bug 974293

Change-Id: Id41ab20193a70246ad2e3e1cc18edf47059d312d
Cleanup xenapi driver logging messages to include instance

Also, use the logging instance kwarg so it gets logged in a consistent
format.

Change-Id: I4429e9660ff72e1f79d889f89b5abbf1949720de
Merge "Remove unused user_id and project_id parameters to fetch_image()"
Merge "Cleanup xenapi driver logging messages to include instance"
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
Merge "Stop libvirt test from deleting instances dir"
Merge "Use -1 end-to-end for unlimited quotas"
Allow instance logging to use just a UUID.

Sometimes all you have is an instance UUID, and its not worth
building an instance dict just for logging. Allow callers to pass
just the UUID if that's all they have. Resolves bug 975774.

I have included a sample use as well.

Change-Id: I1eb50515d837869ed7fdc5e766d8700be7da3286
Cloudpipe tap vpn not always working

Fixes bug 975043

Since Essex, all instances will have an eth0 MAC address in the range
of FA:16:3E, which is near the end of the MAC address space.

When openvpn is started, a TAP interface is created with a random
generated MAC address. Chances are high the generated MAC address is
lower in value than the eth0 MAC address. Once the tap interface is
added to the bridge interface, the bridge interface will no longer have
the eth0 MAC address, but take over the TAP MAC address. This is a
feature of the linux kernel, whereby a bridge interface will take the
MAC address with the lowest value amongst its interfaces. After the ARP
entries expire, this will result in the cloudpipe instance being no
longer reachable.

This fix, randomly generates a MAC address starting with FA:17:3E, which
is greater than FA, and will thus ensure the brige will keep the eth0 MAC
address.

Change-Id: I0bd994b6dc7a92738ed23cd62ee42a021fd394e2
Imported Translations from Launchpad

Change-Id: I1eac99495dc2ed1b23ce12377aa93534ef4eb527
Change Diablo document reference to trunk

Change-Id: I1e43668ec8624f722c32e2ffebc81a387551cebc