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

[droplets]: add support for droplet backup policy #1609

Merged
merged 35 commits into from
Nov 18, 2024

Conversation

loosla
Copy link
Contributor

@loosla loosla commented Nov 5, 2024

This PR adds droplet backup policy to doctl.

For droplets on:

  • droplet create
  • get a policy for a droplet
  • list policies for all existing droplets
  • list policies for all supported droplets

For droplet actions on:

  • enable backups (now you can add a policy with a flag --backup-policy)
  • change backup policy

Thanks 🦈

@loosla loosla marked this pull request as ready for review November 7, 2024 20:50
@loosla loosla requested a review from a team November 7, 2024 20:50
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

Looking good. Left a few comments in-line from my first pass review. Would be great to get some integration-style tests as well.

Thinking about the overall structure, it might make sense to group these new commands together under a backup-policies sub command. Something like:

doctl compute droplet backup-policies get
doctl compute droplet backup-policies list
doctl compute droplet backup-policies list-supported

It feels a bit cleaner to me. What do you think?

commands/displayers/droplet_backup_policies.go Outdated Show resolved Hide resolved
commands/displayers/droplet_backup_policies.go Outdated Show resolved Hide resolved
commands/displayers/droplet_supported_backup_policies.go Outdated Show resolved Hide resolved
commands/droplets.go Outdated Show resolved Hide resolved
commands/droplet_actions.go Outdated Show resolved Hide resolved
commands/displayers/droplet_backup_policies.go Outdated Show resolved Hide resolved
commands/droplet_actions.go Outdated Show resolved Hide resolved
Copy link
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

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

🙌 LGTM!

@loosla loosla merged commit 5d268d5 into main Nov 18, 2024
8 checks passed
@loosla loosla deleted the alushnikova/droplet-backup-policy branch November 18, 2024 17:21
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