Commit Graph

534 Commits

Author SHA1 Message Date
OpenDev Sysadmins c570cb3e97 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:09 +00:00
Ian Wienand 7ae5ad9329 Replace openstack.org git:// URLs with https://
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
2019-03-24 20:33:42 +00:00
Zuul 1620ed5f9a Merge "Revert "Validation message correction"" into stable/queens 2019-03-18 11:15:20 +00:00
Zuul 1a177866ed Merge "Revert "Removal of constraint for blob re-upload"" into stable/queens 2019-03-18 11:15:19 +00:00
Zuul 7429d3362e Merge "Revert "like filter addition for name and type_name"" into stable/queens 2019-03-18 11:15:19 +00:00
Idan Narotzki 488c551585 Revert "Validation message correction"
This reverts commit c56ba10dd0.

Change-Id: If14bbcbb8ffa925e5619766b61b3eb242658ea6d
2019-03-18 09:14:37 +00:00
Idan Narotzki 72408e40eb Revert "Removal of constraint for blob re-upload"
This reverts commit 79b11ee008.

Change-Id: Ibc59f0c03a81cbba5bd2970353a7f6039f65c80c
2019-03-18 09:14:01 +00:00
Idan Narotzki 2a464b1e71 Revert "like filter addition for name and type_name"
This reverts commit 69103be501.

Change-Id: I922ef66d774ee48541fec5b950bf1e23cdae1ec3
2019-03-18 09:13:04 +00:00
Zuul 558fa434af Merge "like filter addition for name and type_name" into stable/queens 2019-03-17 17:56:54 +00:00
Zuul d8104557e3 Merge "Removal of constraint for blob re-upload" into stable/queens 2019-03-17 17:51:12 +00:00
Kushal Agrawal 69103be501 like filter addition for name and type_name
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)
2019-03-17 14:37:16 +00:00
Kushal Agrawal 79b11ee008 Removal of constraint for blob re-upload
Change-Id: Ic333f9d9deb29f0a235db6aa956d7b11f8991414
(cherry picked from commit c329e4f5f2)
2019-03-17 14:34:15 +00:00
Kushal Agrawal c56ba10dd0 Validation message correction
corrected exception message for MinStrLen method

Change-Id: I9992283bc02ebb2b1a391b0e97f1c5fdbfed2d42
(cherry picked from commit d1de4d1c7b)
2019-03-17 14:32:05 +00:00
Kushal Agrawal 5997a3e758 Added display_type_name field in BaseArtifact
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)
2019-03-14 09:32:42 +00:00
idanaroz 7112503f67 Removed tpool.execute to prevent upload failure
As of now there no solution to the issue where thread is getting
stuck in eventlet.
Few other similar incidents and without proper solution:
https://bugs.launchpad.net/cinder/+bug/1694509
https://github.com/eventlet/eventlet/issues/432
https://github.com/eventlet/eventlet/issues/492
https://github.com/eventlet/eventlet/issues/395

Originally was taken from: https://review.openstack.org/#/c/613023/1


Change-Id: Ic924f0ef0cb632b2439dfb7d1092bebf54adb863
closes-bug: #1742729
2019-03-10 11:58:52 +00:00
Andreas Jaeger 5297ea86e8 Import legacy-glare-dsvm
Import legacy-glare-dsvm job and rename to glare-devstack following
naming policy.

