diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/network_management_client.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/network_management_client.py index 6fc7a88ee1a4..6e72d2db1fa4 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/network_management_client.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/network_management_client.py @@ -101,16 +101,29 @@ class NetworkManagementClientConfiguration(AzureConfiguration): identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param resource_group_name: The resource group name of the Microsoft Azure + resource. + :type resource_group_name: str + :param virtual_hub_name: The name of the Virtual Hub resource. + :type virtual_hub_name: str + :param connection_name: The name of the connection resource. + :type connection_name: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, resource_group_name, virtual_hub_name, connection_name, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") + if resource_group_name is None: + raise ValueError("Parameter 'resource_group_name' must not be None.") + if virtual_hub_name is None: + raise ValueError("Parameter 'virtual_hub_name' must not be None.") + if connection_name is None: + raise ValueError("Parameter 'connection_name' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -121,6 +134,9 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.virtual_hub_name = virtual_hub_name + self.connection_name = connection_name class NetworkManagementClient(SDKClient): @@ -273,13 +289,20 @@ class NetworkManagementClient(SDKClient): identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. :type subscription_id: str + :param resource_group_name: The resource group name of the Microsoft Azure + resource. + :type resource_group_name: str + :param virtual_hub_name: The name of the Virtual Hub resource. + :type virtual_hub_name: str + :param connection_name: The name of the connection resource. + :type connection_name: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, resource_group_name, virtual_hub_name, connection_name, base_url=None): - self.config = NetworkManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = NetworkManagementClientConfiguration(credentials, subscription_id, resource_group_name, virtual_hub_name, connection_name, base_url) super(NetworkManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -492,11 +515,9 @@ def check_dns_name_availability( check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} def supported_security_providers( - self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, custom_headers=None, raw=False, **operation_config): """Gives the supported security providers for the virtual wan. - :param resource_group_name: The resource group name. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are needed. :type virtual_wan_name: str @@ -518,7 +539,7 @@ def supported_security_providers( url = self.supported_security_providers.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/hub_virtual_network_connections_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/hub_virtual_network_connections_operations.py index 63547a5e7b4e..f078266bdf42 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/hub_virtual_network_connections_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/hub_virtual_network_connections_operations.py @@ -11,6 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -37,15 +39,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, virtual_hub_name, connection_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a HubVirtualNetworkConnection. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str - :param virtual_hub_name: The name of the VirtualHub. - :type virtual_hub_name: str - :param connection_name: The name of the vpn connection. - :type connection_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -62,9 +58,9 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), - 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("self.config.connection_name", self.config.connection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -101,14 +97,209 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} + + def _create_or_update_initial( + self, hub_virtual_network_connection_parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("self.config.connection_name", self.config.connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hub_virtual_network_connection_parameters, 'HubVirtualNetworkConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HubVirtualNetworkConnection', response) + if response.status_code == 201: + deserialized = self._deserialize('HubVirtualNetworkConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, hub_virtual_network_connection_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a HubVirtualNetworkConnection resource if it doesn't exist. + Updates the HubVirtualNetworkConnection if one exists. + + :param hub_virtual_network_connection_parameters: Parameters supplied + to create or update HubVirtualNetworkConnection. + :type hub_virtual_network_connection_parameters: + ~azure.mgmt.network.v2018_12_01.models.HubVirtualNetworkConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + HubVirtualNetworkConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_12_01.models.HubVirtualNetworkConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_12_01.models.HubVirtualNetworkConnection]] + :raises: + :class:`ErrorException` + """ + raw_result = self._create_or_update_initial( + hub_virtual_network_connection_parameters=hub_virtual_network_connection_parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('HubVirtualNetworkConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} + + + def _update_tags_initial( + self, tags=None, custom_headers=None, raw=False, **operation_config): + hub_virtual_network_connection_parameters = models.TagsObject(tags=tags) + + # Construct URL + url = self.update_tags.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("self.config.connection_name", self.config.connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(hub_virtual_network_connection_parameters, 'TagsObject') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HubVirtualNetworkConnection', response) + if response.status_code == 201: + deserialized = self._deserialize('HubVirtualNetworkConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_tags( + self, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates HubVirtualNetworkConnection tags. + + :param tags: Resource tags. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + HubVirtualNetworkConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2018_12_01.models.HubVirtualNetworkConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2018_12_01.models.HubVirtualNetworkConnection]] + :raises: + :class:`ErrorException` + """ + raw_result = self._update_tags_initial( + tags=tags, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('HubVirtualNetworkConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} + def list( - self, resource_group_name, virtual_hub_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Retrieves the details of all HubVirtualNetworkConnections. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str - :param virtual_hub_name: The name of the VirtualHub. - :type virtual_hub_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -127,8 +318,8 @@ def internal_paging(next_link=None, raw=False): url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_gateways_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_gateways_operations.py index f8dee69bd231..51343d3f3d28 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_gateways_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_gateways_operations.py @@ -40,12 +40,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a virtual wan p2s vpn gateway. - :param resource_group_name: The resource group name of the - P2SVpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param dict custom_headers: headers that will be added to the request @@ -63,7 +60,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -103,12 +100,12 @@ def get( def _create_or_update_initial( - self, resource_group_name, gateway_name, p2_svpn_gateway_parameters, custom_headers=None, raw=False, **operation_config): + self, gateway_name, p2_svpn_gateway_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -152,13 +149,10 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, gateway_name, p2_svpn_gateway_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, p2_svpn_gateway_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. - :param resource_group_name: The resource group name of the - P2SVpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param p2_svpn_gateway_parameters: Parameters supplied to create or @@ -180,7 +174,6 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, p2_svpn_gateway_parameters=p2_svpn_gateway_parameters, custom_headers=custom_headers, @@ -208,14 +201,14 @@ def get_long_running_output(response): def _update_tags_initial( - self, resource_group_name, gateway_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, gateway_name, tags=None, custom_headers=None, raw=False, **operation_config): p2_svpn_gateway_parameters = models.TagsObject(tags=tags) # Construct URL url = self.update_tags.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -259,12 +252,9 @@ def _update_tags_initial( return deserialized def update_tags( - self, resource_group_name, gateway_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates virtual wan p2s vpn gateway tags. - :param resource_group_name: The resource group name of the - P2SVpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param tags: Resource tags. @@ -284,7 +274,6 @@ def update_tags( :class:`ErrorException` """ raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, tags=tags, custom_headers=custom_headers, @@ -312,12 +301,12 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -347,12 +336,9 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a virtual wan p2s vpn gateway. - :param resource_group_name: The resource group name of the - P2SVpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param dict custom_headers: headers that will be added to the request @@ -368,7 +354,6 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, custom_headers=custom_headers, raw=True, @@ -390,12 +375,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Lists all the P2SVpnGateways in a resource group. - :param resource_group_name: The resource group name of the - P2SVpnGateway. - :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -414,7 +396,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -521,13 +503,13 @@ def internal_paging(next_link=None, raw=False): def _generate_vpn_profile_initial( - self, resource_group_name, gateway_name, authentication_method=None, custom_headers=None, raw=False, **operation_config): + self, gateway_name, authentication_method=None, custom_headers=None, raw=False, **operation_config): parameters = models.P2SVpnProfileParameters(authentication_method=authentication_method) # Construct URL url = self.generate_vpn_profile.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -572,12 +554,10 @@ def _generate_vpn_profile_initial( return deserialized def generate_vpn_profile( - self, resource_group_name, gateway_name, authentication_method=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, authentication_method=None, custom_headers=None, raw=False, polling=True, **operation_config): """Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :param gateway_name: The name of the P2SVpnGateway. :type gateway_name: str :param authentication_method: VPN client Authentication Method. @@ -599,7 +579,6 @@ def generate_vpn_profile( :raises: :class:`CloudError` """ raw_result = self._generate_vpn_profile_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, authentication_method=authentication_method, custom_headers=custom_headers, diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_server_configurations_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_server_configurations_operations.py index 88b0b7e01d2d..f5247404272e 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_server_configurations_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/p2s_vpn_server_configurations_operations.py @@ -39,12 +39,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, virtual_wan_name, p2_svpn_server_configuration_name, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, p2_svpn_server_configuration_name, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a P2SVpnServerConfiguration. - :param resource_group_name: The resource group name of the - P2SVpnServerConfiguration. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWan. :type virtual_wan_name: str :param p2_svpn_server_configuration_name: The name of the @@ -66,7 +63,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'virtualWanName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), 'p2SVpnServerConfigurationName': self._serialize.url("p2_svpn_server_configuration_name", p2_svpn_server_configuration_name, 'str') } @@ -107,12 +104,12 @@ def get( def _create_or_update_initial( - self, resource_group_name, virtual_wan_name, p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'virtualWanName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), 'p2SVpnServerConfigurationName': self._serialize.url("p2_svpn_server_configuration_name", p2_svpn_server_configuration_name, 'str') } @@ -157,12 +154,10 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, virtual_wan_name, p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_wan_name, p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it doesn't exist else updates the existing P2SVpnServerConfiguration. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWan. :type virtual_wan_name: str :param p2_svpn_server_configuration_name: The name of the @@ -188,7 +183,6 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, p2_svpn_server_configuration_name=p2_svpn_server_configuration_name, p2_svpn_server_configuration_parameters=p2_svpn_server_configuration_parameters, @@ -217,12 +211,12 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, virtual_wan_name, p2_svpn_server_configuration_name, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, p2_svpn_server_configuration_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'virtualWanName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), 'p2SVpnServerConfigurationName': self._serialize.url("p2_svpn_server_configuration_name", p2_svpn_server_configuration_name, 'str') } @@ -253,12 +247,9 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, virtual_wan_name, p2_svpn_server_configuration_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_wan_name, p2_svpn_server_configuration_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a P2SVpnServerConfiguration. - :param resource_group_name: The resource group name of the - P2SVpnServerConfiguration. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWan. :type virtual_wan_name: str :param p2_svpn_server_configuration_name: The name of the @@ -277,7 +268,6 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, p2_svpn_server_configuration_name=p2_svpn_server_configuration_name, custom_headers=custom_headers, @@ -300,11 +290,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'} def list_by_virtual_wan( - self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, custom_headers=None, raw=False, **operation_config): """Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWan. :type virtual_wan_name: str :param dict custom_headers: headers that will be added to the request @@ -325,7 +313,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_virtual_wan.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'virtualWanName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_hubs_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_hubs_operations.py index 7eb5a5d0cc46..3f7323a239b5 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_hubs_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_hubs_operations.py @@ -39,13 +39,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, virtual_hub_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a VirtualHub. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str - :param virtual_hub_name: The name of the VirtualHub. - :type virtual_hub_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -61,8 +57,8 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -101,13 +97,13 @@ def get( def _create_or_update_initial( - self, resource_group_name, virtual_hub_name, virtual_hub_parameters, custom_headers=None, raw=False, **operation_config): + self, virtual_hub_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,14 +146,10 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, virtual_hub_name, virtual_hub_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_hub_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str - :param virtual_hub_name: The name of the VirtualHub. - :type virtual_hub_name: str :param virtual_hub_parameters: Parameters supplied to create or update VirtualHub. :type virtual_hub_parameters: @@ -177,8 +169,6 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - virtual_hub_name=virtual_hub_name, virtual_hub_parameters=virtual_hub_parameters, custom_headers=custom_headers, raw=True, @@ -205,15 +195,15 @@ def get_long_running_output(response): def _update_tags_initial( - self, resource_group_name, virtual_hub_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, tags=None, custom_headers=None, raw=False, **operation_config): virtual_hub_parameters = models.TagsObject(tags=tags) # Construct URL url = self.update_tags.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -256,13 +246,9 @@ def _update_tags_initial( return deserialized def update_tags( - self, resource_group_name, virtual_hub_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates VirtualHub tags. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str - :param virtual_hub_name: The name of the VirtualHub. - :type virtual_hub_name: str :param tags: Resource tags. :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request @@ -280,8 +266,6 @@ def update_tags( :class:`ErrorException` """ raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_hub_name=virtual_hub_name, tags=tags, custom_headers=custom_headers, raw=True, @@ -308,13 +292,13 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, virtual_hub_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("self.config.virtual_hub_name", self.config.virtual_hub_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -343,13 +327,9 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, virtual_hub_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a VirtualHub. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str - :param virtual_hub_name: The name of the VirtualHub. - :type virtual_hub_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -363,8 +343,6 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, - virtual_hub_name=virtual_hub_name, custom_headers=custom_headers, raw=True, **operation_config @@ -385,11 +363,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Lists all the VirtualHubs in a resource group. - :param resource_group_name: The resource group name of the VirtualHub. - :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -408,7 +384,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_wans_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_wans_operations.py index e8f516e6a7c9..3ffaf8e848e2 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_wans_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/virtual_wans_operations.py @@ -39,11 +39,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a VirtualWAN. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN being retrieved. :type virtual_wan_name: str :param dict custom_headers: headers that will be added to the request @@ -60,9 +58,9 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -101,12 +99,12 @@ def get( def _create_or_update_initial( - self, resource_group_name, virtual_wan_name, wan_parameters, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, wan_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,12 +148,10 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, virtual_wan_name, wan_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_wan_name, wan_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN being created or updated. :type virtual_wan_name: str @@ -178,7 +174,6 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, wan_parameters=wan_parameters, custom_headers=custom_headers, @@ -206,14 +201,14 @@ def get_long_running_output(response): def _update_tags_initial( - self, resource_group_name, virtual_wan_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, tags=None, custom_headers=None, raw=False, **operation_config): wan_parameters = models.TagsObject(tags=tags) # Construct URL url = self.update_tags.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -257,11 +252,9 @@ def _update_tags_initial( return deserialized def update_tags( - self, resource_group_name, virtual_wan_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_wan_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates a VirtualWAN tags. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN being updated. :type virtual_wan_name: str :param tags: Resource tags. @@ -281,7 +274,6 @@ def update_tags( :class:`ErrorException` """ raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, tags=tags, custom_headers=custom_headers, @@ -309,12 +301,12 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -344,11 +336,9 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_wan_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a VirtualWAN. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN being deleted. :type virtual_wan_name: str :param dict custom_headers: headers that will be added to the request @@ -364,7 +354,6 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, custom_headers=custom_headers, raw=True, @@ -386,11 +375,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Lists all the VirtualWANs in a resource group. - :param resource_group_name: The resource group name of the VirtualWan. - :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -409,7 +396,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_connections_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_connections_operations.py index ad7612c0a65d..ce2d18dc4993 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_connections_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_connections_operations.py @@ -39,15 +39,11 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, gateway_name, connection_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a vpn connection. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str - :param connection_name: The name of the vpn connection. - :type connection_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -63,9 +59,9 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), - 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + 'connectionName': self._serialize.url("self.config.connection_name", self.config.connection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -104,14 +100,14 @@ def get( def _create_or_update_initial( - self, resource_group_name, gateway_name, connection_name, vpn_connection_parameters, custom_headers=None, raw=False, **operation_config): + self, gateway_name, vpn_connection_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), - 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + 'connectionName': self._serialize.url("self.config.connection_name", self.config.connection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -154,16 +150,12 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, gateway_name, connection_name, vpn_connection_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, vpn_connection_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str - :param connection_name: The name of the connection. - :type connection_name: str :param vpn_connection_parameters: Parameters supplied to create or Update a VPN Connection. :type vpn_connection_parameters: @@ -183,9 +175,7 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, - connection_name=connection_name, vpn_connection_parameters=vpn_connection_parameters, custom_headers=custom_headers, raw=True, @@ -212,14 +202,14 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, gateway_name, connection_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), - 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + 'connectionName': self._serialize.url("self.config.connection_name", self.config.connection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -248,15 +238,11 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, gateway_name, connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a vpn connection. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str - :param connection_name: The name of the connection. - :type connection_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -270,9 +256,7 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, - connection_name=connection_name, custom_headers=custom_headers, raw=True, **operation_config @@ -293,11 +277,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} def list_by_vpn_gateway( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): """Retrieves all vpn connections for a particular virtual wan vpn gateway. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param dict custom_headers: headers that will be added to the request @@ -318,7 +300,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_vpn_gateway.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_gateways_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_gateways_operations.py index 404bfb7b5c24..02754f2529b1 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_gateways_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_gateways_operations.py @@ -39,11 +39,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a virtual wan vpn gateway. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param dict custom_headers: headers that will be added to the request @@ -61,7 +59,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -101,12 +99,12 @@ def get( def _create_or_update_initial( - self, resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers=None, raw=False, **operation_config): + self, gateway_name, vpn_gateway_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,12 +148,10 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, gateway_name, vpn_gateway_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, vpn_gateway_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param vpn_gateway_parameters: Parameters supplied to create or Update @@ -177,7 +173,6 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, vpn_gateway_parameters=vpn_gateway_parameters, custom_headers=custom_headers, @@ -205,14 +200,14 @@ def get_long_running_output(response): def _update_tags_initial( - self, resource_group_name, gateway_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, gateway_name, tags=None, custom_headers=None, raw=False, **operation_config): vpn_gateway_parameters = models.TagsObject(tags=tags) # Construct URL url = self.update_tags.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -256,11 +251,9 @@ def _update_tags_initial( return deserialized def update_tags( - self, resource_group_name, gateway_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates virtual wan vpn gateway tags. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param tags: Resource tags. @@ -280,7 +273,6 @@ def update_tags( :class:`ErrorException` """ raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, tags=tags, custom_headers=custom_headers, @@ -308,12 +300,12 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, **operation_config): + self, gateway_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -343,11 +335,9 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, gateway_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a virtual wan vpn gateway. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param gateway_name: The name of the gateway. :type gateway_name: str :param dict custom_headers: headers that will be added to the request @@ -363,7 +353,6 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, gateway_name=gateway_name, custom_headers=custom_headers, raw=True, @@ -385,11 +374,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Lists all the VpnGateways in a resource group. - :param resource_group_name: The resource group name of the VpnGateway. - :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -408,7 +395,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_configuration_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_configuration_operations.py index ece949e26294..2a09cb61b77a 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_configuration_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_configuration_operations.py @@ -40,14 +40,14 @@ def __init__(self, client, config, serializer, deserializer): def _download_initial( - self, resource_group_name, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, **operation_config): + self, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, **operation_config): request = models.GetVpnSitesConfigurationRequest(vpn_sites=vpn_sites, output_blob_sas_url=output_blob_sas_url) # Construct URL url = self.download.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -81,12 +81,10 @@ def _download_initial( return client_raw_response def download( - self, resource_group_name, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, virtual_wan_name, vpn_sites=None, output_blob_sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): """Gives the sas-url to download the configurations for vpn-sites in a resource group. - :param resource_group_name: The resource group name. - :type resource_group_name: str :param virtual_wan_name: The name of the VirtualWAN for which configuration of all vpn-sites is needed. :type virtual_wan_name: str @@ -109,7 +107,6 @@ def download( :class:`ErrorException` """ raw_result = self._download_initial( - resource_group_name=resource_group_name, virtual_wan_name=virtual_wan_name, vpn_sites=vpn_sites, output_blob_sas_url=output_blob_sas_url, diff --git a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_operations.py b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_operations.py index fb4ef515230a..eb367aa38d53 100644 --- a/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_operations.py +++ b/azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/vpn_sites_operations.py @@ -39,11 +39,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def get( - self, resource_group_name, vpn_site_name, custom_headers=None, raw=False, **operation_config): + self, vpn_site_name, custom_headers=None, raw=False, **operation_config): """Retrieves the details of a VPN site. - :param resource_group_name: The resource group name of the VpnSite. - :type resource_group_name: str :param vpn_site_name: The name of the VpnSite being retrieved. :type vpn_site_name: str :param dict custom_headers: headers that will be added to the request @@ -61,7 +59,7 @@ def get( url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -101,12 +99,12 @@ def get( def _create_or_update_initial( - self, resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers=None, raw=False, **operation_config): + self, vpn_site_name, vpn_site_parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -150,12 +148,10 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, vpn_site_name, vpn_site_parameters, custom_headers=None, raw=False, polling=True, **operation_config): + self, vpn_site_name, vpn_site_parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. - :param resource_group_name: The resource group name of the VpnSite. - :type resource_group_name: str :param vpn_site_name: The name of the VpnSite being created or updated. :type vpn_site_name: str @@ -178,7 +174,6 @@ def create_or_update( :class:`ErrorException` """ raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, vpn_site_name=vpn_site_name, vpn_site_parameters=vpn_site_parameters, custom_headers=custom_headers, @@ -206,14 +201,14 @@ def get_long_running_output(response): def _update_tags_initial( - self, resource_group_name, vpn_site_name, tags=None, custom_headers=None, raw=False, **operation_config): + self, vpn_site_name, tags=None, custom_headers=None, raw=False, **operation_config): vpn_site_parameters = models.TagsObject(tags=tags) # Construct URL url = self.update_tags.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -257,11 +252,9 @@ def _update_tags_initial( return deserialized def update_tags( - self, resource_group_name, vpn_site_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, vpn_site_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates VpnSite tags. - :param resource_group_name: The resource group name of the VpnSite. - :type resource_group_name: str :param vpn_site_name: The name of the VpnSite being updated. :type vpn_site_name: str :param tags: Resource tags. @@ -281,7 +274,6 @@ def update_tags( :class:`ErrorException` """ raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, vpn_site_name=vpn_site_name, tags=tags, custom_headers=custom_headers, @@ -309,12 +301,12 @@ def get_long_running_output(response): def _delete_initial( - self, resource_group_name, vpn_site_name, custom_headers=None, raw=False, **operation_config): + self, vpn_site_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str'), 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -344,11 +336,9 @@ def _delete_initial( return client_raw_response def delete( - self, resource_group_name, vpn_site_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, vpn_site_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a VpnSite. - :param resource_group_name: The resource group name of the VpnSite. - :type resource_group_name: str :param vpn_site_name: The name of the VpnSite being deleted. :type vpn_site_name: str :param dict custom_headers: headers that will be added to the request @@ -364,7 +354,6 @@ def delete( :class:`ErrorException` """ raw_result = self._delete_initial( - resource_group_name=resource_group_name, vpn_site_name=vpn_site_name, custom_headers=custom_headers, raw=True, @@ -386,11 +375,9 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): + self, custom_headers=None, raw=False, **operation_config): """Lists all the vpnSites in a resource group. - :param resource_group_name: The resource group name of the VpnSite. - :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -409,7 +396,7 @@ def internal_paging(next_link=None, raw=False): url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'resourceGroupName': self._serialize.url("self.config.resource_group_name", self.config.resource_group_name, 'str') } url = self._client.format_url(url, **path_format_arguments)