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

[AutoRelease] t2-chaos-2021-10-25-61789 #21390

Merged
merged 3 commits into from
Oct 25, 2021
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
6 changes: 6 additions & 0 deletions sdk/chaos/azure-mgmt-chaos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 1.0.0b2 (2021-10-25)

**Features**

- Modified client name

## 1.0.0b1 (2021-10-21)

* Initial Release
2 changes: 1 addition & 1 deletion sdk/chaos/azure-mgmt-chaos/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "ed12f5402e66c633320954bc4ca3494f267a4be3",
"commit": "1e00e8d52c5da01410e898db01c4954c7bd29ba5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/chaos/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.5",
"readme": "specification/chaos/resource-manager/readme.md"
Expand Down
4 changes: 2 additions & 2 deletions sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._microsoft_azure_chaos import MicrosoftAzureChaos
from ._chaos_management_client import ChaosManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['MicrosoftAzureChaos']
__all__ = ['ChaosManagementClient']

try:
from ._patch import patch_sdk # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import MicrosoftAzureChaosConfiguration
from ._configuration import ChaosManagementClientConfiguration
from .operations import CapabilitiesOperations
from .operations import ExperimentsOperations
from .operations import Operations
Expand All @@ -28,21 +28,21 @@
from . import models


class MicrosoftAzureChaos(object):
"""Azure Chaos Resource Provider REST API.
class ChaosManagementClient(object):
"""Chaos Management Client.

