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: I7d99f7efebbe55f6b5739e40e62b7b4e693bfdbe
default filter for name and type_name does not
allow to use like operator by default due to performance issue,
therefore we have added filters_ops for name in base_artifact
and type_name in all.py
Change-Id: Ib6c5f0d249c33f52858c03c454a0a7a0859e9301
(cherry picked from commit 328ee48815)
display_type_name provides admin a facility to
define a more user friendly type_name for artifact.
Change-Id: I8b1b08e4fa647c87c65f7af94f8f49d6269e03cf
(cherry picked from commit a81783e682)
In case artifact's field is defined to be
nullable=false and also doesn't have any
default, we had a problem:
While creating new artifact of this type
with a value for this field we got:
"BadRequest <artifact_name> field: <field_name>.
value: [None]. Exception.
That happened although a field value was provided.
This kind of error is expected if the field does
not get any value at creation, but not expected
if value is provided.
The following patch suggest a fix for that.
closes-bug: #1775502
Change-Id: I642249f067ab853b4b7d56a8da4db5809ee414c6
Currently in order to list artifacts from all tenants,
keyclock token must include 'admin' role.
The same goes for getting artifact from different realms,
or download blob of artifact from different realm.
The following changes enable more flexbility:
to list artifacts from all tenants, user can define
artifact:list_all_artifacts in policy.yaml with his
own choice for role.
E.G.
"artifact:list_all_artifacts": "role:su_role"
^ this will allow any user with role "su_role" to
list artifacts from any realm.
The same logic holds for getting artifact from other
realm (get_any_artifact), or download blob from artifact
in any realm (download_from_any_artifact)
Change-Id: Iaaa7f4b366230e0c5e4bee136bcdf9d072d498d8
Currently there was no way to get the total number
of records available during pagination until user
reaches the last page. And still he has to keep the
track of previous number of records.
To overcome this issue we have provided total_count
attribute in response structure which provides total
number of records available for the given filter.
Affected API :
GET /artifacts/{artifacts_type} artifact API.
For above API our updated response structure contains
a new json attribute "total_count" and value will
be of integer type.
Change-Id: I7608a80a70e90a4be24ebae7961346810d2f3a70
In order to have more info when upload_blob
fails, we add this log.
Learning from https://bugs.launchpad.net/glare/+bug/1742729
case, where this kind of info was missing.
Change-Id: If91e014692cbe6ad39c473eecef520b08881d53b
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
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
Now when user requests a list of artifacts glare returns
a json dict that has a section called after the type name,
which contains the list of the artifacts.
Example:
GET /artifacts/my_artifacts
{"my_artifacts": [...]}
It's not really a restful approach, so it's suggested to create a
unified section 'artifacts' for all cases, i.e. return
{"artifacts": [...]}
Change-Id: Ic0762f7a379754d19147a4f41a6d5a98abdc86b0
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
Now testr is still used for building rpm packages and we can't relace it
with stestr. So, it's reasonable to return the testr conf, that was removed
with patch #516461
Change-Id: I7482acb8afb6b19e47a73c3da95bde89f008ac14
During execution of the service we get deprecation warnings like
DeprecationWarning: Property 'tenant' has moved to 'project_id'
in version '2.6' and will be removed in version '3.0'
So, it's reasonable to rename it until it's too late.
Change-Id: I6030948c64d21d4799438c4c89e8ffbd999fcb94
This patch replaces explicit list of bandit tests to run
with a list of bandit tests to skip (only 3 are skipped).
It also replaces legacy-formatted bandit.yaml with what current
bandit version expects,
and improves the 'bandit' tox target somewhat.
Change-Id: If1c7be8377b92dac2e47bfcfd6de2847ace31c32
Add testing scenarious for max_artifact_number and max_uploaded_data
quotas in which we test changing of the quota values during the
execution.
Co-Authored-By: Mike Fedosin <mikhail.fedosin.ext@nokia.com>
Change-Id: Ib4d21e1d265b97ae3c8e4fa460661d2b8af3bfd0
TrivialFix:In the change[1] os_testr changed under the covers
from using testr to stestr, so that we now get the following
warning:
ostestr.py:120:
UserWarning: No .stestr.conf file found in the CWD.
Please create one to to replace the .testr.conf. You
can find a script to do this in the stestr git repository.
So remove the .testr.conf and add .stestr.conf which was
generated using a utility script as documented here [2].
[1] Id7cb2a39a8308f1413608dcf19273a1d7f33592e
[2] https://media.readthedocs.org/pdf/stestr/stable/stestr.pdf
Change-Id: I084215311928c0e66d45977748e5a2263bbc1444