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
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
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
Fixes logging in image_import's main module

Some of the logs were not translated. This patch fixes those and
some other logs.

Change-Id: I153b3aef13bdc4a3c0ef477d3bccd93c5c1887ff
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
Fixes Error Calling GET on V1 Registry

Calling GET on members in the glance registry no longer returns a
500 Server Error. Since GET isn't supported, it now returns a
405 Method Not Allowed, matching the behavior of members for the
glance api.

Change-Id: I25d7e5f4818a1cdb20788643ae6dd7e277928743
Closes-Bug: #1187395
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
Mark custom properties in image schema as non-base

Currently it is impossible to determine if given image schema property
is base or custom one and knowledge of that can be handy in some
situations.    Proposed change appends to every custom property special
key which determiness that it is not a base property.

Change-Id: I49255255df311036d516768afc55475c1f9aad47
Partial-Bug: #1371559
Open Kilo development

Bump pre-version to 2015.1 to formally open master branch to Kilo
development.

Change-Id: I4b9b78ee45113294eb9d0a9240925e2e2e6901b7
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