Skip to content
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

[AutoPR azure-mgmt-fabric] remove examples-dir from python tspconfig #8881

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions sdk/fabric/azure-mgmt-fabric/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "eea7584434f9225cad0327d83d5c6d84257a4d7d",
"commit": "65171caa921a67914855465095f912fb17445d7e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/fabric/Microsoft.Fabric.Management",
"@azure-tools/typespec-python": "0.30.0"
"@azure-tools/typespec-python": "0.33.0"
}
301 changes: 279 additions & 22 deletions sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_model_base.py

Large diffs are not rendered by default.

415 changes: 265 additions & 150 deletions sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_serialization.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def get(self, resource_group_name: str, capacity_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.fabric.models.FabricCapacity
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -163,7 +163,7 @@ async def _create_or_update_initial(
resource: Union[_models.FabricCapacity, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -399,7 +399,7 @@ async def _update_initial(
properties: Union[_models.FabricCapacityUpdate, JSON, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -629,7 +629,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, capacity_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -759,7 +759,7 @@ def list_by_resource_group(

cls: ClsType[List[_models.FabricCapacity]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -844,7 +844,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.FabricCa

cls: ClsType[List[_models.FabricCapacity]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -918,7 +918,7 @@ async def get_next(next_link=None):
async def _resume_initial(
self, resource_group_name: str, capacity_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1033,7 +1033,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _suspend_initial(
self, resource_group_name: str, capacity_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1223,7 +1223,7 @@ async def check_name_availability(
:rtype: ~azure.mgmt.fabric.models.CheckNameAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1306,7 +1306,7 @@ def list_skus_for_capacity(

cls: ClsType[List[_models.RpSkuDetailsForExistingResource]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1393,7 +1393,7 @@ def list_skus(self, **kwargs: Any) -> AsyncIterable["_models.RpSkuDetailsForNewR

cls: ClsType[List[_models.RpSkuDetailsForNewResource]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1495,7 +1495,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:

cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def get(self, resource_group_name: str, capacity_name: str, **kwargs: Any) -> _m
:rtype: ~azure.mgmt.fabric.models.FabricCapacity
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -468,7 +468,7 @@ def _create_or_update_initial(
resource: Union[_models.FabricCapacity, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -704,7 +704,7 @@ def _update_initial(
properties: Union[_models.FabricCapacityUpdate, JSON, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -932,7 +932,7 @@ def get_long_running_output(pipeline_response):
)

def _delete_initial(self, resource_group_name: str, capacity_name: str, **kwargs: Any) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1060,7 +1060,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite

cls: ClsType[List[_models.FabricCapacity]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1145,7 +1145,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.FabricCapacit

cls: ClsType[List[_models.FabricCapacity]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1217,7 +1217,7 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)

def _resume_initial(self, resource_group_name: str, capacity_name: str, **kwargs: Any) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1330,7 +1330,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore

def _suspend_initial(self, resource_group_name: str, capacity_name: str, **kwargs: Any) -> Iterator[bytes]:
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1520,7 +1520,7 @@ def check_name_availability(
:rtype: ~azure.mgmt.fabric.models.CheckNameAvailabilityResponse
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1602,7 +1602,7 @@ def list_skus_for_capacity(

cls: ClsType[List[_models.RpSkuDetailsForExistingResource]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1688,7 +1688,7 @@ def list_skus(self, **kwargs: Any) -> Iterable["_models.RpSkuDetailsForNewResour

cls: ClsType[List[_models.RpSkuDetailsForNewResource]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down Expand Up @@ -1790,7 +1790,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]:

cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None)

error_map: MutableMapping[int, Type[HttpResponseError]] = {
error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
Expand Down
2 changes: 1 addition & 1 deletion sdk/fabric/azure-mgmt-fabric/generated_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
load_dotenv()


# aovid record sensitive identity information in recordings
# For security, please avoid record sensitive identity information in recordings
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
fabricmgmt_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setup_method(self, method):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_get(self, resource_group):
def test_fabric_capacities_get(self, resource_group):
response = self.client.fabric_capacities.get(
resource_group_name=resource_group.name,
capacity_name="str",
Expand All @@ -31,7 +31,7 @@ def test_get(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_begin_create_or_update(self, resource_group):
def test_fabric_capacities_begin_create_or_update(self, resource_group):
response = self.client.fabric_capacities.begin_create_or_update(
resource_group_name=resource_group.name,
capacity_name="str",
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_begin_create_or_update(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_begin_update(self, resource_group):
def test_fabric_capacities_begin_update(self, resource_group):
response = self.client.fabric_capacities.begin_update(
resource_group_name=resource_group.name,
capacity_name="str",
Expand All @@ -75,7 +75,7 @@ def test_begin_update(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_begin_delete(self, resource_group):
def test_fabric_capacities_begin_delete(self, resource_group):
response = self.client.fabric_capacities.begin_delete(
resource_group_name=resource_group.name,
capacity_name="str",
Expand All @@ -86,7 +86,7 @@ def test_begin_delete(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_by_resource_group(self, resource_group):
def test_fabric_capacities_list_by_resource_group(self, resource_group):
response = self.client.fabric_capacities.list_by_resource_group(
resource_group_name=resource_group.name,
)
Expand All @@ -96,15 +96,15 @@ def test_list_by_resource_group(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_by_subscription(self, resource_group):
def test_fabric_capacities_list_by_subscription(self, resource_group):
response = self.client.fabric_capacities.list_by_subscription()
result = [r for r in response]
# please add some check logic here by yourself
# ...

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_begin_resume(self, resource_group):
def test_fabric_capacities_begin_resume(self, resource_group):
response = self.client.fabric_capacities.begin_resume(
resource_group_name=resource_group.name,
capacity_name="str",
Expand All @@ -115,7 +115,7 @@ def test_begin_resume(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_begin_suspend(self, resource_group):
def test_fabric_capacities_begin_suspend(self, resource_group):
response = self.client.fabric_capacities.begin_suspend(
resource_group_name=resource_group.name,
capacity_name="str",
Expand All @@ -126,7 +126,7 @@ def test_begin_suspend(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_check_name_availability(self, resource_group):
def test_fabric_capacities_check_name_availability(self, resource_group):
response = self.client.fabric_capacities.check_name_availability(
location="str",
body={"name": "str", "type": "str"},
Expand All @@ -137,7 +137,7 @@ def test_check_name_availability(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_skus_for_capacity(self, resource_group):
def test_fabric_capacities_list_skus_for_capacity(self, resource_group):
response = self.client.fabric_capacities.list_skus_for_capacity(
resource_group_name=resource_group.name,
capacity_name="str",
Expand All @@ -148,7 +148,7 @@ def test_list_skus_for_capacity(self, resource_group):

@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
def test_list_skus(self, resource_group):
def test_fabric_capacities_list_skus(self, resource_group):
response = self.client.fabric_capacities.list_skus()
result = [r for r in response]
# please add some check logic here by yourself
Expand Down
Loading
Loading