67 Commits

Author SHA1 Message Date
Nguyen Hai
5e5ba92aec Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Remove the '[build_sphinx]' and [pbr] sections as described in:
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Adds the use of sphinxcontrib.apidoc to get (mostly) the same output as what
was provided by the removed [pbr] section.

Change-Id: Ie7e3acef7161cb8f218c2333167490c8116a2122
Depends-On: https://review.openstack.org/#/c/560270/
2018-04-11 06:02:54 +00:00
Zuul
abfa272c1f Merge "Adds 'web-download' import method" 2018-02-07 06:03:48 +00:00
Haikel Guemar
c1930d4c93 Fix pip install failure
At install_data hook, it tries to glance-image-import.conf which
does not exist. Since it is an optional file, let's not install it
by default.

Change-Id:  I8a5122355da43c592b0cbad0eb7921875e0a5e99
2018-01-25 14:02:41 +01:00
Erno Kuvaja
223f2cf887 Adds 'web-download' import method
This change adds 'web-download' Image Import method.

Changes discovery call returning actual enabled methods rather than
hardcoded value.

Change-Id: I3960d07cfa4e1be391f7a164147611724788d83e
2018-01-24 13:01:26 +00:00
bhagyashris
f5ae04b9f3 Implementation of Inject metadata properties
Implements the spec Inject metadata properties automatically
to non-admin images

This commit adds new task '_InjectImageMetadata' to inject
the metadata properties automatically to non-admin images
at the time of creation of images using newly introduce
'image-import' api in v2.

DocImpact

Implements: I6a7ed31d5fae677cbbc9a6f6053f79d3e9326561
Change-Id: I98be97c42f23b60a72d520aad5f6078a96372c59
2018-01-19 12:11:31 +05:30
Erno Kuvaja
1231fb5f6e Add hooks for Image Import plugins
This change adds hooks for pulling in plugins for
Interoperable Image Import taksflow. Boilerplate Noop
plugin is provided as an example and for testing.

Change-Id: If14c7dc4f38360006f9cb350fbba54fa2f33be61
2018-01-09 21:13:15 +00:00
Jesse Pretorius
b0b102b8dc Add default configuration files to data_files
In order to make it simpler to use the default
configuration files when deploying services
from source, the files are added to pbr's
data_files section so that the files are
included in the built wheels and therefore
deployed with the code. Packaging and deployment
tools can then more easily use the default files
if they wish to.

This pattern is already established with similar
files for neutron and the glance metadefs as has
been mentioned in the related bug report.

Change-Id: Ie0eb7f16bc975de0db80a2144fd8db9e09f6317f
Closes-Bug: #1718356
2017-09-21 17:39:43 +00:00
Jenkins
02cd5cba70 Merge "Update URL home-page in documents according to document migration" 2017-08-28 18:40:43 +00:00
Brian Rosmaita
4366a7493c Fix api_image_import tasks stuck in 'pending'
The immediate cause was that the api_image_import flow was not
listed in the entrypoints in setup.cfg, so stevedore couldn't find
it.  After the entrypoint was added, the task was going to failure
because it couldn't find the image_id.  So this patch has the
import controller add the image_id to the task_input dict.  Next
the flows were having trouble finding the image_id, so I just
passed it to them.  There's probably a more elegant way to have
taskflow handle this, so this patch could use a refactoring.  On
the plus side, the interoperable image import process does appear
to work with this patch.

NOTE: if you want to test this in devstack, use the stable/ocata
devstack but with the master branch of glance.  The tasks engine
doesn't appear to be running under the Pike devstack configuration.
(Use defect 1712463 if you have an idea what might be the problem.)

