Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update-testcase
  • Loading branch information
ChenxiJiang333 committed Oct 30, 2024
commit 6ed925da68f23bdba76ffa71031ad24e8a597154
39 changes: 1 addition & 38 deletions sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,9 @@

## 2.0.0 (2024-10-30)

### Features Added

- Enum `LengthHeightUnit` added member `IN`
- Method `EdgeOrderManagementClient.begin_create_address` has a new overload `def begin_create_address(self: None, address_name: str, resource_group_name: str, address_resource: AddressResource, content_type: str)`
- Method `EdgeOrderManagementClient.begin_create_address` has a new overload `def begin_create_address(self: None, address_name: str, resource_group_name: str, address_resource: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClient.begin_create_order_item` has a new overload `def begin_create_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_resource: OrderItemResource, content_type: str)`
- Method `EdgeOrderManagementClient.begin_create_order_item` has a new overload `def begin_create_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_resource: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClient.begin_return_order_item` has a new overload `def begin_return_order_item(self: None, order_item_name: str, resource_group_name: str, return_order_item_details: ReturnOrderItemDetails, content_type: str)`
- Method `EdgeOrderManagementClient.begin_return_order_item` has a new overload `def begin_return_order_item(self: None, order_item_name: str, resource_group_name: str, return_order_item_details: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClient.begin_update_address` has a new overload `def begin_update_address(self: None, address_name: str, resource_group_name: str, address_update_parameter: AddressUpdateParameter, if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.begin_update_address` has a new overload `def begin_update_address(self: None, address_name: str, resource_group_name: str, address_update_parameter: IO[bytes], if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.begin_update_order_item` has a new overload `def begin_update_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_update_parameter: OrderItemUpdateParameter, if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.begin_update_order_item` has a new overload `def begin_update_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_update_parameter: IO[bytes], if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.cancel_order_item` has a new overload `def cancel_order_item(self: None, order_item_name: str, resource_group_name: str, cancellation_reason: CancellationReason, content_type: str)`
- Method `EdgeOrderManagementClient.cancel_order_item` has a new overload `def cancel_order_item(self: None, order_item_name: str, resource_group_name: str, cancellation_reason: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClient.list_configurations` has a new overload `def list_configurations(self: None, configurations_request: ConfigurationsRequest, skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.list_configurations` has a new overload `def list_configurations(self: None, configurations_request: IO[bytes], skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.list_product_families` has a new overload `def list_product_families(self: None, product_families_request: ProductFamiliesRequest, expand: Optional[str], skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClient.list_product_families` has a new overload `def list_product_families(self: None, product_families_request: IO[bytes], expand: Optional[str], skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_create_address` has a new overload `def begin_create_address(self: None, address_name: str, resource_group_name: str, address_resource: AddressResource, content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_create_address` has a new overload `def begin_create_address(self: None, address_name: str, resource_group_name: str, address_resource: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_create_order_item` has a new overload `def begin_create_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_resource: OrderItemResource, content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_create_order_item` has a new overload `def begin_create_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_resource: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_return_order_item` has a new overload `def begin_return_order_item(self: None, order_item_name: str, resource_group_name: str, return_order_item_details: ReturnOrderItemDetails, content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_return_order_item` has a new overload `def begin_return_order_item(self: None, order_item_name: str, resource_group_name: str, return_order_item_details: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_update_address` has a new overload `def begin_update_address(self: None, address_name: str, resource_group_name: str, address_update_parameter: AddressUpdateParameter, if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_update_address` has a new overload `def begin_update_address(self: None, address_name: str, resource_group_name: str, address_update_parameter: IO[bytes], if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_update_order_item` has a new overload `def begin_update_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_update_parameter: OrderItemUpdateParameter, if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.begin_update_order_item` has a new overload `def begin_update_order_item(self: None, order_item_name: str, resource_group_name: str, order_item_update_parameter: IO[bytes], if_match: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.cancel_order_item` has a new overload `def cancel_order_item(self: None, order_item_name: str, resource_group_name: str, cancellation_reason: CancellationReason, content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.cancel_order_item` has a new overload `def cancel_order_item(self: None, order_item_name: str, resource_group_name: str, cancellation_reason: IO[bytes], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.list_configurations` has a new overload `def list_configurations(self: None, configurations_request: ConfigurationsRequest, skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.list_configurations` has a new overload `def list_configurations(self: None, configurations_request: IO[bytes], skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.list_product_families` has a new overload `def list_product_families(self: None, product_families_request: ProductFamiliesRequest, expand: Optional[str], skip_token: Optional[str], content_type: str)`
- Method `EdgeOrderManagementClientOperationsMixin.list_product_families` has a new overload `def list_product_families(self: None, product_families_request: IO[bytes], expand: Optional[str], skip_token: Optional[str], content_type: str)`

### Breaking Changes

- Method `EdgeOrderManagementClient.__init__` parameter `base_url` changed default value from `None` to `str`
- Deleted or renamed enum value `LengthHeightUnit.IN_ENUM`
- This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ingore this change.

## 2.0.0b1 (2023-02-13)

Expand Down
2 changes: 2 additions & 0 deletions sdk/edgeorder/azure-mgmt-edgeorder/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
-e ../../../tools/azure-sdk-tools
-e ../../resources/azure-mgmt-resource
aiohttp
37 changes: 37 additions & 0 deletions sdk/edgeorder/azure-mgmt-edgeorder/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import os
import pytest
from dotenv import load_dotenv
from devtools_testutils import (
test_proxy,
add_general_regex_sanitizer,
add_body_key_sanitizer,
add_header_regex_sanitizer,
)

load_dotenv()


# aovid record sensitive identity information in recordings
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
edgeordermanagement_subscription_id = os.environ.get(
"AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
)
edgeordermanagement_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
edgeordermanagement_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000")
edgeordermanagement_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=edgeordermanagement_subscription_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=edgeordermanagement_tenant_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=edgeordermanagement_client_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=edgeordermanagement_client_secret, value="00000000-0000-0000-0000-000000000000")

add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
add_header_regex_sanitizer(key="Cookie", value="cookie;")
add_body_key_sanitizer(json_path="$..access_token", value="access_token")
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import pytest
from azure.mgmt.edgeorder.aio import EdgeOrderManagementClient

from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
from devtools_testutils.aio import recorded_by_proxy_async

AZURE_LOCATION = "eastus"


@pytest.mark.live_test_only
class TestEdgeOrderManagementAsync(AzureMgmtRecordedTestCase):
def setup_method(self, method):
self.client = self.create_mgmt_client(EdgeOrderManagementClient, is_async=True)

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_operations(self, resource_group):
response = self.client.list_operations()
result = [r async for r in response]
assert result


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_addresses_at_subscription_level(self, resource_group):
response = self.client.list_addresses_at_subscription_level()
result = [r async for r in response]
assert response

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_product_families_metadata(self, resource_group):
response = self.client.list_product_families_metadata()
result = [r async for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_order_at_subscription_level(self, resource_group):
response = self.client.list_order_at_subscription_level()
result = [r async for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_order_items_at_subscription_level(self, resource_group):
response = self.client.list_order_items_at_subscription_level()
result = [r async for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_addresses_at_resource_group_level(self, resource_group):
response = self.client.list_addresses_at_resource_group_level(
resource_group_name=resource_group.name,
)
result = [r async for r in response]
assert result == []

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_order_at_resource_group_level(self, resource_group):
response = self.client.list_order_at_resource_group_level(
resource_group_name=resource_group.name,
)
result = [r async for r in response]
assert result == []


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list_order_items_at_resource_group_level(self, resource_group):
response = self.client.list_order_items_at_resource_group_level(
resource_group_name=resource_group.name,
)
result = [r async for r in response]
assert result == []

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import pytest
from azure.mgmt.edgeorder import EdgeOrderManagementClient

from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy

AZURE_LOCATION = "eastus"


@pytest.mark.live_test_only
class TestEdgeOrderManagement(AzureMgmtRecordedTestCase):
def setup_method(self, method):
self.client = self.create_mgmt_client(EdgeOrderManagementClient)

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_operations(self, resource_group):
response = self.client.list_operations()
result = [r for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_addresses_at_subscription_level(self, resource_group):
response = self.client.list_addresses_at_subscription_level()
result = [r for r in response]
assert response

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_product_families_metadata(self, resource_group):
response = self.client.list_product_families_metadata()
result = [r for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_order_at_subscription_level(self, resource_group):
response = self.client.list_order_at_subscription_level()
result = [r for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_order_items_at_subscription_level(self, resource_group):
response = self.client.list_order_items_at_subscription_level()
result = [r for r in response]
assert response


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_addresses_at_resource_group_level(self, resource_group):
response = self.client.list_addresses_at_resource_group_level(
resource_group_name=resource_group.name,
)
result = [r for r in response]
assert result == []

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_order_at_resource_group_level(self, resource_group):
response = self.client.list_order_at_resource_group_level(
resource_group_name=resource_group.name,
)
result = [r for r in response]
assert result == []


@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_order_items_at_resource_group_level(self, resource_group):
response = self.client.list_order_items_at_resource_group_level(
resource_group_name=resource_group.name,
)
result = [r for r in response]
assert response