-
Notifications
You must be signed in to change notification settings - Fork 17
feat(cli): onboard iaas volume backup api #773
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
5da9ab6
add volume backup create
Benjosh95 ce3e135
wip
Benjosh95 4a441bc
add volume backup create tests
Benjosh95 f4fc4dd
wip list
Benjosh95 43b6bd5
add volume backup update and update tests
Benjosh95 c649947
add volume backup delete and delete tests
Benjosh95 909323f
add volume backup describe and describe tests
Benjosh95 db1ff24
add volume backup restore and restore tests
Benjosh95 aa28b9f
generate docs for volume backup api
Benjosh95 41ea880
volume backup create sourcelabel fix
Benjosh95 b9b172d
fix according to review request
Benjosh95 804d613
fix linting errors
Benjosh95 3f44036
add required backup payload
Benjosh95 7c5d094
fix describe visual presentation
Benjosh95 30b99a8
fix list visual presentation
Benjosh95 df449ee
add newest version of iaas service
Benjosh95 db7d9a2
fix backup create test
Benjosh95 ec43946
add testcase for an empty backup slice
Benjosh95 1270bb2
add create backup is nil testcaste
Benjosh95 0eab9e4
add handle for possible nil pointer
Benjosh95 8119d2d
refactor loop
Benjosh95 9257fe5
refactor branching
Benjosh95 d0bc7ec
refactor reduce variable
Benjosh95 726da7f
refactor examples
Benjosh95 ced4edf
changed labels format
Benjosh95 0e51999
update examples
Benjosh95 74aa489
update backup examples
Benjosh95 be8816d
update docs
Benjosh95 bbbdd3b
refactor configuration of flagOptions
Benjosh95 f751239
refactor create backup test vars
Benjosh95 bc1451d
add assume check to update volumen backup
Benjosh95 575fbb8
add util function, refactor
Benjosh95 ac271a8
refactoring
Benjosh95 3572381
update docs
Benjosh95 3f92f4e
fix utils test
Benjosh95 5e1d3fd
refactor duplicate code with util func ConvertStringMapToInterfaceMap
Benjosh95 667d6cf
fix go mod,sum
Benjosh95 b15a2ea
fix printing behavior
Benjosh95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## stackit volume backup | ||
|
||
Provides functionality for volume backups | ||
|
||
### Synopsis | ||
|
||
Provides functionality for volume backups. | ||
|
||
``` | ||
stackit volume backup [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup" | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume](./stackit_volume.md) - Provides functionality for volumes | ||
* [stackit volume backup create](./stackit_volume_backup_create.md) - Creates a backup from a specific source | ||
* [stackit volume backup delete](./stackit_volume_backup_delete.md) - Deletes a backup | ||
* [stackit volume backup describe](./stackit_volume_backup_describe.md) - Describes a backup | ||
* [stackit volume backup list](./stackit_volume_backup_list.md) - Lists all backups | ||
* [stackit volume backup restore](./stackit_volume_backup_restore.md) - Restores a backup | ||
* [stackit volume backup update](./stackit_volume_backup_update.md) - Updates a backup | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## stackit volume backup create | ||
|
||
Creates a backup from a specific source | ||
|
||
### Synopsis | ||
|
||
Creates a backup from a specific source (volume or snapshot). | ||
|
||
``` | ||
stackit volume backup create [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
Create a backup from a volume | ||
$ stackit volume backup create --source-id xxx --source-type volume | ||
|
||
Create a backup from a snapshot with a name | ||
$ stackit volume backup create --source-id xxx --source-type snapshot --name my-backup | ||
|
||
Create a backup with labels | ||
$ stackit volume backup create --source-id xxx --source-type volume --labels key1=value1,key2=value2 | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup create" | ||
--labels stringToString Key-value string pairs as labels (default []) | ||
--name string Name of the backup | ||
--source-id string ID of the source from which a backup should be created | ||
--source-type string Source type of the backup, one of ["volume" "snapshot"] | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume backup](./stackit_volume_backup.md) - Provides functionality for volume backups | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## stackit volume backup delete | ||
|
||
Deletes a backup | ||
|
||
### Synopsis | ||
|
||
Deletes a backup by its ID. | ||
|
||
``` | ||
stackit volume backup delete BACKUP_ID [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
Delete a backup with ID "xxx" | ||
$ stackit volume backup delete xxx | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup delete" | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume backup](./stackit_volume_backup.md) - Provides functionality for volume backups | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## stackit volume backup describe | ||
|
||
Describes a backup | ||
|
||
### Synopsis | ||
|
||
Describes a backup by its ID. | ||
|
||
``` | ||
stackit volume backup describe BACKUP_ID [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
Get details of a backup with ID "xxx" | ||
$ stackit volume backup describe xxx | ||
|
||
Get details of a backup with ID "xxx" in JSON format | ||
$ stackit volume backup describe xxx --output-format json | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup describe" | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume backup](./stackit_volume_backup.md) - Provides functionality for volume backups | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## stackit volume backup list | ||
|
||
Lists all backups | ||
|
||
### Synopsis | ||
|
||
Lists all backups in a project. | ||
|
||
``` | ||
stackit volume backup list [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
List all backups | ||
$ stackit volume backup list | ||
|
||
List all backups in JSON format | ||
$ stackit volume backup list --output-format json | ||
|
||
List up to 10 backups | ||
$ stackit volume backup list --limit 10 | ||
|
||
List backups with specific labels | ||
$ stackit volume backup list --label-selector key1=value1,key2=value2 | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup list" | ||
--label-selector string Filter backups by labels | ||
--limit int Maximum number of entries to list | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume backup](./stackit_volume_backup.md) - Provides functionality for volume backups | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## stackit volume backup restore | ||
|
||
Restores a backup | ||
|
||
### Synopsis | ||
|
||
Restores a backup by its ID. | ||
|
||
``` | ||
stackit volume backup restore BACKUP_ID [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
Restore a backup with ID "xxx" | ||
$ stackit volume backup restore xxx | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup restore" | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume backup](./stackit_volume_backup.md) - Provides functionality for volume backups | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## stackit volume backup update | ||
|
||
Updates a backup | ||
|
||
### Synopsis | ||
|
||
Updates a backup by its ID. | ||
|
||
``` | ||
stackit volume backup update BACKUP_ID [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
Update the name of a backup with ID "xxx" | ||
$ stackit volume backup update xxx --name new-name | ||
Update the labels of a backup with ID "xxx" | ||
$ stackit volume backup update xxx --labels key1=value1,key2=value2 | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help Help for "stackit volume backup update" | ||
--labels stringToString Key-value string pairs as labels (default []) | ||
--name string Name of the backup | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
-y, --assume-yes If set, skips all confirmation prompts | ||
--async If set, runs the command asynchronously | ||
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"] | ||
-p, --project-id string Project ID | ||
--region string Target region for region-specific requests | ||
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [stackit volume backup](./stackit_volume_backup.md) - Provides functionality for volume backups | ||
|
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.