@@ -456,36 +456,15 @@ def get_long_running_output(response):
456
456
lro_delay = operation_config .get (
457
457
'long_running_operation_timeout' ,
458
458
self .config .long_running_operation_timeout )
459
- if polling is True : polling_method = ARMPolling (lro_delay , ** operation_config )
459
+ if polling is True : polling_method = ARMPolling (lro_delay , lro_options = { 'final-state-via' : 'location' }, ** operation_config )
460
460
elif polling is False : polling_method = NoPolling ()
461
461
else : polling_method = polling
462
462
return LROPoller (self ._client , raw_result , get_long_running_output , polling_method )
463
463
reset .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset' }
464
464
465
- def generatevpnclientpackage (
466
- self , resource_group_name , virtual_network_gateway_name , processor_architecture = None , custom_headers = None , raw = False , ** operation_config ):
467
- """Generates VPN client package for P2S client of the virtual network
468
- gateway in the specified resource group.
469
465
470
- :param resource_group_name: The name of the resource group.
471
- :type resource_group_name: str
472
- :param virtual_network_gateway_name: The name of the virtual network
473
- gateway.
474
- :type virtual_network_gateway_name: str
475
- :param processor_architecture: VPN client Processor Architecture.
476
- Possible values are: 'AMD64' and 'X86'. Possible values include:
477
- 'Amd64', 'X86'
478
- :type processor_architecture: str or
479
- ~azure.mgmt.network.v2015_06_15.models.ProcessorArchitecture
480
- :param dict custom_headers: headers that will be added to the request
481
- :param bool raw: returns the direct response alongside the
482
- deserialized response
483
- :param operation_config: :ref:`Operation configuration
484
- overrides<msrest:optionsforoperations>`.
485
- :return: str or ClientRawResponse if raw=true
486
- :rtype: str or ~msrest.pipeline.ClientRawResponse
487
- :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
488
- """
466
+ def _generatevpnclientpackage_initial (
467
+ self , resource_group_name , virtual_network_gateway_name , processor_architecture = None , custom_headers = None , raw = False , ** operation_config ):
489
468
parameters = models .VpnClientParameters (processor_architecture = processor_architecture )
490
469
491
470
# Construct URL
@@ -525,6 +504,7 @@ def generatevpnclientpackage(
525
504
raise exp
526
505
527
506
deserialized = None
507
+
528
508
if response .status_code == 202 :
529
509
deserialized = self ._deserialize ('str' , response )
530
510
@@ -533,4 +513,56 @@ def generatevpnclientpackage(
533
513
return client_raw_response
534
514
535
515
return deserialized
516
+
517
+ def generatevpnclientpackage (
518
+ self , resource_group_name , virtual_network_gateway_name , processor_architecture = None , custom_headers = None , raw = False , polling = True , ** operation_config ):
519
+ """Generates VPN client package for P2S client of the virtual network
520
+ gateway in the specified resource group.
521
+
522
+ :param resource_group_name: The name of the resource group.
523
+ :type resource_group_name: str
524
+ :param virtual_network_gateway_name: The name of the virtual network
525
+ gateway.
526
+ :type virtual_network_gateway_name: str
527
+ :param processor_architecture: VPN client Processor Architecture.
528
+ Possible values are: 'AMD64' and 'X86'. Possible values include:
529
+ 'Amd64', 'X86'
530
+ :type processor_architecture: str or
531
+ ~azure.mgmt.network.v2015_06_15.models.ProcessorArchitecture
532
+ :param dict custom_headers: headers that will be added to the request
533
+ :param bool raw: The poller return type is ClientRawResponse, the
534
+ direct response alongside the deserialized response
535
+ :param polling: True for ARMPolling, False for no polling, or a
536
+ polling object for personal polling strategy
537
+ :return: An instance of LROPoller that returns str or
538
+ ClientRawResponse<str> if raw==True
539
+ :rtype: ~msrestazure.azure_operation.AzureOperationPoller[str] or
540
+ ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[str]]
541
+ :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
542
+ """
543
+ raw_result = self ._generatevpnclientpackage_initial (
544
+ resource_group_name = resource_group_name ,
545
+ virtual_network_gateway_name = virtual_network_gateway_name ,
546
+ processor_architecture = processor_architecture ,
547
+ custom_headers = custom_headers ,
548
+ raw = True ,
549
+ ** operation_config
550
+ )
551
+
552
+ def get_long_running_output (response ):
553
+ deserialized = self ._deserialize ('str' , response )
554
+
555
+ if raw :
556
+ client_raw_response = ClientRawResponse (deserialized , response )
557
+ return client_raw_response
558
+
559
+ return deserialized
560
+
561
+ lro_delay = operation_config .get (
562
+ 'long_running_operation_timeout' ,
563
+ self .config .long_running_operation_timeout )
564
+ if polling is True : polling_method = ARMPolling (lro_delay , lro_options = {'final-state-via' : 'location' }, ** operation_config )
565
+ elif polling is False : polling_method = NoPolling ()
566
+ else : polling_method = polling
567
+ return LROPoller (self ._client , raw_result , get_long_running_output , polling_method )
536
568
generatevpnclientpackage .metadata = {'url' : '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage' }
0 commit comments