From 280eb045c1f7a0869a621fc6b97f672e93a2a99b Mon Sep 17 00:00:00 2001 From: Ted Chambers Date: Mon, 29 Jul 2019 12:47:38 -0400 Subject: [PATCH] Add missing released clients, fix some descriptions --- .../cloud_load_test/cloud_load_test_client.py | 2 +- .../devops/released/notification/__init__.py | 76 +++++ .../notification/notification_client.py | 296 ++++++++++++++++++ .../devops/released/test_plan/__init__.py | 68 ++++ .../released/test_plan/test_plan_client.py | 42 +++ .../devops/released/test_results/__init__.py | 105 +++++++ .../test_results/test_results_client.py | 45 +++ .../cloud_load_test/cloud_load_test_client.py | 2 +- .../devops/v5_1/cloud_load_test/models.py | 234 +++++++------- azure-devops/azure/devops/version.py | 2 +- azure-devops/setup.py | 2 +- 11 files changed, 755 insertions(+), 119 deletions(-) create mode 100644 azure-devops/azure/devops/released/notification/__init__.py create mode 100644 azure-devops/azure/devops/released/notification/notification_client.py create mode 100644 azure-devops/azure/devops/released/test_plan/__init__.py create mode 100644 azure-devops/azure/devops/released/test_plan/test_plan_client.py create mode 100644 azure-devops/azure/devops/released/test_results/__init__.py create mode 100644 azure-devops/azure/devops/released/test_results/test_results_client.py diff --git a/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py b/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py index acb82100..d1554263 100644 --- a/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py +++ b/azure-devops/azure/devops/released/cloud_load_test/cloud_load_test_client.py @@ -39,7 +39,7 @@ def create_agent_group(self, group): def get_agent_groups(self, agent_group_id=None, machine_setup_input=None, machine_access_data=None, outgoing_request_urls=None, agent_group_name=None): """GetAgentGroups. - :param str agent_group_id: The agent group indentifier + :param str agent_group_id: The agent group identifier :param bool machine_setup_input: :param bool machine_access_data: :param bool outgoing_request_urls: diff --git a/azure-devops/azure/devops/released/notification/__init__.py b/azure-devops/azure/devops/released/notification/__init__.py new file mode 100644 index 00000000..a6a19d06 --- /dev/null +++ b/azure-devops/azure/devops/released/notification/__init__.py @@ -0,0 +1,76 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from ...v5_1.notification.models import * +from .notification_client import NotificationClient + +__all__ = [ + 'ArtifactFilter', + 'BaseSubscriptionFilter', + 'BatchNotificationOperation', + 'EventActor', + 'EventScope', + 'EventsEvaluationResult', + 'EventTransformRequest', + 'EventTransformResult', + 'ExpressionFilterClause', + 'ExpressionFilterGroup', + 'ExpressionFilterModel', + 'FieldInputValues', + 'FieldValuesQuery', + 'GraphSubjectBase', + 'IdentityRef', + 'INotificationDiagnosticLog', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'ISubscriptionChannel', + 'ISubscriptionFilter', + 'NotificationAdminSettings', + 'NotificationAdminSettingsUpdateParameters', + 'NotificationDiagnosticLogMessage', + 'NotificationEventField', + 'NotificationEventFieldOperator', + 'NotificationEventFieldType', + 'NotificationEventPublisher', + 'NotificationEventRole', + 'NotificationEventType', + 'NotificationEventTypeCategory', + 'NotificationQueryCondition', + 'NotificationReason', + 'NotificationsEvaluationResult', + 'NotificationStatistic', + 'NotificationStatisticsQuery', + 'NotificationStatisticsQueryConditions', + 'NotificationSubscriber', + 'NotificationSubscriberUpdateParameters', + 'NotificationSubscription', + 'NotificationSubscriptionCreateParameters', + 'NotificationSubscriptionTemplate', + 'NotificationSubscriptionUpdateParameters', + 'OperatorConstraint', + 'ReferenceLinks', + 'SubscriptionAdminSettings', + 'SubscriptionChannelWithAddress', + 'SubscriptionDiagnostics', + 'SubscriptionEvaluationRequest', + 'SubscriptionEvaluationResult', + 'SubscriptionEvaluationSettings', + 'SubscriptionManagement', + 'SubscriptionQuery', + 'SubscriptionQueryCondition', + 'SubscriptionScope', + 'SubscriptionTracing', + 'SubscriptionUserSettings', + 'UpdateSubscripitonDiagnosticsParameters', + 'UpdateSubscripitonTracingParameters', + 'ValueDefinition', + 'VssNotificationEvent', + 'NotificationClient' +] diff --git a/azure-devops/azure/devops/released/notification/notification_client.py b/azure-devops/azure/devops/released/notification/notification_client.py new file mode 100644 index 00000000..2c833304 --- /dev/null +++ b/azure-devops/azure/devops/released/notification/notification_client.py @@ -0,0 +1,296 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from ...v5_1.notification import models + + +class NotificationClient(Client): + """Notification + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(NotificationClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = None + + def list_logs(self, source, entry_id=None, start_time=None, end_time=None): + """ListLogs. + List diagnostic logs this service. + :param str source: + :param str entry_id: + :param datetime start_time: + :param datetime end_time: + :rtype: [INotificationDiagnosticLog] + """ + route_values = {} + if source is not None: + route_values['source'] = self._serialize.url('source', source, 'str') + if entry_id is not None: + route_values['entryId'] = self._serialize.url('entry_id', entry_id, 'str') + query_parameters = {} + if start_time is not None: + query_parameters['startTime'] = self._serialize.query('start_time', start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query('end_time', end_time, 'iso-8601') + response = self._send(http_method='GET', + location_id='991842f3-eb16-4aea-ac81-81353ef2b75c', + version='5.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('[INotificationDiagnosticLog]', self._unwrap_collection(response)) + + def get_subscription_diagnostics(self, subscription_id): + """GetSubscriptionDiagnostics. + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + response = self._send(http_method='GET', + location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', + version='5.1', + route_values=route_values) + return self._deserialize('SubscriptionDiagnostics', response) + + def update_subscription_diagnostics(self, update_parameters, subscription_id): + """UpdateSubscriptionDiagnostics. + :param :class:` ` update_parameters: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(update_parameters, 'UpdateSubscripitonDiagnosticsParameters') + response = self._send(http_method='PUT', + location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', + version='5.1', + route_values=route_values, + content=content) + return self._deserialize('SubscriptionDiagnostics', response) + + def get_event_type(self, event_type): + """GetEventType. + Get a specific event type. + :param str event_type: + :rtype: :class:` ` + """ + route_values = {} + if event_type is not None: + route_values['eventType'] = self._serialize.url('event_type', event_type, 'str') + response = self._send(http_method='GET', + location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', + version='5.1', + route_values=route_values) + return self._deserialize('NotificationEventType', response) + + def list_event_types(self, publisher_id=None): + """ListEventTypes. + List available event types for this service. Optionally filter by only event types for the specified publisher. + :param str publisher_id: Limit to event types for this publisher + :rtype: [NotificationEventType] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', + version='5.1', + query_parameters=query_parameters) + return self._deserialize('[NotificationEventType]', self._unwrap_collection(response)) + + def get_settings(self): + """GetSettings. + :rtype: :class:` ` + """ + response = self._send(http_method='GET', + location_id='cbe076d8-2803-45ff-8d8d-44653686ea2a', + version='5.1') + return self._deserialize('NotificationAdminSettings', response) + + def update_settings(self, update_parameters): + """UpdateSettings. + :param :class:` ` update_parameters: + :rtype: :class:` ` + """ + content = self._serialize.body(update_parameters, 'NotificationAdminSettingsUpdateParameters') + response = self._send(http_method='PATCH', + location_id='cbe076d8-2803-45ff-8d8d-44653686ea2a', + version='5.1', + content=content) + return self._deserialize('NotificationAdminSettings', response) + + def get_subscriber(self, subscriber_id): + """GetSubscriber. + :param str subscriber_id: + :rtype: :class:` ` + """ + route_values = {} + if subscriber_id is not None: + route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') + response = self._send(http_method='GET', + location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', + version='5.1', + route_values=route_values) + return self._deserialize('NotificationSubscriber', response) + + def update_subscriber(self, update_parameters, subscriber_id): + """UpdateSubscriber. + :param :class:` ` update_parameters: + :param str subscriber_id: + :rtype: :class:` ` + """ + route_values = {} + if subscriber_id is not None: + route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') + content = self._serialize.body(update_parameters, 'NotificationSubscriberUpdateParameters') + response = self._send(http_method='PATCH', + location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', + version='5.1', + route_values=route_values, + content=content) + return self._deserialize('NotificationSubscriber', response) + + def query_subscriptions(self, subscription_query): + """QuerySubscriptions. + Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + :param :class:` ` subscription_query: + :rtype: [NotificationSubscription] + """ + content = self._serialize.body(subscription_query, 'SubscriptionQuery') + response = self._send(http_method='POST', + location_id='6864db85-08c0-4006-8e8e-cc1bebe31675', + version='5.1', + content=content) + return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) + + def create_subscription(self, create_parameters): + """CreateSubscription. + Create a new subscription. + :param :class:` ` create_parameters: + :rtype: :class:` ` + """ + content = self._serialize.body(create_parameters, 'NotificationSubscriptionCreateParameters') + response = self._send(http_method='POST', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='5.1', + content=content) + return self._deserialize('NotificationSubscription', response) + + def delete_subscription(self, subscription_id): + """DeleteSubscription. + Delete a subscription. + :param str subscription_id: + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + self._send(http_method='DELETE', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='5.1', + route_values=route_values) + + def get_subscription(self, subscription_id, query_flags=None): + """GetSubscription. + Get a notification subscription by its ID. + :param str subscription_id: + :param str query_flags: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + query_parameters = {} + if query_flags is not None: + query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') + response = self._send(http_method='GET', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='5.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('NotificationSubscription', response) + + def list_subscriptions(self, target_id=None, ids=None, query_flags=None): + """ListSubscriptions. + Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. + :param str target_id: User or Group ID + :param [str] ids: List of subscription IDs + :param str query_flags: + :rtype: [NotificationSubscription] + """ + query_parameters = {} + if target_id is not None: + query_parameters['targetId'] = self._serialize.query('target_id', target_id, 'str') + if ids is not None: + ids = ",".join(ids) + query_parameters['ids'] = self._serialize.query('ids', ids, 'str') + if query_flags is not None: + query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') + response = self._send(http_method='GET', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='5.1', + query_parameters=query_parameters) + return self._deserialize('[NotificationSubscription]', self._unwrap_collection(response)) + + def update_subscription(self, update_parameters, subscription_id): + """UpdateSubscription. + Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. + :param :class:` ` update_parameters: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(update_parameters, 'NotificationSubscriptionUpdateParameters') + response = self._send(http_method='PATCH', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='5.1', + route_values=route_values, + content=content) + return self._deserialize('NotificationSubscription', response) + + def get_subscription_templates(self): + """GetSubscriptionTemplates. + Get available subscription templates. + :rtype: [NotificationSubscriptionTemplate] + """ + response = self._send(http_method='GET', + location_id='fa5d24ba-7484-4f3d-888d-4ec6b1974082', + version='5.1') + return self._deserialize('[NotificationSubscriptionTemplate]', self._unwrap_collection(response)) + + def update_subscription_user_settings(self, user_settings, subscription_id, user_id): + """UpdateSubscriptionUserSettings. + Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. + :param :class:` ` user_settings: + :param str subscription_id: + :param str user_id: ID of the user + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + content = self._serialize.body(user_settings, 'SubscriptionUserSettings') + response = self._send(http_method='PUT', + location_id='ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e', + version='5.1', + route_values=route_values, + content=content) + return self._deserialize('SubscriptionUserSettings', response) + diff --git a/azure-devops/azure/devops/released/test_plan/__init__.py b/azure-devops/azure/devops/released/test_plan/__init__.py new file mode 100644 index 00000000..8cb4bb05 --- /dev/null +++ b/azure-devops/azure/devops/released/test_plan/__init__.py @@ -0,0 +1,68 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from ...v5_1.test_plan.models import * +from .test_plan_client import TestPlanClient + +__all__ = [ + 'BuildDefinitionReference', + 'CloneOperationCommonResponse', + 'CloneOptions', + 'CloneStatistics', + 'CloneTestPlanOperationInformation', + 'CloneTestPlanParams', + 'CloneTestSuiteOperationInformation', + 'CloneTestSuiteParams', + 'Configuration', + 'DestinationTestPlanCloneParams', + 'DestinationTestSuiteInfo', + 'GraphSubjectBase', + 'IdentityRef', + 'LastResultDetails', + 'NameValuePair', + 'PointAssignment', + 'ReferenceLinks', + 'ReleaseEnvironmentDefinitionReference', + 'Results', + 'SourceTestPlanInfo', + 'SourceTestplanResponse', + 'SourceTestSuiteInfo', + 'SuiteEntry', + 'SuiteEntryUpdateParams', + 'SuiteTestCaseCreateUpdateParameters', + 'TeamProjectReference', + 'TestCase', + 'TestCaseReference', + 'TestConfiguration', + 'TestConfigurationCreateUpdateParameters', + 'TestConfigurationReference', + 'TestEnvironment', + 'TestOutcomeSettings', + 'TestPlan', + 'TestPlanCreateParams', + 'TestPlanDetailedReference', + 'TestPlanReference', + 'TestPlansHubRefreshData', + 'TestPlanUpdateParams', + 'TestPoint', + 'TestPointCount', + 'TestPointResults', + 'TestPointUpdateParams', + 'TestSettings', + 'TestSuite', + 'TestSuiteCreateParams', + 'TestSuiteCreateUpdateCommonParams', + 'TestSuiteReference', + 'TestSuiteReferenceWithProject', + 'TestSuiteUpdateParams', + 'TestVariable', + 'TestVariableCreateUpdateParameters', + 'WorkItem', + 'WorkItemDetails', + 'TestPlanClient' +] diff --git a/azure-devops/azure/devops/released/test_plan/test_plan_client.py b/azure-devops/azure/devops/released/test_plan/test_plan_client.py new file mode 100644 index 00000000..660441a8 --- /dev/null +++ b/azure-devops/azure/devops/released/test_plan/test_plan_client.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from ...v5_1.test_plan import models + + +class TestPlanClient(Client): + """TestPlan + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TestPlanClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = None + + def get_suites_by_test_case_id(self, test_case_id): + """GetSuitesByTestCaseId. + Find the list of all test suites in which a given test case is present. This is helpful if you need to find out which test suites are using a test case, when you need to make changes to a test case. + :param int test_case_id: ID of the test case for which suites need to be fetched. + :rtype: [TestSuite] + """ + query_parameters = {} + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + response = self._send(http_method='GET', + location_id='a4080e84-f17b-4fad-84f1-7960b6525bf2', + version='5.1', + query_parameters=query_parameters) + return self._deserialize('[TestSuite]', self._unwrap_collection(response)) + diff --git a/azure-devops/azure/devops/released/test_results/__init__.py b/azure-devops/azure/devops/released/test_results/__init__.py new file mode 100644 index 00000000..27388e6d --- /dev/null +++ b/azure-devops/azure/devops/released/test_results/__init__.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from ...v5_1.test_results.models import * +from .test_results_client import TestResultsClient + +__all__ = [ + 'AggregatedDataForResultTrend', + 'AggregatedResultsAnalysis', + 'AggregatedResultsByOutcome', + 'AggregatedResultsDifference', + 'AggregatedRunsByOutcome', + 'AggregatedRunsByState', + 'BuildConfiguration', + 'BuildCoverage', + 'BuildReference', + 'CodeCoverageData', + 'CodeCoverageStatistics', + 'CodeCoverageSummary', + 'CoverageStatistics', + 'CustomTestField', + 'DtlEnvironmentDetails', + 'FailingSince', + 'FieldDetailsForTestResults', + 'FileCoverageRequest', + 'FlakyDetection', + 'FlakyDetectionPipelines', + 'FlakySettings', + 'FunctionCoverage', + 'GraphSubjectBase', + 'IdentityRef', + 'JobReference', + 'ModuleCoverage', + 'PhaseReference', + 'PipelineReference', + 'QueryModel', + 'ReferenceLinks', + 'ReleaseReference', + 'ResultsFilter', + 'RunCreateModel', + 'RunFilter', + 'RunStatistic', + 'RunSummaryModel', + 'RunUpdateModel', + 'ShallowReference', + 'ShallowTestCaseResult', + 'SharedStepModel', + 'StageReference', + 'TeamProjectReference', + 'TestActionResultModel', + 'TestAttachment', + 'TestAttachmentReference', + 'TestAttachmentRequestModel', + 'TestCaseResult', + 'TestCaseResultAttachmentModel', + 'TestCaseResultIdentifier', + 'TestEnvironment', + 'TestFailureDetails', + 'TestFailuresAnalysis', + 'TestFlakyIdentifier', + 'TestHistoryQuery', + 'TestIterationDetailsModel', + 'TestLog', + 'TestLogReference', + 'TestLogStoreEndpointDetails', + 'TestMessageLogDetails', + 'TestMethod', + 'TestOperationReference', + 'TestResolutionState', + 'TestResultDocument', + 'TestResultHistory', + 'TestResultHistoryDetailsForGroup', + 'TestResultHistoryForGroup', + 'TestResultMetaData', + 'TestResultMetaDataUpdateInput', + 'TestResultModelBase', + 'TestResultParameterModel', + 'TestResultPayload', + 'TestResultsContext', + 'TestResultsDetails', + 'TestResultsDetailsForGroup', + 'TestResultsQuery', + 'TestResultsSettings', + 'TestResultSummary', + 'TestResultsUpdateSettings', + 'TestResultTrendFilter', + 'TestRun', + 'TestRunCoverage', + 'TestRunStatistic', + 'TestSettings', + 'TestSubResult', + 'TestSummaryForWorkItem', + 'TestTag', + 'TestTagSummary', + 'TestTagsUpdateModel', + 'TestToWorkItemLinks', + 'WorkItemReference', + 'WorkItemToTestLinks', + 'TestResultsClient' +] diff --git a/azure-devops/azure/devops/released/test_results/test_results_client.py b/azure-devops/azure/devops/released/test_results/test_results_client.py new file mode 100644 index 00000000..c533accd --- /dev/null +++ b/azure-devops/azure/devops/released/test_results/test_results_client.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest import Serializer, Deserializer +from ...client import Client +from ...v5_1.test_results import models + + +class TestResultsClient(Client): + """TestResults + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TestResultsClient, self).__init__(base_url, creds) + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + resource_area_identifier = None + + def get_test_run_statistics(self, project, run_id): + """GetTestRunStatistics. + Get test run statistics , used when we want to get summary of a run by outcome. + :param str project: Project ID or project name + :param int run_id: ID of the run to get. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='82b986e8-ca9e-4a89-b39e-f65c69bc104a', + version='5.1', + route_values=route_values) + return self._deserialize('TestRunStatistic', response) + diff --git a/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py b/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py index 447b7ba2..8ffc3448 100644 --- a/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py +++ b/azure-devops/azure/devops/v5_1/cloud_load_test/cloud_load_test_client.py @@ -39,7 +39,7 @@ def create_agent_group(self, group): def get_agent_groups(self, agent_group_id=None, machine_setup_input=None, machine_access_data=None, outgoing_request_urls=None, agent_group_name=None): """GetAgentGroups. - :param str agent_group_id: The agent group indentifier + :param str agent_group_id: The agent group identifier :param bool machine_setup_input: :param bool machine_access_data: :param bool outgoing_request_urls: diff --git a/azure-devops/azure/devops/v5_1/cloud_load_test/models.py b/azure-devops/azure/devops/v5_1/cloud_load_test/models.py index bbd1701e..5f995ee1 100644 --- a/azure-devops/azure/devops/v5_1/cloud_load_test/models.py +++ b/azure-devops/azure/devops/v5_1/cloud_load_test/models.py @@ -11,19 +11,19 @@ class AgentGroup(Model): """ - :param created_by: + :param created_by: User that created the agent group :type created_by: :class:`IdentityRef ` - :param creation_time: + :param creation_time: Time agent group was created :type creation_time: datetime - :param group_id: + :param group_id: Id of the agent group :type group_id: str - :param group_name: + :param group_name: The name of the agent group :type group_name: str :param machine_access_data: :type machine_access_data: list of :class:`AgentGroupAccessData ` - :param machine_configuration: + :param machine_configuration: Machine configuration :type machine_configuration: :class:`WebApiUserLoadTestMachineInput ` - :param tenant_id: + :param tenant_id: Tenant Id :type tenant_id: str """ @@ -50,15 +50,15 @@ def __init__(self, created_by=None, creation_time=None, group_id=None, group_nam class AgentGroupAccessData(Model): """ - :param details: + :param details: Type Specific details :type details: str - :param storage_connection_string: + :param storage_connection_string: Access string :type storage_connection_string: str - :param storage_end_point: + :param storage_end_point: Endpoint for the service :type storage_end_point: str - :param storage_name: + :param storage_name: Identifier for the storage (eg. table name) :type storage_name: str - :param storage_type: + :param storage_type: Type of the store (table, queue, blob) :type storage_type: str """ @@ -81,19 +81,19 @@ def __init__(self, details=None, storage_connection_string=None, storage_end_poi class Application(Model): """ - :param application_id: + :param application_id: Unique Id of the Application Component :type application_id: str - :param description: + :param description: Description of the Application component :type description: str - :param name: + :param name: The Name of the Application component :type name: str - :param path: + :param path: Path identifier of the Application component :type path: str - :param path_seperator: + :param path_seperator: Character used to separate paths for counters :type path_seperator: str - :param type: + :param type: Type identifier of the Application component under test :type type: str - :param version: + :param version: Version of the Application Component :type version: str """ @@ -120,17 +120,17 @@ def __init__(self, application_id=None, description=None, name=None, path=None, class ApplicationCounters(Model): """ - :param application_id: + :param application_id: The unique Id of the Application that the counter belongs :type application_id: str - :param description: + :param description: Description of autCounter :type description: str - :param id: + :param id: The unique Id for the AutCounter :type id: str - :param is_default: + :param is_default: Whether the autCounter is a default counter or not :type is_default: bool - :param name: + :param name: Name of the AutCounter :type name: str - :param path: + :param path: The Path of the the autcounter wrt to hierarchy :type path: str """ @@ -155,17 +155,17 @@ def __init__(self, application_id=None, description=None, id=None, is_default=No class ApplicationType(Model): """ - :param action_uri_link: + :param action_uri_link: Helper link url :type action_uri_link: str - :param aut_portal_link: + :param aut_portal_link: The link that points to aut results site :type aut_portal_link: str - :param is_enabled: + :param is_enabled: true if application results collection is enabled for this tenant :type is_enabled: bool - :param max_components_allowed_for_collection: + :param max_components_allowed_for_collection: the max no. of application components allowed for collection per run :type max_components_allowed_for_collection: int - :param max_counters_allowed: + :param max_counters_allowed: The max no. of counters that can be collected per aut :type max_counters_allowed: int - :param type: + :param type: Application Type :type type: str """ @@ -255,7 +255,7 @@ class CounterInstanceSamples(Model): :type count: int :param counter_instance_id: :type counter_instance_id: str - :param next_refresh_time: + :param next_refresh_time: The time of next refresh :type next_refresh_time: datetime :param values: :type values: list of :class:`CounterSample ` @@ -329,7 +329,7 @@ def __init__(self, base_value=None, computed_value=None, counter_frequency=None, class CounterSampleQueryDetails(Model): """ - :param counter_instance_id: + :param counter_instance_id: The instanceId for which samples are required :type counter_instance_id: str :param from_interval: :type from_interval: int @@ -352,13 +352,13 @@ def __init__(self, counter_instance_id=None, from_interval=None, to_interval=Non class CounterSamplesResult(Model): """ - :param count: + :param count: Count of the samples :type count: int - :param max_batch_size: + :param max_batch_size: Maximum number of samples returned in this object :type max_batch_size: int - :param total_samples_count: + :param total_samples_count: Count of the samples :type total_samples_count: int - :param values: + :param values: The result samples :type values: list of :class:`CounterInstanceSamples ` """ @@ -404,7 +404,7 @@ class DropAccessData(Model): """ :param drop_container_url: :type drop_container_url: str - :param sas_key: + :param sas_key: The SaSkey to use for the drop. :type sas_key: str """ @@ -913,17 +913,17 @@ def __init__(self, percentile=None, percentile_value=None): class TenantDetails(Model): """ - :param access_details: + :param access_details: Access details :type access_details: list of :class:`AgentGroupAccessData ` - :param id: + :param id: Tenant Id :type id: str - :param static_machines: + :param static_machines: Static machines configured for local runs :type static_machines: list of :class:`WebApiTestMachine ` :param user_load_agent_input: :type user_load_agent_input: :class:`WebApiUserLoadTestMachineInput ` :param user_load_agent_resources_uri: :type user_load_agent_resources_uri: str - :param valid_geo_locations: + :param valid_geo_locations: The list of valid geo-lcations for tenant :type valid_geo_locations: list of str """ @@ -948,7 +948,7 @@ def __init__(self, access_details=None, id=None, static_machines=None, user_load class TestDefinitionBasic(Model): """ - :param access_data: + :param access_data: Data for accessing the drop and not persisted in storage :type access_data: :class:`DropAccessData ` :param created_by: :type created_by: :class:`IdentityRef ` @@ -991,17 +991,17 @@ def __init__(self, access_data=None, created_by=None, created_date=None, id=None class TestDrop(Model): """ - :param access_data: + :param access_data: Data for accessing the drop and not persisted in storage :type access_data: :class:`DropAccessData ` - :param created_date: + :param created_date: Time at which the drop is created :type created_date: datetime - :param drop_type: + :param drop_type: Identifies the type of drop :type drop_type: str - :param id: + :param id: Drop Id :type id: str - :param load_test_definition: + :param load_test_definition: LoadTest definition of the run for which testdrop is created :type load_test_definition: :class:`LoadTestDefinition ` - :param test_run_id: + :param test_run_id: Test Run Id :type test_run_id: str """ @@ -1026,9 +1026,11 @@ def __init__(self, access_data=None, created_date=None, drop_type=None, id=None, class TestDropRef(Model): """ - :param id: + An abstracted reference to some other resource. This class is used to provide the load test data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. + + :param id: Id of the resource :type id: str - :param url: + :param url: Full http link to the resource :type url: str """ @@ -1045,13 +1047,13 @@ def __init__(self, id=None, url=None): class TestResults(Model): """ - :param cloud_load_test_solution_url: + :param cloud_load_test_solution_url: The uri to the test run results file. :type cloud_load_test_solution_url: str :param counter_groups: :type counter_groups: list of :class:`CounterGroup ` - :param diagnostics: + :param diagnostics: The object contains diagnostic details :type diagnostics: :class:`Diagnostics ` - :param results_url: + :param results_url: The uri to the test run results file. :type results_url: str """ @@ -1150,33 +1152,33 @@ def __init__(self, action=None, cause=None, details=None, logged_date=None, sour class TestRunBasic(Model): """ - :param created_by: + :param created_by: Vss User identity who created the test run. :type created_by: :class:`IdentityRef ` - :param created_date: + :param created_date: Gets the creation time of the test run :type created_date: datetime - :param deleted_by: + :param deleted_by: Vss User identity who deleted the test run. :type deleted_by: :class:`IdentityRef ` - :param deleted_date: + :param deleted_date: Gets the deleted time of the test run :type deleted_date: datetime - :param finished_date: + :param finished_date: Gets the finish time of the test run :type finished_date: datetime - :param id: + :param id: Gets the unique identifier for the test run definition. :type id: str :param load_generation_geo_locations: :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` - :param load_test_file_name: + :param load_test_file_name: Gets the load test file of the test run definition. :type load_test_file_name: str - :param name: + :param name: Gets the name of the test run definition. :type name: str - :param run_number: + :param run_number: Gets the number of the test run (unique within a tenant) :type run_number: int - :param run_source: + :param run_source: Test run source like Ibiza,VSO,BuildVNext, etc. :type run_source: str - :param run_specific_details: + :param run_specific_details: Run specific details. :type run_specific_details: :class:`LoadTestRunDetails ` - :param run_type: + :param run_type: Run type like VisualStudioLoadTest or JMeterLoadTest :type run_type: object - :param state: + :param state: State of the test run. :type state: object :param url: :type url: str @@ -1221,25 +1223,25 @@ def __init__(self, created_by=None, created_date=None, deleted_by=None, deleted_ class TestRunCounterInstance(Model): """ - :param category_name: + :param category_name: CategoryName for this counter :type category_name: str - :param counter_instance_id: + :param counter_instance_id: Combination of source and SourceInstanceId :type counter_instance_id: str - :param counter_name: + :param counter_name: Name of the counter Eg: Errors/Sec :type counter_name: str - :param counter_units: + :param counter_units: Units for this counter. Empty string for mere numbers :type counter_units: str - :param instance_name: + :param instance_name: Instance Name Eg: _Avg,_Total etc :type instance_name: str - :param is_preselected_counter: + :param is_preselected_counter: true if this counter instance is a default counter :type is_preselected_counter: bool - :param machine_name: + :param machine_name: Machine from where this counter was collected Used in case of machine specific counters like - Agent CPU and memory etc. :type machine_name: str - :param part_of_counter_groups: + :param part_of_counter_groups: Counter Groups to which this counter instance is part of :type part_of_counter_groups: list of str - :param summary_data: + :param summary_data: Summary result for this counter instance :type summary_data: :class:`WebInstanceSummaryData ` - :param unique_name: + :param unique_name: A unique name for this counter instance :type unique_name: str """ @@ -1272,7 +1274,7 @@ def __init__(self, category_name=None, counter_instance_id=None, counter_name=No class TestRunMessage(Model): """ - :param agent_id: + :param agent_id: Agent Id :type agent_id: str :param error_code: :type error_code: str @@ -1280,13 +1282,13 @@ class TestRunMessage(Model): :type logged_date: datetime :param message: :type message: str - :param message_id: + :param message_id: Message Id :type message_id: str :param message_source: :type message_source: object :param message_type: :type message_type: object - :param test_run_id: + :param test_run_id: Id of the test run :type test_run_id: str :param url: :type url: str @@ -1319,11 +1321,11 @@ def __init__(self, agent_id=None, error_code=None, logged_date=None, message=Non class TestSettings(Model): """ - :param cleanup_command: + :param cleanup_command: Cleanup command :type cleanup_command: str - :param host_process_platform: + :param host_process_platform: Processor Architecture chosen :type host_process_platform: object - :param setup_command: + :param setup_command: Setup command :type setup_command: str """ @@ -1485,6 +1487,8 @@ def __init__(self, last_heart_beat=None, machine_name=None, status=None): class WebApiUserLoadTestMachineInput(WebApiLoadTestMachineInput): """ + This can eventually evolve as the ultimate JSON file that user can use to configure their machine(s) against CLT + :param machine_group_id: :type machine_group_id: str :param machine_type: @@ -1583,7 +1587,7 @@ def __init__(self, agent_count=None, core_count=None, cores_per_agent=None, dura class TestDefinition(TestDefinitionBasic): """ - :param access_data: + :param access_data: Data for accessing the drop and not persisted in storage :type access_data: :class:`DropAccessData ` :param created_by: :type created_by: :class:`IdentityRef ` @@ -1601,7 +1605,7 @@ class TestDefinition(TestDefinitionBasic): :type name: str :param description: :type description: str - :param load_generation_geo_locations: + :param load_generation_geo_locations: Geo location from where load is generated :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` :param load_test_definition_source: :type load_test_definition_source: str @@ -1642,75 +1646,75 @@ def __init__(self, access_data=None, created_by=None, created_date=None, id=None class TestRun(TestRunBasic): """ - :param created_by: + :param created_by: Vss User identity who created the test run. :type created_by: :class:`IdentityRef ` - :param created_date: + :param created_date: Gets the creation time of the test run :type created_date: datetime - :param deleted_by: + :param deleted_by: Vss User identity who deleted the test run. :type deleted_by: :class:`IdentityRef ` - :param deleted_date: + :param deleted_date: Gets the deleted time of the test run :type deleted_date: datetime - :param finished_date: + :param finished_date: Gets the finish time of the test run :type finished_date: datetime - :param id: + :param id: Gets the unique identifier for the test run definition. :type id: str :param load_generation_geo_locations: :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` - :param load_test_file_name: + :param load_test_file_name: Gets the load test file of the test run definition. :type load_test_file_name: str - :param name: + :param name: Gets the name of the test run definition. :type name: str - :param run_number: + :param run_number: Gets the number of the test run (unique within a tenant) :type run_number: int - :param run_source: + :param run_source: Test run source like Ibiza,VSO,BuildVNext, etc. :type run_source: str - :param run_specific_details: + :param run_specific_details: Run specific details. :type run_specific_details: :class:`LoadTestRunDetails ` - :param run_type: + :param run_type: Run type like VisualStudioLoadTest or JMeterLoadTest :type run_type: object - :param state: + :param state: State of the test run. :type state: object :param url: :type url: str - :param abort_message: + :param abort_message: Message associated to state change, contains details of infrastructure error. :type abort_message: :class:`TestRunAbortMessage ` - :param aut_initialization_error: + :param aut_initialization_error: true if aut counter collection could not start due to some critical error for this run. :type aut_initialization_error: bool - :param chargeable: + :param chargeable: Whether run is chargeable or not Its chargeable once we configured agent and sent start signal :type chargeable: bool - :param charged_vUserminutes: + :param charged_vUserminutes: Whether run is chargeable or not The Charged VUser Minutes for the RUN :type charged_vUserminutes: int - :param description: + :param description: Test run description. :type description: str - :param execution_finished_date: + :param execution_finished_date: Gets the time when the test run execution finished :type execution_finished_date: datetime - :param execution_started_date: + :param execution_started_date: Gets the time when the test run warmup finished(if warmup was specified) and load test started :type execution_started_date: datetime - :param queued_date: + :param queued_date: Gets the time when the test run was queued :type queued_date: datetime - :param retention_state: + :param retention_state: Retention state of the run :type retention_state: object :param run_source_identifier: :type run_source_identifier: str - :param run_source_url: + :param run_source_url: The uri to the run source. :type run_source_url: str - :param started_by: + :param started_by: Vss User identity who created the test run. :type started_by: :class:`IdentityRef ` - :param started_date: + :param started_date: When the test run started execution. :type started_date: datetime - :param stopped_by: + :param stopped_by: Vss User identity who created the test run. :type stopped_by: :class:`IdentityRef ` - :param sub_state: + :param sub_state: SubState is more granular description of the state :type sub_state: object :param supersede_run_settings: :type supersede_run_settings: :class:`OverridableRunSettings ` - :param test_drop: + :param test_drop: Drop associated with this test run :type test_drop: :class:`TestDropRef ` - :param test_settings: + :param test_settings: The Test settings for the test run :type test_settings: :class:`TestSettings ` - :param warm_up_started_date: + :param warm_up_started_date: Gets the time when the test run warmup started :type warm_up_started_date: datetime - :param web_result_url: + :param web_result_url: The uri to the vso detailed result. :type web_result_url: str """ diff --git a/azure-devops/azure/devops/version.py b/azure-devops/azure/devops/version.py index 55e90a72..1722640a 100644 --- a/azure-devops/azure/devops/version.py +++ b/azure-devops/azure/devops/version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = "5.1.0b1" +VERSION = "5.1.0b2" diff --git a/azure-devops/setup.py b/azure-devops/setup.py index b244139b..f9faf30d 100644 --- a/azure-devops/setup.py +++ b/azure-devops/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages NAME = "azure-devops" -VERSION = "5.1.0b1" +VERSION = "5.1.0b2" # To install the library, run the following #