-
Notifications
You must be signed in to change notification settings - Fork 51
feat: add support for Storage Boxes #684
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
==========================================
+ Coverage 78.24% 78.53% +0.28%
==========================================
Files 55 59 +4
Lines 5039 5619 +580
==========================================
+ Hits 3943 4413 +470
- Misses 827 912 +85
- Partials 269 294 +25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
992641b to
2d340eb
Compare
ff07920 to
aa5a527
Compare
ee914b1 to
39b8d99
Compare
39b8d99 to
8c628b8
Compare
a4842c1 to
20e0a5f
Compare
jooola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do another pass when the additional changes from #745 are merged.
a00ef9f to
8a77911
Compare
Adds support for the new Hetzner API with a shallow copy of the original client. The new options `WithHetznerEndpoints` is marked as experimental for now. --------- Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
We can use the same API endpoint here, as this is a local server for testing, where we define the responses ourselves.
Reference to API docs: https://docs.hetzner.cloud/reference/hetzner#storage-box-types --------- Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
This PR adds missing schema conversion functions and makes some conversions more consistent with other resources
`hcloud.StorageBox` is part of `hcloud.StorageBoxSubaccount` and `hcloud.StorageBoxSnapshot`. Therefore, we can remove the storage box reference from the function parameters.
Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
|
ℹ️ I am currently fixing a bunch of things here. |
Done, please see #752 |
Additional fixes for the storage boxes implementation.
`ExampleStorageBoxClient_Create` and `ExampleStorageBoxClient_Create` are two examples, which can be expanded in the `func (*StorageBoxClient) [Create]` section of the https://pkg.go.dev/ docs.
Omitted the changelog reference, as there is no sensible one. I have opted for `[StorageBoxClient] is experimental`, as this puts a focus on the hcloud-go integration being experimental instead of the product.
### Storage Box API Experimental This release adds support for the [Storage Box API](https://docs.hetzner.cloud/reference/hetzner#storage-boxes). The Storage Box integration will be introduced as an **experimental** feature. This experimental phase is expected to last until **21 November 2025**. During this period, upcoming minor releases of the project may include breaking changes to features related to the Storage Box API. This release includes all changes from the recent [Storage Box API changelog](https://docs.hetzner.cloud/changelog#2025-10-21-storage-box-api-update) entry. #### Examples ```go result, _, err := client.StorageBox.Create(ctx, hcloud.StorageBoxCreateOpts{ Name: "my-storage-box", StorageBoxType: &hcloud.StorageBoxType{Name: "bx11"}, Location: &hcloud.Location{Name: "fsn1"}, Password: "my-secure-password", SSHKeys: []*hcloud.SSHKey{{ PublicKey: "ssh-rsa AAAAB3NzaC1yc2E..." }}, Labels: map[string]string{"key": "value"}, AccessSettings: &hcloud.StorageBoxCreateOptsAccessSettings{ ReachableExternally: hcloud.Ptr(true), SSHEnabled: hcloud.Ptr(true), }, }) err = client.Action.WaitFor(ctx, result.Action) ``` ### Features - retrieve a server or load balancer network attachment (#750) - add support for Storage Boxes (#684) ### Bug Fixes - deprecate `firewall_already_removed` error code (#748) - invalid property in network add_subnet request body (#751)
…8.0 (hetznercloud/fleeting-plugin-hetzner!294) This MR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/hetznercloud/hcloud-go/v2](https://github.com/hetznercloud/hcloud-go) | `v2.27.0` -> `v2.28.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>hetznercloud/hcloud-go (github.com/hetznercloud/hcloud-go/v2)</summary> ### [`v2.28.0`](https://github.com/hetznercloud/hcloud-go/blob/HEAD/CHANGELOG.md#v2280) [Compare Source](hetznercloud/hcloud-go@v2.27.0...v2.28.0) ##### Storage Box API Experimental This release adds support for the [Storage Box API](https://docs.hetzner.cloud/reference/hetzner#storage-boxes). The Storage Box integration will be introduced as an **experimental** feature. This experimental phase is expected to last until **21 November 2025**. During this period, upcoming minor releases of the project may include breaking changes to features related to the Storage Box API. This release includes all changes from the recent [Storage Box API changelog](https://docs.hetzner.cloud/changelog#2025-10-21-storage-box-api-update) entry. ##### Examples ```go result, _, err := client.StorageBox.Create(ctx, hcloud.StorageBoxCreateOpts{ Name: "my-storage-box", StorageBoxType: &hcloud.StorageBoxType{Name: "bx11"}, Location: &hcloud.Location{Name: "fsn1"}, Password: "my-secure-password", SSHKeys: []*hcloud.SSHKey{{ PublicKey: "ssh-rsa AAAAB3NzaC1yc2E..." }}, Labels: map[string]string{"key": "value"}, AccessSettings: &hcloud.StorageBoxCreateOptsAccessSettings{ ReachableExternally: hcloud.Ptr(true), SSHEnabled: hcloud.Ptr(true), }, }) err = client.Action.WaitFor(ctx, result.Action) ``` ##### Features - retrieve a server or load balancer network attachment ([#​750](hetznercloud/hcloud-go#750)) - add support for Storage Boxes ([#​684](hetznercloud/hcloud-go#684)) ##### Bug Fixes - deprecate `firewall_already_removed` error code ([#​748](hetznercloud/hcloud-go#748)) - invalid property in network add\_subnet request body ([#​751](hetznercloud/hcloud-go#751)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTYuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE1Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
We collect all changes for the Storage Box support (#675) in this PR. It will only be merged when everything is implemented through smaller pull requests targetting the
storage-boxesbranch.Closes #675