Commit Graph

66 Commits

Author SHA1 Message Date
Brian Rosmaita 11989a18f4 Bump Image API version to 2.16
This API version increment is due to change I6a875a38bef5, which
corrected the response code for the admin-only API call:
    PUT /v2/cache/{image_id}
The call now returns 202 upon success (it had been returning 200).

The intent of this version bump is to get the attention of operators
to take note of this change; from now on, the call always returns 202
upon success regardless of what API version you request.

Additionally, cleaned up some version tests that had gotten out of
date and were not thoroughly testing version negotiation.

Also, corrected the version negotiation code around the v2.13 API.
The versions response had been modified by change I6882fd2381e6 to
only include v2.13 when the 'enabled_backends' config option had a
value, but the versions negotiation code was not updated to reflect
that.

Change-Id: I0cf35ed7e21497826cd581e59aa58774f030b9f6
Related-bug: #1971521
2022-05-24 11:45:30 -04:00
Mridula Joshi a34764ecac Added a new API to expose store info
This patch adds a new API to glance ``GET /v2/info/stores/detail``
to expose the stores specific details about the store like store
type and other specific store properties.This operation
will be admin only and validated by the new policy rule
``stores_info_detail`` which defaults to admin only

Implements: blueprint expose-store-specific-info
Change-Id: I6882fd2381e6ae245fd8c61bf9f4d52df2b216f5
2022-02-16 05:46:47 +00:00
Erno Kuvaja 87eae327bf Cache management API endpoints
This change adds the new cache API endpoints and their related
new policies.

Implements-bp: https://blueprints.launchpad.net/glance/+spec/cache-api
Change-Id: I69162e19bf095ef11fbac56a1ea2159d1caefba7
2022-02-14 15:14:17 +00:00
Dan Smith f865b8cac7 [APIImpact] Quota usage API
This adds a /v2/info/usage API endpoint which exposes to the user
their current limits and usage.

The discovery API does not (appear to) have existing tests, so this
adds a module for that, although only usage tests are added currently.

Implements: blueprint quota-api
Change-Id: I50c98bac50f815bdb9baae024e77afd388f74554
2022-02-03 09:55:50 -08:00
Abhishek Kekane af3ce1adc9 Bump Images API version to 2.12
Related: blueprint messages-api
Change-Id: Icd56ce4f0fb0b70fdfc649474766b638a707fdd0
2021-02-24 05:58:14 +00:00
Erno Kuvaja 0e3d274915 Bump Images API version to 2.11
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: I1e200c47f20ec6945981dbd92f859cfec234e42d
related-bug: #1897773
2020-09-29 17:47:45 -04:00
Erno Kuvaja bbb3ede895 Removal of 'enable_v2_api'
Removal of config option 'enable_v2_api' and its related
operations and tests.

Change-Id: Ic83e7e8077b3fc939990c1f8e9c99b13b7fcd7ad
2020-07-03 19:01:39 +00:00
Erno Kuvaja d9546dce75 Images API version bump and config sync
This change contains minor version bump to Images API to
indicate latest changes to the API.

Also has config file sync for for M3 release.

These two are combined for saving some gating time due to
busy infra at Train milestone 3 deadline.

Change-Id: I13133c32734751d43cc3afed9b68d015cebd5b6b
2019-09-16 13:25:45 +01:00
Erno Kuvaja 208935af96 Add API version 2.8
This change bumps the API to EXPERIMENTAL 2.8 when multi back-end
is enabled.

Change-Id: Ie0e1ed84db1b227eea1774138b2a83172ff85bec
2018-08-07 16:39:06 +01:00
Erno Kuvaja 8e16e41f4d Bump Imges API version to 2.7
This API version bump contains the extensions for hidden images
and multihash feature support.

Change-Id: I3d394b344492a1f06a4999a3f61cecf5ace30f23
2018-08-01 19:42:11 +01:00
Erno Kuvaja 3dde3204d5 Remove Images API v1 entry points
This change removes option to configure Images API v1
This change removes Images API v1 endpoints from the router
This change removes all v1 tests
This change removes the v1 dependant glance-cache-manage command

This change does not remove all v1 codebase. Further cleanup and
decoupling will be needed.

