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
update-testcase
  • Loading branch information
ChenxiJiang333 committed Nov 5, 2024
commit e2d1a255809a9555af4be84cebc73aac3ff3e7e3
33 changes: 3 additions & 30 deletions sdk/managementgroups/azure-mgmt-managementgroups/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,10 @@
# Release History

## 2.0.0 (2024-11-04)
## 1.1.0b2 (2024-11-05)

### Features Added
### Other Changes

- Model `CheckNameAvailabilityRequest` added property `type`
- Added enum `EntitySearchType`
- Added enum `EntityViewParameterType`
- Added enum `ManagementGroupExpandType`
- Model `EntitiesOperations` added parameter `kwargs` in method `__init__`
- Model `HierarchySettingsOperations` added parameter `kwargs` in method `__init__`
- Model `ManagementGroupSubscriptionsOperations` added parameter `kwargs` in method `__init__`
- Model `ManagementGroupsOperations` added parameter `kwargs` in method `__init__`
- Model `Operations` added parameter `kwargs` in method `__init__`
- Method `ManagementGroupsAPI.check_name_availability` has a new overload `def check_name_availability(self: None, check_name_availability_request: CheckNameAvailabilityRequest, content_type: str)`
- Method `ManagementGroupsAPI.check_name_availability` has a new overload `def check_name_availability(self: None, check_name_availability_request: IO[bytes], content_type: str)`
- Method `HierarchySettingsOperations.create_or_update` has a new overload `def create_or_update(self: None, group_id: str, create_tenant_settings_request: CreateOrUpdateSettingsRequest, content_type: str)`
- Method `HierarchySettingsOperations.create_or_update` has a new overload `def create_or_update(self: None, group_id: str, create_tenant_settings_request: IO[bytes], content_type: str)`
- Method `HierarchySettingsOperations.update` has a new overload `def update(self: None, group_id: str, create_tenant_settings_request: CreateOrUpdateSettingsRequest, content_type: str)`
- Method `HierarchySettingsOperations.update` has a new overload `def update(self: None, group_id: str, create_tenant_settings_request: IO[bytes], content_type: str)`
- Method `ManagementGroupsAPIOperationsMixin.check_name_availability` has a new overload `def check_name_availability(self: None, check_name_availability_request: CheckNameAvailabilityRequest, content_type: str)`
- Method `ManagementGroupsAPIOperationsMixin.check_name_availability` has a new overload `def check_name_availability(self: None, check_name_availability_request: IO[bytes], content_type: str)`
- Method `ManagementGroupsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, group_id: str, create_management_group_request: CreateManagementGroupRequest, cache_control: str, content_type: str)`
- Method `ManagementGroupsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, group_id: str, create_management_group_request: IO[bytes], cache_control: str, content_type: str)`
- Method `ManagementGroupsOperations.update` has a new overload `def update(self: None, group_id: str, patch_group_request: PatchManagementGroupRequest, cache_control: str, content_type: str)`
- Method `ManagementGroupsOperations.update` has a new overload `def update(self: None, group_id: str, patch_group_request: IO[bytes], cache_control: str, content_type: str)`

### Breaking Changes

- Method `ManagementGroupsAPI.__init__` parameter `base_url` changed default value from `None` to `str`
- Deleted or renamed model `Enum0`
- Deleted or renamed model `Enum2`
- Deleted or renamed model `Enum3`
- Update dependencies

## 1.1.0b1 (2022-11-01)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.0.0"
VERSION = "1.1.0b2"
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-e ../../../tools/azure-sdk-tools
aiohttp
10 changes: 6 additions & 4 deletions sdk/managementgroups/azure-mgmt-managementgroups/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

# Version extraction inspired from 'requests'
with open(
os.path.join(package_folder_path, "version.py")
if os.path.exists(os.path.join(package_folder_path, "version.py"))
else os.path.join(package_folder_path, "_version.py"),
(
os.path.join(package_folder_path, "version.py")
if os.path.exists(os.path.join(package_folder_path, "version.py"))
else os.path.join(package_folder_path, "_version.py")
),
"r",
) as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
Expand All @@ -49,7 +51,7 @@
url="https://github.com/Azure/azure-sdk-for-python",
keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product
classifiers=[
"Development Status :: 5 - Production/Stable",
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
Expand Down
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):
managementgroupsapi_subscription_id = os.environ.get(
"AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000"
)
managementgroupsapi_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
managementgroupsapi_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000")
managementgroupsapi_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=managementgroupsapi_subscription_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=managementgroupsapi_tenant_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=managementgroupsapi_client_id, value="00000000-0000-0000-0000-000000000000")
add_general_regex_sanitizer(regex=managementgroupsapi_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,43 @@
# 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.managementgroups.aio import ManagementGroupsAPI

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

AZURE_LOCATION = "eastus"


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

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_check_name_availability(self, resource_group):
response = await self.client.check_name_availability(
check_name_availability_request={"name": "str", "type": "Microsoft.Management/managementGroups"},
)

assert response

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_start_tenant_backfill(self, resource_group):
response = await self.client.start_tenant_backfill()

assert response

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_tenant_backfill_status(self, resource_group):
response = await self.client.tenant_backfill_status()

assert response
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.managementgroups.aio import ManagementGroupsAPI

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

AZURE_LOCATION = "eastus"


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

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list(self, resource_group):
response = self.client.entities.list()
result = [r async for r in response]
assert response
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.managementgroups import ManagementGroupsAPI

from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy

AZURE_LOCATION = "eastus"


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

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list(self, resource_group):
response = self.client.entities.list()
result = [r for r in response]
assert response
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.managementgroups.aio import ManagementGroupsAPI

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

AZURE_LOCATION = "eastus"


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

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
async def test_list(self, resource_group):
response = self.client.operations.list()
result = [r async for r in response]
assert result
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.managementgroups import ManagementGroupsAPI

from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy

AZURE_LOCATION = "eastus"


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

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list(self, resource_group):
response = self.client.operations.list()
result = [r for r in response]
assert result
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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.managementgroups import ManagementGroupsAPI

from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy

AZURE_LOCATION = "eastus"


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

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_check_name_availability(self, resource_group):
response = self.client.check_name_availability(
check_name_availability_request={"name": "str", "type": "Microsoft.Management/managementGroups"},
)

assert response

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_start_tenant_backfill(self, resource_group):
response = self.client.start_tenant_backfill()

assert response

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_tenant_backfill_status(self, resource_group):
response = self.client.tenant_backfill_status()

assert response