Skip to content

Commit 84c71b9

Browse files
[AutoRelease] t2-chaos-2024-02-21-34265(can only be merged by SDK owner) (#34391)
* code and test * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 85ef6d5 commit 84c71b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+96
-79
lines changed

sdk/chaos/azure-mgmt-chaos/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 1.1.0 (2024-03-04)
4+
5+
### Features Added
6+
7+
- Model ExperimentUpdate has a new parameter tags
8+
39
## 1.0.0 (2023-11-20)
410

511
### Features Added

sdk/chaos/azure-mgmt-chaos/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Chaos Management Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.8+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.7+ is required to use this package.
15+
- Python 3.8+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package

sdk/chaos/azure-mgmt-chaos/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"commit": "1e410d42c1932737d545fcf91a38594d04ca9c22",
2+
"commit": "50f502f5099796ba92f63384884574d46333cec2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.7",
55
"use": [

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_chaos_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ChaosManagementClient: # pylint: disable=client-accepts-api-version-keywo
5353
:type subscription_id: str
5454
:param base_url: Service URL. Default value is "https://management.azure.com".
5555
:type base_url: str
56-
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
56+
:keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
5757
default value may result in unsupported behavior.
5858
:paramtype api_version: str
5959
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class ChaosManagementClientConfiguration(Configuration): # pylint: disable=too-
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: GUID that represents an Azure subscription ID. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
3333
default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(ChaosManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-11-01")
39+
api_version: str = kwargs.pop("api_version", "2024-01-01")
4040

4141
if credential is None:
4242
raise ValueError("Parameter 'credential' must not be None.")

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "1.1.0"

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_chaos_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ChaosManagementClient: # pylint: disable=client-accepts-api-version-keywo
5353
:type subscription_id: str
5454
:param base_url: Service URL. Default value is "https://management.azure.com".
5555
:type base_url: str
56-
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
56+
:keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
5757
default value may result in unsupported behavior.
5858
:paramtype api_version: str
5959
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class ChaosManagementClientConfiguration(Configuration): # pylint: disable=too-
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: GUID that represents an Azure subscription ID. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2024-01-01". Note that overriding this
3333
default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(ChaosManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-11-01")
39+
api_version: str = kwargs.pop("api_version", "2024-01-01")
4040

4141
if credential is None:
4242
raise ValueError("Parameter 'credential' must not be None.")

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_operation_statuses_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, *args, **kwargs) -> None:
5454
async def get(self, location: str, async_operation_id: str, **kwargs: Any) -> _models.OperationStatus:
5555
"""Get the status of a long running azure asynchronous operation.
5656
57-
:param location: The region name of operation. Required.
57+
:param location: The name of the Azure region. Required.
5858
:type location: str
5959
:param async_operation_id: The operation Id. Required.
6060
:type async_operation_id: str
@@ -109,5 +109,5 @@ async def get(self, location: str, async_operation_id: str, **kwargs: Any) -> _m
109109
return deserialized
110110

111111
get.metadata = {
112-
"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationsStatuses/{asyncOperationId}"
112+
"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationStatuses/{asyncOperationId}"
113113
}

sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,19 +1476,31 @@ class ExperimentUpdate(_serialization.Model):
14761476
14771477
:ivar identity: The identity of the experiment resource.
14781478
:vartype identity: ~azure.mgmt.chaos.models.ResourceIdentity
1479+
:ivar tags: The tags of the experiment resource.
1480+
:vartype tags: dict[str, str]
14791481
"""
14801482

14811483
_attribute_map = {
14821484
"identity": {"key": "identity", "type": "ResourceIdentity"},
1485+
"tags": {"key": "tags", "type": "{str}"},
14831486
}
14841487

1485-
def __init__(self, *, identity: Optional["_models.ResourceIdentity"] = None, **kwargs: Any) -> None:
1488+
def __init__(
1489+
self,
1490+
*,
1491+
identity: Optional["_models.ResourceIdentity"] = None,
1492+
tags: Optional[Dict[str, str]] = None,
1493+
**kwargs: Any
1494+
) -> None:
14861495
"""
14871496
:keyword identity: The identity of the experiment resource.
14881497
:paramtype identity: ~azure.mgmt.chaos.models.ResourceIdentity
1498+
:keyword tags: The tags of the experiment resource.
1499+
:paramtype tags: dict[str, str]
14891500
"""
14901501
super().__init__(**kwargs)
14911502
self.identity = identity
1503+
self.tags = tags
14921504

14931505

14941506
class KeyValuePair(_serialization.Model):
@@ -1645,9 +1657,11 @@ def __init__(self, **kwargs: Any) -> None:
16451657
self.next_link = None
16461658

16471659

1648-
class OperationStatus(_serialization.Model):
1660+
class OperationStatus(ErrorResponse):
16491661
"""The status of operation.
16501662
1663+
:ivar error: The error object.
1664+
:vartype error: ~azure.mgmt.chaos.models.ErrorDetail
16511665
:ivar id: The operation Id.
16521666
:vartype id: str
16531667
:ivar name: The operation name.
@@ -1658,31 +1672,31 @@ class OperationStatus(_serialization.Model):
16581672
:vartype end_time: str
16591673
:ivar status: The status of the operation.
16601674
:vartype status: str
1661-
:ivar error: The error detail of the operation if any.
1662-
:vartype error: ~azure.mgmt.chaos.models.ErrorResponse
16631675
"""
16641676

16651677
_attribute_map = {
1678+
"error": {"key": "error", "type": "ErrorDetail"},
16661679
"id": {"key": "id", "type": "str"},
16671680
"name": {"key": "name", "type": "str"},
16681681
"start_time": {"key": "startTime", "type": "str"},
16691682
"end_time": {"key": "endTime", "type": "str"},
16701683
"status": {"key": "status", "type": "str"},
1671-
"error": {"key": "error", "type": "ErrorResponse"},
16721684
}
16731685

16741686
def __init__(
16751687
self,
16761688
*,
1689+
error: Optional["_models.ErrorDetail"] = None,
16771690
id: Optional[str] = None, # pylint: disable=redefined-builtin
16781691
name: Optional[str] = None,
16791692
start_time: Optional[str] = None,
16801693
end_time: Optional[str] = None,
16811694
status: Optional[str] = None,
1682-
error: Optional["_models.ErrorResponse"] = None,
16831695
**kwargs: Any
16841696
) -> None:
16851697
"""
1698+
:keyword error: The error object.
1699+
:paramtype error: ~azure.mgmt.chaos.models.ErrorDetail
16861700
:keyword id: The operation Id.
16871701
:paramtype id: str
16881702
:keyword name: The operation name.
@@ -1693,16 +1707,13 @@ def __init__(
16931707
:paramtype end_time: str
16941708
:keyword status: The status of the operation.
16951709
:paramtype status: str
1696-
:keyword error: The error detail of the operation if any.
1697-
:paramtype error: ~azure.mgmt.chaos.models.ErrorResponse
16981710
"""
1699-
super().__init__(**kwargs)
1711+
super().__init__(error=error, **kwargs)
17001712
self.id = id
17011713
self.name = name
17021714
self.start_time = start_time
17031715
self.end_time = end_time
17041716
self.status = status
1705-
self.error = error
17061717

17071718

17081719
class ResourceIdentity(_serialization.Model):

0 commit comments

Comments
 (0)