Skip to content

Comments

feat: retrieve a server or load balancer network attachment#750

Merged
jooola merged 2 commits intomainfrom
server-private-network
Oct 15, 2025
Merged

feat: retrieve a server or load balancer network attachment#750
jooola merged 2 commits intomainfrom
server-private-network

Conversation

@jooola
Copy link
Member

@jooola jooola commented Oct 15, 2025

Adds the (&Server{}).PrivateNetFor(&Network{}) and (&LoadBalancer{}).PrivateNetFor(&Network{}) methods to retrieve the private network attachment information.

@codecov
Copy link

codecov bot commented Oct 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.38%. Comparing base (9b89d96) to head (8aa5847).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #750      +/-   ##
==========================================
+ Coverage   78.27%   78.38%   +0.10%     
==========================================
  Files          55       55              
  Lines        5023     5039      +16     
==========================================
+ Hits         3932     3950      +18     
+ Misses        824      822       -2     
  Partials      267      267              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds the `(&Server{}).PrivateNetFor(&Network{})` and `(&LoadBalancer{}).PrivateNetFor(&Network{})` methods to retrieve the private network assignation information.
@jooola jooola force-pushed the server-private-network branch from 1b91c37 to f035730 Compare October 15, 2025 14:00
@jooola jooola changed the title feat: add method to retrieve a server network assignation feat: retrieve a server or load balancer network assignation Oct 15, 2025
@jooola jooola marked this pull request as ready for review October 15, 2025 14:02
@jooola jooola requested a review from a team as a code owner October 15, 2025 14:02
@apricote apricote changed the title feat: retrieve a server or load balancer network assignation feat: retrieve a server or load balancer network assignment Oct 15, 2025
Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine 👍

@jooola jooola changed the title feat: retrieve a server or load balancer network assignment feat: retrieve a server or load balancer network attachment Oct 15, 2025
@jooola jooola merged commit 9da946b into main Oct 15, 2025
4 of 5 checks passed
@jooola jooola deleted the server-private-network branch October 15, 2025 15:38
lukasmetzner pushed a commit that referenced this pull request Oct 21, 2025
### 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)
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Oct 21, 2025
…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` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fhetznercloud%2fhcloud-go%2fv2/v2.27.0/v2.28.0?slim=true)](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 ([#&#8203;750](hetznercloud/hcloud-go#750))
- add support for Storage Boxes ([#&#8203;684](hetznercloud/hcloud-go#684))

##### Bug Fixes

- deprecate `firewall_already_removed` error code ([#&#8203;748](hetznercloud/hcloud-go#748))
- invalid property in network add\_subnet request body ([#&#8203;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-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants