@@ -154,7 +154,8 @@ def get_list(self,
154154 sort = None , # type: Optional[List[str]]
155155 page = None , # type: Optional[int]
156156 per_page = None , # type: Optional[int]
157- status = None # type: Optional[List[str]]
157+ status = None , # type: Optional[List[str]]
158+ include_deprecated = None # type: Optional[bool]
158159 ):
159160 # type: (...) -> PageResults[List[BoundImage]]
160161 """Get all images
@@ -171,6 +172,8 @@ def get_list(self,
171172 Can be used to filter images by their status. The response will only contain images matching the status.
172173 :param sort: List[str] (optional)
173174 Choices: id id:asc id:desc name name:asc name:desc created created:asc created:desc
175+ :param include_deprecated: bool (optional)
176+ Include deprecated images in the response. Default: False
174177 :param page: int (optional)
175178 Specifies the page to fetch
176179 :param per_page: int (optional)
@@ -194,7 +197,8 @@ def get_list(self,
194197 params ['per_page' ] = per_page
195198 if status is not None :
196199 params ['status' ] = per_page
197-
200+ if include_deprecated is not None :
201+ params ['include_deprecated' ] = include_deprecated
198202 response = self ._client .request (url = "/images" , method = "GET" , params = params )
199203 images = [BoundImage (self , image_data ) for image_data in response ['images' ]]
200204
@@ -207,6 +211,7 @@ def get_all(self,
207211 type = None , # type: Optional[List[str]]
208212 sort = None , # type: Optional[List[str]]
209213 status = None , # type: Optional[List[str]]
214+ include_deprecated = None # type: Optional[bool]
210215 ):
211216 # type: (...) -> List[BoundImage]
212217 """Get all images
@@ -223,9 +228,11 @@ def get_all(self,
223228 Can be used to filter images by their status. The response will only contain images matching the status.
224229 :param sort: List[str] (optional)
225230 Choices: id name created (You can add one of ":asc", ":desc" to modify sort order. ( ":asc" is default))
231+ :param include_deprecated: bool (optional)
232+ Include deprecated images in the response. Default: False
226233 :return: List[:class:`BoundImage <hcloud.images.client.BoundImage>`]
227234 """
228- return super (ImagesClient , self ).get_all (name = name , label_selector = label_selector , bound_to = bound_to , type = type , sort = sort , status = status )
235+ return super (ImagesClient , self ).get_all (name = name , label_selector = label_selector , bound_to = bound_to , type = type , sort = sort , status = status , include_deprecated = include_deprecated )
229236
230237 def get_by_name (self , name ):
231238 # type: (str) -> BoundImage
0 commit comments