feat(snapshot): accept instance name and auto-detect volumes#91
Merged
Conversation
Allow `snapshot create` to accept `--instance` to auto-detect attached volumes instead of requiring `--volume-id`. Adds `--device` filter to target a specific device when using `--instance`. When multiple volumes are found, snapshot names are suffixed with the device name. https://claude.ai/code/session_018cz4V49XUdte4NBJfGR21S
- Change --instance Option to positional Argument to match codebase convention (every other command uses typer.Argument for instance names) - Add --device short flag -D for consistency with other options - Add partial failure handling: when snapshotting multiple volumes, catch per-volume errors, continue with remaining volumes, and report a summary of successes/failures at the end - Refactor get_volume_ids to delegate to get_volumes_for_instance (DRY) - Fix stale test docstring (test_create_snapshot_missing_volume_id) - Add test for instance resolution failure during create - Add test for partial failure scenario https://claude.ai/code/session_018cz4V49XUdte4NBJfGR21S
- Bump version 1.5.0 → 1.6.0 - Add changelog entry for snapshot create instance support - Update README snapshot examples to show new instance-based usage - Update CLAUDE.md CLI parameter patterns to reflect snapshot create changes https://claude.ai/code/session_018cz4V49XUdte4NBJfGR21S
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
Closes #87.
snapshot createnow accepts an instance name to auto-detect attached volumes instead of requiring--volume-id.instance_nameargument tosnapshot create(follows codebase convention for instance params)--device/-Doption to filter to a specific device (e.g.,/dev/sdf)--volume-idremains supported as the alternative single-volume pathbackup-sda1,backup-sdf)get_volumes_for_instanceutility; refactorget_volume_idsto delegate to it (DRY)Usage
Test plan
--volume-id) unchanged--devicefilters correctlyhttps://claude.ai/code/session_018cz4V49XUdte4NBJfGR21S