Commit Graph

56 Commits

Author SHA1 Message Date
Ghanshyam Mann fe0003b0c0 Update python classifier in setup.cfg
As per the current release tested runtime, we test
till python 3.11 so updating the same in python
classifier in setup.cfg

Change-Id: Ida165cbd294fe623772723cec5170e7069b60089
2024-01-03 21:24:37 -08:00
Zuul 2f405f1c39 Merge "Fix listing and removing roles from users." 2023-05-04 04:17:12 +00:00
Dale Smith db795e20ed Fix listing and removing roles from users.
* Listing roles was failing due to a mismatch in returned data
and how it was being processed. Removed role id lookup for now,
so output only shows role names.
* Delete required json data, and this argument was missing.

Change-Id: I7b4ca739ae03443c0b2a885872f4b557a9998efb
2023-05-04 16:00:25 +12:00
Zuul 57e570f7c0 Merge "Bugfix: Six removal introduced regression in v1/users" 2023-05-04 04:00:04 +00:00
Zuul 7af8c21284 Merge "Fix typo in help text" 2023-05-04 03:55:49 +00:00
Dale Smith c50e3feeec Fix typo in help text
Metavar should not both be named 'users'.

Change-Id: I64c6685584a5ad569a00d894228af457caf47c7b
2023-05-03 14:36:20 +12:00
Dale Smith 5a92d900b9 Bugfix: Six removal introduced regression in v1/users
Bug introduced in b89a07b

Change-Id: I10ad2928f4faffb863152e0bbafc097b70b02082
2023-05-03 14:35:26 +12:00
Dale Smith b4ef3e619d Add check-requirements to Zuul tests
Change-Id: I90ea330a359fc225d8db7e51f1bcfb88d4569454
2023-01-09 11:27:48 +13:00
Zuul b5b755c459 Merge "Switch to 2023.1 Python3 unit tests and generic template name" 2022-12-15 01:32:55 +00:00
OpenStack Release Bot 0ac84256e5 Switch to 2023.1 Python3 unit tests and generic template name
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope. Also,
updating the template name to generic one.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I56e1aa8da51b510db8a7845da98c39533feb8e90
2022-09-16 09:56:34 +00:00
wangzihao b89a07b5a1 Remove six
Remove six.moves Replace the following items with Python 3 style code.

- six.moves.urllib
- six.iteritems

Change-Id: I65d7a43ac9ae76e0634b72c6bb54cb3a98bd7aab
2022-09-13 22:08:15 +00:00
Dale Smith 0930120e83 Update python testing for zed cycle testing runtime
Drop support for python3.6 and python3.7.
https://governance.openstack.org/tc/reference/runtimes/zed.html

Removed upper limit for prettytable as this conflicts upper-constraints.txt

Change-Id: Ib6af03541ae4e95b35da851f0604d4394815747e
2022-09-12 10:07:06 +12:00
Anand Bhat 20d234bc37 Migrate from testr to stestr
* Replace .testr.conf by .stestr.conf for migration and update
  .gitignore and test-requirements.txt file accordingly
* Use py3 as the default runtime for tox and 3.18.0 as the
  minversion for tox, replace whitelist_externals
  by allowlist_externals

Change-Id: I7747c4ce8d95ce94e0750a3f964f0264fe491fce
2021-07-01 10:21:43 +00:00
maaoyu 32ef2538fc bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.

ref:
  https://governance.openstack.org/tc/reference/runtimes/victoria.html

Change-Id: I4d8f7e2f6325c3519c29d00e60c7ab56af0fbcee
2020-10-12 15:23:30 +08:00
Sean McGinnis e493613fde
Add expected zuul jobs
This repo still runs noop jobs. Need to update to actually run the
expected set of tests.

Change-Id: I9da7a30c6b942f736ccba00a6f0d65311fd8ecc4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-09-10 08:30:02 -05:00
Zuul 9095d25ca0 Merge "Add py38 package metadata" 2020-06-23 03:12:27 +00:00
Hervé Beraud 0977716067 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I5ef5b684f4c666e6d9f1168477f5b6c7799e9850
2020-06-09 11:52:14 +02:00
jiasirui 5f54efe236 Add py38 package metadata
Change-Id: I0972e985d4c8ddc88b7d444b00bafb1df1f2e240
2020-06-05 09:09:47 +08:00
Andreas Jaeger 9908379f82 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update classifiers
- This repo has no docs, remove releasenotes and docs building
  infrastructure
- Cleanup */source/conf.py to remove now obsolete content.
- Remove install_command from tox.ini, the default is fine
- Remove Babel from requirements, it's not needed for running.
- Use TOX_CONSTRAINTS_FILE, UPPER_CONSTRAINTS_FILE is obsolete
- Update to hacking 3.0, fix problems found

Change-Id: I9133baec6cb123440f34b8c4b31001cfe875919e
2020-05-09 18:06:43 +02:00
Arundhati Surpur 5d1caeb37f Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators.
We can use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I9cf36db9e18d02238ebbfa6962f0ac76d694a43a
2020-04-29 08:13:42 +00:00
tonybrad fee539e9ad Change to releases.openstack.org
Change-Id: Ie62e00f2c3cfe895e0c4a20eda918c53cc691a77
2020-04-29 07:53:51 +00:00
Ghanshyam Mann 505504fdfc [ussuri][goal] drop python 2.7 support
OpenStack is dropping the py2.7 support in ussuri cycle except
swift and sorlets which is exception approved in this goal.

Somehow this repo is left to remove the support of py2.7.

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I0b8a896ce64a4b31c11444a2af45ae503ad089f1
2020-04-25 19:50:42 -05:00
Adrian Turjak 03c00a10d9 Switch Adjutant service type to Admin-Logic
Change-Id: Ic173891bfdd109d8d0fe1038d0ec10184da0e4e6
2020-02-20 11:46:59 +13:00
OpenDev Sysadmins c0f32f26b3 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:40:43 +00:00
Zuul 51742657b1 Merge "fix tox python3 overrides" 2019-03-17 23:01:59 +00:00
Adrian Turjak 8ae1931d0c Fix some py3 issues and a user invite cancel bug
old py3 issues on print, and some bad logic handling for canceling
a user invite when using the user (task) id.

Change-Id: Icf8de9483da4c43521d8837939dbc5c9847c1b5e
2019-03-18 11:56:58 +13:00
Doug Hellmann 8627f50cb9 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I93adb1f95f751f7db6b6aa01ceeeb329035c2676
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:49:50 -04:00
Adrian Turjak 05e8af6cf3 Add tox.ini
* add a fake test
* change homepage

Change-Id: I77f1940f897e845d277362939786f8d2d7c703ad
2017-09-27 17:25:23 +13:00
Amelia Cordwell da2648d2d9 Remove HTTP client
* Update README to use the session client
* If someone passes in username/password constructor it will
  create the session and then return the session client

Change-Id: I6281bbaef18d21ac96999a4bf8a7dbf8a9b0bf52
2017-09-27 16:12:22 +13:00
Amelia Cordwell decc4ed309 Added Quota Commands
openstack project quota show
 - Shows overview of current quotas for all region
openstack project quota show --region REGIONNAME
 - Shows details for specified region
openstack project quota tasks
 -  lists completed and in progress quota updates
openstack project quota sizes
 - Shows details of sizes for quotas

openstack project quota update <size> --regions regionOne regionTwo
 - Submits a quota update request for the specified sizes
 - If regions are not specifed will default to all regions
stacktask quota - returns data from the get request, including all
quota sizes and the current quota values for all of the regions
stacktask quota --regions <RegionName> - returns data from the quota
get request but only returns quota data specific to the region

Change-Id: I506befd7749100ebf8b8cc2c11f444f067e200d3
2017-09-14 01:55:22 +12:00
Jenkins e5f4d56748 Merge "Fixing an issue with json data caused by a code update" 2017-08-21 02:58:21 +00:00
adrian-turjak da7961e5df Fixing an issue with json data caused by a code update
* this fixes a regression caused by updating some code based on
  changes in similar upstream clients.

Change-Id: I98be962cb0dcb2a0e5a04c3def88643db6d30bc0
2017-08-21 14:55:23 +12:00
Amelia Cordwell f26e5dcb1b Update .gitreview file for openstack gerrit
* Was still pointing to internal Catalyst gerrit

Change-Id: I56c7945372bb755b6826b9d799c1af4e0e3ae9b4
2017-08-21 14:38:09 +12:00
adrian-turjak 7a5a238cf7 Remove incorrect readme line
Change-Id: Icba71fa9cff2f7dd64c5400ff16fc930dd950dec
2017-05-29 12:53:48 +12:00
adrian-turjak a9b57aafb7 Properly handle empty values for show task.
* added getattr for getting values in the _show_task function

