Add delete_isilon_allocation utility function#474
Open
claire-peters wants to merge 1 commit into
Open
Conversation
Adds a standalone function for cleaning up after a failed allocation creation. Given a resource URL and Subdirectory path (e.g. rc_labs/smithlab), it discovers and deletes the quota, snapshot schedule, SMB share, NFS export (each only if present), Lab/Everyone subdirectories, and root lab directory. Refuses to proceed if the quota reports non-zero physical usage, and requires explicit confirmation before any destructive operation. Intended for interactive shell use via the Django shell or a script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
delete_isilon_allocation(resource_url, path, force=False)tocoldfront/plugins/isilon/utils.py"yes"to confirmpathmatches theSubdirectoryallocation attribute (e.g.rc_labs/smithlab), lab name is derived from the last path componentTest plan
ValueErroris raised before any deletion occurs"yes"at the prompt — confirm nothing is deleted