Change-Id: Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
2018-07-13 10:21:49 +01:00
Erno Kuvaja f91c3a7016 Align Vers Neg Middleware to current API
Fixes the version neg hiding API v2.6 if the deployment has
disabled the Image Import feature. Being current API 2.6 should
be always returned.

Change-Id: I69ac7f36f4fbb633c731be439b69c2a682b91238
2018-02-08 14:51:29 +00:00
Brian Rosmaita d3871a57b8 Fix Image API 'versions' response
Whether or not the v2.6 EXPERIMENTAL API is exposed at a site
depends on the enable_image_import config value.  If it's False
(the default), then the API a client sees is the CURRENT v2.5
API, and any of the v2.6 calls made against 2.5 return a 404
(same as if you were running Ocata).  This patch adjusts the
'versions' response so that when enable_image_import=False,
the EXPERIMENTAL v2.6 does not appear in the response.

Change-Id: Ibe164f02c99d10f5a5edd0de96c665413a12f700
Closes-bug: #1711829
2017-08-19 13:00:20 -04:00
Brian Rosmaita af8c371a8c Bump Images API to v2.6
The MVP of image import functionality will be introduced as an
EXPERIMENTAL 2.6 version of the Images API.  The current version
will remain at 2.5.

This patch:
* Updates the version response
* Updates version negotiation code
* Updates unit and functional tests
* Updates the api-ref
* Adds a releasenote

Change-Id: Ied573897157e05f7b0438baeb1553326fb06613a
2017-08-06 09:19:13 -04:00
rtmdk ff60e33cec Fix some reST field lists in docstrings
Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.

[1] http://sphinx-doc.org/domains.html#info-field-lists

Change-Id: I0300dbac6dc02681cec2725b3c44a7dd1bfd7b4e
2017-03-25 00:35:17 -07:00
Brian Rosmaita 4b8026714f Glare-ectomy
Glare became a separate project during Newton.  The code was copied
out of the Glance tree, but remained in the Glance repository.  It
is no longer being maintained, and that has begun to cause some
problems, for example, blocking a recent stevedore upper constraints
change; see I141b17f9dd2acebe2b23f8fc93206e23bc70b568

This patch removes the Glare code from the Glance repository.  It
includes Alembic database migration scripts, in both the all-in-one
and E-M-C format.  It also includes release notes.

Implements: blueprint glare-ectomy
Change-Id: I3026ca6287a65ab5287bf3843f2a9d756ce15139
2017-03-01 21:46:52 +00:00
Brian Rosmaita c8028768e6 Bump minor API version
Change-Id I94bc7708b291ce37319539e27b3e88c9a17e1a9f (Community
Images) entails a minor version bump in the v2 API.

Change-Id: I2b7cd5ec9b974ebc738feb89ef22c428fbe3be06
Depends-On: I94bc7708b291ce37319539e27b3e88c9a17e1a9f
2017-01-19 18:16:51 -05:00
Nikhil Komawar a2b329c997 Bump up Glance API minor version to 2.4
This is the minor version bump for Newton after some of the API
impacting changes occur.

APIImpact
UpgradeImpact
DocImpact

Depends-On: Ie463e2f30db94cde7716c83a94ec2fb0c0658c91

Change-Id: I5d1c4380682efa4c15ff0f294f269c800fe6762a
2016-09-07 18:31:37 +00:00
Nikhil Komawar 0d1daf44ef Version negotiation api middleware to include v2.3
Glance API is at v2.3 listed to be CURRENT version but the version
negotiation middleware lists only v2, v2.0, v2.1, v2.2.

Version negotiation middleware and related tests must include v2.3

Change-Id: I4018af408fa45f3ac0ad6e9c8229428a9f87089f
Closes-Bug: 1609571
2016-08-03 18:34:32 -04:00
Erno Kuvaja 9ef5ed125c Remove unused enable_v3_api config option
The option was used to enable experimental Artifacts API
that was moved to glance-glare service. This config option
does not do anything and is removed to avoid confusion.

Removed apropriate sections from example config files as well.

Change-Id: Ie84f3f65ec88fd30197758ac319ef5b2f4c313e2
Closes-bug: 1556050
2016-03-11 12:00:55 +00: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
Jenkins 2682dfe200 Merge "Import i18n functions directly" 2015-12-10 03:42:30 +00:00
kairat_kushaev c27c25f779 Import i18n functions directly
Import i18n functions from module directly and do not use
global module variables like _ = i18n._. It makes code shorter
and cleaner. It also to detect cases when these functions are not
used in module.

