Set is_public to False by default for volume backed snapshots

This update results in the same behavior that is already implemented
in _create_image where the meta_data for is_public is set to False.

Change-Id: Ie0720d5c847871527db7d9477ca6cb05abe7a1a5
Closes-Bug: #1255316
Correct uses of :params in docstrings

Replace all occurrences of :params with :param alongway
(matches http://sphinx-doc.org/domains.html#info-field-lists)

Change-Id: Ia01e563dd54cce1e763c076b15d1a47b790eb802
Pass rbd_user id and conf path  as part of RBD URI for qemu-img

Unlike rados.py, qemu-img does not use id from CEPH_ARGS and has to be
given a ceph user id and conf path explicitly in RBD URI

Closes-Bug: #1261675
Change-Id: I9226515f2a860ed45d12012fd5b6bc7e842f6d32
Adds user_data extension to nova.api.v3.extensions

Although the user_data extension does not create a resource
or controller extension and only implements server.create and
server.create.deserialize entry points it does need to be listed as
a nova.api.v3.extension entry point as the whitelist check
operates on that entry point.

This does not add any runtime overhead and allows user_data to be
specified in the whitelist.

Also adds missing discoverable policy for the user data extension

Partially implements blueprint nova-v3-api

Change-Id: Ia8ac2fa150ab2fe9c1848c5a7ddc416952adf0e4
Change log from ERROR to WARNING when instance absent

Periodic task will update the host stat so that it will
collect all active instances and get their disk size
during the operation period, the instance might be resized
by nova operations, it will lead to disk file not exist
it's not an error from current design point of view, so
change from ERROR to WARNING to avoid confusion

Change-Id: I3b6f1416c248d9d4d2caaf2cc30a7c944685661c
Closes-Bug: #1243849
Rename instance_type to flavor in hyper-v virt driver

Renames 'instance_type' to 'flavor' in the hyper-v virt driver and
associated tests.

Part of blueprint flavor-instance-type-dedup

Change-Id: I769bf86a63283152c5bbc5644e7b74cc2bb24697
Add finer granularity to host aggregate APIs

This change provides the ability to set finer permission rules around
the host aggregate APIs. Prior to this change, all operations assumed
that the same permissions were necessary. However, it's very possible
that an OpenStack administrator may want to have varying sets of
permissions for operations across the standard CRUD operations.  This
change is only applicable to the v3 APIs as v2 APIs should remain
backwards compatible.

Also included is a change to fake_policy.py (since the file was
updated anyway) to make the base aggregate policy require the
'admin_api' rule (i.e., to be consistent with the policy.json file).

Also added the corresponding API test cases.

DocImpact v3 host aggregate APIs require action-level policies
Implements: blueprint aggregate-api-policy

Change-Id: I8a88824bbb41807fad849ad15af4411d3a3dca6e
baremetal: stop deployment if block devices are not available

In this case deploy-helper should abort immediately and make sure
that the instance's status set to ERROR.

Closes-Bug: 1251525
Change-Id: Ic09f171edb0fe3a449c7adfe622ab48709c73252
Enabled Libvirt driver to read 'os_command_line' from image properties.

The os_command_line can now be presented to the Libvirt driver through the
glance image property 'os_command_line'.  When this property is present,
the driver uses its value instead of the default. Libvirt uses this
value as either kernel command line or arguments to init (in case of LXC).
DocImpact

bp: enable-libvirt-driver-to-read-kernel-command-line-from-glance-image
Change-Id: Iad53c687053bdb5469baad4331ea55f428c170b0
Use the mangle checksum fill rule regardless to the multi_host

The checksum-fill is required even when you are running devstack,
in a nested kvm guest.
Always using the checksum-fill on all dhcp responses is safe, and does
not have significant impact.

The situation is similar when the checksum-fill first introduced to
nova.

See Also:
https://bugzilla.redhat.com/show_bug.cgi?id=910619#c6

Change-Id: I8a34d5f815f6bfef6d683965ed51a77e82af8834
Using staticmethod to mock LibvirtDriver._supports_direct_io

The actual test is wrong, but does not failed because the signature
of the fake method "connection_supports_direct_io_stub" accepts an
ulimited number of args.

Change-Id: Ide3e093911723f787d9e84797be86fb7d0cd00c7
Optimize libvirt live migration workflow at source

During live migration, after instance migrated to destination, we
call Hypervisor destroy to clean the instance, this can be omitted
because it doesn't exist in source server already. This patch changes
cleanup to a public method to driver, split instance destroy to two
step:

1. destroy instance in the Hypervisor
2. cleanup instance resources(block device, network)

Change-Id: I65e711c03fee7342b1e2bc4f9459baae7729f911
Closes-bug: 1240820
VMware: unnecessary session reconnection

An error FAULT_NOT_AUTHENTICATED could imply that there is a problem
with the backend or that no values were found (for example there are
no running VMS). In the latter case the connection should not
be restarted.

The patch also ensures that the session is restarted if there are
connection issues.

This issue occasionally causes CI issues with minesweeper.

Closes-bug: #1265512

Co-authored-by: Shawn Harsock <hartsocks@vmware.com>

Change-Id: Ibfa83d0b5b93680890aad8c88c041fa344765448
Merge "Add finer granularity to host aggregate APIs"
Make nova-network use Service object

There is a very small usage of service data in nova-network, which
can be converted to use the object method. Since it results in
the same database call as before, the tests need no change.

Related to blueprint nova-network-objects

Change-Id: Ie6ef37a3508c0ef3481d0217d3d085b855cfdc70
Make nova-network use Instance objects

This converts existing direct-to-database instance queries
use objects.

Related to blueprint nova-network-objects

Change-Id: Ia035fc9e48843b8aa8ac2d12dbb7bfcc7d6b59ae
Refactor CIDR field to use netaddr.IPNetwork

This makes the CIDR field become the IPNetwork field (and associate
versioned fields). It also uses the netaddr.IPNetwork class, which
is what should have been done in the first place.

Wire format is unchanged, so we can make this without any version
bumps or upgrade impact.

Related to blueprint nova-network-objects

Change-Id: I1a3ab6a5f4c624f3da0ab1c78c75c6f1e474541f
Consolidate the blockdev related filters

Seeing a "/usr/local/bin/nova-rootwrap: Unauthorized command" error
in the logs when  "blockdev --flushbufs" is executed because of the
existing blockdev in compute.filters. We need to merge both into a
single RegExpFilter

Change-Id: Ic323ff00e5c23786a6e376e67a4ad08f92708aef
Merge "Enabled Libvirt driver to read 'os_command_line' from image properties."
Merge "Correct uses of :params in docstrings"