Skip to content

Commit a0115cb

Browse files
committed
Merge branch 'main' into e2e-tests
2 parents dd9d37e + 6ff17de commit a0115cb

File tree

6 files changed

+30
-0
lines changed

6 files changed

+30
-0
lines changed

scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
ListPublicCatalogProductsRequestProductType,
1212
ListPublicCatalogProductsResponse,
1313
PublicCatalogProduct,
14+
PublicCatalogProductLocality,
1415
)
1516
from .marshalling import (
1617
unmarshal_ListPublicCatalogProductsResponse,
@@ -28,13 +29,15 @@ async def list_public_catalog_products(
2829
product_types: Optional[
2930
List[ListPublicCatalogProductsRequestProductType]
3031
] = None,
32+
locality: Optional[PublicCatalogProductLocality] = None,
3133
) -> ListPublicCatalogProductsResponse:
3234
"""
3335
List all available products.
3436
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
3537
:param page: Number of the page. Value must be greater or equal to 1.
3638
:param page_size: The number of products per page. Value must be greater or equal to 1.
3739
:param product_types: The list of filtered product categories.
40+
:param locality: The locality of the products to filter by. If not set, all localities are returned.
3841
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`
3942
4043
Usage:
@@ -47,6 +50,7 @@ async def list_public_catalog_products(
4750
"GET",
4851
"/product-catalog/v2alpha1/public-catalog/products",
4952
params={
53+
"locality": locality,
5054
"page": page,
5155
"page_size": page_size or self.client.default_page_size,
5256
"product_types": product_types,
@@ -64,13 +68,15 @@ async def list_public_catalog_products_all(
6468
product_types: Optional[
6569
List[ListPublicCatalogProductsRequestProductType]
6670
] = None,
71+
locality: Optional[PublicCatalogProductLocality] = None,
6772
) -> List[PublicCatalogProduct]:
6873
"""
6974
List all available products.
7075
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
7176
:param page: Number of the page. Value must be greater or equal to 1.
7277
:param page_size: The number of products per page. Value must be greater or equal to 1.
7378
:param product_types: The list of filtered product categories.
79+
:param locality: The locality of the products to filter by. If not set, all localities are returned.
7480
:return: :class:`List[PublicCatalogProduct] <List[PublicCatalogProduct]>`
7581
7682
Usage:
@@ -87,5 +93,6 @@ async def list_public_catalog_products_all(
8793
"page": page,
8894
"page_size": page_size,
8995
"product_types": product_types,
96+
"locality": locality,
9097
},
9198
)

scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,8 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
432432
"""
433433
The list of filtered product categories.
434434
"""
435+
436+
locality: Optional[PublicCatalogProductLocality]
437+
"""
438+
The locality of the products to filter by. If not set, all localities are returned.
439+
"""

scaleway/scaleway/product_catalog/v2alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
ListPublicCatalogProductsRequestProductType,
1212
ListPublicCatalogProductsResponse,
1313
PublicCatalogProduct,
14+
PublicCatalogProductLocality,
1415
)
1516
from .marshalling import (
1617
unmarshal_ListPublicCatalogProductsResponse,
@@ -28,13 +29,15 @@ def list_public_catalog_products(
2829
product_types: Optional[
2930
List[ListPublicCatalogProductsRequestProductType]
3031
] = None,
32+
locality: Optional[PublicCatalogProductLocality] = None,
3133
) -> ListPublicCatalogProductsResponse:
3234
"""
3335
List all available products.
3436
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
3537
:param page: Number of the page. Value must be greater or equal to 1.
3638
:param page_size: The number of products per page. Value must be greater or equal to 1.
3739
:param product_types: The list of filtered product categories.
40+
:param locality: The locality of the products to filter by. If not set, all localities are returned.
3841
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`
3942
4043
Usage:
@@ -47,6 +50,7 @@ def list_public_catalog_products(
4750
"GET",
4851
"/product-catalog/v2alpha1/public-catalog/products",
4952
params={
53+
"locality": locality,
5054
"page": page,
5155
"page_size": page_size or self.client.default_page_size,
5256
"product_types": product_types,
@@ -64,13 +68,15 @@ def list_public_catalog_products_all(
6468
product_types: Optional[
6569
List[ListPublicCatalogProductsRequestProductType]
6670
] = None,
71+
locality: Optional[PublicCatalogProductLocality] = None,
6772
) -> List[PublicCatalogProduct]:
6873
"""
6974
List all available products.
7075
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
7176
:param page: Number of the page. Value must be greater or equal to 1.
7277
:param page_size: The number of products per page. Value must be greater or equal to 1.
7378
:param product_types: The list of filtered product categories.
79+
:param locality: The locality of the products to filter by. If not set, all localities are returned.
7480
:return: :class:`List[PublicCatalogProduct] <List[PublicCatalogProduct]>`
7581
7682
Usage:
@@ -87,5 +93,6 @@ def list_public_catalog_products_all(
8793
"page": page,
8894
"page_size": page_size,
8995
"product_types": product_types,
96+
"locality": locality,
9097
},
9198
)

scaleway/scaleway/product_catalog/v2alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,8 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
432432
"""
433433
The list of filtered product categories.
434434
"""
435+
436+
locality: Optional[PublicCatalogProductLocality]
437+
"""
438+
The locality of the products to filter by. If not set, all localities are returned.
439+
"""

scaleway/tests/test_test_v1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from scaleway import Client, WaitForOptions
88
from scaleway.test.v1 import EyeColors, Human, HumanStatus, TestV1API
99

10+
1011
@unittest.skip("API test is not deploy")
1112
class TestTestV1(unittest.TestCase):
1213
def setUp(self) -> None:

scaleway/tests/test_test_v1_marshalling.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
system_random = random.SystemRandom()
2222

23+
2324
def _mock_human_raw() -> Dict[str, Any]:
2425
altitude_in_meter = system_random.randint(0, 100)
2526
created_at = utils.random_date_string(
@@ -66,6 +67,8 @@ def _mock_human() -> Human:
6667
name=utils.random_name(),
6768
project_id=str(uuid.uuid4()),
6869
)
70+
71+
6972
@unittest.skip("API test is not deploy")
7073
class TestTestV1UnmarshallingHuman(unittest.TestCase):
7174
def _assert_raw_and_unmarshalled_human(
@@ -124,6 +127,7 @@ def test_unmarshal_ListHumansResponse(self) -> None:
124127
humans[i], list_humans_response.humans[i]
125128
)
126129

130+
127131
def _mock_create_human_request() -> CreateHumanRequest:
128132
human = _mock_human()
129133

@@ -141,6 +145,7 @@ def _mock_create_human_request() -> CreateHumanRequest:
141145
organization_id=human.organization_id,
142146
)
143147

148+
144149
@unittest.skip("API test is not deploy")
145150
class TestTestV1MarshallingCreateHumanRequest(unittest.TestCase):
146151
def _assert_create_human_request_and_raw(

0 commit comments

Comments
 (0)