Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] API related to Registry Auth and Pod Templates. #390

Open
cblmemo opened this issue Dec 27, 2024 · 0 comments
Open

[FR] API related to Registry Auth and Pod Templates. #390

cblmemo opened this issue Dec 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cblmemo
Copy link

cblmemo commented Dec 27, 2024

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:

  1. 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).
  1. Delete Pod Template (from its id or name);
  2. 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 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant