Skip to content

Commit 484ee11

Browse files
feat(api): aggregated API specs update
1 parent 86f34b8 commit 484ee11

File tree

3 files changed

+70
-46
lines changed

3 files changed

+70
-46
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 523
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-fa5e3eb5c4c01c6be5a8d036640779fa59a1931c596245748ed28601213caa3b.yml
3-
openapi_spec_hash: 2ad55753d983df577077b3ce156ac4ca
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-b0e93e2128f920111ddf34b3de83232ca518082c681daff1f6277e578a10ad86.yml
3+
openapi_spec_hash: e76f6f0cf1c92f2944aa3daed70bed0f
44
config_hash: 28b1157595821f9f0eb3e9f3ea690703

src/gcore/resources/cloud/floating_ips.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ def delete(
192192
Delete floating IP
193193
194194
Args:
195+
project_id: Project ID
196+
197+
region_id: Region ID
198+
199+
floating_ip_id: Floating IP ID
200+
195201
extra_headers: Send extra headers
196202
197203
extra_query: Add additional query parameters to the request
@@ -283,6 +289,12 @@ def get(
283289
Get floating IP
284290
285291
Args:
292+
project_id: Project ID
293+
294+
region_id: Region ID
295+
296+
floating_ip_id: Floating IP ID
297+
286298
extra_headers: Send extra headers
287299
288300
extra_query: Add additional query parameters to the request
@@ -595,6 +607,12 @@ async def delete(
595607
Delete floating IP
596608
597609
Args:
610+
project_id: Project ID
611+
612+
region_id: Region ID
613+
614+
floating_ip_id: Floating IP ID
615+
598616
extra_headers: Send extra headers
599617
600618
extra_query: Add additional query parameters to the request
@@ -686,6 +704,12 @@ async def get(
686704
Get floating IP
687705
688706
Args:
707+
project_id: Project ID
708+
709+
region_id: Region ID
710+
711+
floating_ip_id: Floating IP ID
712+
689713
extra_headers: Send extra headers
690714
691715
extra_query: Add additional query parameters to the request

tests/api_resources/cloud/test_floating_ips.py

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,18 @@ def test_streaming_response_list(self, client: Gcore) -> None:
116116
@parametrize
117117
def test_method_delete(self, client: Gcore) -> None:
118118
floating_ip = client.cloud.floating_ips.delete(
119-
floating_ip_id="floating_ip_id",
120-
project_id=0,
121-
region_id=0,
119+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
120+
project_id=1,
121+
region_id=1,
122122
)
123123
assert_matches_type(TaskIDList, floating_ip, path=["response"])
124124

125125
@parametrize
126126
def test_raw_response_delete(self, client: Gcore) -> None:
127127
response = client.cloud.floating_ips.with_raw_response.delete(
128-
floating_ip_id="floating_ip_id",
129-
project_id=0,
130-
region_id=0,
128+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
129+
project_id=1,
130+
region_id=1,
131131
)
132132

133133
assert response.is_closed is True
@@ -138,9 +138,9 @@ def test_raw_response_delete(self, client: Gcore) -> None:
138138
@parametrize
139139
def test_streaming_response_delete(self, client: Gcore) -> None:
140140
with client.cloud.floating_ips.with_streaming_response.delete(
141-
floating_ip_id="floating_ip_id",
142-
project_id=0,
143-
region_id=0,
141+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
142+
project_id=1,
143+
region_id=1,
144144
) as response:
145145
assert not response.is_closed
146146
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -155,8 +155,8 @@ def test_path_params_delete(self, client: Gcore) -> None:
155155
with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
156156
client.cloud.floating_ips.with_raw_response.delete(
157157
floating_ip_id="",
158-
project_id=0,
159-
region_id=0,
158+
project_id=1,
159+
region_id=1,
160160
)
161161

162162
@parametrize
@@ -223,18 +223,18 @@ def test_path_params_assign(self, client: Gcore) -> None:
223223
@parametrize
224224
def test_method_get(self, client: Gcore) -> None:
225225
floating_ip = client.cloud.floating_ips.get(
226-
floating_ip_id="floating_ip_id",
227-
project_id=0,
228-
region_id=0,
226+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
227+
project_id=1,
228+
region_id=1,
229229
)
230230
assert_matches_type(FloatingIP, floating_ip, path=["response"])
231231

232232
@parametrize
233233
def test_raw_response_get(self, client: Gcore) -> None:
234234
response = client.cloud.floating_ips.with_raw_response.get(
235-
floating_ip_id="floating_ip_id",
236-
project_id=0,
237-
region_id=0,
235+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
236+
project_id=1,
237+
region_id=1,
238238
)
239239

240240
assert response.is_closed is True
@@ -245,9 +245,9 @@ def test_raw_response_get(self, client: Gcore) -> None:
245245
@parametrize
246246
def test_streaming_response_get(self, client: Gcore) -> None:
247247
with client.cloud.floating_ips.with_streaming_response.get(
248-
floating_ip_id="floating_ip_id",
249-
project_id=0,
250-
region_id=0,
248+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
249+
project_id=1,
250+
region_id=1,
251251
) as response:
252252
assert not response.is_closed
253253
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -262,8 +262,8 @@ def test_path_params_get(self, client: Gcore) -> None:
262262
with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
263263
client.cloud.floating_ips.with_raw_response.get(
264264
floating_ip_id="",
265-
project_id=0,
266-
region_id=0,
265+
project_id=1,
266+
region_id=1,
267267
)
268268

269269
@parametrize
@@ -412,18 +412,18 @@ async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
412412
@parametrize
413413
async def test_method_delete(self, async_client: AsyncGcore) -> None:
414414
floating_ip = await async_client.cloud.floating_ips.delete(
415-
floating_ip_id="floating_ip_id",
416-
project_id=0,
417-
region_id=0,
415+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
416+
project_id=1,
417+
region_id=1,
418418
)
419419
assert_matches_type(TaskIDList, floating_ip, path=["response"])
420420

421421
@parametrize
422422
async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
423423
response = await async_client.cloud.floating_ips.with_raw_response.delete(
424-
floating_ip_id="floating_ip_id",
425-
project_id=0,
426-
region_id=0,
424+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
425+
project_id=1,
426+
region_id=1,
427427
)
428428

429429
assert response.is_closed is True
@@ -434,9 +434,9 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
434434
@parametrize
435435
async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None:
436436
async with async_client.cloud.floating_ips.with_streaming_response.delete(
437-
floating_ip_id="floating_ip_id",
438-
project_id=0,
439-
region_id=0,
437+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
438+
project_id=1,
439+
region_id=1,
440440
) as response:
441441
assert not response.is_closed
442442
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -451,8 +451,8 @@ async def test_path_params_delete(self, async_client: AsyncGcore) -> None:
451451
with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
452452
await async_client.cloud.floating_ips.with_raw_response.delete(
453453
floating_ip_id="",
454-
project_id=0,
455-
region_id=0,
454+
project_id=1,
455+
region_id=1,
456456
)
457457

458458
@parametrize
@@ -519,18 +519,18 @@ async def test_path_params_assign(self, async_client: AsyncGcore) -> None:
519519
@parametrize
520520
async def test_method_get(self, async_client: AsyncGcore) -> None:
521521
floating_ip = await async_client.cloud.floating_ips.get(
522-
floating_ip_id="floating_ip_id",
523-
project_id=0,
524-
region_id=0,
522+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
523+
project_id=1,
524+
region_id=1,
525525
)
526526
assert_matches_type(FloatingIP, floating_ip, path=["response"])
527527

528528
@parametrize
529529
async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
530530
response = await async_client.cloud.floating_ips.with_raw_response.get(
531-
floating_ip_id="floating_ip_id",
532-
project_id=0,
533-
region_id=0,
531+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
532+
project_id=1,
533+
region_id=1,
534534
)
535535

536536
assert response.is_closed is True
@@ -541,9 +541,9 @@ async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
541541
@parametrize
542542
async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
543543
async with async_client.cloud.floating_ips.with_streaming_response.get(
544-
floating_ip_id="floating_ip_id",
545-
project_id=0,
546-
region_id=0,
544+
floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
545+
project_id=1,
546+
region_id=1,
547547
) as response:
548548
assert not response.is_closed
549549
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -558,8 +558,8 @@ async def test_path_params_get(self, async_client: AsyncGcore) -> None:
558558
with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
559559
await async_client.cloud.floating_ips.with_raw_response.get(
560560
floating_ip_id="",
561-
project_id=0,
562-
region_id=0,
561+
project_id=1,
562+
region_id=1,
563563
)
564564

565565
@parametrize

0 commit comments

Comments
 (0)