Change-Id: Ic68c17f4cb671eb664e2de331787b55fe9878a27
Closes-bug: #1712462
2017-08-23 14:12:43 -04:00
Luong Anh Tuan
545fff51f3 Update URL home-page in documents according to document migration
Change-Id: I8970c2d67cfefc8c094e2bb4b6e0ca5e5853ca73
2017-07-14 02:55:12 +00:00
Stephen Finucane
1da56883f5 doc: Explicitly set 'builders' option
A recent release of pbr explicitly requires stating which builders are
requested, rather than defaulting to html and man. This has resulted in
man pages not being built. Correct this oversight, along with a few
issues that have been introduced to 'doc/source/conf.py' since. It is
also necessary to remove a couple of plugins as there seems to be
another pbr bug under the hood. Fortunately none of these are used so
it's all good.

Change-Id: I22fd4d113704949dbf7704f50fa1d08fa10f11b6
2017-07-07 17:52:25 +00:00
Doug Hellmann
f9c8f860f3 turn on warning-is-error for sphinx build
Change-Id: I325346f580bb85ffc8834df66a1f2e4a4664dbc7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-29 13:59:47 +00:00
Doug Hellmann
a2df410e76 fix the autodoc instructions
Use autodoc_index_modules instead of autodoc_tree_index_modules so only
one copy of the API docs are generated.

Exclude the tests subpackage because it's not part of the Glance Python
API.

Exclude the glance.db.sqlalchemy subpackage to avoid issues caused when
parts of it cannot be imported during the doc build because they rely on
alembic setting up values that are not configured for a simple import.

Change-Id: I127b812bc879fc39533b39df1785d93835142430
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-21 14:15:58 -04:00
Doug Hellmann
1c7f556d4f rearrange existing documentation to follow the new layout standard
This change moves existing files, updates a few of the cross-references
and paths, and fixes some formatting. It is not meant to be the final
word on how the main page looks or how the other files are organized,
but it gets everything roughly into shape. If the glance team wants to
make changes, please do those as follow-up patches

This change depends on the spec and on a feature of pbr that allows us
to move where the auto-generated class reference documentation ends up
in the tree.

Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Depends-On: I2bd5652bb59cbd9c939931ba2e7db1b37d2b30bb
Change-Id: I9dde267793a5913acb5b1ec028cfb66bc5189783
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-21 14:15:58 -04:00
Matthew Treinish
5e260055fa
Add pbr wsgi script entrypoint to glance
This commit adds a pbr entrypoint for the wsgi script file. This enables
deploying glance as a proper wsgi application instead of a standalone
service.

Change-Id: I089a22a4be4227a551c32442dba27c426f54c87d
2017-06-18 03:52:20 -04:00
Javier Pena
ce92edafd2 Remove glare leftovers from setup.cfg
I3026ca6287a65ab5287bf3843f2a9d756ce15139 removed Glare from the Glance
codebase, but left some lines in setup.cfg.

This patch removes the remnant of the references in the code tree.

Co-Authored-By: Javier Pena <jpena@redhat.com>
Co-Authored-By: Nikhil Komawar <nik.komawar@gmail.com>

Depends-on: I02bfe805c419fcc49ac43b66f4f7b1a0d1d54755
Change-Id: Ia3652eb0dede3614cc4ea880f8ddc06c95740797
2017-03-04 15:59:29 +00:00
Tom Cocozzello
99cece5fdd revert warnerrors before gate breaks
warnerrors used to show the errors in output when the docs generate
but now it looks like when this patch lands [0] it will cause the gate
to fail. I will push up a patch to fix all the docs problems but we
should revert this so we don't have a day when the gate is broken.

[0] https://review.openstack.org/#/c/229951

Change-Id: Ica33f1fd5acdc17a115d7a3bd81f8f4d79c1a809
2016-03-14 09:17:13 -04:00
Doug Hellmann
dde2c72d75 register the config generator default hook with the right name
No config generator hooks should ever be registered with a name that
belongs to another project. In this case, using oslo.middleware.cors
means that *every other project* that loads the middleware gets this
application's defaults when the generator is run on a system with
everything installed (such as a dev box with devstack). Use the name
of the app instead, to ensure that the defaults are only set when this
app's sample config and documentation are being generated.

