94 Commits

Author SHA1 Message Date
Corey Bryant
b1364646f7 python3 compatibility for failing unit tests
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
2019-09-10 11:32:23 +02:00
OpenDev Sysadmins
99aeb00ab5 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:51:56 +00:00
Doug Hellmann
ecc44e3925 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I54473d2fa682641f0a22beba344615807733016f
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-20 16:25:28 -04:00
Kushal Agrawal
98d2a4deb7 Marker support for next page in list command
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
0.5.3
2018-04-11 07:57:47 +00:00
Dirk Mueller
7118ff5d6b Remove usage of ordereddict
This was only needed for Python < 2.7, but glareeclient's setup.cfg
already declares compatibility only with 2.7.

Change-Id: I2975485d884df08494189c4f4d598b44d9c5abd8
2018-03-09 16:05:27 +01:00
Mike Fedosin
6da299f345 Adopt new api for artifact listing
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
0.5.2
2018-01-17 10:19:47 +00:00
Mike Fedosin
bf74fb428e Rename -s option to -S
Now to sort list of artifacts by some field cli accepts
-s option. Unfortunatelly this option appeared in openstack
client and we have to remane ours.

By tradition we use capital letters for conflicting options,
therefore we should rename -s to -S.

Change-Id: Ic1ab7f28112f04e21ed3d6e3a018c5fc5d44e314
2018-01-10 21:20:14 +01:00
Zuul
05c44532a4 Merge "Remove setting of version/release from releasenotes" 2017-12-31 00:20:49 +00:00
Zuul
333d019528 Merge "Avoid tox_install.sh for constraints support" 0.5.1 2017-12-21 07:49:40 +00:00
Mike Fedosin
8348e98224 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 resful approach, so it's suggested to create a
unified section 'artifacts' for all cases, i.e. return
{"artifacts": [...]}

Change-Id: I2afb80fc7285bb8111a45a88d03f8ea21052f871
2017-12-12 13:48:20 +01:00
Andreas Jaeger
004144ab77 Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I57b7cb9aff05f4f81f02b39b603f3480943f914e
2017-12-02 17:01:16 +00:00
Andreas Jaeger
08939282c6 Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: Ib3988b96b3bfd6b200dc5e746797aef098a33ce0
2017-11-16 20:41:14 +01:00
OpenStack Proposal Bot
c11f038e6e Updated from global requirements
Change-Id: Id15eb5a248faf916cc6e8378c76f7e34836cbe2c
2017-11-14 04:14:05 +00:00
OpenStack Proposal Bot
3a6f4e007d Updated from global requirements
Change-Id: I7326cae290546a3c2d1ce9a6823f0936330c55d5
2017-11-02 13:58:24 +00:00
Mike Fedosin
158524e075 Don't create client for help and bash completion
Currently when we need a help, client object is created
and authentication is performed. This is completely useless
and leads to unnecessary actions in the background.

This patch prevents creation of client object (and therefore
authentication) for help or bash-completion commands.

Change-Id: I08ee73980efc1e84d91868e451e11fa5fe547bf4
0.5.0
2017-10-20 20:50:58 +00:00
Mike Fedosin
c9f70bd2c2 Allow to work in secure mode without certificate
If we are not working in insecure mode and certificate not
supplied we should work still in secured mode, because secure
mode can work even without certificate supplied (loaded to ca-store)

Change-Id: If3471fc8621a774a1f752cd6b84509e7128b0146
Closes-bug: #1720783
2017-10-02 15:32:59 +03:00
Jenkins
016653cbdc Merge "Allow to delete blobs with external urls" 0.4.2 2017-08-15 11:02:05 +00:00
Jenkins
601c73af30 Merge "Add content_length to header in upload_blob" 2017-08-15 10:53:40 +00:00
Idan Narotzki
95f569fc70 Add content_length to header in upload_blob
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
2017-08-15 12:02:22 +03:00
Idan Narotzki
abedb2836d Allow to delete blobs with external urls
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
2017-08-12 12:39:11 +03:00
Mike Fedosin
f669aba20c Add ssl options to keycloak auth module
Change-Id: I8ac595de304b627ef2f701fcf78644be854438ec
2017-08-10 18:22:49 +03:00
Mike Fedosin
4563ad2ecd Add ssl options to glare cli
Change-Id: I00ccbd9920bfb69e019a056418097b9d1a9679ca
2017-08-09 13:39:18 +03:00
Jenkins
081e07a1b7 Merge "Updated from global requirements" 2017-06-28 15:33:19 +00:00
Mike Fedosin
3644d2d664 Return missing 'return' in build_option_parser
It was removed by mistake and should be removed
back.

