Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions runpod/api/mutations/endpoints.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Runpod | API Wrapper | Mutations | Endpoints """
f"""Runpod | API Wrapper | Mutations | Endpoints"""

# pylint: disable=too-many-arguments

Expand All @@ -23,7 +23,7 @@ def generate_endpoint_mutation(

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

input_fields.append(f'name: "{name}"')
input_fields.append(f'templateId: "{template_id}"')
Expand Down Expand Up @@ -75,12 +75,12 @@ def generate_endpoint_mutation(
workersMax
allowedCudaVersions
gpuCount
flashBootType
}}
}}
"""



def update_endpoint_template_mutation(endpoint_id: str, template_id: str):
"""Generate a string for a GraphQL mutation to update an existing endpoint's template."""
input_fields = []
Expand Down
3 changes: 2 additions & 1 deletion tests/test_api/test_mutation_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_all_fields(self):
4,
True,
)
self.assertIn('name: "test_name-fb"', result)
self.assertIn('name: "test_name"', result)
self.assertIn('templateId: "test_template_id"', result)
self.assertIn('gpuIds: "AMPERE_20"', result)
self.assertIn('networkVolumeId: "test_volume_id"', result)
Expand All @@ -42,3 +42,4 @@ def test_all_fields(self):
self.assertIn("scalerValue: 5", result)
self.assertIn("workersMin: 2", result)
self.assertIn("workersMax: 4", result)
self.assertIn('flashBootType: "FLASHBOOT"', result)
Loading