Skip to content

Commit 8eaf030

Browse files
authored
[ContainerApp] Fix #31762: az containerapp job list: Fix bug only 20 items are returned (#31888)
1 parent 1565a55 commit 8eaf030

File tree

3 files changed

+36664
-0
lines changed

3 files changed

+36664
-0
lines changed

src/azure-cli/azure/cli/command_modules/containerapp/_clients.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,14 @@ def list_by_subscription(cls, cmd, formatter=lambda x: x):
936936
formatted = formatter(app)
937937
app_list.append(formatted)
938938

939+
while j.get("nextLink") is not None:
940+
request_url = j["nextLink"]
941+
r = send_raw_request(cmd.cli_ctx, "GET", request_url)
942+
j = r.json()
943+
for app in j["value"]:
944+
formatted = formatter(app)
945+
app_list.append(formatted)
946+
939947
return app_list
940948

941949
@classmethod
@@ -957,6 +965,14 @@ def list_by_resource_group(cls, cmd, resource_group_name, formatter=lambda x: x)
957965
formatted = formatter(app)
958966
app_list.append(formatted)
959967

968+
while j.get("nextLink") is not None:
969+
request_url = j["nextLink"]
970+
r = send_raw_request(cmd.cli_ctx, "GET", request_url)
971+
j = r.json()
972+
for app in j["value"]:
973+
formatted = formatter(app)
974+
app_list.append(formatted)
975+
960976
return app_list
961977

962978
@classmethod

0 commit comments

Comments
 (0)