9
9
from copy import deepcopy
10
10
from typing import Any , TYPE_CHECKING
11
11
12
+ from azure .core .pipeline import policies
12
13
from azure .core .rest import HttpRequest , HttpResponse
13
14
from azure .mgmt .core import ARMPipelineClient
15
+ from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
14
16
15
17
from . import models as _models
16
18
from ._configuration import MobileNetworkManagementClientConfiguration
26
28
PacketCoreControlPlaneVersionsOperations ,
27
29
PacketCoreControlPlanesOperations ,
28
30
PacketCoreDataPlanesOperations ,
31
+ RoutingInfoOperations ,
29
32
ServicesOperations ,
30
33
SimGroupsOperations ,
31
34
SimPoliciesOperations ,
@@ -61,6 +64,8 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
61
64
:ivar packet_core_control_planes: PacketCoreControlPlanesOperations operations
62
65
:vartype packet_core_control_planes:
63
66
azure.mgmt.mobilenetwork.operations.PacketCoreControlPlanesOperations
67
+ :ivar routing_info: RoutingInfoOperations operations
68
+ :vartype routing_info: azure.mgmt.mobilenetwork.operations.RoutingInfoOperations
64
69
:ivar packet_core_control_plane_versions: PacketCoreControlPlaneVersionsOperations operations
65
70
:vartype packet_core_control_plane_versions:
66
71
azure.mgmt.mobilenetwork.operations.PacketCoreControlPlaneVersionsOperations
@@ -90,7 +95,7 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
90
95
:type subscription_id: str
91
96
:param base_url: Service URL. Default value is "https://management.azure.com".
92
97
: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
94
99
default value may result in unsupported behavior.
95
100
:paramtype api_version: str
96
101
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -107,7 +112,25 @@ def __init__(
107
112
self ._config = MobileNetworkManagementClientConfiguration (
108
113
credential = credential , subscription_id = subscription_id , ** kwargs
109
114
)
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 )
111
134
112
135
client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
113
136
self ._serialize = Serializer (client_models )
@@ -126,6 +149,7 @@ def __init__(
126
149
self .packet_core_control_planes = PacketCoreControlPlanesOperations (
127
150
self ._client , self ._config , self ._serialize , self ._deserialize
128
151
)
152
+ self .routing_info = RoutingInfoOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
129
153
self .packet_core_control_plane_versions = PacketCoreControlPlaneVersionsOperations (
130
154
self ._client , self ._config , self ._serialize , self ._deserialize
131
155
)
@@ -143,7 +167,7 @@ def __init__(
143
167
)
144
168
self .ue_information = UeInformationOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
145
169
146
- def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
170
+ def _send_request (self , request : HttpRequest , * , stream : bool = False , * *kwargs : Any ) -> HttpResponse :
147
171
"""Runs the network request through the client's chained policies.
148
172
149
173
>>> from azure.core.rest import HttpRequest
@@ -163,7 +187,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
163
187
164
188
request_copy = deepcopy (request )
165
189
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
167
191
168
192
def close (self ) -> None :
169
193
self ._client .close ()
0 commit comments