From 0511af1fe378f1901a2f32781adf4b623488deb0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 30 Oct 2018 23:15:06 +0000 Subject: [PATCH 1/2] Generated from 490314cf7a09e90d28985acda96d9d8d39e3e052 Fix network trace API bugs --- .../web/operations/web_apps_operations.py | 96 +++++++++++-------- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py index 4ac5aa2211a3..5c84ad51d249 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py @@ -7751,8 +7751,9 @@ def get_network_trace_operation( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ @@ -7792,7 +7793,7 @@ def get_network_trace_operation( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7920,7 +7921,7 @@ def _start_web_site_network_trace_operation_initial( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7950,10 +7951,12 @@ def start_web_site_network_trace_operation( 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 object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] :raises: :class:`DefaultErrorResponseException` """ @@ -7969,7 +7972,7 @@ def start_web_site_network_trace_operation( ) def get_long_running_output(response): - deserialized = self._deserialize('object', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8131,8 +8134,9 @@ def get_network_trace_operation_v2( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ @@ -8172,7 +8176,7 @@ def get_network_trace_operation_v2( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -18270,8 +18274,9 @@ def get_network_trace_operation_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ @@ -18312,7 +18317,7 @@ def get_network_trace_operation_slot( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -18444,7 +18449,7 @@ def _start_web_site_network_trace_operation_slot_initial( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -18476,10 +18481,12 @@ def start_web_site_network_trace_operation_slot( 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 object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] :raises: :class:`DefaultErrorResponseException` """ @@ -18496,7 +18503,7 @@ def start_web_site_network_trace_operation_slot( ) def get_long_running_output(response): - deserialized = self._deserialize('object', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -18645,7 +18652,7 @@ def get_network_traces_slot( return deserialized get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - def get_network_trace_operation_slot_v2( + def get_network_trace_operation_v2_slot( self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): """Gets a named operation for a network trace capturing (or deployment slot, if specified). @@ -18668,13 +18675,14 @@ def get_network_trace_operation_slot_v2( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_network_trace_operation_slot_v2.metadata['url'] + url = self.get_network_trace_operation_v2_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -18710,16 +18718,16 @@ def get_network_trace_operation_slot_v2( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} + get_network_trace_operation_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} - def get_network_traces_slot_v2( + def get_network_traces_v2_slot( self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): """Gets a named operation for a network trace capturing (or deployment slot, if specified). @@ -18749,7 +18757,7 @@ def get_network_traces_slot_v2( :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_network_traces_slot_v2.metadata['url'] + url = self.get_network_traces_v2_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -18790,7 +18798,7 @@ def get_network_traces_slot_v2( return client_raw_response return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + get_network_traces_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} def generate_new_site_publishing_password_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -21932,7 +21940,7 @@ def _start_network_trace_slot_initial( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -21964,10 +21972,12 @@ def start_network_trace_slot( 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 object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] :raises: :class:`DefaultErrorResponseException` """ @@ -21984,7 +21994,7 @@ def start_network_trace_slot( ) def get_long_running_output(response): - deserialized = self._deserialize('object', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -24172,7 +24182,7 @@ def _start_network_trace_initial( if response.status_code == 200: deserialized = self._deserialize('[NetworkTrace]', response) if response.status_code == 202: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -24202,10 +24212,12 @@ def start_network_trace( 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 object or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[object] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[object]] + :return: An instance of LROPoller that returns list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] :raises: :class:`DefaultErrorResponseException` """ @@ -24221,7 +24233,7 @@ def start_network_trace( ) def get_long_running_output(response): - deserialized = self._deserialize('object', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) From c2fa34b25b4e727e9bcb891bf6eca18121472908 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 1 Nov 2018 00:51:37 +0000 Subject: [PATCH 2/2] Generated from cd188bfe4b478640564185f58a0c505640d2d095 Fix network trace API V2 --- .../azure/mgmt/web/operations/web_apps_operations.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py index 5c84ad51d249..3db347f680c8 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py @@ -18652,7 +18652,7 @@ def get_network_traces_slot( return deserialized get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - def get_network_trace_operation_v2_slot( + def get_network_trace_operation_slot_v2( self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): """Gets a named operation for a network trace capturing (or deployment slot, if specified). @@ -18682,7 +18682,7 @@ def get_network_trace_operation_v2_slot( :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_network_trace_operation_v2_slot.metadata['url'] + url = self.get_network_trace_operation_slot_v2.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -18725,9 +18725,9 @@ def get_network_trace_operation_v2_slot( return client_raw_response return deserialized - get_network_trace_operation_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} + get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} - def get_network_traces_v2_slot( + def get_network_traces_slot_v2( self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): """Gets a named operation for a network trace capturing (or deployment slot, if specified). @@ -18757,7 +18757,7 @@ def get_network_traces_v2_slot( :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_network_traces_v2_slot.metadata['url'] + url = self.get_network_traces_slot_v2.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -18798,7 +18798,7 @@ def get_network_traces_v2_slot( return client_raw_response return deserialized - get_network_traces_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} def generate_new_site_publishing_password_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config):