Skip to content

Commit 638a3ff

Browse files
phm07lukasmetzner
andcommitted
feat(storage-box): implement CRUD operations (#1143)
This PR implements the CRUD (create, read, update, delete) operations for Storage Boxes. --------- Co-authored-by: lukasmetzner <[email protected]>
1 parent 61b6bae commit 638a3ff

33 files changed

+2381
-0
lines changed

docs/reference/manual/hcloud.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ A command-line interface for Hetzner Cloud
4242
* [hcloud server](hcloud_server.md) - Manage Servers
4343
* [hcloud server-type](hcloud_server-type.md) - View Server Types
4444
* [hcloud ssh-key](hcloud_ssh-key.md) - Manage SSH Keys
45+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
4546
* [hcloud storage-box-type](hcloud_storage-box-type.md) - View Storage Box Types
4647
* [hcloud version](hcloud_version.md) - Print version information
4748
* [hcloud volume](hcloud_volume.md) - Manage Volumes
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## hcloud storage-box
2+
3+
Manage Storage Boxes
4+
5+
### Options
6+
7+
```
8+
-h, --help help for storage-box
9+
```
10+
11+
### Options inherited from parent commands
12+
13+
```
14+
--config string Config file path (default "~/.config/hcloud/cli.toml")
15+
--context string Currently active context
16+
--debug Enable debug output
17+
--debug-file string File to write debug output to
18+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
19+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
20+
--no-experimental-warnings If true, experimental warnings are not shown
21+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
22+
--quiet If true, only print error messages
23+
```
24+
25+
### SEE ALSO
26+
27+
* [hcloud](hcloud.md) - Hetzner Cloud CLI
28+
* [hcloud storage-box add-label](hcloud_storage-box_add-label.md) - Add a label to a Storage Box
29+
* [hcloud storage-box create](hcloud_storage-box_create.md) - Create a new Storage Box
30+
* [hcloud storage-box delete](hcloud_storage-box_delete.md) - Delete a Storage Box
31+
* [hcloud storage-box describe](hcloud_storage-box_describe.md) - Describe a Storage Box
32+
* [hcloud storage-box folders](hcloud_storage-box_folders.md) - List folders of a Storage Box
33+
* [hcloud storage-box list](hcloud_storage-box_list.md) - List Storage Boxes
34+
* [hcloud storage-box remove-label](hcloud_storage-box_remove-label.md) - Remove a label from a Storage Box
35+
* [hcloud storage-box update](hcloud_storage-box_update.md) - Update a Storage Box
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hcloud storage-box add-label
2+
3+
Add a label to a Storage Box
4+
5+
```
6+
hcloud storage-box add-label [--overwrite] <storage-box> <label>...
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for add-label
13+
-o, --overwrite Overwrite label if it exists already (true, false)
14+
```
15+
16+
### Options inherited from parent commands
17+
18+
```
19+
--config string Config file path (default "~/.config/hcloud/cli.toml")
20+
--context string Currently active context
21+
--debug Enable debug output
22+
--debug-file string File to write debug output to
23+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
24+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
25+
--no-experimental-warnings If true, experimental warnings are not shown
26+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
27+
--quiet If true, only print error messages
28+
```
29+
30+
### SEE ALSO
31+
32+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## hcloud storage-box create
2+
3+
Create a new Storage Box
4+
5+
```
6+
hcloud storage-box create [options] --name <name> --type <type> --location <location> --password <password>
7+
```
8+
9+
### Options
10+
11+
```
12+
--enable-protection strings Enable protection (delete) (default: none)
13+
--enable-samba Whether the Samba subsystem should be enabled
14+
--enable-ssh Whether the SSH subsystem should be enabled
15+
--enable-webdav Whether the WebDAV subsystem should be enabled
16+
--enable-zfs Whether the ZFS Snapshot folder should be visible
17+
-h, --help help for create
18+
--label stringToString User-defined labels ('key=value') (can be specified multiple times) (default [])
19+
--location string Location (ID or name) (required)
20+
--name string Storage Box name (required)
21+
-o, --output stringArray output options: json|yaml
22+
--password string The password that will be set for this Storage Box (required)
23+
--reachable-externally Whether the Storage Box should be accessible from outside the Hetzner network
24+
--ssh-key stringArray SSH public keys in OpenSSH format or as the ID or name of an existing SSH key
25+
--type string Storage Box Type (ID or name) (required)
26+
```
27+
28+
### Options inherited from parent commands
29+
30+
```
31+
--config string Config file path (default "~/.config/hcloud/cli.toml")
32+
--context string Currently active context
33+
--debug Enable debug output
34+
--debug-file string File to write debug output to
35+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
36+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
37+
--no-experimental-warnings If true, experimental warnings are not shown
38+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
39+
--quiet If true, only print error messages
40+
```
41+
42+
### SEE ALSO
43+
44+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## hcloud storage-box delete
2+
3+
Delete a Storage Box
4+
5+
```
6+
hcloud storage-box delete <storage-box>...
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for delete
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--config string Config file path (default "~/.config/hcloud/cli.toml")
19+
--context string Currently active context
20+
--debug Enable debug output
21+
--debug-file string File to write debug output to
22+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
23+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
24+
--no-experimental-warnings If true, experimental warnings are not shown
25+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
26+
--quiet If true, only print error messages
27+
```
28+
29+
### SEE ALSO
30+
31+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hcloud storage-box describe
2+
3+
Describe a Storage Box
4+
5+
```
6+
hcloud storage-box describe [options] <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for describe
13+
-o, --output stringArray output options: json|yaml|format
14+
```
15+
16+
### Options inherited from parent commands
17+
18+
```
19+
--config string Config file path (default "~/.config/hcloud/cli.toml")
20+
--context string Currently active context
21+
--debug Enable debug output
22+
--debug-file string File to write debug output to
23+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
24+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
25+
--no-experimental-warnings If true, experimental warnings are not shown
26+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
27+
--quiet If true, only print error messages
28+
```
29+
30+
### SEE ALSO
31+
32+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## hcloud storage-box folders
2+
3+
List folders of a Storage Box
4+
5+
```
6+
hcloud storage-box folders <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for folders
13+
-o, --output stringArray output options: json|yaml
14+
--path string Relative path for which the listing is to be made
15+
```
16+
17+
### Options inherited from parent commands
18+
19+
```
20+
--config string Config file path (default "~/.config/hcloud/cli.toml")
21+
--context string Currently active context
22+
--debug Enable debug output
23+
--debug-file string File to write debug output to
24+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
25+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
26+
--no-experimental-warnings If true, experimental warnings are not shown
27+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
28+
--quiet If true, only print error messages
29+
```
30+
31+
### SEE ALSO
32+
33+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## hcloud storage-box list
2+
3+
List Storage Boxes
4+
5+
### Synopsis
6+
7+
Displays a list of Storage Boxes.
8+
9+
Output can be controlled with the -o flag. Use -o noheader to suppress the
10+
table header. Displayed columns and their order can be set with
11+
-o columns=age,created (see available columns below).
12+
13+
Columns:
14+
- age
15+
- created
16+
- id
17+
- labels
18+
- location
19+
- name
20+
- server
21+
- size
22+
- status
23+
- system
24+
- type
25+
- username
26+
27+
```
28+
hcloud storage-box list [options]
29+
```
30+
31+
### Options
32+
33+
```
34+
-h, --help help for list
35+
-o, --output stringArray output options: noheader|columns=...|json|yaml
36+
-l, --selector string Selector to filter by labels
37+
-s, --sort strings Determine the sorting of the result
38+
```
39+
40+
### Options inherited from parent commands
41+
42+
```
43+
--config string Config file path (default "~/.config/hcloud/cli.toml")
44+
--context string Currently active context
45+
--debug Enable debug output
46+
--debug-file string File to write debug output to
47+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
48+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
49+
--no-experimental-warnings If true, experimental warnings are not shown
50+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
51+
--quiet If true, only print error messages
52+
```
53+
54+
### SEE ALSO
55+
56+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hcloud storage-box remove-label
2+
3+
Remove a label from a Storage Box
4+
5+
```
6+
hcloud storage-box remove-label <storage-box> (--all | <label>...)
7+
```
8+
9+
### Options
10+
11+
```
12+
-a, --all Remove all labels
13+
-h, --help help for remove-label
14+
```
15+
16+
### Options inherited from parent commands
17+
18+
```
19+
--config string Config file path (default "~/.config/hcloud/cli.toml")
20+
--context string Currently active context
21+
--debug Enable debug output
22+
--debug-file string File to write debug output to
23+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
24+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
25+
--no-experimental-warnings If true, experimental warnings are not shown
26+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
27+
--quiet If true, only print error messages
28+
```
29+
30+
### SEE ALSO
31+
32+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## hcloud storage-box update
2+
3+
Update a Storage Box
4+
5+
```
6+
hcloud storage-box update [options] <storage-box>
7+
```
8+
9+
### Options
10+
11+
```
12+
-h, --help help for update
13+
--name string Storage Box name
14+
```
15+
16+
### Options inherited from parent commands
17+
18+
```
19+
--config string Config file path (default "~/.config/hcloud/cli.toml")
20+
--context string Currently active context
21+
--debug Enable debug output
22+
--debug-file string File to write debug output to
23+
--endpoint string Hetzner Cloud API endpoint (default "https://api.hetzner.cloud/v1")
24+
--hetzner-endpoint string Hetzner API endpoint (default "https://api.hetzner.com/v1")
25+
--no-experimental-warnings If true, experimental warnings are not shown
26+
--poll-interval duration Interval at which to poll information, for example action progress (default 500ms)
27+
--quiet If true, only print error messages
28+
```
29+
30+
### SEE ALSO
31+
32+
* [hcloud storage-box](hcloud_storage-box.md) - Manage Storage Boxes

0 commit comments

Comments
 (0)