Change-Id: I4619c7d9989894fe32fdfe310d18a26b2f80c80c
2017-05-29 11:55:35 +12:00
adrian-turjak bf62bc73a0 Renamed to Adjutant and cull legacy code
* Renaming from StackTask to Adjutant.
* Cull unused or old elements of code originally
  from heatclient.
* Remove old cli as deprecation is redundant with the
  rename as well. Rename is now a blank slate for the cli
  and the cli is entirely OSC based.

Change-Id: Ic548bdd0f5dadfe537ffe5e1eed7725358c13fce
2017-05-25 21:32:41 +12:00
Amelia Cordwell 18a17265a8 Stacktask Client as a plugin for openstack client
All commands now available under the core openstack command and
deprecation warnings have been added to the older shell client.

Change-Id: If7b6a382a2a842a8c5085c944063544d01d58c1d
2017-05-25 16:52:05 +12:00
Dale Smith cf869eb1ef Better support for unauthenticated requests.
* Don't complain about missing account info if we know
  the request will be unauthenticated.

Change-Id: I573a485798a1e59b453d1ce8569c3557912998a5
2016-10-18 17:13:34 +01:00
Dale Smith b7f6bc52c7 Add unauthenticated signup support to stacktask client.
* Unauthenticated requests to sign-up require --bypass-url as we can not
  use Openstack service catalog.

Change-Id: I1545e620e148bfffee46324bff9467f0cd6b6593
2016-10-03 22:39:41 +01:00
adrian-turjak 4c65446546 Fixing client format and sort issues
Client now doesn't sort by default and instead expects
sorting to come from the server.

Json formatting has been improved to correctly wrap for
long lines.

Added json formatter for newly added 'approved_by' field.
This will still work for older deployments without the
approved_by field.

Change-Id: I18adcccc36c9f71af8d4c90aacafdb5793e4999e
2016-08-29 15:58:23 +12:00
adrian-turjak d199682bd2 updating shell and client to use KeystoneAuth
Also renaming OS_AUTH_TOKEN to OS_TOKEN
to be more consistent with OpenStackClient.

Minor formatting changes.

Added 'env/' to gitignore.

Change-Id: I2ef4e6920b75b0abe79c7fe3e1ac06d8230001e3
2016-08-11 10:28:08 +12:00
Dale Smith be016f2996 Fix keystoneclient exceptions import. Bump package versions in requirements
Change-Id: I427ae2b5913b2546cd863fdbdb37ab7003bc4ed4
2016-08-08 17:29:10 +01:00
adriant a5859ccc7f adding a few print outs to some commands
* Also fixing error handling so it prints error responses
  from the server properly.

Change-Id: I3eb245de6fdfa603e0f6b4f9d867bb0eb59409fd
2016-04-29 17:36:58 +12:00
adriant 9710e10b40 updating user role CLI cmds to resolve use_id from email
* this only works for emails which currently have roles in your project

Change-Id: Iade0826a3dffdccd7782dcf4ee1e352e7efb0023
2016-04-05 14:00:12 +12:00
adriant eaf5067db4 Adding a readme for pypi
Change-Id: Ic7447cbbf6cbdb5794fb317c25da0523c822515b
2016-03-09 15:56:16 +13:00
adriant 3c62b93a13 minor gitignore changes
Change-Id: Iab396fe8d4df6803ed5d1e1bd0559a190bff3a23
2016-02-26 16:13:46 +13:00
Dale Smith b0425f4c11 Remove duplicated code in token_submit functions.
* Create a common helper function.
 * Both specialised password and generic submit now use this.
 * Provide more useful information for badly formatted json to token_submit.
 * Added exception support for stacktasks' errors list.

Change-Id: Id6fd38ae79226aa9da2af3301f320129122eb2b3
2016-02-25 10:46:53 +13:00
adriant 9b84cac78f Tons of clean up, some new features, some bug fixes
* new function for cleaning up expired tokens
* new function to cancel a task directly
* lots of clean up
* reworked some functions to work with more than one item

Change-Id: I21683af24410c7a602c2d5a7fb93f7cbc1f605e5
2016-02-25 10:39:51 +13:00
Dale Smith 726a43c9dd Add cohort column to user-list output.
Change-Id: I55c8f13432f02d7a1ee635a999266aeb5213b25a
2016-02-05 04:23:12 +13:00
adriant 9fa1638a1d Updating client to be able to use all the stacktask endpoints
* plus probably other minor fixes.

Change-Id: I1d8d1a00a850d06141d726fd7968380201b6e852
2016-02-04 15:20:55 +00:00