Change-Id: Iaa593ac1f2dd15cbcad049bef6ba68f1cfa610da
2015-12-07 18:20:43 +03:00
Jenkins 625269f114 Merge "Change the format of some inconsistent docstring" 2015-12-07 10:45:00 +00:00
leo.young bcbfa598e8 Change the format of some inconsistent docstring
Replace all the ":return:" with ":returns:"
Replace all the ":returns " wtih ":returns:"
Replace all the ":returns :" with ":returns:"

Add the changes for ":raise" also, change ":raise" to ":raise:"

Change-Id: I5d0def4665d0cd69b73c3c3826ad8f208e1e970e
2015-12-01 10:50:49 -05:00
kairat_kushaev e2c8b23129 Format log messages correctly
Postpone formatting of log messages until check that debug is
turned on. It allows not to format and prepare formatted log
messages if debug mode is turned off.

Change-Id: Ic26a2940948fe9891e4898689e2ea9fc7f0d4350
2015-11-23 11:58:43 +03:00
Erno Kuvaja 0c8fb73acb Remove todo to remove /versions
I don't think it's realistic to expect that we have either will or
means to deprecate the /versions endpoint. Lets remove the misleading
TODO comment around that.

Change-Id: I1fad4b6964d0f9c0cf2da545ef3d9af8baf47f2d
2015-11-12 11:16:42 +00:00
Erno Kuvaja 3730d855ec Remove WARN log message from version_negotiation
After this version_negotiation logs only Debug messages when / gets
requested.

Closes-Bug: #1496138

Change-Id: I99035679ec4faa3144507a844157fc37eb71c275
2015-09-16 10:16:06 +00:00
Flavio Percoco 3fc253c197 Don't return 300 when requesting /versions
Whenever the versions resource is used, it'll reply with a 300 status
code. This is the desired behavior when requesting versions that we
don't support and/or non-existent.

However, when the user requests specifically for the `/versions`
endpoint, Glance shouldn't reply with a 300 since there's just 1 choice
for such endpoint.

APIImpact
Closes-bug: #1491350

Change-Id: I23e3780e5d1b609753ffef59418115f45ab45fe7
2015-09-02 15:03:41 +02: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
Louis Taylor 0acff569e0 Move to graduated oslo.log module
This removes the log module from the oslo incubator directory.

Change-Id: Ib017cc2777e27c58b376c3138c9fba614783cc34
2015-03-12 11:48:24 +00:00
Louis Taylor d759a6fd1a Move from oslo.config to oslo_config
oslo_config was moved out of the oslo namespace in oslo.config>=1.6.0.

Related-to: blueprint drop-namespace-packages

Change-Id: I30ecbf8f9de77496fcb643c7ad9738d79ad359f0
2015-01-12 14:34:22 +00:00
James Carey 3f2a56ae65 Move from using _ builtin to using glance.i18n _
The builtin _ should not longer be used.  Instead _
should be explicitly assigned from glance.i18n.

This patch does the following:
  (1) adds these explict assignments to any
      glance file that was missing them,
  (2) removes the defintion of _ as a builtin from
      tox.ini so that a pep8 failure will occur
      if _ is not defined,
  (3) removes calls to install().

This removes the last direct use of gettextutils by glance.
The indirect uses, via openstack/common, will be removed
in the next sync with oslo.

Change-Id: Ie54e8a67e747e022cc01022dfad35d89686bdfc4
2014-11-21 18:51:19 +00:00
Erno Kuvaja 4f46fb67f2 Raising glance logging levels
This change complements glance change #106776 by raising some logging
levels and fixing some of the translations of logging.

Related to bp refactoring-glance-logging
Closes-Bug: #1336955

Change-Id: Ib547f4603025ebe4f6c055779032ab4064784490
2014-11-21 17:11:17 +00:00
Julien Danjou fadbef8511 hacking: upgrade to 0.9.x serie
Change-Id: I252758fd633662de9659a402c5e3d7e3ce1fae0f
2014-10-06 14:41:03 +02:00
Christian Berendt 86dd9ff66c debug level logs should not be translated
According to the OpenStack translation policy available at
https://wiki.openstack.org/wiki/LoggingStandards debug messages
should not be translated. Like mentioned in several changes in
Nova by garyk this is to help prioritize log translation.

