Skip to content
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
CodeGen from PR 33891 in Azure/azure-rest-api-specs
Merge 22d9452657b7967f613a425d8c94baf837bb8d43 into dce18ad6d9dbc9e8c9912339f2c542f168ac4cb0
  • Loading branch information
SDKAuto committed Apr 18, 2025
commit ce9e6a6217c1559a430e58ec0afcd9aaeacbb0c1
2 changes: 1 addition & 1 deletion sdk/loadtesting/azure-developer-loadtesting/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ include azure/developer/loadtesting/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/developer/__init__.py
include azure/developer/__init__.py
6 changes: 6 additions & 0 deletions sdk/loadtesting/azure-developer-loadtesting/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "97b1524a3ebb70a532c64a2751b132331489ecf2",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/loadtestservice/LoadTestService",
"@azure-tools/typespec-python": "0.43.0"
}
101 changes: 101 additions & 0 deletions sdk/loadtesting/azure-developer-loadtesting/apiview-properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"CrossLanguagePackageId": "Microsoft.LoadTestService",
"CrossLanguageDefinitionId": {
"azure.developer.loadtesting.models.AppComponent": "Microsoft.LoadTestService.AppComponent",
"azure.developer.loadtesting.models.ArtifactsContainerInfo": "Microsoft.LoadTestService.ArtifactsContainerInfo",
"azure.developer.loadtesting.models.AutoStopCriteria": "Microsoft.LoadTestService.AutoStopCriteria",
"azure.developer.loadtesting.models.CertificateMetadata": "Microsoft.LoadTestService.CertificateMetadata",
"azure.developer.loadtesting.models.DimensionFilter": "Microsoft.LoadTestService.DimensionFilter",
"azure.developer.loadtesting.models.DimensionValue": "Microsoft.LoadTestService.DimensionValue",
"azure.developer.loadtesting.models.ErrorDetails": "Microsoft.LoadTestService.ErrorDetails",
"azure.developer.loadtesting.models.FunctionFlexConsumptionResourceConfiguration": "Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration",
"azure.developer.loadtesting.models.TargetResourceConfigurations": "Microsoft.LoadTestService.TargetResourceConfigurations",
"azure.developer.loadtesting.models.FunctionFlexConsumptionTargetResourceConfigurations": "Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations",
"azure.developer.loadtesting.models.LoadTestConfiguration": "Microsoft.LoadTestService.LoadTestConfiguration",
"azure.developer.loadtesting.models.MetricAvailability": "Microsoft.LoadTestService.MetricAvailability",
"azure.developer.loadtesting.models.MetricDefinition": "Microsoft.LoadTestService.MetricDefinition",
"azure.developer.loadtesting.models.MetricDefinitionCollection": "Microsoft.LoadTestService.MetricDefinitionCollection",
"azure.developer.loadtesting.models.MetricNamespace": "Microsoft.LoadTestService.MetricNamespace",
"azure.developer.loadtesting.models.MetricNamespaceCollection": "Microsoft.LoadTestService.MetricNamespaceCollection",
"azure.developer.loadtesting.models.MetricRequestPayload": "Microsoft.LoadTestService.MetricRequestPayload",
"azure.developer.loadtesting.models.MetricValue": "Microsoft.LoadTestService.MetricValue",
"azure.developer.loadtesting.models.NameAndDescription": "Microsoft.LoadTestService.NameAndDescription",
"azure.developer.loadtesting.models.OptionalLoadTestConfiguration": "Microsoft.LoadTestService.OptionalLoadTestConfiguration",
"azure.developer.loadtesting.models.PassFailCriteria": "Microsoft.LoadTestService.PassFailCriteria",
"azure.developer.loadtesting.models.PassFailMetric": "Microsoft.LoadTestService.PassFailMetric",
"azure.developer.loadtesting.models.PassFailServerMetric": "Microsoft.LoadTestService.PassFailServerMetric",
"azure.developer.loadtesting.models.RegionalConfiguration": "Microsoft.LoadTestService.RegionalConfiguration",
"azure.developer.loadtesting.models.ResourceMetric": "Microsoft.LoadTestService.ResourceMetric",
"azure.developer.loadtesting.models.Secret": "Microsoft.LoadTestService.Secret",
"azure.developer.loadtesting.models.Test": "Microsoft.LoadTestService.Test",
"azure.developer.loadtesting.models.TestAppComponents": "Microsoft.LoadTestService.TestAppComponents",
"azure.developer.loadtesting.models.TestFileInfo": "Microsoft.LoadTestService.TestFileInfo",
"azure.developer.loadtesting.models.TestInputArtifacts": "Microsoft.LoadTestService.TestInputArtifacts",
"azure.developer.loadtesting.models.TestProfile": "Microsoft.LoadTestService.TestProfile",
"azure.developer.loadtesting.models.TestProfileRun": "Microsoft.LoadTestService.TestProfileRun",
"azure.developer.loadtesting.models.TestProfileRunRecommendation": "Microsoft.LoadTestService.TestProfileRunRecommendation",
"azure.developer.loadtesting.models.TestRun": "Microsoft.LoadTestService.TestRun",
"azure.developer.loadtesting.models.TestRunAppComponents": "Microsoft.LoadTestService.TestRunAppComponents",
"azure.developer.loadtesting.models.TestRunArtifacts": "Microsoft.LoadTestService.TestRunArtifacts",
"azure.developer.loadtesting.models.TestRunDetail": "Microsoft.LoadTestService.TestRunDetail",
"azure.developer.loadtesting.models.TestRunFileInfo": "Microsoft.LoadTestService.TestRunFileInfo",
"azure.developer.loadtesting.models.TestRunInputArtifacts": "Microsoft.LoadTestService.TestRunInputArtifacts",
"azure.developer.loadtesting.models.TestRunOutputArtifacts": "Microsoft.LoadTestService.TestRunOutputArtifacts",
"azure.developer.loadtesting.models.TestRunServerMetricsConfiguration": "Microsoft.LoadTestService.TestRunServerMetricsConfiguration",
"azure.developer.loadtesting.models.TestRunStatistics": "Microsoft.LoadTestService.TestRunStatistics",
"azure.developer.loadtesting.models.TestServerMetricsConfiguration": "Microsoft.LoadTestService.TestServerMetricsConfiguration",
"azure.developer.loadtesting.models.TimeSeriesElement": "Microsoft.LoadTestService.TimeSeriesElement",
"azure.developer.loadtesting.models.PFMetrics": "Microsoft.LoadTestService.PFMetrics",
"azure.developer.loadtesting.models.PassFailAggregationFunction": "Microsoft.LoadTestService.PassFailAggregationFunction",
"azure.developer.loadtesting.models.PassFailAction": "Microsoft.LoadTestService.PassFailAction",
"azure.developer.loadtesting.models.PassFailResult": "Microsoft.LoadTestService.PassFailResult",
"azure.developer.loadtesting.models.SecretType": "Microsoft.LoadTestService.SecretType",
"azure.developer.loadtesting.models.CertificateType": "Microsoft.LoadTestService.CertificateType",
"azure.developer.loadtesting.models.FileType": "Microsoft.LoadTestService.FileType",
"azure.developer.loadtesting.models.FileValidationStatus": "Microsoft.LoadTestService.FileValidationStatus",
"azure.developer.loadtesting.models.TestKind": "Microsoft.LoadTestService.TestKind",
"azure.developer.loadtesting.models.ManagedIdentityType": "Microsoft.LoadTestService.ManagedIdentityType",
"azure.developer.loadtesting.models.ResourceKind": "Microsoft.LoadTestService.ResourceKind",
"azure.developer.loadtesting.models.PassFailTestResult": "Microsoft.LoadTestService.PassFailTestResult",
"azure.developer.loadtesting.models.TestRunStatus": "Microsoft.LoadTestService.TestRunStatus",
"azure.developer.loadtesting.models.RequestDataLevel": "Microsoft.LoadTestService.RequestDataLevel",
"azure.developer.loadtesting.models.CreatedByType": "Microsoft.LoadTestService.CreatedByType",
"azure.developer.loadtesting.models.TimeGrain": "Microsoft.LoadTestService.TimeGrain",
"azure.developer.loadtesting.models.Aggregation": "Microsoft.LoadTestService.Aggregation",
"azure.developer.loadtesting.models.MetricUnit": "Microsoft.LoadTestService.MetricUnit",
"azure.developer.loadtesting.models.TestProfileRunStatus": "Microsoft.LoadTestService.TestProfileRunStatus",
"azure.developer.loadtesting.models.RecommendationCategory": "Microsoft.LoadTestService.RecommendationCategory",
"azure.developer.loadtesting.LoadTestAdministrationClient.create_or_update_test": "Customizations.AdministrationOperations.createOrUpdateTest",
"azure.developer.loadtesting.LoadTestAdministrationClient.create_or_update_app_components": "Customizations.AdministrationOperations.createOrUpdateAppComponents",
"azure.developer.loadtesting.LoadTestAdministrationClient.create_or_update_server_metrics_config": "Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig",
"azure.developer.loadtesting.LoadTestAdministrationClient.get_app_components": "Customizations.AdministrationOperations.getAppComponents",
"azure.developer.loadtesting.LoadTestAdministrationClient.get_server_metrics_config": "Customizations.AdministrationOperations.getServerMetricsConfig",
"azure.developer.loadtesting.LoadTestAdministrationClient.get_test": "Customizations.AdministrationOperations.getTest",
"azure.developer.loadtesting.LoadTestAdministrationClient.get_test_file": "Customizations.AdministrationOperations.getTestFile",
"azure.developer.loadtesting.LoadTestAdministrationClient.list_test_files": "Customizations.AdministrationOperations.listTestFiles",
"azure.developer.loadtesting.LoadTestAdministrationClient.list_tests": "Customizations.AdministrationOperations.listTests",
"azure.developer.loadtesting.LoadTestAdministrationClient.delete_test_file": "Customizations.AdministrationOperations.deleteTestFile",
"azure.developer.loadtesting.LoadTestAdministrationClient.delete_test": "Customizations.AdministrationOperations.deleteTest",
"azure.developer.loadtesting.LoadTestAdministrationClient.create_or_update_test_profile": "Customizations.AdministrationOperations.createOrUpdateTestProfile",
"azure.developer.loadtesting.LoadTestAdministrationClient.delete_test_profile": "Customizations.AdministrationOperations.deleteTestProfile",
"azure.developer.loadtesting.LoadTestAdministrationClient.get_test_profile": "Customizations.AdministrationOperations.getTestProfile",
"azure.developer.loadtesting.LoadTestAdministrationClient.list_test_profiles": "Customizations.AdministrationOperations.listTestProfiles",
"azure.developer.loadtesting.LoadTestRunClient.create_or_update_app_components": "Customizations.TestRunOperations.createOrUpdateAppComponents",
"azure.developer.loadtesting.LoadTestRunClient.create_or_update_server_metrics_config": "Customizations.TestRunOperations.createOrUpdateServerMetricsConfig",
"azure.developer.loadtesting.LoadTestRunClient.delete_test_run": "Customizations.TestRunOperations.deleteTestRun",
"azure.developer.loadtesting.LoadTestRunClient.get_app_components": "Customizations.TestRunOperations.getAppComponents",
"azure.developer.loadtesting.LoadTestRunClient.get_server_metrics_config": "Customizations.TestRunOperations.getServerMetricsConfig",
"azure.developer.loadtesting.LoadTestRunClient.get_test_run": "Customizations.TestRunOperations.getTestRun",
"azure.developer.loadtesting.LoadTestRunClient.get_test_run_file": "Customizations.TestRunOperations.getTestRunFile",
"azure.developer.loadtesting.LoadTestRunClient.list_metric_dimension_values": "Customizations.TestRunOperations.listMetricDimensionValues",
"azure.developer.loadtesting.LoadTestRunClient.get_metric_definitions": "Customizations.TestRunOperations.listMetricDefinitions",
"azure.developer.loadtesting.LoadTestRunClient.get_metric_namespaces": "Customizations.TestRunOperations.listMetricNamespaces",
"azure.developer.loadtesting.LoadTestRunClient.list_metrics": "Customizations.TestRunOperations.listMetrics",
"azure.developer.loadtesting.LoadTestRunClient.list_test_runs": "Customizations.TestRunOperations.listTestRuns",
"azure.developer.loadtesting.LoadTestRunClient.stop_test_run": "Customizations.TestRunOperations.stop",
"azure.developer.loadtesting.LoadTestRunClient.delete_test_profile_run": "Customizations.TestRunOperations.deleteTestProfileRun",
"azure.developer.loadtesting.LoadTestRunClient.get_test_profile_run": "Customizations.TestRunOperations.getTestProfileRun",
"azure.developer.loadtesting.LoadTestRunClient.list_test_profile_runs": "Customizations.TestRunOperations.listTestProfileRuns",
"azure.developer.loadtesting.LoadTestRunClient.stop_test_profile_run": "Customizations.TestRunOperations.stopTestProfileRun"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class LoadTestAdministrationClient(LoadTestAdministrationClientOperationsMixin):
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
_endpoint = "https://{endpoint}"
self._config = LoadTestAdministrationClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand Down Expand Up @@ -114,6 +115,7 @@ class LoadTestRunClient(LoadTestRunClientOperationsMixin):
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
_endpoint = "https://{endpoint}"
self._config = LoadTestRunClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# 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.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=protected-access, broad-except

Expand All @@ -21,18 +22,14 @@
from datetime import datetime, date, time, timedelta, timezone
from json import JSONEncoder
import xml.etree.ElementTree as ET
from collections.abc import MutableMapping
from typing_extensions import Self
import isodate
from azure.core.exceptions import DeserializationError
from azure.core import CaseInsensitiveEnumMeta
from azure.core.pipeline import PipelineResponse
from azure.core.serialization import _Null

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping

_LOGGER = logging.getLogger(__name__)

__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"]
Expand Down Expand Up @@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str):
_UNSET = object()


class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object
class _MyMutableMapping(MutableMapping[str, typing.Any]):
def __init__(self, data: typing.Dict[str, typing.Any]) -> None:
self._data = data

Expand Down Expand Up @@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any:
return default

@typing.overload
def pop(self, key: str) -> typing.Any: ...
def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ

@typing.overload
def pop(self, key: str, default: _T) -> _T: ...
def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs

@typing.overload
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs

def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
"""
Expand Down Expand Up @@ -443,7 +440,7 @@ def clear(self) -> None:
"""
self._data.clear()

def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ
"""
Updates D from mapping/iterable E and F.
:param any args: Either a mapping object or an iterable of key-value pairs.
Expand All @@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
def setdefault(self, key: str, default: None = None) -> None: ...

@typing.overload
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs

def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
"""
Expand Down Expand Up @@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self:
cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items())
cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}")

return super().__new__(cls) # pylint: disable=no-value-for-parameter
return super().__new__(cls)

def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None:
for base in cls.__bases__:
Expand Down Expand Up @@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators):
discriminator_value = data.find(xml_name).text # pyright: ignore
else:
discriminator_value = data.get(discriminator._rest_name)
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
return mapped_cls._deserialize(data, exist_discriminators)

def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:
Expand Down
Loading