Change-Id: I6a8c7d44b9db9325003ff2fdb667b0ced7739e96
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-03-11 15:27:56 -05:00
Jenkins
3c14ef558a Merge "no module docs generated" 2016-03-08 21:15:21 +00:00
Tom Cocozzello
b2b0599d51 no module docs generated
It looks like in the docs config.py there
needs to be some modifications so the module
docs can be generated through sphinx

Change-Id: I41a2d62a2300100d9fb412698360bb1238cf7406
Closes-Bug: #1552830
2016-03-07 20:00:22 +00:00
Michael Krotscheck
7a93458baa Moved CORS middleware configuration into oslo-config-generator
The default values needed for glance's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to glance's default configuration parsing. This ensures
that if a value remains unset in glance-api.conf, it will be set to use
sane defaults, and that an operator modifying the configuration
file will be presented with a default set of necessary sane headers.

Change-Id: I3c9d267b6224d6c7e5cc2c41cb51fb7e363c4955
Closes-Bug: 1551836
2016-03-02 07:48:05 -08:00
Andreas Jaeger
e09c00d44f Move bandit into pep8
Run security linter bandit as part of pep8. Pep8 is the usual linter
target and thus let's use it there instead of starting another node for
this short-running job.

Move bandit requirement to test-requirements.

