-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I cannot fully control the RegistryAuth and Template using python API. The following features will be helpful:
- RegistryAuth info retrieval:
- Get RegistryAuth id from its name (since it does not allow two RegistryAuth with the same name, I would assume the name can also serve as a unique identifier), or
- List all RegistryAuth (including id and name).
- Delete Pod Template (from its id or name);
- If using id to delete Pod Template, then Template info retrieval:
- Get Template id from its name (same, seems like RunPod does not allow duplicated name for templates as well), or
- List all Pod Template (including id and name).
Describe the solution you'd like
Implement the above API
Describe alternatives you've considered
I manually called the graphql api in python to delete the pod template. For info retrieval, i manually record it in local database and then retrieve it when used.
def delete_pod_template(template_name: str) -> None:
"""Deletes a pod template."""
try:
runpod.runpod.api.graphql.run_graphql_query(
f'mutation {{deleteTemplate(templateName: "{template_name}")}}')
except runpod.runpod.error.QueryError as e:
logger.warning(f'Failed to delete template {template_name}: {e}'
'Please delete it manually.')
Additional context
Implement those API would greatly enhance the experience for using runpod python SDK 🚀
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request