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.6.0 (#686)
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.5.4` -> `2.6.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>hetznercloud/hcloud-python (hcloud)</summary> ### [`v2.6.0`](https://redirect.github.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#v260) [Compare Source](https://redirect.github.com/hetznercloud/hcloud-python/compare/v2.5.4...v2.6.0) ##### Features - add category property to server type ([#​549](https://redirect.github.com/hetznercloud/hcloud-python/issues/549)) ##### Bug Fixes - rename `ClientEntityBase` to `ResourceClientBase` ([#​532](https://redirect.github.com/hetznercloud/hcloud-python/issues/532)) </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:eyJjcmVhdGVkSW5WZXIiOiI0MS45MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuOTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> --------- 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
f2983603af
commit
923057c7b6
24 changed files with 451 additions and 411 deletions
|
|
@ -1,13 +1,10 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any, NamedTuple
|
||||
from typing import Any, NamedTuple
|
||||
|
||||
from ..core import BoundModelBase, ClientEntityBase, Meta
|
||||
from ..core import BoundModelBase, Meta, ResourceClientBase
|
||||
from .domain import Iso
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .._client import Client
|
||||
|
||||
|
||||
class BoundIso(BoundModelBase, Iso):
|
||||
_client: IsosClient
|
||||
|
|
@ -20,8 +17,8 @@ class IsosPageResult(NamedTuple):
|
|||
meta: Meta
|
||||
|
||||
|
||||
class IsosClient(ClientEntityBase):
|
||||
_client: Client
|
||||
class IsosClient(ResourceClientBase):
|
||||
_base_url = "/isos"
|
||||
|
||||
def get_by_id(self, id: int) -> BoundIso:
|
||||
"""Get a specific ISO by its id
|
||||
|
|
@ -29,7 +26,7 @@ class IsosClient(ClientEntityBase):
|
|||
:param id: int
|
||||
:return: :class:`BoundIso <hcloud.isos.client.BoundIso>`
|
||||
"""
|
||||
response = self._client.request(url=f"/isos/{id}", method="GET")
|
||||
response = self._client.request(url=f"{self._base_url}/{id}", method="GET")
|
||||
return BoundIso(self, response["iso"])
|
||||
|
||||
def get_list(
|
||||
|
|
@ -67,7 +64,7 @@ class IsosClient(ClientEntityBase):
|
|||
if per_page is not None:
|
||||
params["per_page"] = per_page
|
||||
|
||||
response = self._client.request(url="/isos", method="GET", params=params)
|
||||
response = self._client.request(url=self._base_url, method="GET", params=params)
|
||||
isos = [BoundIso(self, iso_data) for iso_data in response["isos"]]
|
||||
return IsosPageResult(isos, Meta.parse_meta(response))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue