From 98c89cfe15faa5a59b8c390a95ca8309760c058c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 19 Apr 2018 09:36:51 -0700 Subject: [PATCH] [AutoPR apimanagement/resource-manager] ApiIssue HEAD operation name consistent across the spec (#2419) * Generated from 3a649f27e5368d86880dc0f4c3b8b2c76676763e normalize head names * Generated from 58adb27c9fd292a5f3c01faa388a3183c075b632 delete supports 200 --- .../operations/api_issue_attachment_operations.py | 8 ++++---- .../operations/api_issue_comment_operations.py | 8 ++++---- .../mgmt/apimanagement/operations/api_issue_operations.py | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py index c0501076087..df95c6de2d2 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_attachment_operations.py @@ -132,7 +132,7 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments'} - def head( + def get_entity_tag( self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -161,7 +161,7 @@ def head( :class:`ErrorResponseException` """ # Construct URL - url = self.head.metadata['url'] + url = self.get_entity_tag.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), @@ -199,7 +199,7 @@ def head( 'ETag': 'str', }) return client_raw_response - head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}'} def get( self, resource_group_name, service_name, api_id, issue_id, attachment_id, custom_headers=None, raw=False, **operation_config): @@ -431,7 +431,7 @@ def delete( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) if raw: diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py index d935d340ac6..317905662af 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_comment_operations.py @@ -132,7 +132,7 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments'} - def head( + def get_entity_tag( self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -161,7 +161,7 @@ def head( :class:`ErrorResponseException` """ # Construct URL - url = self.head.metadata['url'] + url = self.get_entity_tag.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), @@ -199,7 +199,7 @@ def head( 'ETag': 'str', }) return client_raw_response - head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}'} def get( self, resource_group_name, service_name, api_id, issue_id, comment_id, custom_headers=None, raw=False, **operation_config): @@ -431,7 +431,7 @@ def delete( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) if raw: diff --git a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py index ef5d3518785..30fc13dc028 100644 --- a/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py +++ b/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/api_issue_operations.py @@ -130,7 +130,7 @@ def internal_paging(next_link=None, raw=False): return deserialized list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues'} - def head( + def get_entity_tag( self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config): """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -156,7 +156,7 @@ def head( :class:`ErrorResponseException` """ # Construct URL - url = self.head.metadata['url'] + url = self.get_entity_tag.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), @@ -193,7 +193,7 @@ def head( 'ETag': 'str', }) return client_raw_response - head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} + get_entity_tag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}'} def get( self, resource_group_name, service_name, api_id, issue_id, custom_headers=None, raw=False, **operation_config): @@ -410,7 +410,7 @@ def delete( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) if raw: