Commit Graph

557 Commits

Author SHA1 Message Date
Kushal Agrawal 963b4d6a3f Add bindep.txt file for binary dependencies used in unit tests
Change-Id: I2d7fa55e70745a5982205e698f9cec4fe0196bdd
(cherry picked from commit 5395488ad1)
2019-07-16 11:14:32 +00:00
OpenDev Sysadmins 845c1122a1 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:10 +00:00
Ian Wienand 28cd9042cb 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: I086112adc18d8accfcfbc1fd3198dbdfae302c57
2019-03-24 20:33:42 +00:00
Zuul 4ad07d8d01 Merge "uncap eventlet" 2018-10-04 10:36:21 +00:00
Zuul 094ec4e72a Merge "Import legacy-glare-dsvm" 2018-09-25 14:21:01 +00:00
Andreas Jaeger f48bec1426 Import legacy-glare-dsvm
Import legacy-glare-dsvm job and rename to glare-devstack following
naming policy.

Change-Id: I74aa695df50887d99ccf2b0348f1912a90e94725
2018-08-29 06:36:57 +00:00
Doug Hellmann 02685b4e4d uncap eventlet
We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Change-Id: Icdfe7679df3cc7c97685d11d81de3af791cb87c0
Co-Authored-By: Michel Peterson <michel@redhat.com>
Co-Authored-By: Chuck Short <chucks@redhat.com>
2018-07-26 02:00:14 +00:00
Kushal Agrawal 9883099cc4 field custom metadata
Change-Id: I8ad5fdfee9ff8ec138b1089541c9ab1558e80050
Implements-blueprint: field-custom-attribute
2018-07-04 22:40:43 +05:30
Zuul 0736698c92 Merge "updated to_schema method to include display_name." 2018-06-19 10:21:25 +00:00
Kushal Agrawal a187f2e7e8 updated to_schema method to include display_name.
Change-Id: Ib5f2be2f9b4a4274390c0153e8360b4ba15a4fc5
2018-06-18 22:24:14 +05:30
Zuul a2bb4b1f45 Merge "Fix artifact init case." 2018-06-17 12:11:44 +00: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
idanaroz 0ae722e3ae 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 07:31:50 +00:00
Kushal Agrawal 9389a33a52 Restructured import os to be effective in monkey_patching
Change-Id: Ib12b1a8d515450a8c3ba39c7494ee9e5de80f24c
2018-05-25 09:10:16 +05:30
Kushal Agrawal 03114fb80c Test_wsgi fix with webob upgrade
Change-Id: Ib5ac8c2663a8c8b31e7f4ee14f3962f726d169e5
2018-05-24 11:34:29 +05:30
Kushal Agrawal 8ebd33cdc9 log typo correction
Change-Id: I616f8c4d6edf2922afe7d054af20a6002c9ad50c
2018-05-10 15:19:50 +05:30
Zuul 1e503d88fc Merge "Tag search update" 2018-05-09 23:03:30 +00:00
Kushal Agrawal 068b471e49 Tag search update
In case Artifact does not have tags associated and query
constain tags/tags-any condition with any other base artifact
field or custom field condition. It used to fail because of
INNER JOIN between glare_artifacts and glare_artifact_tags table.
Replaced "join" with "outerjoin" to rectify this issue.

Change-Id: Ie03520a38d2c726117195ea92c7fbd88c04bff18
2018-05-09 23:01:21 +05:30
Zuul 3e9fba38aa Merge "Retain existing blob in case of pre_upload_hook or save fails" 2018-05-09 10:25:14 +00:00
Kushal Agrawal 39105d2a0a Retain existing blob in case of pre_upload_hook or save fails
While re-uploading blob if pre_upload_hook or store_api throws
exception, Existing content needs to be retained.

Change-Id: I51effe4c76de9a353dec99c634c173840c792198
2018-05-08 16:16:09 +05:30
Kushal Agrawal d1edf09ef5 Moved display_type_name attribute to to each artifact detail object
Change-Id: Id869ea4106bc08fd3fa7c76611474740a694dab0
2018-05-08 11:50:54 +05:30
Zuul 5408124b87 Merge "Search based on tags condition with or condition combiner" 2018-05-06 17:13:17 +00:00
Kushal Agrawal 86d40aa3bf Added few more logs for upload_blob operation.
Change-Id: I3eb6485992ce686944bd94e5dc8c6a2e53f4a8b6
2018-05-03 15:22:27 +05:30
Kushal Agrawal 40d57e0893 Search based on tags condition with or condition combiner
In case of more than one tags values in request query with other
condition it was not using separate alias name for artifact_tag table
to join with glare_artifacts table. To rectify this we have created
aliases beforehand and using it updating the tag search condition.

