Skip to content

Commit 17f950a

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] t2-monitor-2023-05-04-08934(can only be merged by SDK owner) (Azure#30223)
* code and test * update --------- Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
1 parent 493dc78 commit 17f950a

File tree

378 files changed

+5362
-7440
lines changed

Some content is hidden

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

378 files changed

+5362
-7440
lines changed

sdk/monitor/azure-mgmt-monitor/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+
## 6.0.1 (2023-05-04)
4+
5+
### Other Changes
6+
7+
- Fixed annotation about namespace
8+
39
## 6.0.0 (2023-03-20)
410

511
### Features Added

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ client = MonitorManagementClient(credential=DefaultAzureCredential(), subscripti
4545

4646
## Examples
4747

48-
49-
Code samples for this package can be found at [Monitor](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
48+
Code samples for this package can be found at:
49+
- [Search Monitor](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
5051

5152

5253
## Troubleshooting
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "7d313ecb6a58a51046a3916ee5ea6b6d29973522",
2+
"commit": "817e7cea0b7e3194868825cbef6d4e62a7895951",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/python@6.4.3",
6+
"@autorest/python@6.4.8",
77
"@autorest/modelerfour@4.24.3"
88
],
9-
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/monitor/resource-manager/readme.md"
1111
}

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
631631
if xml_desc.get("attr", False):
632632
if xml_ns:
633633
ET.register_namespace(xml_prefix, xml_ns)
634-
xml_name = "{}{}".format(xml_ns, xml_name)
634+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
635635
serialized.set(xml_name, new_attr) # type: ignore
636636
continue
637637
if xml_desc.get("text", False):
@@ -1273,7 +1273,7 @@ def _extract_name_from_internal_type(internal_type):
12731273
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12741274
xml_ns = internal_type_xml_map.get("ns", None)
12751275
if xml_ns:
1276-
xml_name = "{}{}".format(xml_ns, xml_name)
1276+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12771277
return xml_name
12781278

12791279

@@ -1297,7 +1297,7 @@ def xml_key_extractor(attr, attr_desc, data):
12971297
# Integrate namespace if necessary
12981298
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12991299
if xml_ns:
1300-
xml_name = "{}{}".format(xml_ns, xml_name)
1300+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
13011301

13021302
# If it's an attribute, that's simple
13031303
if xml_desc.get("attr", False):

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "6.0.0"
8+
VERSION = "6.0.1"

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,19 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key
3333
"""Monitor Management Client.
3434
3535
:ivar activity_logs: ActivityLogsOperations operations
36-
:vartype activity_logs: $(python-base-namespace).v2015_04_01.operations.ActivityLogsOperations
36+
:vartype activity_logs: azure.mgmt.monitor.v2015_04_01.operations.ActivityLogsOperations
3737
:ivar autoscale_settings: AutoscaleSettingsOperations operations
3838
:vartype autoscale_settings:
39-
$(python-base-namespace).v2015_04_01.operations.AutoscaleSettingsOperations
39+
azure.mgmt.monitor.v2015_04_01.operations.AutoscaleSettingsOperations
4040
:ivar event_categories: EventCategoriesOperations operations
41-
:vartype event_categories:
42-
$(python-base-namespace).v2015_04_01.operations.EventCategoriesOperations
41+
:vartype event_categories: azure.mgmt.monitor.v2015_04_01.operations.EventCategoriesOperations
4342
:ivar operations: Operations operations
44-
:vartype operations: $(python-base-namespace).v2015_04_01.operations.Operations
43+
:vartype operations: azure.mgmt.monitor.v2015_04_01.operations.Operations
4544
:ivar tenant_activity_logs: TenantActivityLogsOperations operations
4645
:vartype tenant_activity_logs:
47-
$(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations
46+
azure.mgmt.monitor.v2015_04_01.operations.TenantActivityLogsOperations
4847
:ivar alert_rules: AlertRulesOperations operations
49-
:vartype alert_rules: $(python-base-namespace).v2015_04_01.operations.AlertRulesOperations
48+
:vartype alert_rules: azure.mgmt.monitor.v2015_04_01.operations.AlertRulesOperations
5049
:param credential: Credential needed for the client to connect to Azure. Required.
5150
:type credential: ~azure.core.credentials.TokenCredential
5251
:param subscription_id: The ID of the target subscription. Required.

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_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 = "6.0.0"
9+
VERSION = "6.0.1"

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,20 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key
3333
"""Monitor Management Client.
3434
3535
:ivar activity_logs: ActivityLogsOperations operations
36-
:vartype activity_logs:
37-
$(python-base-namespace).v2015_04_01.aio.operations.ActivityLogsOperations
36+
:vartype activity_logs: azure.mgmt.monitor.v2015_04_01.aio.operations.ActivityLogsOperations
3837
:ivar autoscale_settings: AutoscaleSettingsOperations operations
3938
:vartype autoscale_settings:
40-
$(python-base-namespace).v2015_04_01.aio.operations.AutoscaleSettingsOperations
39+
azure.mgmt.monitor.v2015_04_01.aio.operations.AutoscaleSettingsOperations
4140
:ivar event_categories: EventCategoriesOperations operations
4241
:vartype event_categories:
43-
$(python-base-namespace).v2015_04_01.aio.operations.EventCategoriesOperations
42+
azure.mgmt.monitor.v2015_04_01.aio.operations.EventCategoriesOperations
4443
:ivar operations: Operations operations
45-
:vartype operations: $(python-base-namespace).v2015_04_01.aio.operations.Operations
44+
:vartype operations: azure.mgmt.monitor.v2015_04_01.aio.operations.Operations
4645
:ivar tenant_activity_logs: TenantActivityLogsOperations operations
4746
:vartype tenant_activity_logs:
48-
$(python-base-namespace).v2015_04_01.aio.operations.TenantActivityLogsOperations
47+
azure.mgmt.monitor.v2015_04_01.aio.operations.TenantActivityLogsOperations
4948
:ivar alert_rules: AlertRulesOperations operations
50-
:vartype alert_rules: $(python-base-namespace).v2015_04_01.aio.operations.AlertRulesOperations
49+
:vartype alert_rules: azure.mgmt.monitor.v2015_04_01.aio.operations.AlertRulesOperations
5150
:param credential: Credential needed for the client to connect to Azure. Required.
5251
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
5352
:param subscription_id: The ID of the target subscription. Required.

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
1110

1211
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -29,10 +28,6 @@
2928
from ..._vendor import _convert_request
3029
from ...operations._activity_logs_operations import build_list_request
3130

32-
if sys.version_info >= (3, 8):
33-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
34-
else:
35-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3631
T = TypeVar("T")
3732
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3833

@@ -43,7 +38,7 @@ class ActivityLogsOperations:
4338
**DO NOT** instantiate this class directly.
4439
4540
Instead, you should access the following operations through
46-
:class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s
41+
:class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s
4742
:attr:`activity_logs` attribute.
4843
"""
4944

@@ -87,13 +82,13 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Asyn
8782
:keyword callable cls: A custom type or function that will be passed the direct response
8883
:return: An iterator like instance of either EventData or the result of cls(response)
8984
:rtype:
90-
~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.EventData]
85+
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.EventData]
9186
:raises ~azure.core.exceptions.HttpResponseError:
9287
"""
9388
_headers = kwargs.pop("headers", {}) or {}
9489
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
9590

96-
api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
91+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01"))
9792
cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None)
9893

9994
error_map = {

0 commit comments

Comments
 (0)