Refactor nova.rpc config handling.

This patch does a couple of things:

1) Remove the dependency of nova.rpc on nova.flags.  This is a step
toward decoupling nova.rpc from the rest of nova so that it can be moved
to openstack-common.

2) Refactor nova.rpc so that a configuration object is passed around as
needed instead of depending on nova.flags.FLAGS.

This was done by avoiding changing the nova.rpc API as much as possible
so that existing usage of nova.rpc would not have to be touched.  So,
instead, a config object gets registered, cached, and then passed into
the rpc implementations as needed.  Getting rid of this global config
reference in nova.rpc will require changing the public API and I wanted
to avoid doing that until there was a better reason than this.

Change-Id: I9a7fa67bd12ced877c83e48e31f5ef7263be6815
Include instance in log message.

Change-Id: Id4f8be8cf01d04602feaf62f388702011dea692e
Add instance to log messages.

Change-Id: I53b166c7f53c0094951cb13ed8942e0b7bbb8b55
Ensure all messages include instance.

Change-Id: I6d870cd8cba796c26d7893f132c85510bd8f6d43
Log instance.

Change-Id: I8fbfd7fdc6e16d555151d63657fb8435077a006e
Include instance in log message.

Change-Id: I350a6a7670a0d5b1b917ac33b86d77a4f010fd19
Log instance information for baremetal.

Change-Id: I38b230b2d4506bc6f7758698a381b3e1ae392e2b
Log instance.

Even though this is a fake, its at least consistent.

Change-Id: Ib5ae787b068c94cedcfd7f1d2dd843110129f299
Add instance logging to vmops.py

Change-Id: I9d1f61f568e8d5c8b45c4097e5240facc13191d6
Add instance logging to vmware_images.py

Change-Id: I92e81d777b4e866abbbc2f8b5d173089bfe48b52
Xen: Pass session to destroy_vdi

Change-Id: I34c59ff536abfdff9221cdb3d9ecc45d1e7a1a90
Make the filename that image hashes are written to configurable.

This is a baby step towards storing more than just a checksum in
these files. The specific use case is I need to store whether or
not the image was prefetched in here as well.

Change-Id: Ia1d67ac1ac766f22c6ecb814182150a789c91095
Introduced _atomic_restart_dhcp() Fixes Bug 977875

Introduced a new method which executes update_dhcp_text_file
and restart_dhcp as one atomic unit - to avoid race between these
steps.

Change-Id: I6fda9fbfcaf59fa6a4859b361574d98e16331882
Disallow network creation when label > 255. Fixes bug 965008

Added length check for label. Without length check,
label is truncated. Warning is shown by sqlalchemy layer.

Raise an InvalidInput exception when validation fails (like
rest of the surroudning code)

Change-Id: Iae517e03099e36f1c00f4742049834a9231a2fff
Make updating hostId raises BadRequest.

fixes bug 944028

Change-Id: I563f51dd7afea1d0a9c7391c9e641e7c8c493216
Fix 986922

Fix typo in nova/network/manager.py

Change-Id: I4fdb2f08a9d4ee8a1056267b50aa27c3201b4d7a
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Add a force_config_drive flag

Config drive can currently only be requested via the API.  That
doesn't play nice with horizon, and requires the caller to know
what the image expects.

Currently, only None or 'always' are documented (although any
value is treated as 'always').  I expect we'll want 'never',
'byimage' etc in future.

Bug #988556

Change-Id: I895a6a9fd3e6395bb00f54f26531b6faf0c9f4f1
Merge "Include instance in log message."
Merge "Log instance."
Merge "Ensure all messages include instance."