Add plan for kilo blueprints: when is a blueprint needed

At the nova mid-cycle we agreed that while specs have made our
process significantly better, we think the current approach still leaves
much to be desired. This document is the outcome of the discussion at
the mid-cycle on how we want to manage blueprints in kilo.

This proposal is being placed in devref, as we want to use gerrit's
workflow (two core reviews, inline comments, revisions etc) and this is
a document for developers.

It turns out adding the specs requirement to blueprints adds a
non-trivial amount of overhead, revisit when a blueprint and spec is
needed to minimize overhead in cases where it isn't helpful.

Change-Id: Iaaadc26f3f51ee091419beaa12e0508623eed99e
VMware: fix broken mock of ds_util.mkdir

Change I788e33dbcb3dedc41831b976137607274b1c02ca introduced an
incorrect use of mock which had side-effects for other tests. This
change fixes it.

Change-Id: I71188ec7c12d51c2b4a253f13a5f51cc8bc0ae36
Fix unset extra_spec for a flavor

A flavor extra_specs key cannot be deleted using 'nova flavor-key'.
Updates to a flavor's extra_specs are not being registered by
NovaObject, such that when NovaObject.obj_what_changed is called,
no changes in the extra_specs field are picked up. In order for
changes in extra_specs to be picked up, the updated extra_specs
has to be compared against the _orig_extra_specs. The same approach
also applies to the flavor's projects, where the updated projects
has to be compared against the _orig_projects.

Also, if you delete the last remaining extra_specs key, nova would
throw an sqlalchemy warning, i.e. 'SAWarning: The IN-predicate on
"instance_type_extra_specs.key" was invoked with an empty sequence'.
This was caused by calling db.flavor_extra_specs_update_or_create
with an empty dict of keys to add or update. This patch fixes it
calling db.flavor_extra_specs_update_or_create only on a non-empty
dict of keys.

Change-Id: Icea492134239296f1570b2a4208eb0868315aa5f
Closes-Bug: #1340885
libvirt: convert CacheConcurrencyTestCase to avoid DB usage

The CacheConcurrencyTestCase test case does not do anything DB
related. Convert it to NoDBTestCase to avoid DB setup penalty.
This improves perf from 1.7s to 0.2s

Partial-bug: #1369516
Change-Id: I8ef124e9f5d86a990722019978c725c955ffb1ea
VMware: Improve logging of DatastorePath in error messages

Change-Id: I8ad6dc52c460d11f71c750e8cc287b36d8238106
VMware: trivial formatting fix in fake driver

Change-Id: Ie6029896edb51c613bd53b5441df4825588b2334
Remove usage of self.__dict__ for message var replacement

This is the same as using locals() for variable replacement in a log
message which violates hacking rule H501.  On Cinder this actually
caused the cinder-api process to hang on python 2.6.

Nova has the same code so this fixes the hacking violation.

Note that the H501 rule was updated in commit 55e96ee but it's not in a
released version of hacking yet (and won't be in time for Juno).

Closes-Bug: #1365901

Change-Id: I1be0db327a2fa1e866328eecd2e7c3dd3ee3cc93
VMware: Make DatastorePath hashable

Make DatastorePath work properly when used as a key value in a dict or
set.

This change specifically enables a subsequent change in the fake
driver, which stores DatastorePath objects in a set. However, it's
probably a good idea in general as I spent quite some time trying to
work out why it didn't work when I hit it.

Change-Id: Ia5519b84bc47ea1e0a5a70f9368806f762d12db5
Merge "libvirt: convert CacheConcurrencyTestCase to avoid DB usage"
Merge "Fix unset extra_spec for a flavor"
Merge "Add plan for kilo blueprints: when is a blueprint needed"
Merge "Remove usage of self.__dict__ for message var replacement"
Merge "VMware: fix broken mock of ds_util.mkdir"
Merge "VMware: Improve logging of DatastorePath in error messages"
Merge "VMware: trivial formatting fix in fake driver"
Merge "VMware: Make DatastorePath hashable"