Change-Id: Ic7afe47fcf8f23a694f2c3d99dbdbd7797d506dd
closes-bug: #1765338
2018-04-30 18:07:23 +05:30
Kushal Agrawal 92bc2ad89f list api with limit and search text issue
If artifact data has multiple properties other than base
artifact properties i.e. which needs to be stored in
glare_artifact_properties table. In that case providing limit will
always result in less no of artifacts then limit.

This issue is not available in sqllite database, therefore no additional
testcase is added.

Change-Id: I933783cabb5b71d92b4d645d340bd9d1c9f6f8b5
closes-bug: #1766537
2018-04-26 12:15:46 +05:30
Kushal Agrawal 06e46b778f Condition based INNER JOIN for artifact_properties table
In case that "artifact data" does not contain properties other
than base artifact properties, query will return no records.
That because of INNER JOIN usage between glare_artifacts and 
glare_artifact_properties tables (as there are no rows in
glare_artifact_properties corresponding to that artifact_id).

Therefore INNER JOIN needed to be added only if there is
any glare_artifact_properties based condition.

Change-Id: Icfcbeb41703771145db5405ffc2609dbb6ca1741
2018-04-25 13:25:47 +00:00
Zuul 1a0c7c01cf Merge "Move Operation bug fix in update API" 2018-04-16 10:26:23 +00:00
Kushal Agrawal 57a589fccd Move Operation bug fix in update API
updating the value of source location in move operation
as part of artifact update.

Change-Id: Ic6912fa9c714762e38ba01793a7a8da1a70a12ba
Closes-bug: #1743971
2018-04-16 13:51:28 +05:30
Zuul edf4db7e72 Merge "Adding WWW-Authenticate info." 2018-04-15 17:14:15 +00:00
Zuul bbb1243104 Merge "and/or query combiner for filter options" 2018-04-11 07:18:02 +00:00
Idan Narotzki 5e60d27376 Adding WWW-Authenticate info.
when glare requests are failing with "401 Unauthorized"
against keycloak, more data can be added to the logs,
to understand the reason better.

In case keycloak return 401 it must provide the www-Authenticate
response header with the reason:
https://www.w3.org/Protocols/HTTP/1.0/spec.html#WWW-Authenticate

This code take care of it by adding the WWW-Authenticate value to
glare api-log.

Change-Id: Ia3966ad00868b559874610f552c8e491d8a01acd
2018-04-10 10:10:14 -06:00
Kushal Agrawal 00bae420b7 and/or query combiner for filter options
With the new changes it is be possible to search tags based on or query.
it can be used with both tags and tags-any filter parameters.

Change-Id: Ib7a0054cb7e220e64d19839d79367b1ac180ea94
Implements: blueprint glare-search-artifact-query-update
2018-04-05 00:20:27 +05:30
Kushal Agrawal 9419d4d970 Added Unit test cases for split_filter_op function
Change-Id: I4cd23dbfdfb2b98546ec18896c3ab23b699e57ae
2018-03-28 23:58:11 +05:30
Kushal Agrawal 37b31018dd and/or query combiner for filter options
Provides an option to specify query combiner ("and/or")
for attribute based filters in query parameter.
So if user wants to search artefact a based on filters :
field1 = value1 and (field2 = value2 or field3 = value3)

it can be specified in query like :
field1=eq:value1&field2=or:eq:value2&field3=or:eq:value3

"and" is the default value of combiner in case it is not specified.

Change-Id: I16c7c7fecefab5d615fa9e933234725249c5d97a
Implements: blueprint glare-search-artifact-query-update
2018-03-22 13:37:46 +05:30
Kushal Agrawal 328ee48815 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
2018-03-20 15:58:31 +05:30
Zuul 82c5aab94f Merge "Added display_type_name field in BaseArtifact" 2018-03-19 16:26:27 +00:00
Kushal Agrawal a81783e682 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
2018-03-19 20:24:00 +05:30
Zuul 1c946da5ad Merge "Removal of constraint for blob re-upload" 2018-03-15 06:55:42 +00:00
Kushal Agrawal c329e4f5f2 Removal of constraint for blob re-upload
Change-Id: Ic333f9d9deb29f0a235db6aa956d7b11f8991414
2018-03-13 12:14:31 +05:30
Kushal Agrawal d1de4d1c7b Validation message correction
corrected exception message for MinStrLen method

Change-Id: I9992283bc02ebb2b1a391b0e97f1c5fdbfed2d42
2018-03-07 23:09:46 +05:30
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