Nova instance config drive Metadata Definition

A nova Juno FFE landed to support setting the
img_config_drive property on images to require images
to be booted with a config drive. The Glance Metadata
Definitions should include this property.

See Nova Blueprint:
https://blueprints.launchpad.net/nova/+spec/config-drive-image-property

Change-Id: Iffc4d4f00f3677ed1fa41233ef6cfbc5c46d8602
Closes-bug: 1367981
Add missing metadefs for Aggregate Filters

The below spec implemented in Juno added numerous properties
that can be added to Host Aggregates. The Metadata
Definitions catalog should include them.

https://github.com/openstack/nova-specs/blob/master/specs/juno/per-aggregate-filters.rst

Change-Id: Id37028b4b24ab5f6b0c4547a3c1af47bd76e61f6
Closes-bug: 1368032
Specify the MetadefNamespace.namespace column is not nullable

The metadef_namespaces table definition indicates the namespace
column as not accepting nulls. The related MetadefNamespace ORM class
should also indicate that the namespace column does not accept nulls
with "nullable=False" in the column definition.

Change-Id: I681747b6579a2284f23bf154889a61c639b0616d
Closes-Bug: 1367619
Stop using intersphinx

Remove intersphinx from the docs build as it triggers network calls that
occasionally fail, and we don't really use intersphinx (links other
sphinx documents out on the internet)

This also removes the requirement for internet access during docs build.

This causes docs jobs to fail because we error out on warnings.

Change-Id: I71e941e2a639641a662a163c682eb86d51de42fb
Related-Bug: #1368910
Refactor metadef ORM classes to use to_dict instead of as_dict

The Metadef ORM base dictionary class should replace as_dict with to_dict
to be consistent with other Glance ORM classes.

Change-Id: I1550bd519f100cdffcf5046e9838cf192d4aac50
Closes-Bug: 1370058
Update Metadefs associated with ImagePropertiesFilter

From: http://docs.openstack.org/trunk/config-reference/content/section_compute-scheduler.html#imagepropertiesfilter

Filters hosts based on properties defined on the instance's image.

Updated descriptions to be provide better information.
Added baremetal "hypervisor_type" after getting info from
Nova core about what hypervisors to include.

Left out "architecture" for now, because horizon fails when
trying to update architecture property.

Change-Id: I9195825a0ab4b89e764983da06827173a2daa23c
Closes-bug: 1368965
Update driver metadata definitions to Juno

vmware and libvirt support different hw_vif_model settings.
This patch updates them so that each namespace can specify
the models they support.

vmware api is updated with the vmware_disktype

Change-Id: Iec5901097c9621a052a930b99d5cbe7872d4f3ff
Closes-bug: 1370767
Make compute-trust.json compatible with TrustFilter

Current properties inside compute-trust.json does not match
with how TrustFilter in nova works. JSON provides True/False
boolean values but TrustFilter expects trusted/untrusted/unknown
string values. This patch repairs compute-trust.json to be
compatible with TrustFilter.

Change-Id: I26965a549daf9340621b0f18a1b845b39bac4bd8
Closes-Bug: #1369581
Fix glance V2 incorrectly implements JSON Patch'add'

According to the RFC for JSON Patch
http://tools.ietf.org/html/rfc6902#section-4.1
the 'add' operation, in the event that the property being
added already exists, should replace the existing value. For backward
compatibility We've fix it only for the latest content type.

Change-Id: Ia4be8b384f8b7f193f139f2206ceea25786b5cc3
Closes-bug: 1250158
DocImpact
Partial-bug: #1277104
Fix missing space in user_storage_quota help message

Add a missing space in the help message for the user_storage_quota config
parameter.

Closes-Bug: #1373268
Change-Id: I5462b85047ec322f9c795778fccbe4fd41365a98
Include Metadata Defs Concepts in Dev Docs

The http://docs.openstack.org/developer/glance/
site currently doesn't include the Juno Metadata
Definitions concepts.  This patch adds
an overview of the concepts to this site.

This provides a synopis of the concepts in:
https://github.com/openstack/glance-specs/blob/master/specs/juno/metadata-schema-catalog.rst

DocImpact
Closes-Bug: 1367432
Related-Bug: 1367908
Related-Bug: 1363615
Related-Bug: 1366286
Related-Bug: 1363383
Change-Id: Iad4d388cbbf2f63fa243d04d35032de0cb0bc1b4
Refactor test_migrations module

Refactored migration tests to use OpportunisticTestCase, removed
unused code and ``test_migrations.conf`` file.

The main feature of this approach is to create a new database with
random name for each migration test.  This will avoid migration tests of
race conditions and reduce tests intersection. After this change, database
``openstack_citest`` will be used only for initial connection to the database.

``test_migrations.conf`` file not required anymore, because we create test
database for migration test, so we no longer need to keep database credentials.

Partial-Bug: #1368274

Change-Id: Ib1d6dfae62cc60f814c01d07adc53f68e7c234f6
Run tests with default concurrency 0

Setting concurrency to 0 would enable Glance tests to be run using the
the total number of cores on the system rather than by a single one.

This would, by default, speed up the run time of tests for developers
who are not aware about it. Also, any jobs which run these tests for
Continuous Integration would be benefitted without having to deal with
the machine level logic.

Closes-Bug: #1368274

Change-Id: I0842b0c0be1272d479fad9ef7609cd8a29231cb5
Fix bad header bug in glance-replicator

When trying to use "glance-replicator livecopy" to replicate the
images from one OpenStack glance to another, it encounters "Bad
header" error for "x-image-meta-virtual-size" header. This is
because this header is not in the whitelist of v1 API headers of
form "x-image-meta-xxx".

Another problem after adding this "x-image-meta-virtual-size" to
header whitelist is that the sqlalchemy fail due to virual_size is
"None", which cannot be converted to int. To fix this problem, we
should avoid converting the None value attribute in GET
/v1/images/detail response to the header of POST /v1/images. I
added the None value check, following what the way in
glance/common/utils.py image_meta_to_http_headers() method.

Closes-Bug: #1373333

Change-Id: I13182c4e3212024a9d5663cefd2951c576961f4f
Merge "Fix bad header bug in glance-replicator"
Merge "Make compute-trust.json compatible with TrustFilter"
Merge "Fix glance V2 incorrectly implements JSON Patch'add'"
Merge "Include Metadata Defs Concepts in Dev Docs"
Merge "Refactor test_migrations module"
Merge "Run tests with default concurrency 0"