Skip to content

Commit fe435b7

Browse files
[AutoRelease] t2-mobilenetwork-2024-06-05-65505(can only be merged by SDK owner) (#35916)
* code and test * Update assets.json --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 811dc0e commit fe435b7

File tree

139 files changed

+4811
-4603
lines changed

Some content is hidden

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

139 files changed

+4811
-4603
lines changed

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

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

3+
## 3.3.0 (2024-06-17)
4+
5+
### Features Added
6+
7+
- Added operation MobileNetworksOperations.list_sim_groups
8+
- Added operation SimsOperations.begin_clone
9+
- Added operation SimsOperations.begin_move
10+
- Added operation group RoutingInfoOperations
11+
- Model InterfaceProperties has a new parameter bfd_ipv4_endpoints
12+
- Model InterfaceProperties has a new parameter ipv4_address_list
13+
- Model InterfaceProperties has a new parameter vlan_id
14+
- Model PacketCoreControlPlane has a new parameter user_consent
15+
- Model Platform has a new parameter ha_upgrades_available
16+
- Model SignalingConfiguration has a new parameter nas_encryption
17+
318
## 3.2.0 (2024-03-18)
419

520
### Features Added
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "c7b8df506c79231f08e1d878b1c4917a5abb1113",
2+
"commit": "f6f50c6388fd5836fa142384641b8353a99874ef",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.7.1",
7-
"@autorest/modelerfour@4.26.2"
6+
"@autorest/python@6.13.16",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/mobilenetwork/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/mobilenetwork/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.13.16 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/mobilenetwork/resource-manager/readme.md"
1111
}

sdk/mobilenetwork/azure-mgmt-mobilenetwork/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/mobilenetwork/azure-mgmt-mobilenetwork",
5-
"Tag": "python/mobilenetwork/azure-mgmt-mobilenetwork_f697b1e70b"
5+
"Tag": "python/mobilenetwork/azure-mgmt-mobilenetwork_3467978f5a"
66
}

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from typing import Any, TYPE_CHECKING
1010

11-
from azure.core.configuration import Configuration
1211
from azure.core.pipeline import policies
1312
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1413

@@ -19,7 +18,7 @@
1918
from azure.core.credentials import TokenCredential
2019

2120

22-
class MobileNetworkManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class MobileNetworkManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2322
"""Configuration for MobileNetworkManagementClient.
2423
2524
Note that all parameters used to create this instance are saved as instance
@@ -29,14 +28,13 @@ class MobileNetworkManagementClientConfiguration(Configuration): # pylint: disa
2928
:type credential: ~azure.core.credentials.TokenCredential
3029
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3130
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this
3332
default value may result in unsupported behavior.
3433
:paramtype api_version: str
3534
"""
3635

3736
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
super(MobileNetworkManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2024-02-01")
37+
api_version: str = kwargs.pop("api_version", "2024-04-01")
4038

4139
if credential is None:
4240
raise ValueError("Parameter 'credential' must not be None.")
@@ -48,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4846
self.api_version = api_version
4947
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5048
kwargs.setdefault("sdk_moniker", "mgmt-mobilenetwork/{}".format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(self, **kwargs: Any) -> None:
@@ -56,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
5655
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5756
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
5857
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
59-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6058
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6159
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6261
self.authentication_policy = kwargs.get("authentication_policy")
6362
if self.credential and not self.authentication_policy:
6463
self.authentication_policy = ARMChallengeAuthenticationPolicy(

sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/_mobile_network_management_client.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
1111

12+
from azure.core.pipeline import policies
1213
from azure.core.rest import HttpRequest, HttpResponse
1314
from azure.mgmt.core import ARMPipelineClient
15+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1416

1517
from . import models as _models
1618
from ._configuration import MobileNetworkManagementClientConfiguration
@@ -26,6 +28,7 @@
2628
PacketCoreControlPlaneVersionsOperations,
2729
PacketCoreControlPlanesOperations,
2830
PacketCoreDataPlanesOperations,
31+
RoutingInfoOperations,
2932
ServicesOperations,
3033
SimGroupsOperations,
3134
SimPoliciesOperations,
@@ -61,6 +64,8 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
6164
:ivar packet_core_control_planes: PacketCoreControlPlanesOperations operations
6265
:vartype packet_core_control_planes:
6366
azure.mgmt.mobilenetwork.operations.PacketCoreControlPlanesOperations
67+
:ivar routing_info: RoutingInfoOperations operations
68+
:vartype routing_info: azure.mgmt.mobilenetwork.operations.RoutingInfoOperations
6469
:ivar packet_core_control_plane_versions: PacketCoreControlPlaneVersionsOperations operations
6570
:vartype packet_core_control_plane_versions:
6671
azure.mgmt.mobilenetwork.operations.PacketCoreControlPlaneVersionsOperations
@@ -90,7 +95,7 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
9095
:type subscription_id: str
9196
:param base_url: Service URL. Default value is "https://management.azure.com".
9297
:type base_url: str
93-
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
98+
:keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this
9499
default value may result in unsupported behavior.
95100
:paramtype api_version: str
96101
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -107,7 +112,25 @@ def __init__(
107112
self._config = MobileNetworkManagementClientConfiguration(
108113
credential=credential, subscription_id=subscription_id, **kwargs
109114
)
110-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
115+
_policies = kwargs.pop("policies", None)
116+
if _policies is None:
117+
_policies = [
118+
policies.RequestIdPolicy(**kwargs),
119+
self._config.headers_policy,
120+
self._config.user_agent_policy,
121+
self._config.proxy_policy,
122+
policies.ContentDecodePolicy(**kwargs),
123+
ARMAutoResourceProviderRegistrationPolicy(),
124+
self._config.redirect_policy,
125+
self._config.retry_policy,
126+
self._config.authentication_policy,
127+
self._config.custom_hook_policy,
128+
self._config.logging_policy,
129+
policies.DistributedTracingPolicy(**kwargs),
130+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
131+
self._config.http_logging_policy,
132+
]
133+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
111134

112135
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
113136
self._serialize = Serializer(client_models)
@@ -126,6 +149,7 @@ def __init__(
126149
self.packet_core_control_planes = PacketCoreControlPlanesOperations(
127150
self._client, self._config, self._serialize, self._deserialize
128151
)
152+
self.routing_info = RoutingInfoOperations(self._client, self._config, self._serialize, self._deserialize)
129153
self.packet_core_control_plane_versions = PacketCoreControlPlaneVersionsOperations(
130154
self._client, self._config, self._serialize, self._deserialize
131155
)
@@ -143,7 +167,7 @@ def __init__(
143167
)
144168
self.ue_information = UeInformationOperations(self._client, self._config, self._serialize, self._deserialize)
145169

146-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
170+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
147171
"""Runs the network request through the client's chained policies.
148172
149173
>>> from azure.core.rest import HttpRequest
@@ -163,7 +187,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
163187

164188
request_copy = deepcopy(request)
165189
request_copy.url = self._client.format_url(request_copy.url)
166-
return self._client.send_request(request_copy, **kwargs)
190+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
167191

168192
def close(self) -> None:
169193
self._client.close()

sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

0 commit comments

Comments
 (0)