Skip to content

Commit 6342126

Browse files
author
Mathis Rocher
committed
feat(ovhcloud-cli): refactor all storage commands
Signed-off-by: Mathis Rocher <mathis.rocher@corp.ovh.com>
1 parent 4641b1d commit 6342126

128 files changed

Lines changed: 5029 additions & 78 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/ovhcloud_cloud.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, O
4848
* [ovhcloud cloud region](ovhcloud_cloud_region.md) - Check regions in the given cloud project
4949
* [ovhcloud cloud savings-plan](ovhcloud_cloud_savings-plan.md) - Manage savings plans for your cloud project
5050
* [ovhcloud cloud ssh-key](ovhcloud_cloud_ssh-key.md) - Manage SSH keys in the given cloud project
51-
* [ovhcloud cloud storage-block](ovhcloud_cloud_storage-block.md) - Manage block storage volumes in the given cloud project
52-
* [ovhcloud cloud storage-file](ovhcloud_cloud_storage-file.md) - Manage file storage shares in the given cloud project
53-
* [ovhcloud cloud storage-s3](ovhcloud_cloud_storage-s3.md) - Manage S3™* compatible storage containers in the given cloud project (* S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.)
54-
* [ovhcloud cloud storage-swift](ovhcloud_cloud_storage-swift.md) - Manage SWIFT storage containers in the given cloud project
51+
* [ovhcloud cloud storage](ovhcloud_cloud_storage.md) - Manage storage services in the given cloud project
5552
* [ovhcloud cloud user](ovhcloud_cloud_user.md) - Manage users in the given cloud project
5653

