Skip to content

Commit 56e8abd

Browse files
Fyuselcgoetz-inovex
andcommitted
Update examples/registry/list_artifactories.py
Co-authored-by: cgoetz-inovex <carlo.goetz@inovex.de>
1 parent e7f86bf commit 56e8abd

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

‎examples/registry/list_artifactories.py‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,19 @@
99
config = Configuration()
1010
client = DefaultApi(config)
1111

12-
# Get all artifactories
13-
print(client.list_artifactories(project_id, region))
12+
# Get all artifactories, following pagination tokens.
13+
next_page_token = None
14+
15+
while True:
16+
response = client.list_artifactories(
17+
project_id=project_id,
18+
region_id=region,
19+
next_page_token=next_page_token,
20+
)
21+
22+
for artifactory in response.artifactories:
23+
print(artifactory)
24+
25+
next_page_token = response.next_page_token
26+
if not next_page_token:
27+
break

0 commit comments

Comments
 (0)