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

Add template delete endpoints #55

Merged
merged 7 commits into from
Feb 27, 2025
Merged

Add template delete endpoints #55

merged 7 commits into from
Feb 27, 2025

Conversation

alexchristy
Copy link
Member

@alexchristy alexchristy commented Feb 24, 2025

Checklist

  • I have added a version label to my PR (e.g., patch, minor, major).
  • I have tested my changes locally and verified they work as expected.
  • I have added relevant tests to cover my changes.
  • I have made any necessary updates to the documentation.

Description

This PR adds delete endpoints for all of the existing template objects: range, vpc, subnet, and host. All the endpoints are located at DELETE /api/v1/templates/{TEMPLATE_TYPE}/{UUID}.

Tests were added to verify that deletes will cascade and delete all sub templates. For example, if you delete a range template, all VPCs, subnets, and hosts part of that range template will also be deleted from the database.

This addresses part of #53. The modification endpoints will be made in a separate PR.

@alexchristy alexchristy added the patch Increment the patch version when merged label Feb 24, 2025
@alexchristy alexchristy self-assigned this Feb 24, 2025
Copy link
Member

@Adamkadaban Adamkadaban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

Copy link
Member

@Nareshp1 Nareshp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexchristy alexchristy merged commit 5124513 into main Feb 27, 2025
4 checks passed
@alexchristy alexchristy deleted the delete-endpoints branch February 27, 2025 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants