Skip to content

Commit 7938936

Browse files
authored
fix: use flashBootType instead of appending -fb (#484)
1 parent 8d08f24 commit 7938936

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

runpod/api/mutations/endpoints.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Runpod | API Wrapper | Mutations | Endpoints """
1+
f"""Runpod | API Wrapper | Mutations | Endpoints"""
22

33
# pylint: disable=too-many-arguments
44

@@ -23,7 +23,7 @@ def generate_endpoint_mutation(
2323

2424
# ------------------------------ Required Fields ----------------------------- #
2525
if flashboot:
26-
name = name + "-fb"
26+
input_fields.append('flashBootType: "FLASHBOOT"')
2727

2828
input_fields.append(f'name: "{name}"')
2929
input_fields.append(f'templateId: "{template_id}"')
@@ -75,12 +75,12 @@ def generate_endpoint_mutation(
7575
workersMax
7676
allowedCudaVersions
7777
gpuCount
78+
flashBootType
7879
}}
7980
}}
8081
"""
8182

8283

83-
8484
def update_endpoint_template_mutation(endpoint_id: str, template_id: str):
8585
"""Generate a string for a GraphQL mutation to update an existing endpoint's template."""
8686
input_fields = []

tests/test_api/test_mutation_endpoints.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_all_fields(self):
3232
4,
3333
True,
3434
)
35-
self.assertIn('name: "test_name-fb"', result)
35+
self.assertIn('name: "test_name"', result)
3636
self.assertIn('templateId: "test_template_id"', result)
3737
self.assertIn('gpuIds: "AMPERE_20"', result)
3838
self.assertIn('networkVolumeId: "test_volume_id"', result)
@@ -42,3 +42,4 @@ def test_all_fields(self):
4242
self.assertIn("scalerValue: 5", result)
4343
self.assertIn("workersMin: 2", result)
4444
self.assertIn("workersMax: 4", result)
45+
self.assertIn('flashBootType: "FLASHBOOT"', result)

0 commit comments

Comments
 (0)