diff --git a/azure-mgmt-marketplaceordering/MANIFEST.in b/azure-mgmt-marketplaceordering/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-marketplaceordering/MANIFEST.in +++ b/azure-mgmt-marketplaceordering/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/marketplace_ordering_agreements.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/marketplace_ordering_agreements.py index 32b15685431e..92405c1b5bcb 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/marketplace_ordering_agreements.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/marketplace_ordering_agreements.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -51,7 +51,7 @@ def __init__( self.subscription_id = subscription_id -class MarketplaceOrderingAgreements(object): +class MarketplaceOrderingAgreements(SDKClient): """REST API for MarketplaceOrdering Agreements. :ivar config: Configuration for client. @@ -75,7 +75,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = MarketplaceOrderingAgreementsConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(MarketplaceOrderingAgreements, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2015-06-01' diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/__init__.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/__init__.py index 02a7d9c4b255..cbe83590d336 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/__init__.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/__init__.py @@ -9,12 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from .agreement_terms import AgreementTerms -from .error_response_error import ErrorResponseError -from .error_response import ErrorResponse, ErrorResponseException -from .operation_display import OperationDisplay -from .operation import Operation -from .resource import Resource +try: + from .agreement_terms_py3 import AgreementTerms + from .error_response_error_py3 import ErrorResponseError + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation + from .resource_py3 import Resource +except (SyntaxError, ImportError): + from .agreement_terms import AgreementTerms + from .error_response_error import ErrorResponseError + from .error_response import ErrorResponse, ErrorResponseException + from .operation_display import OperationDisplay + from .operation import Operation + from .resource import Resource from .operation_paged import OperationPaged __all__ = [ diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms.py index 50a3041019f2..b30fb3e97b88 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms.py @@ -64,13 +64,13 @@ class AgreementTerms(Resource): 'accepted': {'key': 'properties.accepted', 'type': 'bool'}, } - def __init__(self, publisher=None, product=None, plan=None, license_text_link=None, privacy_policy_link=None, retrieve_datetime=None, signature=None, accepted=None): - super(AgreementTerms, self).__init__() - self.publisher = publisher - self.product = product - self.plan = plan - self.license_text_link = license_text_link - self.privacy_policy_link = privacy_policy_link - self.retrieve_datetime = retrieve_datetime - self.signature = signature - self.accepted = accepted + def __init__(self, **kwargs): + super(AgreementTerms, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.plan = kwargs.get('plan', None) + self.license_text_link = kwargs.get('license_text_link', None) + self.privacy_policy_link = kwargs.get('privacy_policy_link', None) + self.retrieve_datetime = kwargs.get('retrieve_datetime', None) + self.signature = kwargs.get('signature', None) + self.accepted = kwargs.get('accepted', None) diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms_py3.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms_py3.py new file mode 100644 index 000000000000..4175632dea18 --- /dev/null +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/agreement_terms_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class AgreementTerms(Resource): + """Terms properties for provided Publisher/Offer/Plan tuple. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param publisher: Publisher identifier string of image being deployed. + :type publisher: str + :param product: Offer identifier string of image being deployed. + :type product: str + :param plan: Plan identifier string of image being deployed. + :type plan: str + :param license_text_link: Link to HTML with Microsoft and Publisher terms. + :type license_text_link: str + :param privacy_policy_link: Link to the privacy policy of the publisher. + :type privacy_policy_link: str + :param retrieve_datetime: Date and time in UTC of when the terms were + accepted. This is empty if Accepted is false. + :type retrieve_datetime: str + :param signature: Terms signature. + :type signature: str + :param accepted: If any version of the terms have been accepted, otherwise + false. + :type accepted: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'plan': {'key': 'properties.plan', 'type': 'str'}, + 'license_text_link': {'key': 'properties.licenseTextLink', 'type': 'str'}, + 'privacy_policy_link': {'key': 'properties.privacyPolicyLink', 'type': 'str'}, + 'retrieve_datetime': {'key': 'properties.retrieveDatetime', 'type': 'str'}, + 'signature': {'key': 'properties.signature', 'type': 'str'}, + 'accepted': {'key': 'properties.accepted', 'type': 'bool'}, + } + + def __init__(self, *, publisher: str=None, product: str=None, plan: str=None, license_text_link: str=None, privacy_policy_link: str=None, retrieve_datetime: str=None, signature: str=None, accepted: bool=None, **kwargs) -> None: + super(AgreementTerms, self).__init__(**kwargs) + self.publisher = publisher + self.product = product + self.plan = plan + self.license_text_link = license_text_link + self.privacy_policy_link = privacy_policy_link + self.retrieve_datetime = retrieve_datetime + self.signature = signature + self.accepted = accepted diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response.py index c0aa7577d7e8..1c5cb8d0ea13 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates Microsoft.MarketplaceOrdering service is not able + """Error response indicates Microsoft.MarketplaceOrdering service is not able to process the incoming request. The reason is provided in the error message. @@ -26,9 +26,9 @@ class ErrorResponse(Model): 'error': {'key': 'error', 'type': 'ErrorResponseError'}, } - def __init__(self, error=None): - super(ErrorResponse, self).__init__() - self.error = error + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error.py index 1b2f2208f619..689843352a65 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error.py @@ -34,7 +34,7 @@ class ErrorResponseError(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self): - super(ErrorResponseError, self).__init__() + def __init__(self, **kwargs): + super(ErrorResponseError, self).__init__(**kwargs) self.code = None self.message = None diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error_py3.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error_py3.py new file mode 100644 index 000000000000..92a101067f76 --- /dev/null +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_error_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorResponseError(Model): + """The details of the error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponseError, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_py3.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_py3.py new file mode 100644 index 000000000000..4e4585e5f718 --- /dev/null +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/error_response_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Error response indicates Microsoft.MarketplaceOrdering service is not able + to process the incoming request. The reason is provided in the error + message. + + :param error: The details of the error. + :type error: ~azure.mgmt.marketplaceordering.models.ErrorResponseError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseError'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation.py index 632d91912755..3d365b5774be 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation.py @@ -26,7 +26,7 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, } - def __init__(self, name=None, display=None): - super(Operation, self).__init__() - self.name = name - self.display = display + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display.py index 62d6155c0bd3..c536e0888d3b 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display.py @@ -31,8 +31,8 @@ class OperationDisplay(Model): 'operation': {'key': 'operation', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None): - super(OperationDisplay, self).__init__() - self.provider = provider - self.resource = resource - self.operation = operation + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display_py3.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display_py3.py new file mode 100644 index 000000000000..78d3420de4c8 --- /dev/null +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_display_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.MarketplaceOrdering + :type provider: str + :param resource: Resource on which the operation is performed: Agreement, + virtualmachine, etc. + :type resource: str + :param operation: Operation type: Get Agreement, Sign Agreement, Cancel + Agreement etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_py3.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_py3.py new file mode 100644 index 000000000000..1fcec8e5216a --- /dev/null +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/operation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """Microsoft.MarketplaceOrdering REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.marketplaceordering.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource.py index a2ddd410be1b..fc92549d32e9 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource.py @@ -38,8 +38,8 @@ class Resource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource_py3.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource_py3.py new file mode 100644 index 000000000000..aedc5cfaf0b9 --- /dev/null +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/models/resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/marketplace_agreements_operations.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/marketplace_agreements_operations.py index b292a4b5ad6c..3bfff1d1bea8 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/marketplace_agreements_operations.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/marketplace_agreements_operations.py @@ -22,7 +22,7 @@ class MarketplaceAgreementsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the request. Constant value: "2015-06-01". :ivar offer_type: Offer Type, currently only virtualmachine type is supported. Constant value: "virtualmachine". """ @@ -61,7 +61,7 @@ def get( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'offerType': self._serialize.url("self.offer_type", self.offer_type, 'str'), @@ -77,7 +77,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -86,8 +86,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -104,6 +104,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current'} def create( self, publisher_id, offer_id, plan_id, parameters, custom_headers=None, raw=False, **operation_config): @@ -132,7 +133,7 @@ def create( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current' + url = self.create.metadata['url'] path_format_arguments = { 'offerType': self._serialize.url("self.offer_type", self.offer_type, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), @@ -148,6 +149,7 @@ def create( # 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()) @@ -160,9 +162,8 @@ def create( body_content = self._serialize.body(parameters, 'AgreementTerms') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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]: raise models.ErrorResponseException(self._deserialize, response) @@ -177,3 +178,4 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current'} diff --git a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/operations.py b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/operations.py index 78fcfd8d8b24..9c187dc3bef3 100644 --- a/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/operations.py +++ b/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/operations.py @@ -21,7 +21,7 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the request. Constant value: "2015-06-01". """ @@ -56,7 +56,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.MarketplaceOrdering/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -95,3 +94,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.MarketplaceOrdering/operations'}