python-openstackclient 7.4.0__py3-none-any.whl → 7.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openstackclient/identity/v3/trust.py +73 -24
- openstackclient/identity/v3/user.py +6 -4
- openstackclient/tests/unit/identity/v3/test_trust.py +5 -2
- openstackclient/tests/unit/identity/v3/test_user.py +16 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/AUTHORS +2 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/METADATA +1 -1
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/RECORD +12 -12
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/WHEEL +1 -1
- python_openstackclient-7.5.0.dist-info/pbr.json +1 -0
- python_openstackclient-7.4.0.dist-info/pbr.json +0 -1
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/LICENSE +0 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/entry_points.txt +0 -0
- {python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/top_level.txt +0 -0
|
@@ -123,37 +123,67 @@ class CreateTrust(command.ShowOne):
|
|
|
123
123
|
# pointless, and trusts are immutable, so let's enforce it at the
|
|
124
124
|
# client level.
|
|
125
125
|
try:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
if parsed_args.trustor_domain:
|
|
127
|
+
trustor_domain_id = identity_client.find_domain(
|
|
128
|
+
parsed_args.trustor_domain, ignore_missing=False
|
|
129
|
+
).id
|
|
130
|
+
trustor_id = identity_client.find_user(
|
|
131
|
+
parsed_args.trustor,
|
|
132
|
+
ignore_missing=False,
|
|
133
|
+
domain_id=trustor_domain_id,
|
|
134
|
+
).id
|
|
135
|
+
else:
|
|
136
|
+
trustor_id = identity_client.find_user(
|
|
137
|
+
parsed_args.trustor, ignore_missing=False
|
|
138
|
+
).id
|
|
139
|
+
kwargs['trustor_user_id'] = trustor_id
|
|
130
140
|
except sdk_exceptions.ForbiddenException:
|
|
131
|
-
kwargs['
|
|
141
|
+
kwargs['trustor_user_id'] = parsed_args.trustor
|
|
132
142
|
|
|
133
143
|
try:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
if parsed_args.trustee_domain:
|
|
145
|
+
trustee_domain_id = identity_client.find_domain(
|
|
146
|
+
parsed_args.trustee_domain, ignore_missing=False
|
|
147
|
+
).id
|
|
148
|
+
trustee_id = identity_client.find_user(
|
|
149
|
+
parsed_args.trustee,
|
|
150
|
+
ignore_missing=False,
|
|
151
|
+
domain_id=trustee_domain_id,
|
|
152
|
+
).id
|
|
153
|
+
else:
|
|
154
|
+
trustee_id = identity_client.find_user(
|
|
155
|
+
parsed_args.trustee, ignore_missing=False
|
|
156
|
+
).id
|
|
157
|
+
kwargs['trustee_user_id'] = trustee_id
|
|
138
158
|
except sdk_exceptions.ForbiddenException:
|
|
139
|
-
kwargs['
|
|
159
|
+
kwargs['trustee_user_id'] = parsed_args.trustee
|
|
140
160
|
|
|
141
161
|
try:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
if parsed_args.project_domain:
|
|
163
|
+
project_domain_id = identity_client.find_domain(
|
|
164
|
+
parsed_args.project_domain, ignore_missing=False
|
|
165
|
+
).id
|
|
166
|
+
project_id = identity_client.find_project(
|
|
167
|
+
parsed_args.project,
|
|
168
|
+
ignore_missing=False,
|
|
169
|
+
domain_id=project_domain_id,
|
|
170
|
+
).id
|
|
171
|
+
else:
|
|
172
|
+
project_id = identity_client.find_project(
|
|
173
|
+
parsed_args.project, ignore_missing=False
|
|
174
|
+
).id
|
|
145
175
|
kwargs['project_id'] = project_id
|
|
146
176
|
except sdk_exceptions.ForbiddenException:
|
|
147
177
|
kwargs['project_id'] = parsed_args.project
|
|
148
178
|
|
|
149
|
-
|
|
179
|
+
roles = []
|
|
150
180
|
for role in parsed_args.roles:
|
|
151
181
|
try:
|
|
152
182
|
role_id = identity_client.find_role(role).id
|
|
153
183
|
except sdk_exceptions.ForbiddenException:
|
|
154
184
|
role_id = role
|
|
155
|
-
|
|
156
|
-
kwargs['roles'] =
|
|
185
|
+
roles.append({"id": role_id})
|
|
186
|
+
kwargs['roles'] = roles
|
|
157
187
|
|
|
158
188
|
if parsed_args.expiration:
|
|
159
189
|
expires_at = datetime.datetime.strptime(
|
|
@@ -161,8 +191,7 @@ class CreateTrust(command.ShowOne):
|
|
|
161
191
|
)
|
|
162
192
|
kwargs['expires_at'] = expires_at
|
|
163
193
|
|
|
164
|
-
|
|
165
|
-
kwargs['is_impersonation'] = parsed_args.is_impersonation
|
|
194
|
+
kwargs['impersonation'] = bool(parsed_args.is_impersonation)
|
|
166
195
|
|
|
167
196
|
trust = identity_client.create_trust(**kwargs)
|
|
168
197
|
|
|
@@ -289,9 +318,19 @@ class ListTrust(command.Lister):
|
|
|
289
318
|
trustor = None
|
|
290
319
|
if parsed_args.trustor:
|
|
291
320
|
try:
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
321
|
+
if parsed_args.trustor_domain:
|
|
322
|
+
trustor_domain_id = identity_client.find_domain(
|
|
323
|
+
parsed_args.trustor_domain, ignore_missing=False
|
|
324
|
+
).id
|
|
325
|
+
trustor_id = identity_client.find_user(
|
|
326
|
+
parsed_args.trustor,
|
|
327
|
+
ignore_missing=False,
|
|
328
|
+
domain_id=trustor_domain_id,
|
|
329
|
+
).id
|
|
330
|
+
else:
|
|
331
|
+
trustor_id = identity_client.find_user(
|
|
332
|
+
parsed_args.trustor, ignore_missing=False
|
|
333
|
+
).id
|
|
295
334
|
trustor = trustor_id
|
|
296
335
|
except sdk_exceptions.ForbiddenException:
|
|
297
336
|
trustor = parsed_args.trustor
|
|
@@ -299,9 +338,19 @@ class ListTrust(command.Lister):
|
|
|
299
338
|
trustee = None
|
|
300
339
|
if parsed_args.trustee:
|
|
301
340
|
try:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
341
|
+
if parsed_args.trustee_domain:
|
|
342
|
+
trustee_domain_id = identity_client.find_domain(
|
|
343
|
+
parsed_args.trustee_domain, ignore_missing=False
|
|
344
|
+
).id
|
|
345
|
+
trustee_id = identity_client.find_user(
|
|
346
|
+
parsed_args.trustee,
|
|
347
|
+
ignore_missing=False,
|
|
348
|
+
domain_id=trustee_domain_id,
|
|
349
|
+
).id
|
|
350
|
+
else:
|
|
351
|
+
trustee_id = identity_client.find_user(
|
|
352
|
+
parsed_args.trustee, ignore_missing=False
|
|
353
|
+
).id
|
|
305
354
|
trustee = trustee_id
|
|
306
355
|
except sdk_exceptions.ForbiddenException:
|
|
307
356
|
trustee = parsed_args.trustee
|
|
@@ -612,10 +612,12 @@ class SetUser(command.Command):
|
|
|
612
612
|
if parsed_args.description:
|
|
613
613
|
kwargs['description'] = parsed_args.description
|
|
614
614
|
if parsed_args.project:
|
|
615
|
-
project_domain_id =
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
615
|
+
project_domain_id = None
|
|
616
|
+
if parsed_args.project_domain:
|
|
617
|
+
project_domain_id = identity_client.find_domain(
|
|
618
|
+
name_or_id=parsed_args.project_domain,
|
|
619
|
+
ignore_missing=False,
|
|
620
|
+
).id
|
|
619
621
|
project_id = identity_client.find_project(
|
|
620
622
|
name_or_id=parsed_args.project,
|
|
621
623
|
ignore_missing=False,
|
|
@@ -70,12 +70,15 @@ class TestTrustCreate(identity_fakes.TestIdentityv3):
|
|
|
70
70
|
# Set expected values
|
|
71
71
|
kwargs = {
|
|
72
72
|
'project_id': self.project.id,
|
|
73
|
-
'roles': [self.role.id],
|
|
73
|
+
'roles': [{'id': self.role.id}],
|
|
74
|
+
'impersonation': False,
|
|
74
75
|
}
|
|
75
76
|
# TrustManager.create(trustee_id, trustor_id, impersonation=,
|
|
76
77
|
# project=, role_names=, expires_at=)
|
|
77
78
|
self.identity_sdk_client.create_trust.assert_called_with(
|
|
78
|
-
|
|
79
|
+
trustor_user_id=self.user.id,
|
|
80
|
+
trustee_user_id=self.user.id,
|
|
81
|
+
**kwargs,
|
|
79
82
|
)
|
|
80
83
|
|
|
81
84
|
collist = (
|
|
@@ -1206,6 +1206,17 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1206
1206
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1207
1207
|
user=self.user, **kwargs
|
|
1208
1208
|
)
|
|
1209
|
+
self.identity_sdk_client.find_domain.assert_not_called()
|
|
1210
|
+
|
|
1211
|
+
# Set expected values
|
|
1212
|
+
kwargs = {
|
|
1213
|
+
'ignore_missing': False,
|
|
1214
|
+
'domain_id': None,
|
|
1215
|
+
}
|
|
1216
|
+
self.identity_sdk_client.find_project.assert_called_once_with(
|
|
1217
|
+
name_or_id=self.project.id, **kwargs
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1209
1220
|
self.assertIsNone(result)
|
|
1210
1221
|
|
|
1211
1222
|
def test_user_set_project_domain(self):
|
|
@@ -1238,6 +1249,11 @@ class TestUserSet(identity_fakes.TestIdentityv3):
|
|
|
1238
1249
|
self.identity_sdk_client.update_user.assert_called_with(
|
|
1239
1250
|
user=self.user, **kwargs
|
|
1240
1251
|
)
|
|
1252
|
+
|
|
1253
|
+
self.identity_sdk_client.find_domain.assert_called_once_with(
|
|
1254
|
+
name_or_id=self.project.domain_id, ignore_missing=False
|
|
1255
|
+
)
|
|
1256
|
+
|
|
1241
1257
|
self.assertIsNone(result)
|
|
1242
1258
|
|
|
1243
1259
|
def test_user_set_enable(self):
|
|
@@ -107,6 +107,7 @@ Dina Belova <dbelova@mirantis.com>
|
|
|
107
107
|
Dirk Mueller <dirk@dmllr.de>
|
|
108
108
|
Diwei Zhu <zhu.diw@northeastern.edu>
|
|
109
109
|
Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com>
|
|
110
|
+
Dmitriy Chubinidze <dcu995@gmail.com>
|
|
110
111
|
Dmitriy Rabotyagov <drabotyagov@vexxhost.com>
|
|
111
112
|
Dmitriy Rabotyagov <noonedeadpunk@ya.ru>
|
|
112
113
|
Dmitry Tantsur <dtantsur@protonmail.com>
|
|
@@ -425,6 +426,7 @@ Violet Kurtz <vi.kurtz@protonmail.com>
|
|
|
425
426
|
Violet Kurtz <vikurtz@osuosl.org>
|
|
426
427
|
Vishakha Agarwal <agarwalvishakha18@gmail.com>
|
|
427
428
|
Vladimir Eremin <yottatsa@yandex-team.ru>
|
|
429
|
+
Vladimir Kozhukalov <kozhukalov@gmail.com>
|
|
428
430
|
Vu Cong Tuan <tuanvc@vn.fujitsu.com>
|
|
429
431
|
Wenran Xiao <xiaowenran@unitedstack.com>
|
|
430
432
|
Wenzhi Yu <wenzhi_yu@163.com>
|
|
@@ -78,9 +78,9 @@ openstackclient/identity/v3/service.py,sha256=2VuxiOEuEnqjWEPNryKRe4LLe70-MIndkD
|
|
|
78
78
|
openstackclient/identity/v3/service_provider.py,sha256=tw_X_S3dXZPs-AijTbi_UC14JivBZ-IxsVwcj-6dYSY,8433
|
|
79
79
|
openstackclient/identity/v3/tag.py,sha256=dcVDheoWxdkwsZYvyJSpzIF2EGpqZtaE0h7x2halscc,3972
|
|
80
80
|
openstackclient/identity/v3/token.py,sha256=dXP7iRYZRROw3k8knao6NteZeP67mVGCc2Y9jMHudnQ,7399
|
|
81
|
-
openstackclient/identity/v3/trust.py,sha256=
|
|
81
|
+
openstackclient/identity/v3/trust.py,sha256=5VZYtn8Dy_R_JlWmG3eiiv93cLwrlD7OiMcjO5qFDsU,13884
|
|
82
82
|
openstackclient/identity/v3/unscoped_saml.py,sha256=A-645W2kp0_27NxG03YcEU9EtcCFex6Ojzw4fLApuds,2031
|
|
83
|
-
openstackclient/identity/v3/user.py,sha256=
|
|
83
|
+
openstackclient/identity/v3/user.py,sha256=y0pKxoNnXmchABzTt8lg9tkgOPqTZxUYiaXjw1xSrlM,24147
|
|
84
84
|
openstackclient/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
85
|
openstackclient/image/client.py,sha256=I088KrjZ9ubuS_8NDX98W6_lHkdaxbBtRHTHt5q_HC8,1508
|
|
86
86
|
openstackclient/image/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -340,9 +340,9 @@ openstackclient/tests/unit/identity/v3/test_role_assignment.py,sha256=Lpb0vwOfP7
|
|
|
340
340
|
openstackclient/tests/unit/identity/v3/test_service.py,sha256=eFRjaeuJKd4_G1_gSTzAKmLTN035rQjY4E5RnLzMutY,15028
|
|
341
341
|
openstackclient/tests/unit/identity/v3/test_service_provider.py,sha256=vAY1-5zzhbw_Fa5tcYMWzNezTKMpHfvYDYN2w6zOFdI,12080
|
|
342
342
|
openstackclient/tests/unit/identity/v3/test_token.py,sha256=7Vp-thUbZcaXvIybvD40Xc8JfncZF9DcipgibyTjIdw,4098
|
|
343
|
-
openstackclient/tests/unit/identity/v3/test_trust.py,sha256=
|
|
343
|
+
openstackclient/tests/unit/identity/v3/test_trust.py,sha256=C-RY9_SJypImzDbHgyMNj-yzvEfqdylwONdFFt8D4wg,12953
|
|
344
344
|
openstackclient/tests/unit/identity/v3/test_unscoped_saml.py,sha256=gBtouVvKaOTflJ6TMg497ScL4GsVS3lVM_h8XKFExXg,3592
|
|
345
|
-
openstackclient/tests/unit/identity/v3/test_user.py,sha256=
|
|
345
|
+
openstackclient/tests/unit/identity/v3/test_user.py,sha256=z2fChcuhT711GDyKlYsIPpvAx2aDtFn9C2KAe4kvYNw,58719
|
|
346
346
|
openstackclient/tests/unit/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
347
347
|
openstackclient/tests/unit/image/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
348
348
|
openstackclient/tests/unit/image/v1/fakes.py,sha256=rwYSQK12WxSaX2p-f15e6D94qC6lg1XIgBFvdiJ5aRc,2271
|
|
@@ -494,11 +494,11 @@ openstackclient/volume/v3/volume_message.py,sha256=HBBxPEcYoNqGjEbzGIEnIJ1XTcQ2K
|
|
|
494
494
|
openstackclient/volume/v3/volume_snapshot.py,sha256=pZ4q_qCwqh4jaGhX28G59wsWDmEc3uXdbpeD176osZg,3186
|
|
495
495
|
openstackclient/volume/v3/volume_transfer_request.py,sha256=PthOJV2m-pTV1njFzwTpaekXZkET1c6alIJrpuN7R6Q,7530
|
|
496
496
|
openstackclient/volume/v3/volume_type.py,sha256=_nbmu6e87UAHRjh30fQIwScMubox_FpHcQKDUOxO4NA,33955
|
|
497
|
-
python_openstackclient-7.
|
|
498
|
-
python_openstackclient-7.
|
|
499
|
-
python_openstackclient-7.
|
|
500
|
-
python_openstackclient-7.
|
|
501
|
-
python_openstackclient-7.
|
|
502
|
-
python_openstackclient-7.
|
|
503
|
-
python_openstackclient-7.
|
|
504
|
-
python_openstackclient-7.
|
|
497
|
+
python_openstackclient-7.5.0.dist-info/AUTHORS,sha256=dLJoA2nJCPXXMQlfd8nyRZhXkR2Ai9t6frv3d3eZUII,21679
|
|
498
|
+
python_openstackclient-7.5.0.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
|
|
499
|
+
python_openstackclient-7.5.0.dist-info/METADATA,sha256=t2n54Ya-t_0Ca4BJFk0TYWfMNjRbGhdPMRs4nsiRrpc,6516
|
|
500
|
+
python_openstackclient-7.5.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
501
|
+
python_openstackclient-7.5.0.dist-info/entry_points.txt,sha256=VsZCw-6So3hkHuIiX-dGaMVL1PEqmfDynF37m1EwjCs,53260
|
|
502
|
+
python_openstackclient-7.5.0.dist-info/pbr.json,sha256=E0U5ImtX7CrMc6toMJW1G42hL8cWtMsUKUJyLrUc3sM,47
|
|
503
|
+
python_openstackclient-7.5.0.dist-info/top_level.txt,sha256=htg7z9oZgysRuVUHn-m1Bk6XLGOeV65nMbZX9H8qhs0,16
|
|
504
|
+
python_openstackclient-7.5.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "bc1930c2", "is_release": true}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "4b7e32ca", "is_release": true}
|
|
File without changes
|
{python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{python_openstackclient-7.4.0.dist-info → python_openstackclient-7.5.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|