Skip to content

Commit f828f03

Browse files
authored
feat(file): add organization_id in ListFileSystemsRequest (#1015)
1 parent f26d3ac commit f828f03

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

scaleway-async/scaleway_async/file/v1alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ async def list_file_systems(
120120
region: Optional[ScwRegion] = None,
121121
order_by: Optional[ListFileSystemsRequestOrderBy] = None,
122122
project_id: Optional[str] = None,
123+
organization_id: Optional[str] = None,
123124
page: Optional[int] = None,
124125
page_size: Optional[int] = None,
125126
name: Optional[str] = None,
@@ -131,6 +132,7 @@ async def list_file_systems(
131132
:param region: Region to target. If none is passed will use default region from the config.
132133
:param order_by: Criteria to use when ordering the list.
133134
:param project_id: Filter by project ID.
135+
:param organization_id: Filter by organization ID.
134136
:param page: Page number (starting at 1).
135137
:param page_size: Number of entries per page (default: 20, max: 100).
136138
:param name: Filter the returned filesystems by their names.
@@ -153,6 +155,8 @@ async def list_file_systems(
153155
params={
154156
"name": name,
155157
"order_by": order_by,
158+
"organization_id": organization_id
159+
or self.client.default_organization_id,
156160
"page": page,
157161
"page_size": page_size or self.client.default_page_size,
158162
"project_id": project_id or self.client.default_project_id,
@@ -169,6 +173,7 @@ async def list_file_systems_all(
169173
region: Optional[ScwRegion] = None,
170174
order_by: Optional[ListFileSystemsRequestOrderBy] = None,
171175
project_id: Optional[str] = None,
176+
organization_id: Optional[str] = None,
172177
page: Optional[int] = None,
173178
page_size: Optional[int] = None,
174179
name: Optional[str] = None,
@@ -180,6 +185,7 @@ async def list_file_systems_all(
180185
:param region: Region to target. If none is passed will use default region from the config.
181186
:param order_by: Criteria to use when ordering the list.
182187
:param project_id: Filter by project ID.
188+
:param organization_id: Filter by organization ID.
183189
:param page: Page number (starting at 1).
184190
:param page_size: Number of entries per page (default: 20, max: 100).
185191
:param name: Filter the returned filesystems by their names.
@@ -200,6 +206,7 @@ async def list_file_systems_all(
200206
"region": region,
201207
"order_by": order_by,
202208
"project_id": project_id,
209+
"organization_id": organization_id,
203210
"page": page,
204211
"page_size": page_size,
205212
"name": name,

scaleway-async/scaleway_async/file/v1alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ class ListFileSystemsRequest:
285285
Filter by project ID.
286286
"""
287287

288+
organization_id: Optional[str]
289+
"""
290+
Filter by organization ID.
291+
"""
292+
288293
page: Optional[int]
289294
"""
290295
Page number (starting at 1).

scaleway/scaleway/file/v1alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def list_file_systems(
118118
region: Optional[ScwRegion] = None,
119119
order_by: Optional[ListFileSystemsRequestOrderBy] = None,
120120
project_id: Optional[str] = None,
121+
organization_id: Optional[str] = None,
121122
page: Optional[int] = None,
122123
page_size: Optional[int] = None,
123124
name: Optional[str] = None,
@@ -129,6 +130,7 @@ def list_file_systems(
129130
:param region: Region to target. If none is passed will use default region from the config.
130131
:param order_by: Criteria to use when ordering the list.
131132
:param project_id: Filter by project ID.
133+
:param organization_id: Filter by organization ID.
132134
:param page: Page number (starting at 1).
133135
:param page_size: Number of entries per page (default: 20, max: 100).
134136
:param name: Filter the returned filesystems by their names.
@@ -151,6 +153,8 @@ def list_file_systems(
151153
params={
152154
"name": name,
153155
"order_by": order_by,
156+
"organization_id": organization_id
157+
or self.client.default_organization_id,
154158
"page": page,
155159
"page_size": page_size or self.client.default_page_size,
156160
"project_id": project_id or self.client.default_project_id,
@@ -167,6 +171,7 @@ def list_file_systems_all(
167171
region: Optional[ScwRegion] = None,
168172
order_by: Optional[ListFileSystemsRequestOrderBy] = None,
169173
project_id: Optional[str] = None,
174+
organization_id: Optional[str] = None,
170175
page: Optional[int] = None,
171176
page_size: Optional[int] = None,
172177
name: Optional[str] = None,
@@ -178,6 +183,7 @@ def list_file_systems_all(
178183
:param region: Region to target. If none is passed will use default region from the config.
179184
:param order_by: Criteria to use when ordering the list.
180185
:param project_id: Filter by project ID.
186+
:param organization_id: Filter by organization ID.
181187
:param page: Page number (starting at 1).
182188
:param page_size: Number of entries per page (default: 20, max: 100).
183189
:param name: Filter the returned filesystems by their names.
@@ -198,6 +204,7 @@ def list_file_systems_all(
198204
"region": region,
199205
"order_by": order_by,
200206
"project_id": project_id,
207+
"organization_id": organization_id,
201208
"page": page,
202209
"page_size": page_size,
203210
"name": name,

scaleway/scaleway/file/v1alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ class ListFileSystemsRequest:
285285
Filter by project ID.
286286
"""
287287

288+
organization_id: Optional[str]
289+
"""
290+
Filter by organization ID.
291+
"""
292+
288293
page: Optional[int]
289294
"""
290295
Page number (starting at 1).

0 commit comments

Comments
 (0)