:ivar capabilities: CapabilitiesOperations operations
:vartype capabilities: microsoft_azure_chaos.operations.CapabilitiesOperations
:vartype capabilities: chaos_management_client.operations.CapabilitiesOperations
:ivar experiments: ExperimentsOperations operations
:vartype experiments: microsoft_azure_chaos.operations.ExperimentsOperations
:vartype experiments: chaos_management_client.operations.ExperimentsOperations
:ivar operations: Operations operations
:vartype operations: microsoft_azure_chaos.operations.Operations
:vartype operations: chaos_management_client.operations.Operations
:ivar targets: TargetsOperations operations
:vartype targets: microsoft_azure_chaos.operations.TargetsOperations
:vartype targets: chaos_management_client.operations.TargetsOperations
:ivar target_types: TargetTypesOperations operations
:vartype target_types: microsoft_azure_chaos.operations.TargetTypesOperations
:vartype target_types: chaos_management_client.operations.TargetTypesOperations
:ivar capability_types: CapabilityTypesOperations operations
:vartype capability_types: microsoft_azure_chaos.operations.CapabilityTypesOperations
:vartype capability_types: chaos_management_client.operations.CapabilityTypesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: GUID that represents an Azure subscription ID.
Expand All @@ -61,7 +61,7 @@ def __init__(
# type: (...) -> None
if not base_url:
base_url = 'https://management.azure.com'
self._config = MicrosoftAzureChaosConfiguration(credential, subscription_id, **kwargs)
self._config = ChaosManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down Expand Up @@ -105,7 +105,7 @@ def close(self):
self._client.close()

def __enter__(self):
# type: () -> MicrosoftAzureChaos
# type: () -> ChaosManagementClient
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
from azure.core.credentials import TokenCredential


class MicrosoftAzureChaosConfiguration(Configuration):
"""Configuration for MicrosoftAzureChaos.
class ChaosManagementClientConfiguration(Configuration):
"""Configuration for ChaosManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -44,7 +44,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(MicrosoftAzureChaosConfiguration, self).__init__(**kwargs)
super(ChaosManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand Down
10 changes: 5 additions & 5 deletions sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
"chosen_version": "2021-09-15-preview",
"total_api_version_list": ["2021-09-15-preview"],
"client": {
"name": "MicrosoftAzureChaos",
"filename": "_microsoft_azure_chaos",
"description": "Azure Chaos Resource Provider REST API.",
"name": "ChaosManagementClient",
"filename": "_chaos_management_client",
"description": "Chaos Management Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftAzureChaosConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MicrosoftAzureChaosConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ChaosManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ChaosManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_version.py
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 = "1.0.0b1"
VERSION = "1.0.0b2"
4 changes: 2 additions & 2 deletions sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._microsoft_azure_chaos import MicrosoftAzureChaos
__all__ = ['MicrosoftAzureChaos']
from ._chaos_management_client import ChaosManagementClient
__all__ = ['ChaosManagementClient']
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import MicrosoftAzureChaosConfiguration
from ._configuration import ChaosManagementClientConfiguration
from .operations import CapabilitiesOperations
from .operations import ExperimentsOperations
from .operations import Operations
Expand All @@ -26,21 +26,21 @@
from .. import models


class MicrosoftAzureChaos(object):
"""Azure Chaos Resource Provider REST API.
class ChaosManagementClient(object):
"""Chaos Management Client.

:ivar capabilities: CapabilitiesOperations operations
:vartype capabilities: microsoft_azure_chaos.aio.operations.CapabilitiesOperations
:vartype capabilities: chaos_management_client.aio.operations.CapabilitiesOperations
:ivar experiments: ExperimentsOperations operations
:vartype experiments: microsoft_azure_chaos.aio.operations.ExperimentsOperations
:vartype experiments: chaos_management_client.aio.operations.ExperimentsOperations
:ivar operations: Operations operations
:vartype operations: microsoft_azure_chaos.aio.operations.Operations
:vartype operations: chaos_management_client.aio.operations.Operations
:ivar targets: TargetsOperations operations
:vartype targets: microsoft_azure_chaos.aio.operations.TargetsOperations
:vartype targets: chaos_management_client.aio.operations.TargetsOperations
:ivar target_types: TargetTypesOperations operations
:vartype target_types: microsoft_azure_chaos.aio.operations.TargetTypesOperations
:vartype target_types: chaos_management_client.aio.operations.TargetTypesOperations
:ivar capability_types: CapabilityTypesOperations operations
:vartype capability_types: microsoft_azure_chaos.aio.operations.CapabilityTypesOperations
:vartype capability_types: chaos_management_client.aio.operations.CapabilityTypesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: GUID that represents an Azure subscription ID.
Expand All @@ -58,7 +58,7 @@ def __init__(
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = MicrosoftAzureChaosConfiguration(credential, subscription_id, **kwargs)
self._config = ChaosManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
Expand Down Expand Up @@ -99,7 +99,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "MicrosoftAzureChaos":
async def __aenter__(self) -> "ChaosManagementClient":
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from azure.core.credentials_async import AsyncTokenCredential


class MicrosoftAzureChaosConfiguration(Configuration):
"""Configuration for MicrosoftAzureChaos.
class ChaosManagementClientConfiguration(Configuration):
"""Configuration for ChaosManagementClient.

Note that all parameters used to create this instance are saved as instance
attributes.
Expand All @@ -41,7 +41,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(MicrosoftAzureChaosConfiguration, self).__init__(**kwargs)
super(ChaosManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CapabilitiesOperations:
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_azure_chaos.models
:type models: ~chaos_management_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
Expand Down Expand Up @@ -67,7 +67,7 @@ def list(
:type continuation_token_parameter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either CapabilityListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_azure_chaos.models.CapabilityListResult]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.CapabilityListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityListResult"]
Expand Down Expand Up @@ -159,7 +159,7 @@ async def get(
:type capability_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Capability, or the result of cls(response)
:rtype: ~microsoft_azure_chaos.models.Capability
:rtype: ~chaos_management_client.models.Capability
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Capability"]
Expand Down Expand Up @@ -306,10 +306,10 @@ async def create_or_update(
:param capability_name: String that represents a Capability resource name.
:type capability_name: str
:param capability: Capability resource to be created or updated.
:type capability: ~microsoft_azure_chaos.models.Capability
:type capability: ~chaos_management_client.models.Capability
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Capability, or the result of cls(response)
:rtype: ~microsoft_azure_chaos.models.Capability
:rtype: ~chaos_management_client.models.Capability
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.Capability"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CapabilityTypesOperations:
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~microsoft_azure_chaos.models
:type models: ~chaos_management_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
Expand Down Expand Up @@ -58,7 +58,7 @@ def list(
:type continuation_token_parameter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either CapabilityTypeListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~microsoft_azure_chaos.models.CapabilityTypeListResult]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.CapabilityTypeListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityTypeListResult"]
Expand Down Expand Up @@ -138,7 +138,7 @@ async def get(
:type capability_type_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: CapabilityType, or the result of cls(response)
:rtype: ~microsoft_azure_chaos.models.CapabilityType
:rtype: ~chaos_management_client.models.CapabilityType
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityType"]
Expand Down
Loading