Skip to content

Commit 3f8a419

Browse files
feat(cloud): support polling timeout in tasks.poll()
* feat(cloud): support polling timeout in tasks.poll() * feat(cloud): add polling timeout to baremetal create_and_poll * feat(cloud): remove timeout in client initialization of example scripts
1 parent bad7ecb commit 3f8a419

14 files changed

Lines changed: 12 additions & 15 deletions

examples/cloud/audit_logs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def main() -> None:
1212
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]
1313

1414
gcore = Gcore(
15-
timeout=60.0,
1615
# No need to explicitly pass to Gcore constructor if using environment variables
1716
# api_key=api_key,
1817
# cloud_project_id=cloud_project_id,

examples/cloud/audit_logs_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ async def main() -> None:
1313
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]
1414

1515
gcore = AsyncGcore(
16-
timeout=60.0,
1716
# No need to explicitly pass to AsyncGcore constructor if using environment variables
1817
# api_key=api_key,
1918
# cloud_project_id=cloud_project_id,

examples/cloud/baremetal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def main() -> None:
1717
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]
1818

1919
gcore = Gcore(
20-
timeout=1800.0,
2120
# No need to explicitly pass to Gcore constructor if using environment variables
2221
# api_key=api_key,
2322
# cloud_project_id=cloud_project_id,

examples/cloud/baremetal_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ async def main() -> None:
1818
# cloud_region_id = os.environ["GCORE_CLOUD_REGION_ID"]
1919

2020
gcore = AsyncGcore(
21-
timeout=1800.0,
2221
# No need to explicitly pass to AsyncGcore constructor if using environment variables
2322
# api_key=api_key,
2423
# cloud_project_id=cloud_project_id,

examples/cloud/file_shares.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def main() -> None:
1616
cloud_network_id = os.environ["GCORE_CLOUD_NETWORK_ID"]
1717

1818
gcore = Gcore(
19-
timeout=180.0,
2019
# No need to explicitly pass to Gcore constructor if using environment variables
2120
# api_key=api_key,
2221
# cloud_project_id=cloud_project_id,

examples/cloud/file_shares_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ async def main() -> None:
1717
cloud_network_id = os.environ["GCORE_CLOUD_NETWORK_ID"]
1818

1919
gcore = AsyncGcore(
20-
timeout=180.0,
2120
# No need to explicitly pass to AsyncGcore constructor if using environment variables
2221
# api_key=api_key,
2322
# cloud_project_id=cloud_project_id,

examples/cloud/inference.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def main() -> None:
2020
cloud_inference_flavor_name = os.environ["GCORE_CLOUD_INFERENCE_FLAVOR_NAME"]
2121

2222
gcore = Gcore(
23-
timeout=180.0,
2423
# No need to explicitly pass to Gcore constructor if using environment variables
2524
# api_key=api_key,
2625
# cloud_project_id=cloud_project_id,

examples/cloud/inference_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ async def main() -> None:
2121
cloud_inference_flavor_name = os.environ["GCORE_CLOUD_INFERENCE_FLAVOR_NAME"]
2222

2323
gcore = AsyncGcore(
24-
timeout=180.0,
2524
# No need to explicitly pass to AsyncGcore constructor if using environment variables
2625
# api_key=api_key,
2726
# cloud_project_id=cloud_project_id,

examples/cloud/instances.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def main() -> None:
2323
placement_group_id = os.environ.get("GCORE_CLOUD_PLACEMENT_GROUP_ID")
2424

2525
gcore = Gcore(
26-
timeout=180.0,
2726
# No need to explicitly pass to Gcore constructor if using environment variables
2827
# api_key=api_key,
2928
# cloud_project_id=cloud_project_id,

examples/cloud/instances_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ async def main() -> None:
2424
placement_group_id = os.environ.get("GCORE_CLOUD_PLACEMENT_GROUP_ID")
2525

2626
gcore = AsyncGcore(
27-
timeout=180.0,
2827
# No need to explicitly pass to AsyncGcore constructor if using environment variables
2928
# api_key=api_key,
3029
# cloud_project_id=cloud_project_id,

0 commit comments

Comments
 (0)