add hints to api_samples documentation

Based on my own experience and questions I recently answered in
the openstack-nova channel, these hints could help developers.

Change-Id: Id7350f1a6a834b0de8456fdc28c2db890f2971de
Fix AttributeError(s) from get_v4/6_ips_by_interface

Add some defensive code to prevent AttributeError especially
when virtual_interface_get_by_uuid returns None. Add some basic
tests for good and bad data returned from
virtual_interface_get_by_uuid

Change-Id: I0ee1bb2087a6ed2619ac343534e4ade84e08d9bd
Closes-Bug: 1246087
Change conductor live migrate task to use select_destinations()

Live migration currently makes calls to scheduler select_hosts() to select
a suitable target host if none is given. Other tasks instead queries the
scheduler by making calls to select_destinations(). Since the latter call
basically returns the same result, and because live migration is the only
task using select_hosts(), changing to select_destionations() means the
scheduler would no longer need the select_hosts() call.

Change-Id: I984ccc2317184ba8f6b292c91717f52a81cf73d7
Sync log.py from Oslo-incubator

This change syncs log.py and it's dependencies from Oslo-incubator to
include the password sanitation fix that landed in Oslo with commit
76b0cd10c414ae71e6f041adb431460b3337c63d.

The following is a list of the change IDs that this
commit is bringing in from the last sync of Oslo-incubator with
respect to the files we are touching.

2b40a10 python3: Fix UserString import
c331e74 Enable multiple translation domains for gettextutils
89369c3 gettextutils: port to Python 3
6d49bca Translate all substitution elements of a Message object
3970d46 Fix typos in oslo
88db9c8 When translating if no locale is given use default locale
53ebd30 python3: use six.text_types for unicode()
25c5854 Adds admin_password as key to be sanitized when logging
2251cb5 Do not name variables as builtins
04c1b5a Type check for Message param to avoid AttributeError

Change-Id: Ie4d5929604e3fc057ea09edbbf3adf16f8839a4e
Partial-Bug: #1247217
Use password masking utility provided in Oslo

Implement the mask_password function provided in Oslo-incubator's
log.py. Instead of having a specific version in Nova different from
other projects that are essentially doing the same thing.

Change-Id: I7e04b7d31d4d6959b17b1da9654553042eec70f1
Closes-Bug: #1247217
Minor change for typo from patch 80b11279b

In the patch 80b11279b, there is a typo, this patch just fix it.

Change-Id: Ie84d83183b13f99ffb33213684b9d9b8a4e59b42
Add default arguments for Connection class

The fakelibvirt.Connection class, among other things, mocks
libvirt.virConnect which doesn't require any parameters. This is
causing a test to fail.

Change-Id: If77864cb0d0bd1dae20b490b8e87a32a0951b52e
Closes-Bug: 1257876
Make compute support monitors and store metrics

According to the 'nova.conf', compute can call the
appropriate monitors and store metrics into compute nodes
as a json dictionary.

This is part of the blueprint utilization-aware-scheduling and
the blueprint generic-host-state-for-scheduler.

Change-Id: I2d9bde7ae838f2588c19874d87de6653859b3ac4
VMware: fix disk extend bug when no space on datastore

In the event that thete is no space on the datastore then ensure
that the disk extension is cleaned up accordingly.

A number of files would be left behind on the datastore.

Change-Id: Ica9daf9151e4fb1874fa8b1d7247080860ef4ae2
Related-Bug: #1255355
Merge "VMware: fix disk extend bug when no space on datastore"
Merge "Minor change for typo from patch 80b11279b"
Merge "Change conductor live migrate task to use select_destinations()"
Merge "Make compute support monitors and store metrics"
Merge "Fix AttributeError(s) from get_v4/6_ips_by_interface"
Merge "Add default arguments for Connection class"
Merge "add hints to api_samples documentation"
Merge "Sync log.py from Oslo-incubator"
Merge "Use password masking utility provided in Oslo"