Skip to content

feat(cli): onboard iaas snapshot api #774

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Benjosh95
Copy link
Contributor

@Benjosh95 Benjosh95 commented Jun 2, 2025

Description

Onboarding the snapshot API https://docs.api.stackit.cloud/documentation/iaas/version/v1#tag/Snapshots to manage the snapshot resources via the cli.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Testing-Instructions

  1. Create a volume that will be used for snapshot testing.
    stackit volume create
    --availability-zone eu01-1
    --size 10
    --name "snapshot-test-vol"
    --labels purpose=snapshot-testing

  2. Create a snapshot of the volume above

    • Required volume-id flag
    • Optional name and labels
    • Async operation
      stackit volume snapshot create
      --volume-id $VOLUME_ID
      --name "test-snap-1"
      --labels purpose=testing,test-type=minimal
  3. List snapshot(s)
    stackit volume snapshot list --limit 3

  4. Describe snapshot
    stackit volume snapshot describe $SNAPSHOT_ID

  5. Update snapshot
    stackit volume snapshot update $SNAPSHOT_ID
    --name "test-snap-1-updated"
    --labels purpose=testing-updated

  6. Verify update
    stackit volume snapshot describe $SNAPSHOT_ID

  7. Delete the snapshot
    stackit volume snapshot delete $SNAPSHOT_ID

  8. Delete the volume
    stackit volume delete $VOLUME_ID

@rubenhoenle
Copy link
Member

Please check failing CI pipeline

@Benjosh95 Benjosh95 marked this pull request as ready for review June 6, 2025 07:33
payload.Name = &testName

// Convert test labels to map[string]interface{}
labelsMap := map[string]interface{}{}
Copy link
Member

Choose a reason for hiding this comment

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

@Benjosh95 Benjosh95 force-pushed the feat/onboard-iaas-snapshot-api branch from 24d0562 to 72de161 Compare June 11, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants