Use identity_uri instead of older fragments

This has been the default option in middleware for a while now and we
should recommend the default options.

Change-Id: Ief347c897cf15ab4101936a56404e3a378021b15
ignore .idea folder in glance

If we use JetBrains PyCharm as python develop tool, JetBrains PyCharm
would automatically generate its config folder name .idea in the root
dir of your python code.
Many Code projects, such as nova and cinder, have ignore .idea folder.
Project glance should also ignore .idea folder.

Change-Id: I1e3ba1936c8b918aa4669c2d7fceac23a23ca974
Closes-Bug: #1362451
Adds missing db registry api tests for Tasks

The db registry api supports calls to Glance tasks. This patch
adds test coverage to that part of the code.

Fixes bug 1364570

Change-Id: Id7a74239a54d9001c7ac4ab4c8e2b67ac0686125
Glance API V2 can't recognize parameter 'id'

Based on current implement, API V2 is using **id** in image schema,
but using **image_id** for most of the internal functions as key
word arguments. So user will got a key error if using:

glance --os-image-api-version 2 image-create --id <id>

This patch will map 'id' to 'image_id' in RequestDeserializer and
add an unit test case fo the change.

Closes-Bug: 1366515

Change-Id: I4c72881a7ada728307e806776426b42cf4cf0993
Duplicated image id return 409 instead of 500 in API v2

Based on current code, in API v2 duplicated image id will
return HTTP 500 error instead of 409. This patch fix this
issue and add an unit test case for that.

Closes-Bug: 1366503

Change-Id: Ia6c27f9edffd63619d63013e456072d811daf127
Fix VMware Namespace capitalization & description

The namespace had incorrect capitalization. Also,
added additional text in description to make people
aware that the properties only apply to the VMware
compute driver.

Change-Id: Ic1c3c333a1c70782a0780ace0323b2f6728bdd09
Closes-bug: 1367548
Fix CommonImageProperties missing ":"

The namespace had inconsistent naming when compared to
other namespaces.

OS::Glance:CommonImageProperties
 should be
OS::Glance::CommonImageProperties

Change-Id: Iea9860be66eb06250f8a53b8c44ab787e9c8082a
Closes-Bug: 1367545
Change open(file) to with block

Currently script which loads metadata definitions to database
uses open(file) to stream files. This isn't the best practice
because in case of any errors this code may not be safe.
To solve this problem this patch changes open(file) to
'with open(file) as...:' block. It allows us to ensure that every
resource is cleaned up when the code finishes running.

Change-Id: I4a85700061ed5050f4356f1b39ea128931626c83
Closes-Bug: #1367172
Sync glance docs with metadefs api changes

 - Rename resource_type to resource_type_
   associations in namespace API input/output
 - Add created_at/updated_at in resource_
   type_associations block of namespace API
   input/output.
 - Fix minor nits

Closes-bug: 1367908

Change-Id: Ie74bfb36a7023abb346852f5b863f19d0d7bc4ff
Improve OS::Compute::HostCapabilities description

The OS::Compute::HostCapabilities namespace should include more
information about how the properties are used by Nova.
Let admin's know that the ComputeCapabilitiesFilter needs to
be enabled.

Change-Id: Ib3232e560969462d3973606e138a96d1a5beb7de
Closes-bug: 1367860
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
Merge "Fix VMware Namespace capitalization & description"
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
Block sqlalchemy-migrate 0.9.2

Breaks unit tests.

Change-Id: I347a20fd35ae20f1de5db7f2608090b08af6c0ff
Closes-Bug: #1368391
Replaces assertEqual with assertTrue and assertFalse

In order to improve coding practices and be aligned to a standard,
self.assertEqual(...,True) statements where replaced with
self.assertTrue and self.assertFalse.

Change-Id: I4150a343493beae03d6f71c88e84f60d14fb60e1
Closes-Bug: #1230127
Just call register_opts in tests

register_opts already registers options for stores as well. Just call
that function instead of calling register_store_opts too.

Change-Id: I7726c098fec1160549251b3dd30ae02bd89bcadc
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
Merge "Adds missing db registry api tests for Tasks"
Merge "Improve OS::Compute::HostCapabilities description"