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
Don't touch info_cache after refreshing it in Instance.refresh()

We were touching info_cache to force it to be marked dirty in the
instance object after refreshing it. However, it isn't dirty, because
it has just been refreshed and the relationship to instance hasn't
been altered. Also, the dirty state on the instance object is
unconditionally reset immediately after this anyway.

Change-Id: Ibc8e9d95210d14c946f6f820492da2331c0d7fab
VMware: fix regression for 'TaskInProgress'

Commit 73d4a7c1b4681accd993c1109a9eff837ff612f4 caused a regression
with the snapshot deletion. That is, the snapshot deletion will retry
if the resource is busy. The fact that the exception was not supported
in olso caused the problem.

Version 0.6.0 supports this exception.

Change-Id: I12fcc7d039a123e681c51978b9cf632af8f9644b
Closes-bug: #1369463
VMware: pass vm_ref to _get_and_set_vnc_config

In the spawn refactor we get the vm_ref when the instance is created.
Passing it to the method _get_and_set_vnc_config saves a function
call. We are able to do this as we already have the vm_ref for the
instance in question.

Change-Id: I7b8d056af7f49ebd31beff2876edb9e6115d0a2c
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
Fixed quotas double decreasing problem

When we delete vm with status "soft-delete" we shouldn't change
quota values because they were changed during soft-deleting.

Closes-bug: #1333145
Change-Id: I3ed7b3245b8908faa02903c74503918f061016bd
Make aggregate filters use objects

Some scheduler filters that use aggregates have been converted
to use nova objects. This patch converts the remaining ones to
use objects. In both cases the calls to the database are
replaced by calls to a utility method that gets the required
data using Aggregate objects. In the future these utility
methods could be replaced with an implementation that works on
a cache - for now they do not change the behavior - its just
a refactor.

blueprint kilo-objects
Change-Id: I42d5697a67805b7e85f82cf3cf2cd6e17d923955
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
libvirt: enhance config memory backing to handle hugepages

Introduces a new config LibvirtConfigGuestMemoryBackingPage and
updates config LibvirtConfigGuestMemoryBacking to take advantage
of hugepages allocation for guests.

Work-Item: Enhance libvirt driver to configure guests based on
           the flavour parameter for page sizes

Partial-Implement: blueprint virt-driver-large-pages
Change-Id: I87e122a31f91448b203ba9201668f9143bf24752
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
Break V2 XML Support

Nova's XML support has been deprecated with a warning that it could be
removed as early as Juno. Now that we are in Kilo we are ready to remove
support.  Before actually doing the surgery to properly remove XML
support, intentionally break XML support in a 'clean' way, so if someone
freaks out that we are removing XML support we can easily re-enable it.

Follow up to I4acc15ce5f487738bb34a95c2261a5d05d827d8d

Co-Authored-By: Joe Gordon <joe.gordon0@gmail.com>
Change-Id: I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0
libvirt: Fix domain creation for LXC

A condition was introduced during domain creation that needs
disk_info to determine whether or not an instance was booted from
volume. Many calls to _create_domain_and_network were not providing
disk_info and thus the condition was always evaluating to True.
This change adds disk_info to each call that was missing it.

Closes-bug: #1370590

Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>

Change-Id: I23e7e013d3a51b8040dd37e5facfe75b480e1721
objects: Add several complex field types

Adds ListOfSetsOfIntegersField and DictOfIntegersField fields.

These three fields will be needed for NUMACPUPinningCell and
InstanceNUMACPUPinningCell object that will be introduced in
subsequent commits.

We also add the DictProxyField which will allow us to use any type that
can be converted back and forth between a string to be used as a key of
a Dict complex object field.

Change-Id: Id08ec2c436aa35a36fa7f146c6f530d28abec063
Blueprint: virt-driver-cpu-pinning
Adds NUMA CPU Pinning object modeling

Instead of creating new custom field types for bitmaps, this patch
instead implements the NUMA CPU Pinning on the compute node side of
things as a simple SetOfIntegers field.

We also add another ListOfSetsOfIntegres field to track siblings data

We add some simple convenience some simple operators to NUMACell to
detect the set of pinned and unpinned pCPUs for each NUMA cell in a
topology.

Co-authored-by: Nikola Dipanov <ndipanov@redhat.com>

Change-Id: I454acae0859b0d2af66cabfa3fc4e6a4279881b5
Blueprint: virt-driver-cpu-pinning
Merge "Break V2 XML Support"
Merge "Make aggregate filters use objects"
Merge "Don't touch info_cache after refreshing it in Instance.refresh()"
Merge "libvirt: enhance config memory backing to handle hugepages"
Merge "libvirt: Fix domain creation for LXC"