Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: local
hooks:
- id: generate-docs
name: Generate CLI documentation
entry: make doc
language: system
pass_filenames: false
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ schemas:
curl -s "https://eu.api.ovh.com/v1/$(UNIVERSE).json?format=openapi3" | jq 'del(.paths[] | .[]["x-code-samples"])' > "$$tmp" && \
mv "$$tmp" internal/assets/api-schemas/$(UNIVERSE).json

.PHONY: all wasm doc schemas
setup:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/latest/download/prek-installer.sh | sh
prek install

.PHONY: all wasm doc schemas setup
5 changes: 1 addition & 4 deletions doc/ovhcloud_cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, O
* [ovhcloud cloud region](ovhcloud_cloud_region.md) - Check regions in the given cloud project
* [ovhcloud cloud savings-plan](ovhcloud_cloud_savings-plan.md) - Manage savings plans for your cloud project
* [ovhcloud cloud ssh-key](ovhcloud_cloud_ssh-key.md) - Manage SSH keys in the given cloud project
* [ovhcloud cloud storage-block](ovhcloud_cloud_storage-block.md) - Manage block storage volumes in the given cloud project
* [ovhcloud cloud storage-file](ovhcloud_cloud_storage-file.md) - Manage file storage shares in the given cloud project
* [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.)
* [ovhcloud cloud storage-swift](ovhcloud_cloud_storage-swift.md) - Manage SWIFT storage containers in the given cloud project
* [ovhcloud cloud storage](ovhcloud_cloud_storage.md) - Manage storage services in the given cloud project
* [ovhcloud cloud user](ovhcloud_cloud_user.md) - Manage users in the given cloud project

37 changes: 37 additions & 0 deletions doc/ovhcloud_cloud_storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## ovhcloud cloud storage

Manage storage services in the given cloud project

### Options

```
-h, --help help for storage
```

### Options inherited from parent commands

```
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud](ovhcloud_cloud.md) - Manage your projects and services in the Public Cloud universe (MKS, MPR, MRS, Object Storage...)
* [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project
* [ovhcloud cloud storage file](ovhcloud_cloud_storage_file.md) - Manage file storage shares in the given cloud project
* [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.)
* [ovhcloud cloud storage swift](ovhcloud_cloud_storage_swift.md) - Manage SWIFT storage containers in the given cloud project

44 changes: 44 additions & 0 deletions doc/ovhcloud_cloud_storage_block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## ovhcloud cloud storage block

Manage block storage volumes in the given cloud project

### Options

```
--cloud-project string Cloud project ID
-h, --help help for block
```

### Options inherited from parent commands

```
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage](ovhcloud_cloud_storage.md) - Manage storage services in the given cloud project
* [ovhcloud cloud storage block attach](ovhcloud_cloud_storage_block_attach.md) - Attach the given volume to the given instance
* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project
* [ovhcloud cloud storage block create](ovhcloud_cloud_storage_block_create.md) - Create a new volume
* [ovhcloud cloud storage block create-from-backup](ovhcloud_cloud_storage_block_create-from-backup.md) - Create a volume from the given backup
* [ovhcloud cloud storage block delete](ovhcloud_cloud_storage_block_delete.md) - Delete the given volume
* [ovhcloud cloud storage block detach](ovhcloud_cloud_storage_block_detach.md) - Detach the given volume from the given instance
* [ovhcloud cloud storage block edit](ovhcloud_cloud_storage_block_edit.md) - Edit the given volume
* [ovhcloud cloud storage block get](ovhcloud_cloud_storage_block_get.md) - Get a specific volume
* [ovhcloud cloud storage block list](ovhcloud_cloud_storage_block_list.md) - List volumes
* [ovhcloud cloud storage block snapshot](ovhcloud_cloud_storage_block_snapshot.md) - Manage snapshots of the given volume

38 changes: 38 additions & 0 deletions doc/ovhcloud_cloud_storage_block_attach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ovhcloud cloud storage block attach

Attach the given volume to the given instance

```
ovhcloud cloud storage block attach <volume_id> <instance_id> [flags]
```

### Options

```
-h, --help help for attach
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project

39 changes: 39 additions & 0 deletions doc/ovhcloud_cloud_storage_block_backup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## ovhcloud cloud storage block backup

Manage volume backups in the given cloud project

### Options

```
-h, --help help for backup
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block](ovhcloud_cloud_storage_block.md) - Manage block storage volumes in the given cloud project
* [ovhcloud cloud storage block backup create](ovhcloud_cloud_storage_block_backup_create.md) - Create a backup of the given volume
* [ovhcloud cloud storage block backup delete](ovhcloud_cloud_storage_block_backup_delete.md) - Delete the given volume backup
* [ovhcloud cloud storage block backup get](ovhcloud_cloud_storage_block_backup_get.md) - Get a specific volume backup
* [ovhcloud cloud storage block backup list](ovhcloud_cloud_storage_block_backup_list.md) - List volume backups
* [ovhcloud cloud storage block backup restore](ovhcloud_cloud_storage_block_backup_restore.md) - Restore a volume from the given backup

38 changes: 38 additions & 0 deletions doc/ovhcloud_cloud_storage_block_backup_create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ovhcloud cloud storage block backup create

Create a backup of the given volume

```
ovhcloud cloud storage block backup create <volume_id> <backup_name> [flags]
```

### Options

```
-h, --help help for create
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project

38 changes: 38 additions & 0 deletions doc/ovhcloud_cloud_storage_block_backup_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ovhcloud cloud storage block backup delete

Delete the given volume backup

```
ovhcloud cloud storage block backup delete <backup_id> [flags]
```

### Options

```
-h, --help help for delete
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project

38 changes: 38 additions & 0 deletions doc/ovhcloud_cloud_storage_block_backup_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ovhcloud cloud storage block backup get

Get a specific volume backup

```
ovhcloud cloud storage block backup get <backup_id> [flags]
```

### Options

```
-h, --help help for get
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project

45 changes: 45 additions & 0 deletions doc/ovhcloud_cloud_storage_block_backup_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## ovhcloud cloud storage block backup list

List volume backups

```
ovhcloud cloud storage block backup list [flags]
```

### Options

```
--filter stringArray Filter results by any property using https://github.com/PaesslerAG/gval syntax
Examples:
--filter 'state=="running"'
--filter 'name=~"^my.*"'
--filter 'nested.property.subproperty>10'
--filter 'startDate>="2023-12-01"'
--filter 'name=~"something" && nbField>10'
-h, --help help for list
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project

38 changes: 38 additions & 0 deletions doc/ovhcloud_cloud_storage_block_backup_restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## ovhcloud cloud storage block backup restore

Restore a volume from the given backup

```
ovhcloud cloud storage block backup restore <backup_id> <volume_id> [flags]
```

### Options

```
-h, --help help for restore
```

### Options inherited from parent commands

```
--cloud-project string Cloud project ID
-d, --debug Activate debug mode (will log all HTTP requests details)
-e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution
-o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax)
Examples:
--output json
--output yaml
--output interactive
--output 'id' (to extract a single field)
--output 'nested.field.subfield' (to extract a nested field)
--output '[id, "name"]' (to extract multiple fields as an array)
--output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object)
--output 'name+","+type' (to extract and concatenate fields in a string)
--output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields)
--profile string Use a specific profile from the configuration file
```

### SEE ALSO

* [ovhcloud cloud storage block backup](ovhcloud_cloud_storage_block_backup.md) - Manage volume backups in the given cloud project

Loading
Loading