Skip to content

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

@cblmemo

Description

@cblmemo

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 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions