Fix scheduler_available_filters help

The help speaks about nova.scheduler.filters.standard_filters which does
not exist anymore. The default has been changed to all_filters with
commit 0d9ce831 but the help text was not updated so far.

Change-Id: I38dfadabe02489d8d40986e7f4d06c0c68097516
Remove flush_operations in the volume usage output

flush_operations is not used by upper layer code and also
according to
ftp://libvirt.org/libvirt/java/javadoc/org/libvirt/DomainBlockStats.html
http://libvirt.org/ruby/api/Libvirt/Domain/BlockStats.html

seems the last value should be errs instead of flush_operations
so remove it from libvirt driver layer.

Change-Id: I438b6fa40e9d97e3ffddda03919c5d577e91c155
VMware: pass vm_ref to _set_machine_id

Save a method call to get the vm_ref. In spawn this value exists so
we can pass it to the method if necessary.

Change-Id: Ied43fb09fb2eec2d2c22fce17b4f98ae3f58860e
VMware: Fix problem transferring files with ipv6 host

Need to protect the host name with '[' and ']' before
we create a http/https connection

Change-Id: I9320c47f446d1e6b6b088802c3916a88b118d9cf
Closes-bug: #1390906
make get_by_host use slave in periodic task

In periodic task functions nova prefer to use slave db
instead of primary db. This patch makes function
_get_host_volume_bdms to use slave db

Change-Id: Ia297524fc1acf06ab708509c805d14e215b10b86
Rename private functions in db.sqla.api

instance_get_all_by_filters() called 3 helper functions: exact_filter,
regex_filter and tag_filter. None of these functions had any other
callers.

This change prefixes them with _ to identify them as private.
Additionally, it removes the model arguments to the functions as these
always relate to an Instance and/or its InstanceMetadata.
Consequently, the functions are renamed to identify them as specific
to an Instance query. exact_filter is moved from the top of the module
to be next to the other 2.

Change-Id: I671315122438022b13d6b315b577ef2a5cf42545
Indicate whether service is down for mc driver

memcache driver for service didn't log any clue
whether the service is down or not. This patch add a
log to indicate it at DEBUG level.

Closes-Bug: #1382564

Change-Id: I05e12b56411f4475d1ef50e90e09abf75d7355b0
Only filter once for trusted filters

In spawn process the filters will be used only once if the
run_filter_once_per_request is set to True. This apply to the hosts
that will not be affected by previous instance resource consumption.
Trusted filter should be in this kind of filters.

Change-Id: Ia223797798679fecfcf90983ca81a9f395e67c3b
Network object: add missing translations

An exception was raised and not translated in commit
e134f81d85f42b87238f7786b0b50066129c968d.

Change-Id: I1c65041bd3a7152088f1660800d3a58f6fe12eea
Remove old Baremetal Host Manager

Baremetal was deprecated in Juno and its driver was removed in
46ed619b9ab1d61582f36155eea0d4a88f31fd50

This cleans out the parts that's still left in the scheduler.

Change-Id: I86f583f7d0747a164dae4530e25f8b01c2144673
Scheduler: return a namedtuple from _get_group_details

Commit 459ca56de2366aea53efc9ad3295fdf4ddcd452c added the utility
method _get_group_details. This patch returns a namedtuple that
contains the hosts and policies for the instance group. This makes
the code easier to read and more robust.

TrivialFix

Change-Id: I76208092b06408022f48b1d965b982af86c78161
Remove the volume api related useless policy rules

There are some old policy rules used by old nova volume, those are
useless anymore, this patch clean them up.

Change-Id: Ibcdba00652808158019600f8ad75e80c85f9423e
Closes-Bug: #1398686
Libvirt: Don't let get_console_output crash on missing console file.

During a migration, the console file may be configured, even though
the file itself is not yet present. This patch prevents a
ProcessExecutionError which gets thrown by the chown if the file
doesn't exist.

Change-Id: Ifd75ae911fc264f8284ec3f2adbf1d73bc8c4aca
Related-Bug: #1292339
libvirt: Enable console and log for system z guests

If the host architecture is system z (s390, s390x), the interactive
console and the log of instances will be defined as "console" devices
(instead of "serial" devices) in libvirts domain XML. These console
devices need to have a "target type". For the interactive console this
is "sclp" and for the log "sclplm".

Partial-Implements blueprint libvirt-kvm-systemz

Change-Id: I20d5e32fee660e77c52b6fc5fdf1128a996bb994
Fix disconnecting necessary iSCSI sessions issue

In Icehouse with "iscsi_use_multipath=true", detaching a multipath
iSCSI volume kills all iSCSI volumes visible from the nova compute node.
When we use different targets(IQNs) associated with same portal for
each different multipath device, all of the targets will be deleted
via disconnect_volume().

This patch fixes the behavior of detaching volume:

  1. Extract the targets for the detached multipath device.
  2. Delete/disconnect the targets for the detached multipath device.

Closes-Bug: #1382440

Change-Id: I38eafdaee03d136282cfde1fd013e322a4256cc4
VMware: ephemeral disk support

This patch ensures that the driver honors the following for
ephemeral disks:
 1. the flavor definition
 2. the block device mappings

The driver will now create an ephemeral disk(s) if necessary.

The ephemeral disks will be of a 'thin' disk type.

Closes-bug: #1369254

This is part of blueprint vmware-ephemeral-disk-support

DocImpact
  - Indicate that ephemeral disks are now supported by the driver

Change-Id: Icb1796e58126a1e03613946b0f5a917d6eb4708e
Convert v3/v2.1 extension info to present v2 API format

Changes from the v3 API /extensions interface format to the
v2 API format. Note that this does not yet list the same
extensions as the v2 api because in v2.1 some have been split
or renamed. This will be addressed in a future patch

Partially implements blueprint v2-on-v3-api

Change-Id: Icaf945b356fcbbe2126343ad01ee58cecd15100f
Replacement `_` on `_LW` in all LOG.warning part 3

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Change-Id: I14bb1fbf7044769697024b03c965ed9d70ab69c1
Replacement `_` on `_LW` in all LOG.warning part 4

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Change-Id: I913077d3b0fdee78e423c35b3a48137a17946a7b
Enforce unique instance uuid in data model

This adds the database migration that checks for records
where instance_uuid is NULL and fails if found until the
'nova-manage db null_instance_uuid_scan' command is run
and the records are manually deleted.

Unit tests are added for the migration to make sure the
fixed_ips table is left alone and the UniqueConstraint is
created on the instances table.

DocImpact: New 'nova-manage db null_instance_uuid_scan'
           command.

UpgradeImpact: The new database migration script.

Implements blueprint enforce-unique-instance-uuid-in-db

Change-Id: I768c36b140c7e9f437907d4dfe175e1410ca44b0