Disable temporarily some tests in bandit.yaml since they advocate using
defusedxml which is not in global-requirements.txt and thus cannot be
used inside bandit (bug#1550161).

Change-Id: Ie3c9f4ee6e061ea090fa882f4f029f2761706951
2016-02-26 08:12:45 +01:00
Jenkins
6c64bc1b6a Merge "Support importing OVA/OVF package to Glance" 2016-02-26 06:07:54 +00:00
Kent Wang
b00048742e Support importing OVA/OVF package to Glance
Supports import of OVA/OVF package to Glance by adding a new task to
the existing Glance import workflow. Automatically extracts single disk
image from OVA tarball and saves it to the Glance image store. It also
parses the included OVF file for interested metadata. Extracted
metadata is included as uploaded image's properties.

To kick off this flow, specify 'ova' as 'container_format' in the
task-create request. Specify interested metadata in the
'ovf-metadata.json' conf file, generally located at /etc/glance. Any
other additional metadata found in the OVF file will be ignored.

Currently this is an admin only feature and only supports upload of
single disk images. Also currently we will only be supporting extracting
properties from CIM_ProcessorAllocationSettingData.

Co-Authored-By: Jakub Jasek <jakubx.jasek@intel.com>
Co-Authored-By: Deepti Ramakrishna <deepti.ramakrishna@intel.com>
Change-Id: I4c9c9566895c2426f26d2750c8e2a23b39468fb1
Implements: blueprint ovf-lite
2016-02-24 14:35:19 -08:00
Alexander Tivelkov
b974a63660 Move Glance Artifact Repository API to separate endpoint
EXPERIMENTAL Glance v3 API has been removed in favor of standalone API
(EXPERIMENTAL Artifacts API of v0.1).
This patch introduces a new process entry point to run on a different
port (9494 by default), with its own configuration file and a paste
config.

A controller stub for old /v3 api remains in the glnace.api package for
the compatibility with existing paste configuration which may reference
it. This stub returns a 301 redirects to glare endpoint if it is present
or 410 errors otherwise.

To reuse  the existing version_negotiation middleware some refactoring
has been made.

Implements blueprint: move-v3-to-glare

Change-Id: I5b7bd4cdcc5f2a40fc4a5f74bcc422fd700c4fb0
2016-02-10 18:34:55 +03:00
jinxingfang
54d646d505 Update the home page
http://www.openstack.org  ---> http://docs.openstack.org/developer/glance/

Change-Id: I0c4f2bb3dfef9bbdefc098e073fdbec773b4c671
2016-02-05 17:35:35 +08:00
OpenStack Proposal Bot
db4fcfccbc Updated from global requirements
Change-Id: I5c3ab0f35f06529545e52fbe3acc0ac88ca59948
2016-02-04 20:39:52 +00:00
Andreas Jaeger
9196f1356c Fix setup.cfg
Add packages line which is normal for setup.cfg. The new infra
translations scripts need this to figure out the module used.

Change-Id: I9687fba8e956eaf28673a72f0e1a10da3b3b0b8f
Story: 2000452
2016-02-03 08:28:27 +01:00
OpenStack Proposal Bot
561668db17 Updated from global requirements
Change-Id: Ib437d4aecd3babf03f4259666f5f6d0ba4418d9f
2016-01-22 04:03:25 +00:00
Jenkins
2226ade440 Merge "Remove artifact entry point" 2015-12-09 00:11:13 +00:00
Jenkins
8dced37499 Merge "Automated bandit checks in glance" 2015-12-04 03:09:37 +00:00
kairat_kushaev
a0846362d7 Remove artifact entry point
Artifact entry point doesn't exist in glance. So it can be safely
removed.

Change-Id: If7baac6b0e8685843900157717ff1c6c7c8032c0
Closes-bug: #1508879
2015-12-02 16:12:50 +03:00
Flavio Percoco
7e372928a6 Remove version from setup.cfg
Per [1] we now want to use the git repository for knowing the version
instead of just trying to modify the setup.cfg file.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/080692.html

Depends-On: Id86498f9a65897c0e002ded3df745a8076090e96
Change-Id: I880615c1cafefaebb7dc3084f466875de9b7fd48
2015-12-01 13:05:20 -04:30
Drew Varner
b52e0126cb Automated bandit checks in glance
Set up automated bandit checks using tox. These tests are intended to be
eventually suitable as automated gate tests.

Currently, several tests are disabled (and labeled with a TODO to enable
them). A future commit for each test will enable that test, fix all
associated false positives, and fix all associated real positives.

Change-Id: I290992be027eac180b3a0dfcf601465079c2915c
Partial-bug: 1511862
2015-11-30 09:58:28 -06:00
Gregory Haynes
9c32f606b4 Remove glance_store from exta requirements.
We depend on glance_store in requirements.txt so there is no reason to
also depend on it as an extra.

Change-Id: I8c91a7c21247fb52cb777d3ab94cd1c7eee22adc
2015-10-16 14:57:09 +00:00
Doug Hellmann
cd52ba79d7 tell pbr to tell sphinx to treat warnings as errors
Change-Id: I519ef986f2bb5b455fd4ffe3b4420b26d3d91a2a
2015-10-01 15:46:19 +00:00
Thierry Carrez
08c89dc0b1 Open Mitaka development
Bump preversion to mark the start of the Mitaka development branch.
The liberty release branch will be cut from the previous commit.

Change-Id: I25c9c2056ff490f28e0f898b30c4127deacb7f7a
2015-09-25 16:06:00 +02:00
OpenStack Proposal Bot
020f18afbf Updated from global requirements
Change-Id: I507c5f03b2fd53406ff80fd0938aa87ac13a2b0b
2015-09-08 22:02:10 +00:00
Matthew Edmonds
5c58886113 clean up requirements
Backend store-specific requirements are not hard requirements, since
the choice of backend store is up to the operator. The
python-swiftclient and oslo.vmware modules are herein moved out of
requirements.txt and instead listed as optional requirements using
the extras functionality in setup.cfg.

Removed unnecessary import of swift backend in db migration, to allow
python-swiftclient to move out of hard requirements.

Cleaned up other requirements that are no longer used.

Change-Id: I9edbf8a614b5caaf38b4c59bd864b7baa55bf36b
Depends-On: I94d75e3d52c9e3e9f7a741a079d25b1bdff29b27
Closes-Bug: #1475737
2015-09-04 13:48:49 -04:00
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