This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.
This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.
This update should result in no functional change.
For more information see the thread at
http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html
Change-Id: I095bf012d264025f84702140cb96f10428e237fb
Import legacy-glare-dsvm job and rename to glare-devstack following
naming policy.
Change-Id: I74aa695df50887d99ccf2b0348f1912a90e94725
(cherry picked from commit ac4eb163bd)
(cherry picked from commit d48d8439cf)
Now it's possible to get artifact info by providing
different artifact type.
For example, if artifact art_1 has type images, then users can
access it by url /artifacts/heat_templates/art_1 and any other
enabled artifact type.
For sure it should be accessed only by its own type, or by
metatype like 'all'. In all other cases 404 code should be returned.
Change-Id: I6a6bac273572671ae50528b44fb9c39503851b87
Closes-bug: #1743969
(cherry picked from commit c2cbdf076e)
Now we do not update index during iteration which leads
to the fact that BlobIterator returns incorrect data if
a file size exceeds chunk size (default 65536 bytes)
Change-Id: Id2b5f9efe29518106e097d237827ec481f22127b
(cherry picked from commit d880fce89e)
Make keyclock_auth to return exception.BadRequest
instead of exception.GlareException.
Keyclock may return 400 Http status For some cases.
In that case glare throws:
"code": 500, "error": {"message": "{\"error\":\"invalid_request\",
\"error_description\":\"User session not found\"}"
This change came to make glare reflect that this
is a token issue.
Change-Id: I084f05754d25722039039280826dc5dca4d58b95
This patch add new class method 'format_all' that can
be used to change the output format for 'all' metatype.
Change-Id: I67d82d921c5f5a9bad59384f11ed66f4fcecf7a9
(cherry picked from commit 3f1376552a)
Now to get an artifact type object by its name we iterate
by all available classes and compare their names. It leads
to complexity O(n).
It's better to generate a dict of available types and get
them directly from there with complexity O(1).
Change-Id: Icc13cd6f844bc93c8d5a80ba963068cde3ef133e
(cherry picked from commit 7ac7bb092c)
Currently glare calculates the amount of data and artifacts
even if the related quotas are disabled (value -1 is set).
It's not optimal, because additional requests to db are
required.
This code changes this and implements new behaviour when
requsts to bd are performed only if quotas are enabled.
Also it disables quotas by default.
Change-Id: Ie297aa1bc6f2be989bcc29353c8fec0101cf2e5b
(cherry picked from commit 8796021ca6)
Currently for several unit and functional tests it is
required to download data from external source, which
prevents their execution in offline mode.
This commit eliminates the drawback.
Change-Id: I35bfe8fba0a4d332c132a718b1845b3a09d6f68b
Closes-bug: #1721290
(cherry picked from commit 80be8dfbc2)
Recently scoped lock format was mistakenly changed
from "type_name:name:version" to "owner". New format
prevents simultaneuos modifications of different
artifacts by one tenant, because it locks the whole
tenant scope, not just a single artifact.
For this reason it's suggested to revert the format as
it was before.
Closes-bug: #1720139
Change-Id: I9dc26da85f424a4ced1ca232d1f33c548b602f0f
(cherry picked from commit d2ce390ca8)
Import oslo_service first, so that it makes eventlet
hub use a monotonic clock to avoid issues with drifts
of system time.
Change-Id: Ia260a5eb52bacdf202e5204d5b7b2bd281174a4a
Closes-bug: #1719178
Related-bug: #1510234
This code fixes importing configured admin credentials,
adds a help message to 'catalog_type' config parameter
and removes unused custom tempest.conf
Change-Id: I60ba1852d3686141132ae11362f51bf65ddfc618
Closes-bug: #1718669
Now each file in zip archive requires 2 or 3 calls to db:
1. initialize blob instanse, 2.(optional) upload data if
database store is used, 3. activate blob instance
So, for 100 files there are 300 requests, and complexity
is O(n).
With this commit we perform requests for all files in batch
mode: 1. initialize all blob instances, 2.(optional) upload
all data if database store is used, 3.activate all blob
instances.
So, for any number of files in archive there will be only 2 or
3 requests to db. Complexity is O(1).
Change-Id: I87ea9d1f87dc6519956808a1d1e764f16e6dc611
When sending a SIGTERM to the main glare-api process, it was sending a SIGTERM to its children but then also re-spawning its first dead child.
Related-bug: #1714240
Change-Id: Ibef426c198d287bbdac4e764fd654edba4b7c2d7
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: I54ac5a1cff963f301ac1536887f7f0866ada0d22
To prevent possible freezes in upload hook due to cpu intensive tasks
we should execute it in a separate thread.
Change-Id: Id3556d0d6f1973c7b9755428d2587822beddd70f
This patch adds pre and post hooks for all artifact modifying operations:
create, update, activate, deactivate, reactivate, publish, upload,
add_location, download, delete.
Example: 'pre_create_hook' and 'post_create_hook'.
Previous hook calls with 'validate_' prefix are removed except
'validate_upload' which is marked as depricated.
Change-Id: I746ceaacd357e332790c84ffe50e712cfa6cecda
Now to register new config options artifact type
should have 'artifact_type_opts' class attribute,
which represents a list with config options.
After that this options will be placed to
[artifact_type:{type_name}] config section. For
example [artifact_type:images].
Change-Id: I3969b08ad36b37932dbad4919ca3c0fab119344e
This patch adds 3 new api calls
PUT /quotas - set new quotas for specific projects
GET /quotas - get info about all available quotas
GET /quotas/{project_id} - get info about quotas for
specific project
Implements: blueprint glare-quotas
Change-Id: Icd0c960bac897d48b8502dc39d77b6cffad0d6e4
By default glance and glare will share common place to store data.
For example, for 'filesystem' backend it is '/var/lib/glance/images'.
To prevent possible collisions we have to redefine 4 glance_store default
values:
* filesystem_store_datadir='/var/lib/glare/artifacts',
* rbd_store_pool='artifacts',
* vmware_store_image_dir='/openstack_glare',
* swift_store_container='glare'
Change-Id: I37093eb491e13b1bd553bfc9788b89d9c95df937