Change-Id: I0963c2d63b54d1bf6f75e703038712f4632803c8
0.4.1
2017-06-28 01:25:38 +03:00
OpenStack Proposal Bot
d37ebf7dc0 Updated from global requirements
Change-Id: Ida481794628514ee416c42f9ec46c2f4190effc9
2017-06-27 12:21:22 +00:00
Jenkins
32619f1f6b Merge "Remove unecessary cli option "--glare-url"" 0.4.0 2017-06-15 15:58:59 +00:00
Mike Fedosin
ac2d9524bd Remove unecessary cli option "--glare-url"
This feature was added to native cli[1] as "--os-glare-url"
and not required in openstackclient plugin anymore.

[1] https://github.com/openstack/python-glareclient/blob/master/glareclient/shell.py#L176

Change-Id: Id0bef47d56ecc3cf8dc7362755b06e74e0d49f0e
2017-06-13 00:15:13 +03:00
Mike Fedosin
a00ddc6632 Add missing 'activate' command to native glare cli
Change-Id: I5709b5f95cce8500c8951ec53ae7efdc37957992
2017-06-01 15:51:22 +03:00
Mike Fedosin
5768a0db95 Remove unnecessary code from shell
Change-Id: I678cf4d442366e5f24216fc0b877096358851513
2017-04-21 19:12:30 +03:00
Mike Fedosin
f79904c3f2 Raise error if there are more than 1 artifact with same name/version
Change-Id: Ifa69a12de15b854c6b27d2b3edd37d0eb47eabf8
0.3.1
2017-04-05 23:55:44 +03:00
Mike Fedosin
bcc6c0d821 Fix a typo in bash_complition file name
Change-Id: If07f7a664bb7dd1fee0e0f229d135d8723feaa3f
2017-03-30 02:10:00 +03:00
Jenkins
5d7684cf34 Merge "Rename deprecated 'warn' to 'warning' in logging" 2017-03-27 16:04:46 +00:00
Mike Fedosin
27d3dab1c6 Rename deprecated 'warn' to 'warning' in logging
Change-Id: I5b21817362ef4f71d70e8d446b878372f7941bd2
2017-03-27 15:42:47 +00:00
Jenkins
e732f0ff23 Merge "Add 'list-types' and 'schema' operation in native shell" 2017-03-27 15:13:21 +00:00
Mike Fedosin
d6295716f9 Add 'list-types' and 'schema' operation in native shell
Change-Id: I0dbc6647e592032eb442e5c622ff53816b9b254d
2017-03-27 17:51:57 +03:00
Rui Yuan Dou
2b1bea0f45 Use assertIsNone(value) instead of assertEqual(None, value)
Change-Id: Id68e974e4003d364765d683e8dd108559055f1cd
2017-03-22 11:22:18 +08:00
Mike Fedosin
36f0e7318d Add keycloak auth support
Change-Id: I88c79656fbc6cd9c055569979083ef385ba84563
0.3.0
2017-03-16 14:41:29 +03:00
ricolin
e7e555e045 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: Icb9b8708b37abd48ff66db34b46429efe33a635f
2017-03-02 21:31:13 +08:00
OpenStack Proposal Bot
de52047641 Updated from global requirements
Change-Id: I05dbabeca301da42afc6d44da21cad44dd91ae1c
2017-02-11 17:51:16 +00:00
Sergey Skripnick
5e85f0fc3c HTTP Client refactoring
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
2017-01-17 16:35:26 +03:00
Jenkins
7c62625b2a Merge "Add tag support for Glare client" 2017-01-16 21:58:50 +00:00
Mike Fedosin
68ed374835 Parse blob dict upload output right
Change-Id: Ie9aca92820d35576862a5580fc4de8b3237cba03
2017-01-16 23:00:27 +03:00
Mike Fedosin
847615851c Add tag support for Glare client
Change-Id: I08bdfe3260e68bff3955e6dc39941a90c262c112
2017-01-15 17:53:51 +03:00
Mike Fedosin
6ed07b9320 Update CLI options for blobs
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
2016-12-28 15:13:12 +03:00
Jenkins
c03388e413 Merge "Allow to specify dict and list properties in cli" 2016-12-22 18:25:30 +00:00
Mike Fedosin
8e8d788a84 Allow to specify dict and list properties in cli
Change-Id: I9da3c3b0f9f34429ec40d891f76acee863c4ec79
2016-12-22 11:49:15 +03:00
OpenStack Proposal Bot
b76bcfa01d Updated from global requirements
Change-Id: I4c2be005e370141222194bc7f9bb99c69e9dab5f
2016-10-22 01:26:49 +00:00
Mike Fedosin
50e117c20d Fix updating image by name
Change-Id: I287be8b28ffa6e52c321d4abe9e4e61720955df7
2016-10-17 13:33:13 +03:00
Jenkins
6eab98a86e Merge "Add the possibility to specify glare url in cli" 2016-10-15 10:15:27 +00:00
Darja Malyavkina
6abe210de2 Allowed to use the artifacts by name
Added the ability to access by name of the artifact.
To access the artifacts by 'id' must specify the appropriate flag.

Change-Id: I776cd8cb0c15fb58891ae7f06d1c1272a4f3478c
2016-10-14 14:09:26 +03:00