doc/ovhcloud_cloud_storage.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## ovhcloud cloud storage
2+
3+
Manage storage services in the given cloud project
4+
5+
### Options
6+
7+
```
8+
-h, --help help for storage
9+
```
10+
11+
### Options inherited from parent commands
12+
13+
```
14+
-d, --debug Activate debug mode (will log all HTTP requests details)
15+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
16+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
17+
Examples:
18+
--output json
19+
--output yaml
20+
--output interactive
21+
--output 'id' (to extract a single field)
22+
--output 'nested.field.subfield' (to extract a nested field)
23+
--output '[id, "name"]' (to extract multiple fields as an array)
24+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
25+
--output 'name+","+type' (to extract and concatenate fields in a string)
26+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
27+
--profile string Use a specific profile from the configuration file
28+
```
29+
30+
### SEE ALSO
31+
32+
* [ovhcloud cloud](ovhcloud_cloud.md) - Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, Object Storage...)
33+
* [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project
34+
* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage shares in the given cloud project
35+
* [ovhcloud cloud storage object](ovhcloud_cloud_storage_object.md) - Manage S3™* compatible storage containers in the given cloud project (* S3 is a trademark filed by Amazon Technologies,Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies,Inc.)
36+
* [ovhcloud cloud storage swift](ovhcloud_cloud_storage_swift.md) - Manage SWIFT storage containers in the given cloud project
37+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## ovhcloud cloud storage block
2+
3+
Manage block storage volumes in the given cloud project
4+
5+
### Options
6+
7+
```
8+
--cloud-project string Cloud project ID
9+
-h, --help help for block
10+
```
11+
12+
### Options inherited from parent commands
13+
14+
```
15+
-d, --debug Activate debug mode (will log all HTTP requests details)
16+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
17+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
18+
Examples:
19+
--output json
20+
--output yaml
21+
--output interactive
22+
--output 'id' (to extract a single field)
23+
--output 'nested.field.subfield' (to extract a nested field)
24+
--output '[id, "name"]' (to extract multiple fields as an array)
25+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
26+
--output 'name+","+type' (to extract and concatenate fields in a string)
27+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
28+
--profile string Use a specific profile from the configuration file
29+
```
30+
31+
### SEE ALSO
32+
33+
* [ovhcloud cloud storage](ovhcloud_cloud_storage.md) - Manage storage services in the given cloud project
34+
* [ovhcloud cloud storage block attach](ovhcloud_cloud_storage_block_attach.md) - Attach the given volume to the given instance
35+
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
36+
* [ovhcloud cloud storage block create](ovhcloud_cloud_storage_block_create.md) - Create a new volume
37+
* [ovhcloud cloud storage block create-from-backup](ovhcloud_cloud_storage_block_create-from-backup.md) - Create a volume from the given backup
38+
* [ovhcloud cloud storage block delete](ovhcloud_cloud_storage_block_delete.md) - Delete the given volume
39+
* [ovhcloud cloud storage block detach](ovhcloud_cloud_storage_block_detach.md) - Detach the given volume from the given instance
40+
* [ovhcloud cloud storage block edit](ovhcloud_cloud_storage_block_edit.md) - Edit the given volume
41+
* [ovhcloud cloud storage block get](ovhcloud_cloud_storage_block_get.md) - Get a specific volume
42+
* [ovhcloud cloud storage block list](ovhcloud_cloud_storage_block_list.md) - List volumes
43+
* [ovhcloud cloud storage block snapshot](ovhcloud_cloud_storage_block_snapshot.md) - Manage snapshots of the given volume
44+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## ovhcloud cloud storage block attach
2+
3+
Attach the given volume to the given instance
4+
5+
```
6+
ovhcloud cloud storage block attach <volume_id> <instance_id> [flags]
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for attach
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--cloud-project string Cloud project ID
19+
-d, --debug Activate debug mode (will log all HTTP requests details)
20+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
21+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
22+
Examples:
23+
--output json
24+
--output yaml
25+
--output interactive
26+
--output 'id' (to extract a single field)
27+
--output 'nested.field.subfield' (to extract a nested field)
28+
--output '[id, "name"]' (to extract multiple fields as an array)
29+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
30+
--output 'name+","+type' (to extract and concatenate fields in a string)
31+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
32+
--profile string Use a specific profile from the configuration file
33+
```
34+
35+
### SEE ALSO
36+
37+
* [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project
38+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## ovhcloud cloud storage block backup
2+
3+
Manage volume backups in the given cloud project
4+
5+
### Options
6+
7+
```
8+
-h, --help help for backup
9+
```
10+
11+
### Options inherited from parent commands
12+
13+
```
14+
--cloud-project string Cloud project ID
15+
-d, --debug Activate debug mode (will log all HTTP requests details)
16+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
17+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
18+
Examples:
19+
--output json
20+
--output yaml
21+
--output interactive
22+
--output 'id' (to extract a single field)
23+
--output 'nested.field.subfield' (to extract a nested field)
24+
--output '[id, "name"]' (to extract multiple fields as an array)
25+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
26+
--output 'name+","+type' (to extract and concatenate fields in a string)
27+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
28+
--profile string Use a specific profile from the configuration file
29+
```
30+
31+
### SEE ALSO
32+
33+
* [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project
34+
* [ovhcloud cloud storage block backup create](ovhcloud_cloud_storage_block_backup_create.md) - Create a backup of the given volume
35+
* [ovhcloud cloud storage block backup delete](ovhcloud_cloud_storage_block_backup_delete.md) - Delete the given volume backup
36+
* [ovhcloud cloud storage block backup get](ovhcloud_cloud_storage_block_backup_get.md) - Get a specific volume backup
37+
* [ovhcloud cloud storage block backup list](ovhcloud_cloud_storage_block_backup_list.md) - List volume backups
38+
* [ovhcloud cloud storage block backup restore](ovhcloud_cloud_storage_block_backup_restore.md) - Restore a volume from the given backup
39+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## ovhcloud cloud storage block backup create
2+
3+
Create a backup of the given volume
4+
5+
```
6+
ovhcloud cloud storage block backup create <volume_id> <backup_name> [flags]
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for create
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--cloud-project string Cloud project ID
19+
-d, --debug Activate debug mode (will log all HTTP requests details)
20+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
21+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
22+
Examples:
23+
--output json
24+
--output yaml
25+
--output interactive
26+
--output 'id' (to extract a single field)
27+
--output 'nested.field.subfield' (to extract a nested field)
28+
--output '[id, "name"]' (to extract multiple fields as an array)
29+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
30+
--output 'name+","+type' (to extract and concatenate fields in a string)
31+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
32+
--profile string Use a specific profile from the configuration file
33+
```
34+
35+
### SEE ALSO
36+
37+
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
38+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## ovhcloud cloud storage block backup delete
2+
3+
Delete the given volume backup
4+
5+
```
6+
ovhcloud cloud storage block backup delete <backup_id> [flags]
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for delete
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--cloud-project string Cloud project ID
19+
-d, --debug Activate debug mode (will log all HTTP requests details)
20+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
21+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
22+
Examples:
23+
--output json
24+
--output yaml
25+
--output interactive
26+
--output 'id' (to extract a single field)
27+
--output 'nested.field.subfield' (to extract a nested field)
28+
--output '[id, "name"]' (to extract multiple fields as an array)
29+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
30+
--output 'name+","+type' (to extract and concatenate fields in a string)
31+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
32+
--profile string Use a specific profile from the configuration file
33+
```
34+
35+
### SEE ALSO
36+
37+
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
38+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## ovhcloud cloud storage block backup get
2+
3+
Get a specific volume backup
4+
5+
```
6+
ovhcloud cloud storage block backup get <backup_id> [flags]
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for get
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--cloud-project string Cloud project ID
19+
-d, --debug Activate debug mode (will log all HTTP requests details)
20+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
21+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
22+
Examples:
23+
--output json
24+
--output yaml
25+
--output interactive
26+
--output 'id' (to extract a single field)
27+
--output 'nested.field.subfield' (to extract a nested field)
28+
--output '[id, "name"]' (to extract multiple fields as an array)
29+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
30+
--output 'name+","+type' (to extract and concatenate fields in a string)
31+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
32+
--profile string Use a specific profile from the configuration file
33+
```
34+
35+
### SEE ALSO
36+
37+
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
38+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## ovhcloud cloud storage block backup list
2+
3+
List volume backups
4+
5+
```
6+
ovhcloud cloud storage block backup list [flags]
7+
```
8+
9+
### Options
10+
11+
```
12+
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax
13+
Examples:
14+
--filter 'state=="running"'
15+
--filter 'name=~"^my.*"'
16+
--filter 'nested.property.subproperty>10'
17+
--filter 'startDate>="2023-12-01"'
18+
--filter 'name=~"something" && nbField>10'
19+
-h, --help help for list
20+
```
21+
22+
### Options inherited from parent commands
23+
24+
```
25+
--cloud-project string Cloud project ID
26+
-d, --debug Activate debug mode (will log all HTTP requests details)
27+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
28+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
29+
Examples:
30+
--output json
31+
--output yaml
32+
--output interactive
33+
--output 'id' (to extract a single field)
34+
--output 'nested.field.subfield' (to extract a nested field)
35+
--output '[id, "name"]' (to extract multiple fields as an array)
36+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
37+
--output 'name+","+type' (to extract and concatenate fields in a string)
38+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
39+
--profile string Use a specific profile from the configuration file
40+
```
41+
42+
### SEE ALSO
43+
44+
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
45+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## ovhcloud cloud storage block backup restore
2+
3+
Restore a volume from the given backup
4+
5+
```
6+
ovhcloud cloud storage block backup restore <backup_id> <volume_id> [flags]
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for restore
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--cloud-project string Cloud project ID
19+
-d, --debug Activate debug mode (will log all HTTP requests details)
20+
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
21+
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
22+
Examples:
23+
--output json
24+
--output yaml
25+
--output interactive
26+
--output 'id' (to extract a single field)
27+
--output 'nested.field.subfield' (to extract a nested field)
28+
--output '[id, "name"]' (to extract multiple fields as an array)
29+
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
30+
--output 'name+","+type' (to extract and concatenate fields in a string)
31+
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
32+
--profile string Use a specific profile from the configuration file
33+
```
34+
35+
### SEE ALSO
36+
37+
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
38+

0 commit comments

Comments
 (0)