You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use oci.pagination.list_call_get_all_results with the list_groups method of oci.identity.IdentityClient, the call fails with the following error:
Traceback (most recent call last): File "/Users/cpasternak/repos/oci_helpers/groups.py", line 48, in get_all_groups_idd group_list=oci.pagination.list_call_get_all_results( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/cpasternak/Library/Python/3.11/lib/python/site-packages/oci/pagination/pagination_utils.py", line 218, in list_call_get_all_results else aggregated_results.extend(call_result.data.items) ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Groups' object has no attribute 'items'
It would appear that the aggregated_results.extend function is looking for .items, but with the identity domain client, it uses the terminology .resources (not .items)
The text was updated successfully, but these errors were encountered:
SDK version 2.123.0
Python version 3.11.4
When attempting to use oci.pagination.list_call_get_all_results with the list_groups method of oci.identity.IdentityClient, the call fails with the following error:
Traceback (most recent call last):
File "/Users/cpasternak/repos/oci_helpers/groups.py", line 48, in get_all_groups_idd
group_list=oci.pagination.list_call_get_all_results(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cpasternak/Library/Python/3.11/lib/python/site-packages/oci/pagination/pagination_utils.py", line 218, in list_call_get_all_results
else aggregated_results.extend(call_result.data.items)
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Groups' object has no attribute 'items'
CODE:
config=valid OCI config
url="https://idcs-c2ee2b3360e24cea83df0f956fb007d5.identity.oraclecloud.com:443"
identity_domain_client = oci.identity_domains.IdentityDomainsClient(config, url)
group_list=oci.pagination.list_call_get_all_results(
identity_domain_client.list_groups,
retry_strategy=oci.retry.DEFAULT_RETRY_STRATEGY
).data
It would appear that the aggregated_results.extend function is looking for .items, but with the identity domain client, it uses the terminology .resources (not .items)
The text was updated successfully, but these errors were encountered: