Commit Graph

17 Commits

Author SHA1 Message Date
Stephen Finucane c5b772db76 trivial: Prepare for pyupgrade pre-commit hook
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').

We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.

Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-23 12:24:23 +01:00
ArtofBugs 680e3e3011 identity: Migrate 'user' commands to SDK
Change-Id: I06f3848812bce60c65909f1311f36b70eba427d4
2024-04-04 16:22:56 -07:00
Stephen Finucane aed521d426 Blacken openstackclient.identity
Black used with the '-l 79 -S' flags.

A future change will ignore this commit in git-blame history by adding a
'git-blame-ignore-revs' file.

Change-Id: I2eeade1ce6653be8e9179ecc40105182c5ff5f16
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:30 +01:00
Zuul fc12033f1d Merge "Now we can add description for role creation in OSC" 2020-03-20 18:59:44 +00:00
Eric Fried f1d742f32a Fix functional tests for py3
Fix various things so the functional tests will work under python3:

- A hashlib.md5() can only be update()d with an encoded string in py3.
- There's no dict.iteritems(), change to dict.items() (which is already
  an iterator).
- Open temp files with 'w+' mode rather than the default 'w+b' (as an
  alternative to encoding all the write and expected-read payloads as
  bytes).
- (This is a weird one) Explicitly raise SkipTest from unittest (rather
  than unittest2, which is where cls.skipException landed). Not sure why
  this is busted, but this moves the ball.

Change-Id: Ic9b2b47848a600e87a3674289ae7ae8c3e091fee
2019-10-31 00:17:35 +00:00
Monty Taylor 2dd5393167
Use os-cloud instead of OS env vars for functional tests
In order to support switching auth contexts, such as for registered_limits
which take a system scoped token, switch the functional tests to using
the --os-cloud command line parameter. However, honor the OS_CLOUD env var
as a way that someone can select a different cloud, including 'envvars',
to use.

Use devstack-system-admin cloud for limit tests

Keystone requires these to have system scope now.

Change-Id: Ia81eebd3e00ae986cf3ba7e3d98f3e8a1647b622
2019-01-10 14:21:03 +00:00
M V P Nitesh eb001733fd Now we can add description for role creation in OSC
Now user can add the description when user create's the role using OSC
``openstack role create`` command. User can add the description by adding
`--description <Description>` to OSC ``openstack role create`` command.

Co-Authored-By: Deepak Mourya<deepakmoriya7@gmail.com>
Change-Id: I858e004c3b29c687b6a39c8a1ed5fb029eb19c67
Depends-on: I230af9cc833af13064636b5d9a7ce6334c3f6e9a
Closes-Bug: #1669080
2018-09-18 08:56:11 +05:30
Lance Bragstad 735896eb1a Implement support for project limits
This commit let's users manage limits via the command line.

bp unified-limits

Change-Id: I7c44bbb60557378b66c5c43a7ba917f40dc2b633
2018-07-23 21:52:00 +00:00
Lance Bragstad 641a4faac1 Implement support for registered limits
This commit adds support for users to manage registered limits via
the command line.

bp unified-limits

Depends-On: https://review.openstack.org/#/c/574391/
Change-Id: Id8377363f7a3248b45aeeba21d2acc02684a0305
2018-07-23 21:18:50 +00:00
Sami MAKKI 08dbd154e5 Fix the `role implies list` command.
The code was calling an unexisting function which never existed.
The module refers now to the correct `InferenceRuleManager`. It
also allows the compatibility with the future python-keystoneclient
in which the compatibility method will be removed from the
RoleManager.

Change-Id: I08f785dc9e840da2e16915683eecfe49189c44b3
2018-06-24 02:17:02 +02:00
Jose Castro Leon 12ee186108 Add support for endpoing filter commands
Implements the commands that allow to link and endpoint to
a project for endpoint filter management.

Implements: blueprint keystone-endpoint-filter

Change-Id: Iecf61495664fb8413d35ef69f07ea929d190d002
2017-11-21 07:58:48 +01:00
Rui Chen f1d32dbe9b Clean up the changes of os.environ in functional tests
Use fixtures to restore the API version changes of os.environ
in each functional tests, aims to avoid the following test cases
failing in unexpected context.

And make sure setUpClass/tearDownClass call super class's
corresponding methods first.

Change-Id: Ie248fe9d3a9e25f1b076c9f2c363200f29a83817
Closes-Bug: #1696080
2017-07-20 16:39:32 +00:00
Jenkins cb74397215 Merge "Fix Identity functional tests to not require OS_AUTH_URL" 2017-01-26 01:19:17 +00:00
Dean Troyer d780e9e91f Fix Identity functional tests to not require OS_AUTH_URL
The Identity functional tests had an assumption that OS_AUTH_URL would
always be present, but when running the functional tests and only setting
OS_CLOUD (using clouds.yaml for creds) this fell down.

Change-Id: Ie589d301f866b06d9f8be8deeb953e03bc01cf09
2017-01-25 15:25:32 -06:00
Steve Martinelli 42ac82b1a4 change assert_show_fields to not fail on new fields
whenever a resource adds a field (which is allowed in our API
guidelines), OSC functional tests fail, because we validate
the resource keys to a hardcoded list.

instead, this change proposes that the logic of
assert_show_fields is flipped around, so our hardcoded list acts
as a minimum set of values that must appear in the resource.

as part of this change, some fields were remove from the constants
since they were not actually in the returned data.

also, delete unused code `assert_show_structure`.

Change-Id: I8c0f0e80ea472f9c7f93c5f1f0ae52048e6cd7da
2017-01-25 13:09:16 -08:00
Steve Martinelli 29146ab684 add domain id to expected IdP fields, unskip tests
commit Id18b8b2fe853b97631bc990df8188ed64a6e1275 added domain IDs
to an Identity provider, our functional tests have a hard match
on what to expect when 'showing' an idp, the domain ID was missing.

Change-Id: I87a1fd762918551c533668a9aa94f7c6268b79d6
2017-01-07 00:24:52 -05:00
Steve Martinelli c14d3efe61 move all functional tests to tests module
functional tests should be grouped with other tests (unit and
integration tests). as part of this commit the "common" module
was renamed to just "base", this was done for simplicity.

the post_test_hook.sh file was also copied to the functional module
since it should live there. a separate change to the infra repo
will be made to call the new location, once that is merged we
can remove the old one (a new change will also be posted for that)

Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3
Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede
2016-09-09 03:29:47 +00:00