oci.pagination.list_call_get_all_results fails when using identity domain client
还没有人认领这个 Issue。
评估
调研方向
从 oci/pagination/pagination_utils.py 中的 list_call_get_all_results 开始,然后使用 identity_domains.IdentityDomainsClient.list_groups 重现该调用。比较分页辅助工具使用的响应数据形状与身份域响应,并验证分页能够在不出现 AttributeError 的情况下返回所有组。
由索引模型根据 Issue 内容生成。
描述
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)
- 主要语言
- Python
- 星标
- 473
- 派生
- 322
- 平均合并
- 13 分钟
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
oracle/oci-python-sdk 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
oracle/oci-python-sdk#890 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
oracle/oci-python-sdk#879 · 3 条评论 ·
-
Example uses non-existent API可能已有人在做 @reginaldalfret 于 7 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 66/100
oracle/oci-python-sdk#878 ·
-
SDK
难度 3/5 1-2 天 新手友好度 55/100
oracle/oci-python-sdk#861 · 5 条评论 ·
-
SDK
难度 2/5 1-3 小时 新手友好度 48/100
oracle/oci-python-sdk#852 ·
查看 oracle/oci-python-sdk 的全部 Issue
相似的 Issue
-
bug difficulty:2 good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
MakazhanAlpamys/Soup#1865 ·
维护者通常 1 天内回复
-
area: agents area: docs good first issue
难度 2/5 1-3 小时 新手友好度 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exempt可能已有人在做 @adityasinha-ghub 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
pylint-dev/pylint#11656 ·
维护者通常 1 天内回复
-
area:provisioning effort:S priority:P2 provider:local-libvirt risk:daytime-only status:in-progress type:bug
难度 2/5 1-3 小时 新手友好度 78/100
randomparity/kdive#3203 · 2 条评论 ·
维护者通常 1 天内回复
-
get() for StrEnum可能已有人在做 @FeJo5952 今天认领。 未关闭good first issue
难度 2/5 1-3 小时 新手友好度 72/100
collective/icalendar#1921 · 1 条评论 ·
维护者通常 1 天内回复