mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
chore(deps): update dependency hcloud to v2.5.3 (#649)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [hcloud](https://redirect.github.com/hetznercloud/hcloud-python) ([changelog](https://redirect.github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md)) | `2.5.2` -> `2.5.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>hetznercloud/hcloud-python (hcloud)</summary> ### [`v2.5.3`](https://redirect.github.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#v253) [Compare Source](https://redirect.github.com/hetznercloud/hcloud-python/compare/v2.5.2...v2.5.3) ##### Bug Fixes - invalid placement group id casting ([#​501](https://redirect.github.com/hetznercloud/hcloud-python/issues/501)) - handle string id when checking has_id_or_name ([#​504](https://redirect.github.com/hetznercloud/hcloud-python/issues/504)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, 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:eyJjcmVhdGVkSW5WZXIiOiI0MC40OC41IiwidXBkYXRlZEluVmVyIjoiNDAuNDguNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: jo <ljonas@riseup.net>
This commit is contained in:
parent
d75b408830
commit
ba0a419db3
4 changed files with 15 additions and 8 deletions
|
|
@ -1,3 +1,3 @@
|
|||
from __future__ import annotations
|
||||
|
||||
__version__ = "2.5.2" # x-releaser-pleaser-version
|
||||
__version__ = "2.5.3" # x-releaser-pleaser-version
|
||||
|
|
|
|||
|
|
@ -52,15 +52,22 @@ class DomainIdentityMixin:
|
|||
the comparison will not work as expected (e.g. the domains are the same but
|
||||
cannot be equal, if one provides an id and the other the name).
|
||||
"""
|
||||
values: list[int | str] = []
|
||||
result = None
|
||||
|
||||
if self.id is not None:
|
||||
values.append(self.id)
|
||||
value = id_or_name
|
||||
if isinstance(id_or_name, str) and id_or_name.isnumeric():
|
||||
value = int(id_or_name)
|
||||
|
||||
result = result or self.id == value
|
||||
|
||||
if self.name is not None:
|
||||
values.append(self.name)
|
||||
if not values:
|
||||
result = result or self.name == str(id_or_name)
|
||||
|
||||
if result is None:
|
||||
raise ValueError("id or name must be set")
|
||||
|
||||
return id_or_name in values
|
||||
return result
|
||||
|
||||
|
||||
class Pagination(BaseDomain):
|
||||
|
|
|
|||
|
|
@ -1230,7 +1230,7 @@ class ServersClient(ClientEntityBase):
|
|||
:param placement_group: :class:`BoundPlacementGroup <hcloud.placement_groups.client.BoundPlacementGroup>` or :class:`Network <hcloud.placement_groups.domain.PlacementGroup>`
|
||||
:return: :class:`BoundAction <hcloud.actions.client.BoundAction>`
|
||||
"""
|
||||
data: dict[str, Any] = {"placement_group": str(placement_group.id)}
|
||||
data: dict[str, Any] = {"placement_group": placement_group.id}
|
||||
response = self._client.request(
|
||||
url=f"/servers/{server.id}/actions/add_to_placement_group",
|
||||
method="POST",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue