28 Commits

Author SHA1 Message Date
Jenkins
94cb7020e8 Merge "Include metadefs files in all packages" 2015-08-06 10:57:45 +00:00
Louis Taylor
feb927c8a1 Remove Catalog Index Service
The Catalog Index Service added in the kilo cycle has been split into a new
project named searchlight. This code now lives in a seperate repository:

    https://git.openstack.org/openstack/searchlight

For more information about the split, see the governance change:
I8b44aac03585c651ef8d5e94624f64a0ed2d10b2

DocImpact
UpgradeImpact
APIImpact

Change-Id: I239ac9e32857f6a728f40c169e773ee977cca3ca
2015-07-30 09:34:57 +08:00
Ian Cordasco
f9c4312ab1 Include metadefs files in all packages
Previously, metadefs were only shipped in archives of the entire
repository. There's been a recent push in the operator community to
deploy from source, including building wheels and installing using them.
In order for the deployers to take advantage of metadefs as intended.

Change-Id: I1d7eacc19feed34f3e9029d11865e788bb4d4a8c
Closes-bug: 1469869
2015-07-28 21:01:07 -05:00
Doug Hellmann
5a809eac5d Update version for Liberty
Update the version for Liberty, switching from date-based versioning
to pre-versioning using SemVer. See
http://lists.openstack.org/pipermail/openstack-dev/2015-May/065211.html
and
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067082.html
for details.

Change-Id: I6a35fa0dda798fad93b804d00a46af80f08d475c
2015-06-18 19:56:34 +00:00
Mike Fedosin
3cdd5bba7c REST API layer for Artifact Repository
Adds REST API layer for Artifact Repository, binds all other changes
together.

Artifact Repository is run as a part of Glance api.
Requests are routed to /v3/artifacts endpoint on the api port.
API version in version selector is marked as experimental.

Registers artifacts service and a sample Artifact Type in Glance entry
points config.

Implements-blueprint: artifact-repository

FastTrack

Co-Authored-By: Inessa Vasilevskaya <ivasilevskaya@mirantis.com>
Co-Authored-By: Mike Fedosin <mfedosin@mirantis.com>
Co-Authored-By: Alexander Tivelkov <ativelkov@mirantis.com>

Change-Id: Ib6a0d2482208a37aa343a747dfe5f63f9080dd04
2015-06-10 18:49:21 +03:00
Jenkins
0ab2f1154b Merge "Remove unneeded setup hook from setup.cfg" 2015-05-01 17:06:42 +00:00
Monty Taylor
3ba62aed1d Remove unneeded setup hook from setup.cfg
These are a historical thing and are not needed. They don't hurt - but
they are noise.

Change-Id: I4bb8a2d327dc5cc602a95f4ba2cc0a82998af45c
2015-05-01 09:36:22 -04:00
Doug Hellmann
ae21f4dffa Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Ifa8baab33cdb3e606cf175a8c29c3a4ef6c44480
2015-04-28 18:57:45 +00:00
Thierry Carrez
7f9d354082 Open Liberty development
Bump pre-version in setup.cfg to formally open Liberty development.
Kilo release branch will be cut from the previous commit.

Change-Id: If7e00de07472b62d8d086bcb68a32993891becca
2015-04-07 16:36:06 +02:00
Lakshmi N Sampath
9911f962a4 Catalog Index Service
Implements: blueprint catalog-index-service

* Glance Index and Search API Implementation
* Tool for indexing metadefinition resources and images from Glance
database into Elasticsearch index

Change-Id: I6c27d032dea094c7bf5a30b02100170e265588d9
Co-Authored-By: Lakshmi N Sampath <lakshmi.sampath@hp.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
Co-Authored-By: Travis Tripp <travis.tripp@hp.com>
Co-Authored-By: Wayne Okuma <wayne.okuma@hp.com>
Co-Authored-By: Steve McLellan <steve.mclellan@hp.com>
2015-03-26 10:12:27 -07:00
Flavio Percoco
1b144f4c12 Basic support for image conversion
This patch adds a task for image conversion. It uses `qemu-img` to
convert images. This tool has support for several image formats.

The current implementation converts images if and only if the operator
has configured glance to do so. That is, the `convert_to_format` option
has been set.

There are few things about this patch that should be improved by
follow-up patches. The first one is the fact that it relies on the
entry_points order for task execution. Although this works, it is not
the most flexible/controllable way to do it. The second thing is that it
relies on the aforementioned configuration option to enable/disable the
task (as in, it becomes a non-op). There should be an explicit way to
enable/disable tasks.

Since both things mentioned in the previous paragraph affect the task
management in general, I've decided to leave the fix for a follow-up
patch.

DocImpact
SecurityImpact

Partially-implements blueprint: new-upload-workflow
Partially-implements blueprint: basic-import-conversion

Change-Id: I0196a6f327c0147f897ae051ee60a8cb11b8fd40
2015-03-12 11:18:55 -05:00
Flavio Percoco
5dd82abb74 Glance Image Introspection
This patch adds a first step towards image introspection. The patch adds
a set of tasks to correctly import an image from an external source (old
copy-from) and then introspect the image.

The implementation keeps these 2 implementations separate by considering
the import process a top-level task and the introspection step an
optionally available task that may/may not succeed.

The implementation uses stevedore to load both, import and optional
flows, and chains them using linear and unordered flows where needed.

DocImpact

Co-Authored: Erno Kuvaja <jokke@hp.com>

Partially-implements blueprint: new-upload-workflow
Partially-implements blueprint: introspection-of-images
Change-Id: I9e7505d4e84aabf9d71e03c360514ac824ea84de
2015-03-10 11:01:18 -04:30
Julien Danjou
067b0db570 Remove Python 2.6 classifier
Glance does not support Python 2.6 anymore starting with Kilo and might
not work correctly with it, so remove the classifier.

Change-Id: Ibd7ad401198749f975fb19007549f7623caae546
2014-11-25 17:00:14 +01:00
Oleksii Chuprykov
5ce208d472 Do not use LazyPluggable
LazyPluggable was removed but was not replaced in
all places of use.

Closes-Bug: #1394641

Change-Id: Ie5bb32e409a6abce0509adb6e035c533547bb1f5
2014-11-20 18:27:20 +02:00
Oleksii Chuprykov
d40185f248 Replace custom lazy loading by stevedore
Now we have own implementation for loading
extensions. stevedore avoids creating yet
another extension mechanism by building on
top of setuptools entry points.

Change-Id: I7fcb981b58b20fb49d10eea3d477f962e4bf3565
2014-11-10 13:58:00 +00:00
Thierry Carrez
16fa669eb8 Open Kilo development
Bump pre-version to 2015.1 to formally open master branch to Kilo
development.

Change-Id: I4b9b78ee45113294eb9d0a9240925e2e2e6901b7
2014-09-29 11:16:37 +02:00
Zhi Yan Liu
819f28a0b8 Enabling separated sample config file generation
As a common approach most projects used now and Oslo preferred, this
change enabled sample configuration file generation mechanism for
each Glance services.

This change, as an enhancement, allows generating separated sample
configuration files for each Glance major services, e.g.:

    etc/glance-api.conf.sample
    etc/glance-cache.conf.sample
    etc/glance-manage.conf.sample
    etc/glance-registry.conf.sample
    etc/glance-scrubber.conf.sample

It is different than I94d486d6686815c45705a7a9b00fb26062e1eb63
which only supports generating an unified sample configuration
file to including all Glance available options.

This mechanism  not only can help auditing by packager, milestone
maintainer or developer as a function (testenv) of tox, but also
those separated configuration files could make deployment be easy.
And it helps keeping sample configuration files be update with
code change.

The change added "genconfigs" function as a tox testenv (-egenconfigs),
and it dependes on oslo-config-generator function of oslo.config.

The change doesn't introduce those sample files Glance repo, so
next step is to investigate if we can generate them in gate
automatically when a change was merged.

Related-Change-Id: I15686708fc9460948a58cfea3d18dae40ba1fda9
Related-Change-Id: Iae31856d5886ee78786972d80c7c103c3460a2b3
Related-Change-Id: I76043b08e2872867e5af2a5ac902e4d092fda5c8
Closes-Bug: #1300546
Closes-Bug: #1361963

Change-Id: Ibe03a3fe80b96ca32acb1a6bea7e38e6075951bb
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-09-17 13:19:00 +08:00
Thierry Carrez
2b3338b44c Open Juno development
Bump preversion to 2014.2 to formally open Juno development.
The Icehouse release branch (milestone-proposed) will be cut
from the last commit before this one.

Change-Id: I8fe4b32d60fb7c32e80258f60e2c843b76eb4115
2014-04-01 09:16:36 -07:00
Zhi Yan Liu
d7f1221684 Switch to testrepository for running tests
OpenStack as a whole is moving towards using testrepository and
testtools for running tests. To that end, bring Glance into line by
switching it to use testrepository to run tests.

This copies run_tests.sh and tools/colorizer.py from Nova.

This change also has some minor changes to make run_test.sh work well.

Partial fixes bug: 1179009
Fixes bug: 1271806

