Handle StopIteration for Py3.7. PEP 0479,
https://www.python.org/dev/peps/pep-0479/, makes the following
change: "when StopIteration is raised inside a generator, it is
replaced it with RuntimeError". And states: "If raise StopIteration
occurs directly in a generator, simply replace it with return."
Also fix test cases that make assumptions about the ordering of
**kwargs. Python, up to 3.6, doesn't preserve any ordering for those.
And the behavior differs between various Python versions.
For details see PEP 0468 (https://www.python.org/dev/peps/pep-0468/)
Change-Id: I9847053534ffd47c4559d504be647be0de25b651
Closes-Bug: #1784714
Closes-Bug: #1711469
Marker is required to get the next page in list api
in case there are more records available either because of
custom limit provided in request or because of default limit
configured in system (client and server).
ex: glare list all --limit=5 --marker=<artifact_id>
Change-Id: I9f5c890c46b7f1f1e6fefdb7320c4fe00a2b0972
Closes-bug: #1755995
In change Ic0762f7a379754d19147a4f41a6d5a98abdc86b0
we renamed <type_name> section to unified 'artifacts'.
We need to reflect this changes in the client, otherwise
it doesn't work.
Change-Id: I10e5b5678180586d6f09b8dd4d83fb3f45e1f569
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 resful approach, so it's suggested to create a
unified section 'artifacts' for all cases, i.e. return
{"artifacts": [...]}
Change-Id: I2afb80fc7285bb8111a45a88d03f8ea21052f871
Complementary update to glare server commit:
"Allocate blob size before starting the upload"
Co-Authored-By: Mike Fedosin <mikhail.fedosin.ext@nokia.com>
Change-Id: If3ad1bc69fd0a68b5c03abe163b76ba166245b81
This patch support new API request to delete blobs from
artifact:
DELETE /artifacts/{type_name}/{artifact_id}/{blob_name}
if user wants to delete internal blob glare raises 403 error.
Co-Authored-By: Mike Fedosin <mikhail.fedosin.ext@nokia.com>
Change-Id: I8daa686df3a05158f59b33546397b23a494d5ab1
Library `requests` can handle files, pipes, dictionaries and iterators
as `data` argument.
Use 'json' argument to send json requests.
Rewrite some unittests using mock.
Change-Id: I95b71eb2716dc57708ed105659ffece376bd8344
This patch
* changes artifact version option from -v to -V for all blob commands
* adds option -C for setting custom content-type for blob uploading
* removes unnecessary possibility for setting content-type for
external locations
Change-Id: I2f51ce588db3f88d9309081a3d52541a45746d88
Added the ability to access by name of the artifact.
To access the artifacts by 'id' must specify the appropriate flag.
Change-Id: I776cd8cb0c15fb58891ae7f06d1c1272a4f3478c
If user wants to remove(reset) non-compound properties,
then client sets value None to the property and sends
PATCH request with 'replace' operator.
Compound properties are processed as well as before.
Change-Id: Ib3469cf125beaca0e3c7041bc1e198e1ef7f2c19