Skip to content

Commit

Permalink
feat: add include_deprecated argument in images get_by_name_and_archi…
Browse files Browse the repository at this point in the history
…tecture method
  • Loading branch information
jooola committed Apr 2, 2024
1 parent 2e9c5fc commit 4593014
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hcloud/images/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,23 @@ def get_by_name_and_architecture(
self,
name: str,
architecture: str,
include_deprecated: bool | None = None,
) -> BoundImage | None:
"""Get image by name
:param name: str
Used to identify the image.
:param architecture: str
Used to identify the image.
:param include_deprecated: bool (optional)
Include deprecated images. Default: False
:return: :class:`BoundImage <hcloud.images.client.BoundImage>`
"""
return self._get_first_by(name=name, architecture=[architecture])
return self._get_first_by(
name=name,
architecture=[architecture],
include_deprecated=include_deprecated,
)

def update(
self,
Expand Down

0 comments on commit 4593014

Please sign in to comment.