Skip to content

fix(marketplace): order local images by type by default #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions scaleway-async/scaleway_async/marketplace/v2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,29 +269,29 @@ async def get_version(
async def list_local_images(
self,
*,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
order_by: Optional[ListLocalImagesRequestOrderBy] = None,
image_label: Optional[str] = None,
zone: Optional[Zone] = None,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
image_label: Optional[str] = None,
type_: Optional[LocalImageType] = None,
) -> ListLocalImagesResponse:
"""
List local images from a specific image or version.
List information about local images in a specific Availability Zone, specified by its `image_id` (UUID format), `version_id` (UUID format) or `image_label`. Only one of these three parameters may be set.
:param image_id:
:param page_size: A positive integer lower or equal to 100 to select the number of items to display.
:param page: A positive integer to choose the page to display.
:param order_by: Ordering to use.
:param zone: Filter local images available on this Availability Zone.
:param image_id: Filter by image id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param version_id:
:param version_id: Filter by version id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param page_size:
:param page:
:param order_by:
:param image_label:
:param image_label: Filter by image label.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param zone: Zone to target. If none is passed will use default zone from the config.
:param type_:
:param type_: Filter by type.
:return: :class:`ListLocalImagesResponse <ListLocalImagesResponse>`

Usage:
Expand Down Expand Up @@ -325,29 +325,29 @@ async def list_local_images(
async def list_local_images_all(
self,
*,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
order_by: Optional[ListLocalImagesRequestOrderBy] = None,
image_label: Optional[str] = None,
zone: Optional[Zone] = None,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
image_label: Optional[str] = None,
type_: Optional[LocalImageType] = None,
) -> List[LocalImage]:
"""
List local images from a specific image or version.
List information about local images in a specific Availability Zone, specified by its `image_id` (UUID format), `version_id` (UUID format) or `image_label`. Only one of these three parameters may be set.
:param image_id:
:param page_size: A positive integer lower or equal to 100 to select the number of items to display.
:param page: A positive integer to choose the page to display.
:param order_by: Ordering to use.
:param zone: Filter local images available on this Availability Zone.
:param image_id: Filter by image id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param version_id:
:param version_id: Filter by version id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param page_size:
:param page:
:param order_by:
:param image_label:
:param image_label: Filter by image label.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param zone: Zone to target. If none is passed will use default zone from the config.
:param type_:
:param type_: Filter by type.
:return: :class:`List[LocalImage] <List[LocalImage]>`

Usage:
Expand Down
16 changes: 15 additions & 1 deletion scaleway-async/scaleway_async/marketplace/v2/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __str__(self) -> str:


class ListLocalImagesRequestOrderBy(str, Enum, metaclass=StrEnumMeta):
TYPE_ASC = "type_asc"
TYPE_DESC = "type_desc"
CREATED_AT_ASC = "created_at_asc"
CREATED_AT_DESC = "created_at_desc"

Expand Down Expand Up @@ -250,17 +252,29 @@ class ListImagesResponse:
@dataclass
class ListLocalImagesRequest:
page_size: Optional[int]
"""
A positive integer lower or equal to 100 to select the number of items to display.
"""

page: Optional[int]
"""
A positive integer to choose the page to display.
"""

order_by: Optional[ListLocalImagesRequestOrderBy]
"""
Ordering to use.
"""

zone: Optional[Zone]
"""
Zone to target. If none is passed will use default zone from the config.
Filter local images available on this Availability Zone.
"""

type_: Optional[LocalImageType]
"""
Filter by type.
"""

image_id: Optional[str]

Expand Down
44 changes: 22 additions & 22 deletions scaleway/scaleway/marketplace/v2/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,29 +269,29 @@ def get_version(
def list_local_images(
self,
*,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
order_by: Optional[ListLocalImagesRequestOrderBy] = None,
image_label: Optional[str] = None,
zone: Optional[Zone] = None,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
image_label: Optional[str] = None,
type_: Optional[LocalImageType] = None,
) -> ListLocalImagesResponse:
"""
List local images from a specific image or version.
List information about local images in a specific Availability Zone, specified by its `image_id` (UUID format), `version_id` (UUID format) or `image_label`. Only one of these three parameters may be set.
:param image_id:
:param page_size: A positive integer lower or equal to 100 to select the number of items to display.
:param page: A positive integer to choose the page to display.
:param order_by: Ordering to use.
:param zone: Filter local images available on this Availability Zone.
:param image_id: Filter by image id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param version_id:
:param version_id: Filter by version id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param page_size:
:param page:
:param order_by:
:param image_label:
:param image_label: Filter by image label.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param zone: Zone to target. If none is passed will use default zone from the config.
:param type_:
:param type_: Filter by type.
:return: :class:`ListLocalImagesResponse <ListLocalImagesResponse>`

Usage:
Expand Down Expand Up @@ -325,29 +325,29 @@ def list_local_images(
def list_local_images_all(
self,
*,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
page_size: Optional[int] = None,
page: Optional[int] = None,
order_by: Optional[ListLocalImagesRequestOrderBy] = None,
image_label: Optional[str] = None,
zone: Optional[Zone] = None,
image_id: Optional[str] = None,
version_id: Optional[str] = None,
image_label: Optional[str] = None,
type_: Optional[LocalImageType] = None,
) -> List[LocalImage]:
"""
List local images from a specific image or version.
List information about local images in a specific Availability Zone, specified by its `image_id` (UUID format), `version_id` (UUID format) or `image_label`. Only one of these three parameters may be set.
:param image_id:
:param page_size: A positive integer lower or equal to 100 to select the number of items to display.
:param page: A positive integer to choose the page to display.
:param order_by: Ordering to use.
:param zone: Filter local images available on this Availability Zone.
:param image_id: Filter by image id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param version_id:
:param version_id: Filter by version id.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param page_size:
:param page:
:param order_by:
:param image_label:
:param image_label: Filter by image label.
One-Of ('scope'): at most one of 'image_id', 'version_id', 'image_label' could be set.
:param zone: Zone to target. If none is passed will use default zone from the config.
:param type_:
:param type_: Filter by type.
:return: :class:`List[LocalImage] <List[LocalImage]>`

Usage:
Expand Down
16 changes: 15 additions & 1 deletion scaleway/scaleway/marketplace/v2/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __str__(self) -> str:


class ListLocalImagesRequestOrderBy(str, Enum, metaclass=StrEnumMeta):
TYPE_ASC = "type_asc"
TYPE_DESC = "type_desc"
CREATED_AT_ASC = "created_at_asc"
CREATED_AT_DESC = "created_at_desc"

Expand Down Expand Up @@ -250,17 +252,29 @@ class ListImagesResponse:
@dataclass
class ListLocalImagesRequest:
page_size: Optional[int]
"""
A positive integer lower or equal to 100 to select the number of items to display.
"""

page: Optional[int]
"""
A positive integer to choose the page to display.
"""

order_by: Optional[ListLocalImagesRequestOrderBy]
"""
Ordering to use.
"""

zone: Optional[Zone]
"""
Zone to target. If none is passed will use default zone from the config.
Filter local images available on this Availability Zone.
"""

type_: Optional[LocalImageType]
"""
Filter by type.
"""

image_id: Optional[str]

Expand Down