Change-Id: Ic265bc0d2f1528358f6e8ee5b4139f991923fc72
Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-01-29 08:30:55 +08:00
Zhi Yan Liu
9567c2b6a0 Adding image location selection strategies
An image can be saved to more than one backend storage by multi-location
mechanism, Glance should have a capability to select the best backend
storage for improving image consuming performance. This change
implements two strategy modules: "location_order" and "store_type", and
allow Admin configure some strategy-specified options for Glance as
their deployment required.

As an end user, he can get VM or consuming image faster base on this
enhancement. This is not only for 'download' transport handling on the
API server side but also for client since they can obtain locations by
standard 'direct URL' interface.

docImpact
Implements bp: image-location-selection-strategy

Change-Id: I86f192aeae8e5f21a72f946552f6507654c25a6c
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
2014-01-16 15:17:34 +08:00
Mark J. Washenberger
f42ed64f70 Open Icehouse development
This should be accepted/merged once all the RC1 bugfixes are in.

This bumps the target version to 2014.1, effectively opening the master
branch to Icehouse development, ending the feature freeze.

The Havana release branch is cut from the previous commit in master.

Change-Id: Ib8aedc149750ce32558f1fbbf51263f2110be3ac
2013-09-30 11:45:13 -07:00
Monty Taylor
8302c4264f Migrate to PBR for setup and version code.
Fixes bug 1179007

Also, sync with global requirements because we can't do it in two steps.

Change-Id: If1c687f874272b9d9569af9dd1e5cb4457308f5c
2013-08-09 10:32:31 -03:00
Mark McLoughlin
d35e558b93 Remove gettext.install() from glance/__init__.py
The gettext.install() function installs a builtin _() function which
translates a string in the translation domain supplied to the install()
function. If gettext.install() is called multiple times, it's the last
call to the function which wins and the last supplied translation domain
which is used e.g.

 >>> import os
 >>> os.environ['LANG'] = 'ja.UTF-8'
 >>> import gettext
 >>> gettext.install('keystone', unicode=1, localedir='/opt/stack/keystone/keystone/locale')
 >>> print _('Invalid syslog facility')
 無効な syslog ファシリティ
 >>> gettext.install('nova', unicode=1, localedir='/opt/stack/nova/nova/locale')
 >>> print _('Invalid syslog facility')
 Invalid syslog facility

Usually this function is called early on in a toplevel script and we
assume that no other code will call it and override the installed _().
However, in Glance, we have taken a shortcut to avoid having to call it
explicitly from each script and instead call it from glance/__init__.py.

This shortcut would be perfectly fine if we were absolutely sure that
glance modules would never be imported from another program. It's probably
quite incorrect for a program to use glance code (indeed, if we wanted to
support this, Glance code shouldn't use the default _() function) but
nevertheless there are some corner cases where it happens. For example,
the keystoneclient auth_token middleware tries to import cfg from
gance.openstack.common and this in turn causes gettext.install('glance')
to be called in other projects like glance or quantum.

To avoid any doubt here, let's just rip out the shortcut and always
call gettext.install() from the top-level script.

However, there's a bit of an annoying detail here - by default,
nosetests starts in the current directly and tries to import all modules
it finds to look for tests. Without the _() builtin installed, importing
some modules like glance.common.exception will fail.

Since it only ever makes sense to load tests from the glance/tests dir,
we can ask nose to do that by using the --tests argument via setup.cfg.

Note, this means that if you previously did this:

  $> tox -- glance.tests.foo glance.tests.bar

then you must now do this:

  $> tox -- --tests glance.tests.foo,glance.tests.bar

Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
2013-05-08 09:21:46 +01:00
Monty Taylor
7ea5be5952 Stop using detailed-errors plugin for nose.
Because of the move to testtools, the detailed-errors plugin is not only no
longer useful, it actually causes problems, as it fails to process the
error information sent up by testtools.

Part of blueprint grizzly-testtools

Change-Id: I0c8ff489fa92bb4cf7dcd06dd73f14701c013608
2013-01-31 10:50:36 +11:00
Monty Taylor
66108d0e48 Fix coverage jobs. Also, clean up the tox.ini.
Change-Id: I85e8f1b190e2c5f598ae76f2920dfbe7c4ed1500
2012-06-04 15:29:26 -04:00
Monty Taylor
d8f0c382ef Added first step of babel-based translations.
Change-Id: I34e3f49e96cf6e68306770781e8114e56a6b3556
2012-02-28 02:00:37 -08:00
Monty Taylor
eea25b4149 Prep tox config for jenkins builds.
Change-Id: Id81588d3a2aabc0931d5bf12f078d8f770305e69
2012-02-06 08:31:49 -08:00
Monty Taylor
3d69f40135 Added setup.py and sphinx docs. 2010-09-26 00:25:34 -07:00