1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-03 23:51:48 +00:00

chore(deps): update dependency hcloud to v2.7.0 (#693)

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://redirect.github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [hcloud](https://redirect.github.com/hetznercloud/hcloud-python)
([changelog](https://redirect.github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md))
| `2.6.0` -> `2.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/hcloud/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/hcloud/2.6.0/2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-python (hcloud)</summary>

###
[`v2.7.0`](https://redirect.github.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#v270)

[Compare
Source](https://redirect.github.com/hetznercloud/hcloud-python/compare/v2.6.0...v2.7.0)

[Server Types](https://docs.hetzner.cloud/reference/cloud#server-types)
now depend on
[Locations](https://docs.hetzner.cloud/reference/cloud#locations).

- We added a new `locations` property to the [Server
Types](https://docs.hetzner.cloud/reference/cloud#server-types)
resource. The new property defines a list of supported
[Locations](https://docs.hetzner.cloud/reference/cloud#locations) and
additional per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
details such as deprecations information.

- We deprecated the `deprecation` property from the [Server
Types](https://docs.hetzner.cloud/reference/cloud#server-types)
resource. The property will gradually be phased out as per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
deprecations are being announced. Please use the new per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
deprecation information instead.

See our
[changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types)
for more details.

**Upgrading**

```py
```

</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 PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ansible-collections/hetzner.hcloud).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzAuMSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
renovate[bot] 2025-09-26 10:51:34 +02:00 committed by GitHub
parent 1bfdcd5e62
commit 4caf3e67f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 108 additions and 6 deletions

View file

@ -1,3 +1,3 @@
from __future__ import annotations
__version__ = "2.6.0" # x-releaser-pleaser-version
__version__ = "2.7.0" # x-releaser-pleaser-version

View file

@ -5,11 +5,12 @@ from .client import (
ServerTypesClient,
ServerTypesPageResult,
)
from .domain import ServerType
from .domain import ServerType, ServerTypeLocation
__all__ = [
"BoundServerType",
"ServerType",
"ServerTypeLocation",
"ServerTypesClient",
"ServerTypesPageResult",
]

View file

@ -3,7 +3,8 @@ from __future__ import annotations
from typing import Any, NamedTuple
from ..core import BoundModelBase, Meta, ResourceClientBase
from .domain import ServerType
from ..locations import BoundLocation
from .domain import ServerType, ServerTypeLocation
class BoundServerType(BoundModelBase, ServerType):
@ -11,6 +12,28 @@ class BoundServerType(BoundModelBase, ServerType):
model = ServerType
def __init__(
self,
client: ServerTypesClient,
data: dict,
complete: bool = True,
):
raw = data.get("locations")
if raw is not None:
data["locations"] = [
ServerTypeLocation.from_dict(
{
"location": BoundLocation(
client._parent.locations, o, complete=False
),
**o,
}
)
for o in raw
]
super().__init__(client, data, complete)
class ServerTypesPageResult(NamedTuple):
server_types: list[BoundServerType]

View file

@ -4,6 +4,7 @@ import warnings
from ..core import BaseDomain, DomainIdentityMixin
from ..deprecation import DeprecationInfo
from ..locations import BoundLocation
class ServerType(BaseDomain, DomainIdentityMixin):
@ -38,6 +39,7 @@ class ServerType(BaseDomain, DomainIdentityMixin):
deprecated. If it has a value, it is considered deprecated.
:param included_traffic: int
Free traffic per month in bytes
:param locations: Supported Location of the Server Type.
"""
__properties__ = (
@ -52,18 +54,22 @@ class ServerType(BaseDomain, DomainIdentityMixin):
"storage_type",
"cpu_type",
"architecture",
"deprecated",
"deprecation",
"locations",
)
__api_properties__ = (
*__properties__,
"deprecated",
"deprecation",
"included_traffic",
)
__slots__ = (
*__properties__,
"_deprecated",
"_deprecation",
"_included_traffic",
)
# pylint: disable=too-many-locals
def __init__(
self,
id: int | None = None,
@ -80,6 +86,7 @@ class ServerType(BaseDomain, DomainIdentityMixin):
deprecated: bool | None = None,
deprecation: dict | None = None,
included_traffic: int | None = None,
locations: list[ServerTypeLocation] | None = None,
):
self.id = id
self.name = name
@ -92,12 +99,58 @@ class ServerType(BaseDomain, DomainIdentityMixin):
self.storage_type = storage_type
self.cpu_type = cpu_type
self.architecture = architecture
self.locations = locations
self.deprecated = deprecated
self.deprecation = (
DeprecationInfo.from_dict(deprecation) if deprecation is not None else None
)
self.included_traffic = included_traffic
@property
def deprecated(self) -> bool | None:
"""
.. deprecated:: 2.6.0
The 'deprecated' property is deprecated and will gradually be phased starting 24 September 2025.
Please refer to the '.locations[].deprecation' property instead.
See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types.
"""
warnings.warn(
"The 'deprecated' property is deprecated and will gradually be phased starting 24 September 2025. "
"Please refer to the '.locations[].deprecation' property instead. "
"See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types",
DeprecationWarning,
stacklevel=2,
)
return self._deprecated
@deprecated.setter
def deprecated(self, value: bool | None) -> None:
self._deprecated = value
@property
def deprecation(self) -> DeprecationInfo | None:
"""
.. deprecated:: 2.6.0
The 'deprecation' property is deprecated and will gradually be phased starting 24 September 2025.
Please refer to the '.locations[].deprecation' property instead.
See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types.
"""
warnings.warn(
"The 'deprecation' property is deprecated and will gradually be phased starting 24 September 2025. "
"Please refer to the '.locations[].deprecation' property instead. "
"See https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types",
DeprecationWarning,
stacklevel=2,
)
return self._deprecation
@deprecation.setter
def deprecation(self, value: DeprecationInfo | None) -> None:
self._deprecation = value
@property
def included_traffic(self) -> int | None:
"""
@ -119,3 +172,28 @@ class ServerType(BaseDomain, DomainIdentityMixin):
@included_traffic.setter
def included_traffic(self, value: int | None) -> None:
self._included_traffic = value
class ServerTypeLocation(BaseDomain):
"""Server Type Location Domain
:param location: Location of the Server Type.
:param deprecation: Wether the Server Type is deprecated in this Location.
"""
__api_properties__ = (
"location",
"deprecation",
)
__slots__ = __api_properties__
def __init__(
self,
*,
location: BoundLocation,
deprecation: dict | None,
):
self.location = location
self.deprecation = (
DeprecationInfo.from_dict(deprecation) if deprecation is not None else None
)

View file

@ -22,7 +22,7 @@ from textwrap import dedent
logger = logging.getLogger("vendor")
HCLOUD_SOURCE_URL = "https://github.com/hetznercloud/hcloud-python"
HCLOUD_VERSION = "v2.6.0"
HCLOUD_VERSION = "v2.7.0"
HCLOUD_VENDOR_PATH = "plugins/module_utils/vendor/hcloud"