@@ -315,3 +315,77 @@ def get_long_running_output(response):
315
315
else : polling_method = polling
316
316
return LROPoller (self ._client , raw_result , get_long_running_output , polling_method )
317
317
create_or_update .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}' }
318
+
319
+ def list (
320
+ self , resource_group_name , circuit_name , peering_name , custom_headers = None , raw = False , ** operation_config ):
321
+ """Gets all global reach connections associated with a private peering in
322
+ an express route circuit.
323
+
324
+ :param resource_group_name: The name of the resource group.
325
+ :type resource_group_name: str
326
+ :param circuit_name: The name of the circuit.
327
+ :type circuit_name: str
328
+ :param peering_name: The name of the peering.
329
+ :type peering_name: str
330
+ :param dict custom_headers: headers that will be added to the request
331
+ :param bool raw: returns the direct response alongside the
332
+ deserialized response
333
+ :param operation_config: :ref:`Operation configuration
334
+ overrides<msrest:optionsforoperations>`.
335
+ :return: An iterator like instance of ExpressRouteCircuitConnection
336
+ :rtype:
337
+ ~azure.mgmt.network.v2018_10_01.models.ExpressRouteCircuitConnectionPaged[~azure.mgmt.network.v2018_10_01.models.ExpressRouteCircuitConnection]
338
+ :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
339
+ """
340
+ def internal_paging (next_link = None , raw = False ):
341
+
342
+ if not next_link :
343
+ # Construct URL
344
+ url = self .list .metadata ['url' ]
345
+ path_format_arguments = {
346
+ 'resourceGroupName' : self ._serialize .url ("resource_group_name" , resource_group_name , 'str' ),
347
+ 'circuitName' : self ._serialize .url ("circuit_name" , circuit_name , 'str' ),
348
+ 'peeringName' : self ._serialize .url ("peering_name" , peering_name , 'str' ),
349
+ 'subscriptionId' : self ._serialize .url ("self.config.subscription_id" , self .config .subscription_id , 'str' )
350
+ }
351
+ url = self ._client .format_url (url , ** path_format_arguments )
352
+
353
+ # Construct parameters
354
+ query_parameters = {}
355
+ query_parameters ['api-version' ] = self ._serialize .query ("self.api_version" , self .api_version , 'str' )
356
+
357
+ else :
358
+ url = next_link
359
+ query_parameters = {}
360
+
361
+ # Construct headers
362
+ header_parameters = {}
363
+ header_parameters ['Accept' ] = 'application/json'
364
+ if self .config .generate_client_request_id :
365
+ header_parameters ['x-ms-client-request-id' ] = str (uuid .uuid1 ())
366
+ if custom_headers :
367
+ header_parameters .update (custom_headers )
368
+ if self .config .accept_language is not None :
369
+ header_parameters ['accept-language' ] = self ._serialize .header ("self.config.accept_language" , self .config .accept_language , 'str' )
370
+
371
+ # Construct and send request
372
+ request = self ._client .get (url , query_parameters , header_parameters )
373
+ response = self ._client .send (request , stream = False , ** operation_config )
374
+
375
+ if response .status_code not in [200 ]:
376
+ exp = CloudError (response )
377
+ exp .request_id = response .headers .get ('x-ms-request-id' )
378
+ raise exp
379
+
380
+ return response
381
+
382
+ # Deserialize response
383
+ deserialized = models .ExpressRouteCircuitConnectionPaged (internal_paging , self ._deserialize .dependencies )
384
+
385
+ if raw :
386
+ header_dict = {}
387
+ client_raw_response = models .ExpressRouteCircuitConnectionPaged (internal_paging , self ._deserialize .dependencies , header_dict )
388
+ return client_raw_response
389
+
390
+ return deserialized
391
+ list .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections' }
0 commit comments