Change-Id: I88a0c94a3e0799d713637f66d4c0aa410d705fce
2018-09-24 14:04:27 +02:00
idanaroz f7387cbcf6 Fix artifact init case.
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
2018-06-17 11:58:50 +00:00
Zuul c73fe300f5 Merge "Add Error log to upload_blob func." 2018-02-27 05:23:10 +00:00
Zuul 900af2f99b Merge "Adding support to super user roles." 2018-02-20 10:10:07 +00:00
Idan Narotzki 074f8f474b Adding support to super user roles.
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
2018-02-15 14:39:55 +00:00
Zuul fdb39e4c06 Merge "Test malformed json-patch" 2018-02-15 13:32:52 +00:00
Mike Fedosin 6e227236e7 Test malformed json-patch
Change-Id: Iaa4d8d47a6a2c5f39ccc8833a3dcceb51fe922b8
2018-02-15 11:00:32 +00:00
Zuul 9036a06839 Merge "Add 'like' filter to string fields" 2018-02-08 04:47:36 +00:00
Zuul 44b9b319a2 Merge "Total Number of artifacts for given filter" 2018-02-07 17:29:06 +00:00
Kushal Agrawal e3c825a82c Total Number of artifacts for given filter
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
2018-02-07 09:57:31 +00:00
Zuul 233e97b3ed Merge "Disable access to artifact with different artifact type" 2018-02-01 17:34:17 +00:00
Mike Fedosin 88d5d7f416 Add 'like' filter to string fields
Change-Id: I2437de4b7c298ee735dc6e645d164b0245b398b7
2018-01-30 17:54:03 +01:00
Idan Narotzki f4d1e33f10 Add Error log to upload_blob func.
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
2018-01-25 14:47:43 +00:00
Mike Fedosin c2cbdf076e Disable access to artifact with different artifact type
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
2018-01-24 15:40:53 +03:00
Mike Fedosin 2f5a95cf1d Add unit tests for policies
Change-Id: I17f1988390f6abc1f1b1c468b123bd63919d8bef
2018-01-17 15:04:00 +03:00
Mike Fedosin d880fce89e Fix BlobIterator
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
2018-01-10 19:06:58 +01:00
Zuul a12ff42a80 Merge "Implement artifact type generator script" 2018-01-08 10:49:15 +00:00
Kushal Agrawal e6500f0038 Implement artifact type generator script
Co-Authored-By: Mike Fedosin <mfedosin@redhat.com>

Change-Id: I50511053f1c9c7a6efa9f929c17bfabedbfd618a
2017-12-28 20:50:44 +01:00
Mike Fedosin 8439dc411d Add taskflow to glare requirements
Change-Id: I42c65b3cd852ca76b882dc26591eeca77e0015d0
2017-12-28 11:55:54 +01:00
Mike Fedosin 8d4806fc8d Allow to sort 'all' by 'type_name'
Change-Id: Iced8a08e1e3a9a1aa296a77d7c6259faf3fd1f95
2017-12-21 05:30:32 +00:00
Mike Fedosin 2924e662cb Look the list of artifacts in 'artifacts' section
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
2017-12-13 13:39:23 +00:00
OpenStack Proposal Bot 8dce349bdf Updated from global requirements
Change-Id: I4b0de22e2e06a042ad184b97e540f7168f03e47d
2017-12-05 03:02:37 +00:00
OpenStack Proposal Bot 91147a5f23 Updated from global requirements
Change-Id: I91994e09dee198ca4effae7a35fc97acd1587b42
2017-11-16 11:03:34 +00:00
OpenStack Proposal Bot ad5f4621ea Updated from global requirements
Change-Id: Ie718c2a53ea9e8adbf5fd87c08491f0bf633631b
2017-11-14 03:56:45 +00:00
Idan Narotzki 151e82cfcc Make keyclock auth support HTTP 400.
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
2017-11-12 14:05:01 +00:00
Zuul 12ef49c476 Merge "Update bandit usage" 2017-11-04 12:37:08 +00:00
Mike Fedosin 704dbecafd Rename .testr to .testr.conf
Change-Id: I8f720c05734337028c61c61d59bc15ff52609be6
2017-11-03 03:50:43 +03:00
Zuul a44028de5d Merge "Return testr conf" 2017-11-03 00:35:59 +00:00
Mike Fedosin c61ed6f265 Return testr conf
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
2017-11-03 02:19:46 +03:00
Zuul b0b7b9fb38 Merge "Rename context.tenant to context.project_id" 2017-11-02 18:50:01 +00:00
Zuul d11461311b Merge "tests: replace .testr.conf with .stestr.conf" 2017-11-02 17:35:32 +00:00
Mike Fedosin 6986efbd3e Rename context.tenant to context.project_id
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
2017-11-02 16:55:42 +00:00
Pavlo Shchelokovskyy 9eb36a9013 Update bandit usage
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
2017-11-01 20:28:32 +02:00
Idan Narotzki b9652017ed Test quota config parameters change
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
2017-11-01 19:54:15 +03:00
Mike Fedosin 209028bb4e tests: replace .testr.conf with .stestr.conf
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
2017-10-31 01:15:15 +03:00