This patch adds a new hacking check - N319 - that ensures all
debug log messages don't have translations.

Change-Id: I9dd958b904671a7eb95883026e14684469dc52d5
Closes-Bug: #1317847
2014-05-23 15:57:06 +02:00
Sergey Nikitin 75ce276d29 Added undescore function to some log messages
Log messages were not ready for translation w/o underscore function.

Change-Id: I57641afa4fa57aca6d331d609d80e94fbcb7815d
Closes-bug: 1284523
2014-04-10 10:33:57 +04:00
Noboru arai 8de10b0f34 Remove vim header
No need to set tabstop tons of times, this can be set in your vimrc
file instead.

More disucssion:
http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html

Change-Id: I3b830a5bb831a63c188109e6fad66ba48884fff3
Partial-Bug: #1229324
2014-01-14 16:03:28 +00:00
Jenkins 93edd1bdc6 Merge "Changed header from LLC to Foundation based on trademark policies" 2013-11-12 13:41:45 +00:00
Stuart McLaren 408cebacc3 Avoid printing URIs which can contain credentials
Fix for bug 1233275.

Change-Id: I24d8b57418eb678767b33840973a632eb2132c6a
2013-10-10 14:36:06 -07:00
Dirk Mueller 518bbf7298 Changed header from LLC to Foundation based on trademark policies
Fixes: Bug 1214176

Change-Id: I4e394c33d810fe7d48066ff7cb6143f7eae25f13
2013-09-10 18:29:53 +02:00
Mark J. Washenberger 249f800de1 Publish recent api changes as v2.2
Throughout the Havana development cycle, we have added several
features to the v2 api, without breaking backwards compatibility.
So this change bumps up our minor version number.

Change-Id: If0e5ffe117200fbfb967c8c95a63608f12dbba58
2013-09-04 14:55:08 -07:00
James Li abbc535333 Redirects requests from /v# to /v#/ with correct Location header
This is a continuous fix to bug #1166957

VersionNegotiationFilter pops off the version string of PATH_INFO,
the popped segment is pushed onto SCRIPT_NAME, which results in
dual version strings (e.g. '/v1/v1/') in the 'Location' header
of a redirect response. This may result in a further 404 error
if the http client will automatically follow the returned
redirect.

Fix this problem by adding a private method which does not
push the popped segment onto SCRIPT_NAME.

Change-Id: Ie0c244af38534dde2058828fbff840a845cc7c90
Fixes: bug #1175815
2013-05-08 21:16:29 +00:00
Brian Waldon af832bf75f Publish API version 2.1
Fixes bug 1154317.

Change-Id: I1e044539952f649974c757183e9bb2551264850e
2013-03-12 16:23:03 -07:00
Mark McLoughlin 98552376f3 Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-19 10:19:36 +00:00
Zhongyue Luo ce85c38158 Fix import order nits
Change-Id: I972c463131ba688ab9352590eb53f5b1822ac943
2012-12-31 22:12:53 +08:00
isethi 39700637e3 Makes deployed APIs configurable
Uses config options enable_v1_api and enable_v2_api
to control which APIs have been deployed.
(Thanks markwash for all the help)

Fixes bug 1043497

Change-Id: I42dc1d88f94e61b9550c5f114ffc1abad25be7ff
2012-09-05 21:01:25 +00:00
Brian Waldon 2fb37ab925 Reveal v2 API as v2.0 in versions response
* Report v2.0 API compatibility, not v2
* Allow users to specify '/v2' or '/v2.0' in their request URI

Related to bp api-2

Change-Id: Ia8d41902a2171aad8f06d3ac329a3e3c097cdc90
2012-08-11 16:14:55 -07:00
Brian Waldon 279d07eebb Update 'logging' imports to openstack-common
Change-Id: Ia1a7b5062e7f882971f2061274f6a4a44cfc8ced
2012-07-12 15:59:26 -07:00
Brian Waldon 4363af6cc8 Standardize logger instantiation
Use LOG for variable name and __name__ for logger name. Also
document this fact in HACKING.rst

Fixes bug 1015685

Change-Id: I0d9d80bef66197a28ed3d650f17859202048d776
2012-06-25 08:27:08 -07:00