diff --git a/azure-mgmt-logic/MANIFEST.in b/azure-mgmt-logic/MANIFEST.in index 9ecaeb15de50..6ceb27f7a96e 100644 --- a/azure-mgmt-logic/MANIFEST.in +++ b/azure-mgmt-logic/MANIFEST.in @@ -1,2 +1,4 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-logic/azure/__init__.py b/azure-mgmt-logic/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-logic/azure/__init__.py +++ b/azure-mgmt-logic/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-logic/azure/mgmt/__init__.py b/azure-mgmt-logic/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-logic/azure/mgmt/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py b/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py index 5cecf1a882ce..ea6f82d78e58 100644 --- a/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py +++ b/azure-mgmt-logic/azure/mgmt/logic/logic_management_client.py @@ -21,6 +21,8 @@ from .operations.workflow_runs_operations import WorkflowRunsOperations from .operations.workflow_run_actions_operations import WorkflowRunActionsOperations from .operations.workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from .operations.workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from .operations.workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations from .operations.workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations from .operations.workflow_run_operations import WorkflowRunOperations from .operations.integration_accounts_operations import IntegrationAccountsOperations @@ -90,6 +92,10 @@ class LogicManagementClient(SDKClient): :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitions operations :vartype workflow_run_action_repetitions: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_repetitions_request_histories: WorkflowRunActionRepetitionsRequestHistories operations + :vartype workflow_run_action_repetitions_request_histories: azure.mgmt.logic.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations + :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistories operations + :vartype workflow_run_action_request_histories: azure.mgmt.logic.operations.WorkflowRunActionRequestHistoriesOperations :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitions operations :vartype workflow_run_action_scope_repetitions: azure.mgmt.logic.operations.WorkflowRunActionScopeRepetitionsOperations :ivar workflow_run_operations: WorkflowRunOperations operations @@ -150,6 +156,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations( self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations( + self._client, self.config, self._serialize, self._deserialize) self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations( self._client, self.config, self._serialize, self._deserialize) self.workflow_run_operations = WorkflowRunOperations( diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py index a79386ed9a8f..62165dd50eb4 100644 --- a/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py @@ -131,6 +131,10 @@ from .batch_release_criteria_py3 import BatchReleaseCriteria from .batch_configuration_properties_py3 import BatchConfigurationProperties from .batch_configuration_py3 import BatchConfiguration + from .request_py3 import Request + from .response_py3 import Response + from .request_history_properties_py3 import RequestHistoryProperties + from .request_history_py3 import RequestHistory except (SyntaxError, ImportError): from .resource import Resource from .sub_resource import SubResource @@ -253,6 +257,10 @@ from .batch_release_criteria import BatchReleaseCriteria from .batch_configuration_properties import BatchConfigurationProperties from .batch_configuration import BatchConfiguration + from .request import Request + from .response import Response + from .request_history_properties import RequestHistoryProperties + from .request_history import RequestHistory from .workflow_paged import WorkflowPaged from .workflow_version_paged import WorkflowVersionPaged from .workflow_trigger_paged import WorkflowTriggerPaged @@ -261,6 +269,7 @@ from .workflow_run_action_paged import WorkflowRunActionPaged from .expression_root_paged import ExpressionRootPaged from .workflow_run_action_repetition_definition_paged import WorkflowRunActionRepetitionDefinitionPaged +from .request_history_paged import RequestHistoryPaged from .integration_account_paged import IntegrationAccountPaged from .key_vault_key_paged import KeyVaultKeyPaged from .assembly_definition_paged import AssemblyDefinitionPaged @@ -427,6 +436,10 @@ 'BatchReleaseCriteria', 'BatchConfigurationProperties', 'BatchConfiguration', + 'Request', + 'Response', + 'RequestHistoryProperties', + 'RequestHistory', 'WorkflowPaged', 'WorkflowVersionPaged', 'WorkflowTriggerPaged', @@ -435,6 +448,7 @@ 'WorkflowRunActionPaged', 'ExpressionRootPaged', 'WorkflowRunActionRepetitionDefinitionPaged', + 'RequestHistoryPaged', 'IntegrationAccountPaged', 'KeyVaultKeyPaged', 'AssemblyDefinitionPaged', diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request.py b/azure-mgmt-logic/azure/mgmt/logic/models/request.py new file mode 100644 index 000000000000..061c655df42c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request.py @@ -0,0 +1,36 @@ +# 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 Request(Model): + """A request. + + :param headers: A list of all the headers attached to the request. + :type headers: object + :param uri: The destination for the request. + :type uri: str + :param method: The HTTP method used for the request. + :type method: str + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Request, self).__init__(**kwargs) + self.headers = kwargs.get('headers', None) + self.uri = kwargs.get('uri', None) + self.method = kwargs.get('method', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request_history.py b/azure-mgmt-logic/azure/mgmt/logic/models/request_history.py new file mode 100644 index 000000000000..564959f187e8 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request_history.py @@ -0,0 +1,52 @@ +# 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 import Resource + + +class RequestHistory(Resource): + """The request history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The request history properties. + :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, + } + + def __init__(self, **kwargs): + super(RequestHistory, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request_history_paged.py b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_paged.py new file mode 100644 index 000000000000..01d899c9e674 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class RequestHistoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`RequestHistory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RequestHistory]'} + } + + def __init__(self, *args, **kwargs): + + super(RequestHistoryPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties.py b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties.py new file mode 100644 index 000000000000..241a1212a41d --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties.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 RequestHistoryProperties(Model): + """The request history. + + :param start_time: The time the request started. + :type start_time: datetime + :param end_time: The time the request ended. + :type end_time: datetime + :param request: The request. + :type request: ~azure.mgmt.logic.models.Request + :param response: The response. + :type response: ~azure.mgmt.logic.models.Response + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'response': {'key': 'response', 'type': 'Response'}, + } + + def __init__(self, **kwargs): + super(RequestHistoryProperties, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.request = kwargs.get('request', None) + self.response = kwargs.get('response', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties_py3.py new file mode 100644 index 000000000000..5bb2653331e9 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_properties_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 RequestHistoryProperties(Model): + """The request history. + + :param start_time: The time the request started. + :type start_time: datetime + :param end_time: The time the request ended. + :type end_time: datetime + :param request: The request. + :type request: ~azure.mgmt.logic.models.Request + :param response: The response. + :type response: ~azure.mgmt.logic.models.Response + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'response': {'key': 'response', 'type': 'Response'}, + } + + def __init__(self, *, start_time=None, end_time=None, request=None, response=None, **kwargs) -> None: + super(RequestHistoryProperties, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.request = request + self.response = response diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request_history_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_py3.py new file mode 100644 index 000000000000..855a717a27d2 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request_history_py3.py @@ -0,0 +1,52 @@ +# 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 RequestHistory(Resource): + """The request history. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :param location: The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The request history properties. + :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + """ + + _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'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(RequestHistory, self).__init__(location=location, tags=tags, **kwargs) + self.properties = properties diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/request_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/request_py3.py new file mode 100644 index 000000000000..e72ac2ab288c --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/request_py3.py @@ -0,0 +1,36 @@ +# 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 Request(Model): + """A request. + + :param headers: A list of all the headers attached to the request. + :type headers: object + :param uri: The destination for the request. + :type uri: str + :param method: The HTTP method used for the request. + :type method: str + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + } + + def __init__(self, *, headers=None, uri: str=None, method: str=None, **kwargs) -> None: + super(Request, self).__init__(**kwargs) + self.headers = headers + self.uri = uri + self.method = method diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/response.py b/azure-mgmt-logic/azure/mgmt/logic/models/response.py new file mode 100644 index 000000000000..f3b4a4a29e53 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/response.py @@ -0,0 +1,36 @@ +# 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 Response(Model): + """A response. + + :param headers: A list of all the headers attached to the response. + :type headers: object + :param status_code: The status code of the response. + :type status_code: int + :param body_link: Details on the location of the body content. + :type body_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, + } + + def __init__(self, **kwargs): + super(Response, self).__init__(**kwargs) + self.headers = kwargs.get('headers', None) + self.status_code = kwargs.get('status_code', None) + self.body_link = kwargs.get('body_link', None) diff --git a/azure-mgmt-logic/azure/mgmt/logic/models/response_py3.py b/azure-mgmt-logic/azure/mgmt/logic/models/response_py3.py new file mode 100644 index 000000000000..7213223e63c4 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/models/response_py3.py @@ -0,0 +1,36 @@ +# 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 Response(Model): + """A response. + + :param headers: A list of all the headers attached to the response. + :type headers: object + :param status_code: The status code of the response. + :type status_code: int + :param body_link: Details on the location of the body content. + :type body_link: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'headers': {'key': 'headers', 'type': 'object'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, + } + + def __init__(self, *, headers=None, status_code: int=None, body_link=None, **kwargs) -> None: + super(Response, self).__init__(**kwargs) + self.headers = headers + self.status_code = status_code + self.body_link = body_link diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py b/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py index 4f914d51fe35..71ca7f9ddd5e 100644 --- a/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/__init__.py @@ -17,6 +17,8 @@ from .workflow_runs_operations import WorkflowRunsOperations from .workflow_run_actions_operations import WorkflowRunActionsOperations from .workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from .workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from .workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations from .workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations from .workflow_run_operations import WorkflowRunOperations from .integration_accounts_operations import IntegrationAccountsOperations @@ -39,6 +41,8 @@ 'WorkflowRunsOperations', 'WorkflowRunActionsOperations', 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionRepetitionsRequestHistoriesOperations', + 'WorkflowRunActionRequestHistoriesOperations', 'WorkflowRunActionScopeRepetitionsOperations', 'WorkflowRunOperations', 'IntegrationAccountsOperations', diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_request_histories_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_request_histories_operations.py new file mode 100644 index 000000000000..d39359102427 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_repetitions_request_histories_operations.py @@ -0,0 +1,188 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkflowRunActionRepetitionsRequestHistoriesOperations(object): + """WorkflowRunActionRepetitionsRequestHistoriesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, custom_headers=None, raw=False, **operation_config): + """List a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RequestHistory + :rtype: + ~azure.mgmt.logic.models.RequestHistoryPaged[~azure.mgmt.logic.models.RequestHistory] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + 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'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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: + 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 and send request + 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) + + return response + + # Deserialize response + deserialized = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, repetition_name, request_history_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param request_history_name: The request history name. + :type request_history_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RequestHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.RequestHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + 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'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), + 'requestHistoryName': self._serialize.url("request_history_name", request_history_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' + 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 and send request + 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) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RequestHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} diff --git a/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_request_histories_operations.py b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_request_histories_operations.py new file mode 100644 index 000000000000..d6801a082c65 --- /dev/null +++ b/azure-mgmt-logic/azure/mgmt/logic/operations/workflow_run_action_request_histories_operations.py @@ -0,0 +1,182 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkflowRunActionRequestHistoriesOperations(object): + """WorkflowRunActionRequestHistoriesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version. Constant value: "2018-07-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-01-preview" + + self.config = config + + def list( + self, resource_group_name, workflow_name, run_name, action_name, custom_headers=None, raw=False, **operation_config): + """List a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RequestHistory + :rtype: + ~azure.mgmt.logic.models.RequestHistoryPaged[~azure.mgmt.logic.models.RequestHistory] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + 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'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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: + 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 and send request + 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) + + return response + + # Deserialize response + deserialized = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RequestHistoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} + + def get( + self, resource_group_name, workflow_name, run_name, action_name, request_history_name, custom_headers=None, raw=False, **operation_config): + """Gets a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param request_history_name: The request history name. + :type request_history_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RequestHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.logic.models.RequestHistory or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + 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'), + 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), + 'runName': self._serialize.url("run_name", run_name, 'str'), + 'actionName': self._serialize.url("action_name", action_name, 'str'), + 'requestHistoryName': self._serialize.url("request_history_name", request_history_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' + 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 and send request + 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) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RequestHistory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} diff --git a/azure-mgmt-logic/azure_bdist_wheel.py b/azure-mgmt-logic/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-logic/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-logic/setup.cfg b/azure-mgmt-logic/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-logic/setup.cfg +++ b/azure-mgmt-logic/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-logic/setup.py b/azure-mgmt-logic/setup.py index 9018d5b45c2a..760812b2cf0b 100644 --- a/azure-mgmt-logic/setup.py +++ b/azure-mgmt-logic/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-logic" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } )