[Major Change] Moving API version to 5.x (#492)

* 5_0 initial move blind replacement
* Changes in Pull_request_workitems and Get_team_members functions
* Ignore devops_sdk from styling checks
* Skipping test - created user stories for follow up
* Delete workitem with project param - Update test and recordings
* Fix table output for get_team_members since the json is changed.
* Table output format change to accomodate json change for user list
* Fix user tests for list response in live tests
* azure pipelines fix to disable a known job failure
This commit is contained in:
Atul Bagga 2019-03-27 18:41:24 +05:30 коммит произвёл GitHub
Родитель e5cd58243e
Коммит 330797e3ea
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
589 изменённых файлов: 73469 добавлений и 39960 удалений

Просмотреть файл

@ -38,18 +38,18 @@ jobs:
- template: templates/build-publish-azure-cli-test-sdk.yml
- job: 'Run_Test_From_Old_Release'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
# - job: 'Run_Test_From_Old_Release'
# dependsOn : Build_Publish_Azure_CLI_Test_SDK
# pool:
# vmImage: 'macOS-10.13'
steps:
- script: git checkout release-0.3.0
# steps:
# - script: git checkout release-0.3.0
- template: templates/run-tests.yml
parameters:
pythonVersion: '3.7.0'
runOnlyRecordedTests: 'true'
# - template: templates/run-tests.yml
# parameters:
# pythonVersion: '3.7.0'
# runOnlyRecordedTests: 'true'
- job: 'Run_Test_Windows'
dependsOn : [ 'Build_Publish_Azure_CLI_Test_SDK', 'Build_Publish_Azure_DevOps_CLI_Extension']

Просмотреть файл

@ -38,18 +38,19 @@ jobs:
- template: templates/build-publish-azure-cli-test-sdk.yml
- job: 'Run_Test_From_Old_Release'
dependsOn : Build_Publish_Azure_CLI_Test_SDK
pool:
vmImage: 'macOS-10.13'
# Disabled because there are known breaking changes after 0.4.0
# - job: 'Run_Test_From_Old_Release'
# dependsOn : Build_Publish_Azure_CLI_Test_SDK
# pool:
# vmImage: 'macOS-10.13'
steps:
- script: git checkout release-0.3.0
# steps:
# - script: git checkout release-0.3.0
- template: templates/run-tests.yml
parameters:
pythonVersion: '3.7.0'
runOnlyRecordedTests: 'true'
# - template: templates/run-tests.yml
# parameters:
# pythonVersion: '3.7.0'
# runOnlyRecordedTests: 'true'
- job: 'Run_Test_Ubuntu'
dependsOn : Build_Publish_Azure_CLI_Test_SDK

Просмотреть файл

@ -16,4 +16,4 @@ exclude =
doc
build_scripts
*/test/*
*/vstsCompressed/*
*/devops_sdk/*

7
.gitignore поставляемый
Просмотреть файл

@ -300,4 +300,9 @@ paket-files/
.pytest_cache/
#vscode
.vscode/*
.vscode/*
# Except for the release folders which contains vsts release code
!azure-devops/azext_devops/devops_sdk/*/release/
azure-devops/azext_devops/devops_sdk/*/release/release/__pycache__

Просмотреть файл

@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------
from knack.util import CLIError
from azext_devops.vstsCompressed.exceptions import VstsServiceError
from azext_devops.devops_sdk.exceptions import AzureDevOpsServiceError
from azext_devops.dev.common.arguments import convert_date_string_to_iso8601
from .setting import setting_add_or_update, setting_list, setting_remove, GLOBAL_MESSAGE_BANNERS_KEY, USER_SCOPE_HOST
@ -16,7 +16,7 @@ def banner_list(organization=None, detect=None):
try:
return setting_list(user_scope='host', key=GLOBAL_MESSAGE_BANNERS_KEY,
organization=organization, detect=detect)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -32,7 +32,7 @@ def banner_show(id, organization=None, detect=None): # pylint: disable=redefine
if id not in existing_entries:
raise ValueError('The following banner was not found: %s' % id)
return {id: existing_entries[id]}
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -72,7 +72,7 @@ def banner_add(message, banner_type=None, id=None, expiration=None, organization
setting_add_or_update(entries=entries, user_scope=USER_SCOPE_HOST,
organization=organization, detect=detect)
return {id: entries[setting_key]}
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -129,7 +129,7 @@ def banner_update(message=None, banner_type=None, id=None, expiration=None, orga
setting_add_or_update(entries=entries, user_scope=USER_SCOPE_HOST, organization=organization,
detect=detect)
return {id: entries[setting_key]}
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -142,7 +142,7 @@ def banner_remove(id, organization=None, detect=None): # pylint: disable=redefi
try:
setting_key = _get_banner_key(id)
setting_remove(key=setting_key, user_scope='host', organization=organization, detect=detect)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)

Просмотреть файл

@ -8,9 +8,8 @@ import webbrowser
from knack.log import get_logger
from knack.util import CLIError
from azext_devops.vstsCompressed.exceptions import VstsServiceError
from azext_devops.vstsCompressed.work_item_tracking.v4_0.models.models import JsonPatchOperation
from azext_devops.vstsCompressed.work_item_tracking.v4_0.models.models import Wiql
from azext_devops.devops_sdk.exceptions import AzureDevOpsServiceError
from azext_devops.devops_sdk.v5_0.work_item_tracking.models import JsonPatchOperation, Wiql
from azext_devops.dev.common.identities import (ME, get_current_identity,
resolve_identity,
get_account_from_identity)
@ -46,7 +45,7 @@ def create_work_item(work_item_type, title, description=None, assigned_to=None,
:type fields: [str]
:param open: Open the work item in the default web browser.
:type open: bool
:rtype: :class:`<WorkItem> <work-item-tracking.v4_0.models.WorkItem>`
:rtype: :class:`<WorkItem> <v5_0.work-item-tracking.models.WorkItem>`
"""
try:
organization, project = resolve_instance_and_project(
@ -88,7 +87,7 @@ def create_work_item(work_item_type, title, description=None, assigned_to=None,
if open:
_open_work_item(work_item, organization)
return work_item
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
_handle_vsts_service_error(ex)
@ -118,7 +117,7 @@ def update_work_item(id, title=None, description=None, assigned_to=None, state=N
:type fields: [str]
:param open: Open the work item in the default web browser.
:type open: bool
:rtype: :class:`<WorkItem> <work-item-tracking.v4_0.models.WorkItem>`
:rtype: :class:`<WorkItem> <v5_0.work-item-tracking.models.WorkItem>`
"""
organization = resolve_instance(detect=detect, organization=organization)
patch_document = []
@ -160,21 +159,22 @@ def update_work_item(id, title=None, description=None, assigned_to=None, state=N
return work_item
def delete_work_item(id, destroy=False, organization=None, detect=None): # pylint: disable=redefined-builtin
def delete_work_item(id, # pylint: disable=redefined-builtin
destroy=False, organization=None, project=None, detect=None):
"""Delete a work item.
:param id: Unique id of the work item.
:type id: int
:param destroy: Permanently delete this work item.
:type destroy: bool
:rtype: :class:`<WorkItem> <work-item-tracking.v4_0.models.WorkItemDelete>`
:rtype: :class:`<WorkItem> <v5_0.work-item-tracking.models.WorkItemDelete>`
"""
try:
organization = resolve_instance(detect=detect, organization=organization)
organization, project = resolve_instance_and_project(detect=detect, organization=organization, project=project)
client = get_work_item_tracking_client(organization)
delete_response = client.delete_work_item(id, destroy)
delete_response = client.delete_work_item(id=id, project=project, destroy=destroy)
print('Deleted work item {}'.format(id))
return delete_response
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
_handle_vsts_service_error(ex)
@ -205,13 +205,13 @@ def show_work_item(id, open=False, organization=None, detect=None): # pylint: d
:type id: int
:param open: Open the work item in the default web browser.
:type open: bool
:rtype: :class:`<WorkItem> <work-item-tracking.v4_0.models.WorkItem>`
:rtype: :class:`<WorkItem> <v5_0.work-item-tracking.models.WorkItem>`
"""
organization = resolve_instance(detect=detect, organization=organization)
try:
client = get_work_item_tracking_client(organization)
work_item = client.get_work_item(id)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
_handle_vsts_service_error(ex)
if open:
@ -228,7 +228,7 @@ def query_work_items(wiql=None, id=None, path=None, organization=None, project=N
:type id: str
:param path: The path of an existing query. Ignored if --id is specified.
:type path: str
:rtype: :class:`<WorkItem> <work-item-tracking.v4_0.models.WorkItem>`
:rtype: :class:`<WorkItem> <v5_0.work-item-tracking.models.WorkItem>`
"""
if wiql is None and path is None and id is None:
raise CLIError("Either the --wiql, --id, or --path argument must be specified.")
@ -327,7 +327,7 @@ def get_last_query_result():
def _open_work_item(work_item, organization):
"""Opens the work item in the default browser.
:param work_item: The work item to open.
:type work_item: :class:`<WorkItem> <work-item-tracking.v4_0.models.WorkItem>`
:type work_item: :class:`<WorkItem> <v5_0.work-item-tracking.models.WorkItem>`
"""
project = work_item.fields['System.TeamProject']
url = organization.rstrip('/') + '/' + uri_quote(project) + '/_workitems?id='\

Просмотреть файл

@ -19,7 +19,7 @@ from knack.log import get_logger
from knack.util import CLIError
import distro
from azext_devops.dev.common.services import get_vss_connection
from azext_devops.dev.common.services import get_connection
from azext_devops.dev.common.config import AZ_DEVOPS_GLOBAL_CONFIG_DIR
from azext_devops.dev.common.const import (ARTIFACTTOOL_OVERRIDE_PATH_ENVKEY,
ARTIFACTTOOL_OVERRIDE_URL_ENVKEY,
@ -134,7 +134,7 @@ def _update_artifacttool(uri, release_id):
def _get_current_release(organization, override_version):
connection = get_vss_connection(organization)
connection = get_connection(organization)
client = connection.get_client('azext_devops.dev.common.client_tool.client_tool_client.ClientToolClient')
logger.debug("Looking up current version of ArtifactTool...")
# Distro returns empty strings on Windows currently, so don't even send

Просмотреть файл

@ -4,12 +4,12 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from azext_devops.vstsCompressed.vss_client import VssClient
from azext_devops.devops_sdk.client import Client
from . import models
class ClientToolClient(VssClient):
class ClientToolClient(Client):
def __init__(self, base_url=None, creds=None):
super(ClientToolClient, self).__init__(base_url, creds)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}

Просмотреть файл

@ -12,7 +12,7 @@ logger = get_logger(__name__)
def azure_devops_exception_handler(ex):
# we are taking dependency on string here because taking dependency on
# Azure DevOps Client will increase load time for every command
if type(ex).__name__ == 'VstsServiceError':
if type(ex).__name__ == 'AzureDevOpsServiceError':
logger.debug('handling vsts service error')
raise CLIError(ex)
else:

Просмотреть файл

@ -6,7 +6,7 @@
import os
from knack.util import ensure_dir
from azext_devops.vstsCompressed._file_cache import get_cache, DEFAULT_MAX_AGE
from azext_devops.devops_sdk._file_cache import get_cache, DEFAULT_MAX_AGE
from .config import AZ_DEVOPS_GLOBAL_CONFIG_DIR

Просмотреть файл

@ -11,7 +11,7 @@ from knack.log import get_logger
from knack.util import CLIError
from msrest.authentication import BasicAuthentication
from azure.cli.core._profile import Profile
from azext_devops.vstsCompressed.vss_connection import VssConnection
from azext_devops.devops_sdk.connection import Connection
from azext_devops.version import VERSION
from .arguments import should_detect
from .const import (DEFAULTS_SECTION,
@ -26,18 +26,18 @@ from .uri import uri_parse_instance_from_git_uri
logger = get_logger(__name__)
def get_vss_connection(organization):
def get_connection(organization):
organization = organization.lower()
if organization not in _vss_connection:
if organization not in _connection:
credentials = _get_credentials(organization)
try:
from .telemetry import try_send_telemetry_data
_vss_connection[organization] = _get_vss_connection(organization, credentials)
_connection[organization] = _get_connection(organization, credentials)
try_send_telemetry_data(organization)
except Exception as ex:
logger.debug(ex, exc_info=True)
raise CLIError(ex)
return _vss_connection[organization]
return _connection[organization]
def _get_credentials(organization):
@ -76,8 +76,8 @@ def validate_token_for_instance(organization, credentials):
logger.debug("instance recieved in validate_token_for_instance %s", organization)
organization = uri_parse_instance_from_git_uri(organization)
logger.debug("instance processed in validate_token_for_instance %s", organization)
connection = _get_vss_connection(organization, credentials)
core_client = connection.get_client(VSTS_MODULE + 'core.v4_0.core_client.CoreClient')
connection = _get_connection(organization, credentials)
core_client = connection.get_client(VSTS_MODULE + 'v5_0.core.core_client.CoreClient')
try:
core_client.get_projects(state_filter='all', top=1, skip=0)
return True
@ -136,93 +136,93 @@ def get_token_from_az_login(profile, user, tenant):
return ""
def _get_vss_connection(organization, credentials):
return VssConnection(get_base_url(organization), creds=credentials,
user_agent='devOpsCli/{}'.format(VERSION))
def _get_connection(organization, credentials):
return Connection(get_base_url(organization), creds=credentials,
user_agent='devOpsCli/{}'.format(VERSION))
def get_first_vss_instance_uri():
for key in _vss_connection:
for key in _connection:
return key
def get_release_client(team_instance=None):
connection = get_vss_connection(team_instance)
return connection.get_client(VSTS_MODULE + 'release.v4_0.release_client.ReleaseClient')
connection = get_connection(team_instance)
return connection.get_client(VSTS_MODULE + 'v5_0.release.release_client.ReleaseClient')
def get_build_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'build.v4_0.build_client.BuildClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.build.build_client.BuildClient')
def get_ci_client(organization=None):
connection = get_vss_connection(organization)
connection = get_connection(organization)
return connection.get_client(
VSTS_MODULE + 'customer_intelligence.v4_0.customer_intelligence_client.CustomerIntelligenceClient')
VSTS_MODULE + 'v5_0.customer_intelligence.customer_intelligence_client.CustomerIntelligenceClient')
def get_core_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'core.v4_0.core_client.CoreClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.core.core_client.CoreClient')
def get_git_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'git.v4_0.git_client.GitClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.git.git_client.GitClient')
def get_identity_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'identity.v4_0.identity_client.IdentityClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.identity.identity_client.IdentityClient')
def get_service_endpoint_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'service_endpoint.v4_1.service_endpoint_client.ServiceEndpointClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.service_endpoint.service_endpoint_client.ServiceEndpointClient')
def get_location_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'location.v4_0.location_client.LocationClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.location.location_client.LocationClient')
def get_member_entitlement_management_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'member_entitlement_management.v4_1.'
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.member_entitlement_management.'
'member_entitlement_management_client.MemberEntitlementManagementClient')
def get_operations_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'operations.v4_0.operations_client.OperationsClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.operations.operations_client.OperationsClient')
def get_policy_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'policy.v4_0.policy_client.PolicyClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.policy.policy_client.PolicyClient')
def get_settings_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'settings.v4_0.settings_client.SettingsClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.settings.settings_client.SettingsClient')
def get_task_agent_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'task_agent.v4_0.task_agent_client.TaskAgentClient')
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.task_agent.task_agent_client.TaskAgentClient')
def get_work_item_tracking_client(organization=None):
connection = get_vss_connection(organization)
return connection.get_client(VSTS_MODULE + 'work_item_tracking.v4_0.'
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE + 'v5_0.work_item_tracking.'
'work_item_tracking_client.WorkItemTrackingClient')
def get_extension_client(organization=None):
connection = get_vss_connection(organization)
connection = get_connection(organization)
return connection.get_client(VSTS_MODULE +
'extension_management.v4_1.extension_management_client.ExtensionManagementClient')
'v5_0.extension_management.extension_management_client.ExtensionManagementClient')
def get_base_url(organization):
@ -330,9 +330,9 @@ def get_authentication_error(message):
def clear_connection_cache():
_vss_connection.clear()
_connection.clear()
_connection_data = {}
_vss_connection = OrderedDict()
VSTS_MODULE = 'azext_devops.vstsCompressed.'
_connection = OrderedDict()
VSTS_MODULE = 'azext_devops.devops_sdk.'

Просмотреть файл

@ -6,7 +6,7 @@
import threading
from knack.log import get_logger
from azext_devops.vstsCompressed.customer_intelligence.v4_0.models.models import CustomerIntelligenceEvent
from azext_devops.devops_sdk.v5_0.customer_intelligence.models import CustomerIntelligenceEvent
logger = get_logger(__name__)

Просмотреть файл

@ -59,7 +59,7 @@ class VstsGitUrlInfo(object):
@staticmethod
def get_vsts_info(remote_url):
from azext_devops.vstsCompressed.git.v4_1.git_client import GitClient
from azext_devops.devops_sdk.v5_0.git.git_client import GitClient
from .services import _get_credentials
components = uri_parse(remote_url.lower())
if components.scheme == 'ssh':

Просмотреть файл

@ -6,8 +6,7 @@
from webbrowser import open_new
from knack.log import get_logger
from azext_devops.vstsCompressed.build.v4_0.models.models import Build
from azext_devops.vstsCompressed.build.v4_0.models.models import DefinitionReference
from azext_devops.devops_sdk.v5_0.build.models import Build, DefinitionReference
from azext_devops.dev.common.git import resolve_git_ref_heads
from azext_devops.dev.common.identities import resolve_identity_as_id
from azext_devops.dev.common.services import (get_build_client,
@ -35,7 +34,7 @@ def build_queue(definition_id=None, definition_name=None, branch=None, variables
:type source_branch: str
:param commit_id: Commit ID of the branch to build.
:type commit_id: str
:rtype: :class:`<Build> <build.v4_0.models.Build>`
:rtype: :class:`<Build> <v5_0.build.models.Build>`
"""
if branch is None:
branch = source_branch
@ -71,7 +70,7 @@ def build_show(id, open=False, organization=None, project=None, detect=None): #
:type id: int
:param open: Open the build results page in your web browser.
:type open: bool
:rtype: :class:`<Build> <build.v4_0.models.Build>`
:rtype: :class:`<Build> <v5_0.build.models.Build>`
"""
organization, project = resolve_instance_and_project(
detect=detect, organization=organization, project=project)
@ -101,7 +100,7 @@ def build_list(definition_ids=None, branch=None, organization=None, project=None
:type tags: list of str
:param requested_for: Limit to builds requested for this user or group.
:type requested_for: str
:rtype: :class:`<Build> <build.v4_0.models.Build>`
:rtype: :class:`<Build> <v5_0.build.models.Build>`
"""
organization, project = resolve_instance_and_project(
detect=detect, organization=organization, project=project)
@ -174,7 +173,7 @@ def get_build_tags(build_id, organization=None, project=None, detect=None):
def _open_build(build, organization):
"""Open the build results page in your web browser.
:param :class:`<Build> <build.v4_0.models.Build>` build:
:param :class:`<Build> <v5_0.build.models.Build>` build:
:param str organization:
"""
# https://dev.azure.com/OrgName/ProjectName/_build/index?buildId=1234

Просмотреть файл

@ -79,7 +79,7 @@ def build_definition_show(id=None, name=None, open=False, organization=None, pro
def _open_definition(definition, organization):
"""Opens the build definition in the default browser.
:param :class:`<BuildDefinitionReference> <build.v4_0.models.BuildDefinitionReference>` definition:
:param :class:`<BuildDefinitionReference> <v5_0.build.models.BuildDefinitionReference>` definition:
:param str organization:
"""
# https://dev.azure.com/OrgName/ProjectName/_build/index?definitionId=1234

Просмотреть файл

@ -6,9 +6,7 @@
from webbrowser import open_new
from knack.log import get_logger
from azext_devops.vstsCompressed.release.v4_0.models.models import ReleaseStartMetadata
from azext_devops.vstsCompressed.release.v4_0.models.models import ArtifactMetadata
from azext_devops.vstsCompressed.release.v4_0.models.models import BuildVersion
from azext_devops.devops_sdk.v5_0.release.models import ArtifactMetadata, BuildVersion, ReleaseStartMetadata
from azext_devops.dev.common.services import (get_release_client, resolve_instance_and_project)
from .release_definition import get_definition_id_from_name
@ -28,7 +26,7 @@ def release_create(definition_id=None, definition_name=None, artifact_metadata_l
:type artifact_metadata_list: [str]
:param description: Description of the release.
:type description: str
:rtype: :class:`<ReleaseStartMetadata> <release.v4_0.models.ReleaseStartMetadata>`
:rtype: :class:`<ReleaseStartMetadata> <v5_0.release.models.ReleaseStartMetadata>`
"""
organization, project = resolve_instance_and_project(
@ -70,7 +68,7 @@ def release_show(id, open=False, organization=None, project=None, detect=None):
:type id: int
:param open: Open the release results page in your web browser.
:type open: bool
:rtype: :class:`<Release> <release.v4_0.models.Release>`
:rtype: :class:`<Release> <v5_0.release.models.Release>`
"""
organization, project = resolve_instance_and_project(
detect=detect, organization=organization, project=project)
@ -94,7 +92,7 @@ def release_list(definition_id=None, source_branch=None, organization=None, proj
:type status: str
:param source_branch: Filter releases for this branch.
:type source_branch: str
:rtype: :class:`<Release> <release.v4_0.models.Release>`
:rtype: :class:`<Release> <v5_0.release.models.Release>`
"""
organization, project = resolve_instance_and_project(
detect=detect, organization=organization, project=project)
@ -110,7 +108,7 @@ def release_list(definition_id=None, source_branch=None, organization=None, proj
def _open_release(release):
"""Open the release results page in your web browser.
:param :class:`<Release> <release.v4_0.models.Release>` release:
:param :class:`<Release> <v5_0.release.models.Release>` release:
"""
url = _get_release_web_url(release)
if url is not None and url:

Просмотреть файл

@ -67,7 +67,7 @@ def release_definition_show(id=None, name=None, open=False, organization=None, p
def _open_definition(definition):
"""Opens the release definition in the default browser.
:param :class:`<ReleaseDefinitionReference> <release.v4_0.models.ReleaseDefinitionReference>` definition:
:param :class:`<ReleaseDefinitionReference> <v5_0.release.models.ReleaseDefinitionReference>` definition:
"""
url = _get_release_definition_web_url(definition)
if url is not None and url:

Просмотреть файл

@ -5,7 +5,7 @@
from knack.log import get_logger
from knack.util import CLIError
from azext_devops.vstsCompressed.exceptions import VstsServiceError
from azext_devops.devops_sdk.exceptions import AzureDevOpsServiceError
from azext_devops.dev.common.services import (get_build_client,
resolve_instance_and_project)
from azext_devops.dev.common.artifacttool import ArtifactToolInvoker
@ -29,7 +29,7 @@ def run_artifact_download(run_id, artifact_name, path, organization=None, projec
organization, project = resolve_instance_and_project(detect=detect, organization=organization, project=project)
artifact_tool = ArtifactToolInvoker(ProgressReportingExternalToolInvoker(), ArtifactToolUpdater())
return artifact_tool.download_pipeline_artifact(organization, project, run_id, artifact_name, path)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -44,7 +44,7 @@ def run_artifact_list(run_id, organization=None, project=None, detect=None):
client = get_build_client(organization)
artifacts = client.get_artifacts(run_id, project)
return artifacts
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -62,5 +62,5 @@ def run_artifact_upload(run_id, artifact_name, path, organization=None, project=
organization, project = resolve_instance_and_project(detect=detect, organization=organization, project=project)
artifact_tool = ArtifactToolInvoker(ProgressReportingExternalToolInvoker(), ArtifactToolUpdater())
return artifact_tool.upload_pipeline_artifact(organization, project, run_id, artifact_name, path)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)

Просмотреть файл

@ -4,9 +4,9 @@
# --------------------------------------------------------------------------------------------
import time
from azext_devops.vstsCompressed.git.v4_0.models.models import GitImportRequestParameters
from azext_devops.vstsCompressed.git.v4_0.models.models import GitImportGitSource
from azext_devops.vstsCompressed.git.v4_0.models.models import GitImportRequest
from azext_devops.devops_sdk.v5_0.git.models import GitImportRequestParameters
from azext_devops.devops_sdk.v5_0.git.models import GitImportGitSource
from azext_devops.devops_sdk.v5_0.git.models import GitImportRequest
from azext_devops.dev.common.services import get_git_client, resolve_instance_project_and_repo

Просмотреть файл

@ -8,7 +8,7 @@
from knack.util import CLIError
from knack.log import get_logger
from azext_devops.vstsCompressed.policy.v4_0.models.models import PolicyConfiguration
from azext_devops.devops_sdk.v5_0.policy.models import PolicyConfiguration
from azext_devops.dev.common.git import resolve_git_ref_heads
from azext_devops.dev.common.services import (get_policy_client, resolve_instance_and_project)

Просмотреть файл

@ -7,16 +7,11 @@ import webbrowser
from knack.log import get_logger
from knack.util import CLIError
from azext_devops.vstsCompressed.exceptions import VstsClientRequestError
from azext_devops.vstsCompressed.git.v4_0.models.models import GitPullRequest
from azext_devops.vstsCompressed.git.v4_0.models.models import GitPullRequestCompletionOptions
from azext_devops.vstsCompressed.git.v4_0.models.models import GitPullRequestSearchCriteria
from azext_devops.vstsCompressed.git.v4_0.models.models import IdentityRef
from azext_devops.vstsCompressed.git.v4_0.models.models import IdentityRefWithVote
from azext_devops.vstsCompressed.git.v4_0.models.models import ResourceRef
from azext_devops.vstsCompressed.git.v4_0.models.models import GitRefFavorite
from azext_devops.vstsCompressed.work_item_tracking.v4_0.models.models import JsonPatchOperation
from azext_devops.vstsCompressed.work_item_tracking.v4_0.models.models import WorkItemRelation
from azext_devops.devops_sdk.exceptions import AzureDevOpsClientRequestError
from azext_devops.devops_sdk.v5_0.git.models import (GitPullRequest, GitPullRequestCompletionOptions,
GitPullRequestSearchCriteria, IdentityRef, IdentityRefWithVote,
ResourceRef, GitRefFavorite)
from azext_devops.devops_sdk.v5_0.work_item_tracking.models import JsonPatchOperation, WorkItemRelation
from azext_devops.dev.common.arguments import resolve_on_off_switch, should_detect
from azext_devops.dev.common.git import get_current_branch_name, resolve_git_ref_heads, fetch_remote_and_checkout
from azext_devops.dev.common.identities import ME, resolve_identity_as_id
@ -38,7 +33,7 @@ def show_pull_request(id, open=False, organization=None, detect=None): # pylint
:type id: int
:param open: Open the pull request in your web browser.
:type open: bool
:rtype: :class:`GitPullRequest <git.v4_0.models.GitPullRequest>`
:rtype: :class:`GitPullRequest <v5_0.git.models.GitPullRequest>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -75,7 +70,7 @@ def list_pull_requests(repository=None, creator=None, include_links=False, revie
:type skip: int
:param top: Maximum number of pull requests to list.
:type top: int
:rtype: list of :class:`VssJsonCollectionWrapper <git.v4_0.models.VssJsonCollectionWrapper>`
:rtype: list of :class:`VssJsonCollectionWrapper <v5_0.git.models.VssJsonCollectionWrapper>`
"""
organization, project, repository = resolve_instance_project_and_repo(
detect=detect,
@ -147,7 +142,7 @@ def create_pull_request(project=None, repository=None, source_branch=None, targe
:param transition_work_items: Transition any work items linked to the pull request into the next logical state.
(e.g. Active -> Resolved)
:type transition_work_items: bool
:rtype: :class:`GitPullRequest <git.v4_0.models.GitPullRequest>`
:rtype: :class:`GitPullRequest <v5_0.git.models.GitPullRequest>`
"""
organization, project, repository = resolve_instance_project_and_repo(
detect=detect,
@ -267,7 +262,7 @@ def update_pull_request(id, title=None, description=None, auto_complete=None, #
:param transition_work_items: Transition any work items linked to the pull request into the next logical state.
(e.g. Active -> Resolved)
:type transition_work_items: str
:rtype: :class:`GitPullRequest <git.v4_0.models.GitPullRequest>`
:rtype: :class:`GitPullRequest <v5_0.git.models.GitPullRequest>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -315,7 +310,7 @@ def complete_pull_request(id, organization=None, detect=None): # pylint: disabl
"""Complete a pull request.
:param id: ID of the pull request to complete.
:type id: int
:rtype: :class:`GitPullRequest <git.v4_0.models.GitPullRequest>`
:rtype: :class:`GitPullRequest <v5_0.git.models.GitPullRequest>`
"""
return _update_pull_request_status(pull_request_id=id, new_status='completed',
organization=organization, detect=detect)
@ -325,7 +320,7 @@ def abandon_pull_request(id, organization=None, detect=None): # pylint: disable
"""Abandon a pull request.
:param id: ID of the pull request to abandon.
:type id: int
:rtype: :class:`GitPullRequest <git.v4_0.models.GitPullRequest>`
:rtype: :class:`GitPullRequest <v5_0.git.models.GitPullRequest>`
"""
return _update_pull_request_status(pull_request_id=id, new_status='abandoned',
organization=organization, detect=detect)
@ -335,7 +330,7 @@ def reactivate_pull_request(id, organization=None, detect=None): # pylint: disa
"""Reactivate an abandoned pull request.
:param id: ID of the pull request to reactivate.
:type id: int
:rtype: :class:`GitPullRequest <git.v4_0.models.GitPullRequest>`
:rtype: :class:`GitPullRequest <v5_0.git.models.GitPullRequest>`
"""
return _update_pull_request_status(pull_request_id=id, new_status='active',
organization=organization, detect=detect)
@ -347,7 +342,7 @@ def create_pull_request_reviewers(id, reviewers, organization=None, detect=None)
:type id: int
:param reviewers: Users or groups to include as reviewers on a pull request. Space separated.
:type reviewers: list of str
:rtype: list of :class:`IdentityRefWithVote <git.v4_0.models.IdentityRefWithVote>`
:rtype: list of :class:`IdentityRefWithVote <v5_0.git.models.IdentityRefWithVote>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -366,7 +361,7 @@ def delete_pull_request_reviewers(id, reviewers, organization=None, detect=None)
:type id: int
:param reviewers: Users or groups to remove as reviewers on a pull request. Space separated.
:type reviewers: list of str
:rtype: list of :class:`IdentityRefWithVote <git.v4_0.models.IdentityRefWithVote>`
:rtype: list of :class:`IdentityRefWithVote <v5_0.git.models.IdentityRefWithVote>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -386,7 +381,7 @@ def list_pull_request_reviewers(id, organization=None, detect=None): # pylint:
"""List reviewers of a pull request.
:param id: ID of the pull request.
:type id: int
:rtype: list of :class:`IdentityRefWithVote <git.v4_0.models.IdentityRefWithVote>`
:rtype: list of :class:`IdentityRefWithVote <v5_0.git.models.IdentityRefWithVote>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -402,7 +397,7 @@ def add_pull_request_work_items(id, work_items, organization=None, detect=None):
:type id: int
:param work_items: IDs of the work items to link. Space separated.
:type work_items: list of int
:rtype: list of :class:`AssociatedWorkItem <git.v4_0.models.AssociatedWorkItem>`
:rtype: list of :class:`AssociatedWorkItem <v5_0.git.models.AssociatedWorkItem>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -424,14 +419,14 @@ def add_pull_request_work_items(id, work_items, organization=None, detect=None):
patch_document.append(patch_operation)
try:
wit_client.update_work_item(document=patch_document, id=work_item_id)
except VstsClientRequestError as ex:
except AzureDevOpsClientRequestError as ex:
logger.debug(ex, exc_info=True)
message = ex.args[0]
if message != 'Relation already exists.':
raise CLIError(ex)
refs = client.get_pull_request_work_items(project=existing_pr.repository.project.id,
repository_id=existing_pr.repository.id,
pull_request_id=id)
refs = client.get_pull_request_work_item_refs(project=existing_pr.repository.project.id,
repository_id=existing_pr.repository.id,
pull_request_id=id)
ids = []
for ref in refs:
ids.append(ref.id)
@ -470,7 +465,7 @@ def remove_pull_request_work_items(id, work_items, organization=None, detect=Non
:type id: int
:param work_items: IDs of the work items to unlink. Space separated.
:type work_items: list of int
:rtype: list of :class:`AssociatedWorkItem <git.v4_0.models.AssociatedWorkItem>`
:rtype: list of :class:`AssociatedWorkItem <v5_0.git.models.AssociatedWorkItem>`
"""
# pylint: disable=too-many-nested-blocks
organization = resolve_instance(detect=detect, organization=organization)
@ -504,9 +499,9 @@ def remove_pull_request_work_items(id, work_items, organization=None, detect=Non
wit_client.update_work_item(document=patch_document, id=work_item.id)
else:
index += 1
refs = client.get_pull_request_work_items(project=existing_pr.repository.project.id,
repository_id=existing_pr.repository.id,
pull_request_id=id)
refs = client.get_pull_request_work_item_refs(project=existing_pr.repository.project.id,
repository_id=existing_pr.repository.id,
pull_request_id=id)
if refs:
ids = []
for ref in refs:
@ -520,14 +515,14 @@ def list_pull_request_work_items(id, organization=None, detect=None): # pylint:
"""List linked work items for a pull request.
:param id: ID of the pull request.
:type id: int
:rtype: list of :class:`AssociatedWorkItem <git.v4_0.models.AssociatedWorkItem>`
:rtype: list of :class:`AssociatedWorkItem <v5_0.git.models.AssociatedWorkItem>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
pr = client.get_pull_request_by_id(id)
refs = client.get_pull_request_work_items(project=pr.repository.project.id,
repository_id=pr.repository.id,
pull_request_id=id)
refs = client.get_pull_request_work_item_refs(project=pr.repository.project.id,
repository_id=pr.repository.id,
pull_request_id=id)
if refs:
ids = []
for ref in refs:
@ -558,7 +553,7 @@ def vote_pull_request(id, vote, organization=None, detect=None): # pylint: disa
:type id: int
:param vote: New vote value for the pull request.
:type vote: int
:rtype: :class:`IdentityRefWithVote <git.v4_0.models.IdentityRefWithVote>`
:rtype: :class:`IdentityRefWithVote <v5_0.git.models.IdentityRefWithVote>`
"""
organization = resolve_instance(detect=detect, organization=organization)
client = get_git_client(organization)
@ -628,7 +623,7 @@ def queue_pr_policy(id, evaluation_id, organization=None, detect=None): # pylin
def _resolve_reviewers_as_refs(reviewers, organization):
"""Takes a list containing identity names, emails, and ids,
and return a list of IdentityRefWithVote objects.
:rtype: list of :class:`IdentityRefWithVote <git.v4_0.models.IdentityRefWithVote>`
:rtype: list of :class:`IdentityRefWithVote <v5_0.git.models.IdentityRefWithVote>`
"""
resolved_reviewers = None
if reviewers is not None and reviewers:

Просмотреть файл

@ -5,8 +5,8 @@
from knack.log import get_logger
from knack.util import CLIError
from azext_devops.vstsCompressed.git.v4_0.models import GitRefUpdate
from azext_devops.vstsCompressed.exceptions import VstsServiceError
from azext_devops.devops_sdk.v5_0.git.models import GitRefUpdate
from azext_devops.devops_sdk.exceptions import AzureDevOpsServiceError
from azext_devops.dev.common.git import resolve_git_refs
from azext_devops.dev.common.services import (get_git_client,
resolve_instance_project_and_repo)
@ -33,7 +33,7 @@ def list_refs(filter=None, repository=None, organization=None, project=None, det
return client.get_refs(repository_id=repository,
project=project,
filter=filter)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -62,7 +62,7 @@ def create_ref(name, object_id, repository=None, organization=None, project=None
return client.update_refs(ref_updates=[ref_update],
repository_id=repository,
project=project)[0]
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -88,7 +88,7 @@ def delete_ref(name, object_id, repository=None, organization=None, project=None
return client.update_refs(ref_updates=[ref_update],
repository_id=repository,
project=project)[0]
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)
@ -127,5 +127,5 @@ def _update_ref(name, locked, repository, organization, project, detect):
repository_id=repository,
filter=name,
project=project)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)

Просмотреть файл

@ -8,7 +8,7 @@ import webbrowser
from knack.util import CLIError
from knack.log import get_logger
from azext_devops.vstsCompressed.git.v4_0.models.models import GitRepositoryCreateOptions
from azext_devops.devops_sdk.v5_0.git.models import GitRepositoryCreateOptions
from azext_devops.dev.common.services import (get_git_client,
resolve_instance_and_project,
resolve_instance_project_and_repo)
@ -25,7 +25,7 @@ def create_repo(name, organization=None, project=None, detect=None, open=False):
:type name: str
:param open: Open the repository page in your web browser.
:type open: bool
:rtype: :class:`<GitRepository> <git.v4_0.models.GitRepository>`
:rtype: :class:`<GitRepository> <v5_0.git.models.GitRepository>`
"""
organization, project = resolve_instance_and_project(detect=detect,
organization=organization,
@ -56,7 +56,7 @@ def delete_repo(id, organization=None, project=None, detect=None): # pylint: di
def list_repos(organization=None, project=None, detect=None):
"""List Git repositories of a team project.
:rtype: list of :class:`<GitRepository> <git.v4_0.models.GitRepository>`
:rtype: list of :class:`<GitRepository> <v5_0.git.models.GitRepository>`
"""
organization, project = resolve_instance_and_project(detect=detect,
organization=organization,
@ -102,7 +102,7 @@ def show_repo(repository, organization=None, project=None, detect=None, open=Fal
:type repository: str
:param open: Open the repository page in your web browser.
:type open: bool
:rtype: :class:`<GitRepository> <git.v4_0.models.GitRepository>`
:rtype: :class:`<GitRepository> <v5_0.git.models.GitRepository>`
"""
organization, project, repository = resolve_instance_project_and_repo(
detect=detect,

Просмотреть файл

@ -131,16 +131,17 @@ def transform_team_members_table_output(result):
def _transform_team_member_row(row):
table_row = OrderedDict()
table_row['ID'] = row['id']
table_row['Name'] = row['displayName']
table_row['Email'] = row['uniqueName']
table_row['ID'] = row['identity']['id']
table_row['Name'] = row['identity']['displayName']
table_row['Email'] = row['identity']['uniqueName']
return table_row
def transform_users_table_output(result):
members = result['members']
table_output = []
for item in result:
for item in members:
table_output.append(_transform_user_row(item))
return table_output
@ -178,4 +179,4 @@ def _get_team_key(team_row):
def _get_member_key(member_row):
return member_row['uniqueName'].lower()
return member_row['identity']['uniqueName'].lower()

Просмотреть файл

@ -13,7 +13,7 @@ from knack.prompting import NoTTYException, prompt_pass
from knack.util import CLIError
from msrest.authentication import BasicAuthentication
from azext_devops.dev.common._credentials import clear_credential, set_credential
from azext_devops.dev.common.services import _get_vss_connection, get_base_url
from azext_devops.dev.common.services import _get_connection, get_base_url
logger = get_logger(__name__)
@ -26,8 +26,8 @@ def credential_set(organization=None):
organization = get_base_url(organization)
logger.info("Creating connection with personal access token.")
credentials = BasicAuthentication('', token)
connection = _get_vss_connection(organization, credentials)
vstsDir = 'azext_devops.vstsCompressed.'
connection = _get_connection(organization, credentials)
vstsDir = 'azext_devops.devops_sdk.'
location_client = connection.get_client(vstsDir + 'location.v4_1.location_client.LocationClient')
try:
connection_data = location_client.get_connection_data()

Просмотреть файл

@ -8,9 +8,9 @@ from knack.log import get_logger
from knack.util import CLIError
from azext_devops.dev.common.services import (resolve_instance,
get_vss_connection)
get_connection)
from azext_devops.vstsCompressed.vss_client import VssClient
from azext_devops.devops_sdk.client import Client
logger = get_logger(__name__)
@ -31,7 +31,7 @@ def invoke(area=None, resource=None,
version = apiVersionToFloat(api_version)
organization = resolve_instance(detect=detect, organization=organization)
connection = get_vss_connection(organization)
connection = get_connection(organization)
request_body = None
if in_file:
@ -57,7 +57,7 @@ def invoke(area=None, resource=None,
for x in service_list:
try:
logger.info('trying to get locations from %s', x)
clientMock = VssClient(x, connection._creds)
clientMock = Client(x, connection._creds)
resource_location_on_this_service = clientMock._get_resource_locations(all_host_types=True)
resource_locations.extend(resource_location_on_this_service)
except: # pylint: disable=bare-except
@ -77,7 +77,7 @@ def invoke(area=None, resource=None,
if not client_url:
raise CLIError('--area is not present in current organization')
client = VssClient(client_url, connection._creds)
client = Client(client_url, connection._creds)
# there can be multiple resouce/ area with different version so this version comparision is needed
location_id = ''

Просмотреть файл

@ -8,7 +8,7 @@ import webbrowser
from knack.log import get_logger
from knack.util import CLIError
from azext_devops.vstsCompressed.core.v4_0.models.models import TeamProject
from azext_devops.devops_sdk.v5_0.core.models import TeamProject
from azext_devops.dev.common.operations import wait_for_long_running_operation
from azext_devops.dev.common.services import (get_core_client,
resolve_instance)
@ -32,7 +32,7 @@ def create_project(name, organization=None, process=None, source_control='git',
:type visibility: str
:param open: Open the team project in the default web browser.
:type open: bool
:rtype: :class:`<TeamProject> <core.v4_0.models.TeamProject>`
:rtype: :class:`<TeamProject> <v5_0.core.models.TeamProject>`
"""
organization = resolve_instance(detect=detect, organization=organization)
@ -109,7 +109,7 @@ def show_project(project, organization=None, detect=None, open=False): # pylint
:type project: str
:param open: Open the team project in the default web browser.
:type open: bool
:rtype: :class:`<TeamProject> <core.v4_0.models.TeamProject>`
:rtype: :class:`<TeamProject> <v5_0.core.models.TeamProject>`
"""
organization = resolve_instance(detect=detect, organization=organization)
core_client = get_core_client(organization)
@ -125,7 +125,7 @@ def list_projects(organization=None, top=None, skip=None, detect=None):
:type top: int
:param skip: Number of results to skip.
:type skip: int
:rtype: list of :class:`<TeamProject> <core.v4_0.models.TeamProject>`
:rtype: list of :class:`<TeamProject> <v5_0.core.models.TeamProject>`
"""
organization = resolve_instance(detect=detect, organization=organization)
core_client = get_core_client(organization)

Просмотреть файл

@ -8,8 +8,7 @@ from __future__ import print_function
from knack.log import get_logger
from knack.prompting import prompt_pass, NoTTYException
from knack.util import CLIError
from azext_devops.vstsCompressed.service_endpoint.v4_1.models.models import ServiceEndpoint
from azext_devops.vstsCompressed.service_endpoint.v4_1.models.models import EndpointAuthorization
from azext_devops.devops_sdk.v5_0.service_endpoint.models import ServiceEndpoint, EndpointAuthorization
from azext_devops.dev.common.services import get_service_endpoint_client, resolve_instance_and_project
from .const import (SERVICE_ENDPOINT_AUTHORIZATION_PERSONAL_ACCESS_TOKEN,

Просмотреть файл

@ -4,8 +4,8 @@
# --------------------------------------------------------------------------------------------
from knack.util import CLIError
from azext_devops.vstsCompressed.core.v4_0.models.models import WebApiTeam
from azext_devops.vstsCompressed.exceptions import VstsServiceError
from azext_devops.devops_sdk.v5_0.core.models import WebApiTeam
from azext_devops.devops_sdk.exceptions import AzureDevOpsServiceError
from azext_devops.dev.common.services import (get_core_client,
resolve_instance_and_project)
@ -16,7 +16,7 @@ def create_team(name, description=None, organization=None, project=None, detect=
:type name: str
:param description: Description of the new team.
:type description: str
:rtype: :class:`<WebApiTeam> <core.v4_0.models.WebApiTeam>`
:rtype: :class:`<WebApiTeam> <v5_0.core.models.WebApiTeam>`
"""
organization, project = resolve_instance_and_project(detect=detect,
organization=organization,
@ -42,7 +42,7 @@ def get_team(team, organization=None, project=None, detect=None):
"""Show team details.
:param team: The name or id of the team to show.
:type team: str
:rtype: :class:`<WebApiTeam> <core.v4_0.models.WebApiTeam>`
:rtype: :class:`<WebApiTeam> <v5_0.core.models.WebApiTeam>`
"""
organization, project = resolve_instance_and_project(detect=detect,
organization=organization,
@ -80,7 +80,7 @@ def get_team_members(team, top=None, skip=None, organization=None, project=None,
organization=organization,
project=project)
core_client = get_core_client(organization)
return core_client.get_team_members(team_id=team, top=top, skip=skip, project_id=project)
return core_client.get_team_members_with_extended_properties(team_id=team, top=top, skip=skip, project_id=project)
def update_team(team, name=None, description=None, organization=None, project=None, detect=None):
@ -91,7 +91,7 @@ def update_team(team, name=None, description=None, organization=None, project=No
:type name: str
:param description: New description of the team.
:type description: str
:rtype: :class:`<WebApiTeam> <core.v4_0.models.WebApiTeam>`
:rtype: :class:`<WebApiTeam> <v5_0.core.models.WebApiTeam>`
"""
if name is None and description is None:
raise CLIError('Either name or description argument must be provided.')
@ -102,5 +102,5 @@ def update_team(team, name=None, description=None, organization=None, project=No
core_client = get_core_client(organization)
updated_team_data = WebApiTeam(name=name, description=description)
return core_client.update_team(team_data=updated_team_data, project_id=project, team_id=team)
except VstsServiceError as ex:
except AzureDevOpsServiceError as ex:
raise CLIError(ex)

Просмотреть файл

@ -4,9 +4,9 @@
# --------------------------------------------------------------------------------------------
from knack.util import CLIError
from azext_devops.vstsCompressed.member_entitlement_management.v4_1.models.models import (AccessLevel,
GraphUser,
JsonPatchOperation)
from azext_devops.devops_sdk.v5_0.member_entitlement_management.models import (AccessLevel,
GraphUser,
JsonPatchOperation)
from azext_devops.dev.common.services import (get_member_entitlement_management_client,
resolve_instance)
from azext_devops.dev.common.arguments import resolve_true_false

Просмотреть файл

@ -111,11 +111,11 @@ class FileCache(collections.MutableMapping):
def get_cache_dir():
vsts_cache_dir = os.getenv('VSTS_CACHE_DIR', None) or os.path.expanduser(os.path.join('~', '.vsts', 'python-sdk',
'cache'))
if not os.path.exists(vsts_cache_dir):
os.makedirs(vsts_cache_dir)
return vsts_cache_dir
azure_devops_cache_dir = os.getenv('AZURE_DEVOPS_CACHE_DIR', None)\
or os.path.expanduser(os.path.join('~', '.azure-devops', 'python-sdk', 'cache'))
if not os.path.exists(azure_devops_cache_dir):
os.makedirs(azure_devops_cache_dir)
return azure_devops_cache_dir
DEFAULT_MAX_AGE = 3600 * 12 # 12 hours

Просмотреть файл

@ -1,11 +1,9 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# coding=utf-8
# --------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
@ -40,6 +38,30 @@ class ApiResourceLocation(Model):
self.released_version = released_version
class CustomerIntelligenceEvent(Model):
"""CustomerIntelligenceEvent.
:param area:
:type area: str
:param feature:
:type feature: str
:param properties:
:type properties: dict
"""
_attribute_map = {
'area': {'key': 'area', 'type': 'str'},
'feature': {'key': 'feature', 'type': 'str'},
'properties': {'key': 'properties', 'type': '{object}'}
}
def __init__(self, area=None, feature=None, properties=None):
super(CustomerIntelligenceEvent, self).__init__()
self.area = area
self.feature = feature
self.properties = properties
class ImproperException(Model):
"""ImproperException.
:param message:
@ -55,12 +77,36 @@ class ImproperException(Model):
self.message = message
class ResourceAreaInfo(Model):
"""ResourceAreaInfo.
:param id:
:type id: str
:param location_url:
:type location_url: str
:param name:
:type name: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location_url': {'key': 'locationUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, id=None, location_url=None, name=None):
super(ResourceAreaInfo, self).__init__()
self.id = id
self.location_url = location_url
self.name = name
class SystemException(Model):
"""SystemException.
:param class_name:
:type class_name: str
:param inner_exception:
:type inner_exception: :class:`SystemException <vsts.models.SystemException>`
:type inner_exception: :class:`SystemException`
:param message:
:type message: str
"""
@ -94,12 +140,31 @@ class VssJsonCollectionWrapperBase(Model):
self.count = count
class VssJsonCollectionWrapper(VssJsonCollectionWrapperBase):
"""VssJsonCollectionWrapper.
:param count:
:type count: int
:param value:
:type value: object
"""
_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'value': {'key': 'value', 'type': 'object'}
}
def __init__(self, count=None, value=None):
super(VssJsonCollectionWrapper, self).__init__(count=count)
self.value = value
class WrappedException(Model):
"""WrappedException.
:param exception_id:
:type exception_id: str
:param inner_exception:
:type inner_exception: :class:`WrappedException <vsts.models.WrappedException>`
:type inner_exception: :class:`WrappedException`
:param message:
:type message: str
:param type_name:
@ -138,20 +203,13 @@ class WrappedException(Model):
self.custom_properties = custom_properties
class VssJsonCollectionWrapper(VssJsonCollectionWrapperBase):
"""VssJsonCollectionWrapper.
:param count:
:type count: int
:param value:
:type value: object
"""
_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'value': {'key': 'value', 'type': 'object'}
}
def __init__(self, count=None, value=None):
super(VssJsonCollectionWrapper, self).__init__(count=count)
self.value = value
__all__ = [
'ApiResourceLocation',
'CustomerIntelligenceEvent',
'ImproperException',
'ResourceAreaInfo',
'SystemException',
'VssJsonCollectionWrapperBase',
'VssJsonCollectionWrapper',
'WrappedException'
]

Просмотреть файл

@ -14,33 +14,33 @@ from msrest import Deserializer, Serializer
from msrest.exceptions import DeserializationError, SerializationError
from msrest.universal_http import ClientRequest
from msrest.service_client import ServiceClient
from .exceptions import VstsAuthenticationError, VstsClientRequestError, VstsServiceError
from .vss_client_configuration import VssClientConfiguration
from . import models
from .exceptions import AzureDevOpsAuthenticationError, AzureDevOpsClientRequestError, AzureDevOpsServiceError
from .client_configuration import ClientConfiguration
from . import _models
from ._file_cache import OPTIONS_CACHE as OPTIONS_FILE_CACHE
logger = logging.getLogger(__name__)
class VssClient(object):
"""VssClient.
class Client(object):
"""Client.
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
self.config = VssClientConfiguration(base_url)
self.config = ClientConfiguration(base_url)
self.config.credentials = creds
self._client = ServiceClient(creds, config=self.config)
_base_client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
_base_client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._base_deserialize = Deserializer(_base_client_models)
self._base_serialize = Serializer(_base_client_models)
self._all_host_types_locations = None
self._locations = None
self._suppress_fedauth_redirect = True
self._force_msa_pass_through = True
self.normalized_url = VssClient._normalize_url(base_url)
self.normalized_url = Client._normalize_url(base_url)
def add_user_agent(self, user_agent):
if user_agent is not None:
@ -53,7 +53,8 @@ class VssClient(object):
:param content: Any body data to add to the request.
:param config: Any specific config overrides
"""
if TRACE_ENV_VAR in os.environ and os.environ[TRACE_ENV_VAR] == 'true':
if (TRACE_ENV_VAR in os.environ and os.environ[TRACE_ENV_VAR] == 'true')\
or (TRACE_ENV_VAR_COMPAT in os.environ and os.environ[TRACE_ENV_VAR_COMPAT] == 'true'):
print(request.method + ' ' + request.url)
logger.debug('%s %s', request.method, request.url)
logger.debug('Request content: %s', content)
@ -91,11 +92,11 @@ class VssClient(object):
headers['X-TFS-FedAuthRedirect'] = 'Suppress'
if self._force_msa_pass_through:
headers['X-VSS-ForceMsaPassThrough'] = 'true'
if VssClient._session_header_key in VssClient._session_data and VssClient._session_header_key not in headers:
headers[VssClient._session_header_key] = VssClient._session_data[VssClient._session_header_key]
if Client._session_header_key in Client._session_data and Client._session_header_key not in headers:
headers[Client._session_header_key] = Client._session_data[Client._session_header_key]
response = self._send_request(request=request, headers=headers, content=content)
if VssClient._session_header_key in response.headers:
VssClient._session_data[VssClient._session_header_key] = response.headers[VssClient._session_header_key]
if Client._session_header_key in response.headers:
Client._session_data[Client._session_header_key] = response.headers[Client._session_header_key]
return response
def _unwrap_collection(self, response):
@ -137,9 +138,9 @@ class VssClient(object):
return new_template
def _get_resource_location(self, location_id):
if self.config.base_url not in VssClient._locations_cache:
VssClient._locations_cache[self.config.base_url] = self._get_resource_locations(all_host_types=False)
for location in VssClient._locations_cache[self.config.base_url]:
if self.config.base_url not in Client._locations_cache:
Client._locations_cache[self.config.base_url] = self._get_resource_locations(all_host_types=False)
for location in Client._locations_cache[self.config.base_url]:
if location.id == location_id:
return location
@ -177,7 +178,7 @@ class VssClient(object):
response = self._send_request(request, headers=headers)
wrapper = self._base_deserialize('VssJsonCollectionWrapper', response)
if wrapper is None:
raise VstsClientRequestError("Failed to retrieve resource locations from: {}".format(options_uri))
raise AzureDevOpsClientRequestError("Failed to retrieve resource locations from: {}".format(options_uri))
collection = wrapper.value
returned_locations = self._base_deserialize('[ApiResourceLocation]',
collection)
@ -236,7 +237,7 @@ class VssClient(object):
try:
wrapped_exception = self._base_deserialize('WrappedException', response)
if wrapped_exception is not None and wrapped_exception.message is not None:
raise VstsServiceError(wrapped_exception)
raise AzureDevOpsServiceError(wrapped_exception)
else:
# System exceptions from controllers are not returning wrapped exceptions.
# Following code is to handle this unusual exception json case.
@ -245,23 +246,23 @@ class VssClient(object):
if collection_wrapper is not None and collection_wrapper.value is not None:
wrapped_exception = self._base_deserialize('ImproperException', collection_wrapper.value)
if wrapped_exception is not None and wrapped_exception.message is not None:
raise VstsClientRequestError(wrapped_exception.message)
raise AzureDevOpsClientRequestError(wrapped_exception.message)
# if we get here we still have not raised an exception, try to deserialize as a System Exception
system_exception = self._base_deserialize('SystemException', response)
if system_exception is not None and system_exception.message is not None:
raise VstsClientRequestError(system_exception.message)
raise AzureDevOpsClientRequestError(system_exception.message)
except DeserializationError:
pass
elif response.content is not None:
error_message = response.content.decode("utf-8") + ' '
if response.status_code == 401:
full_message_format = '{error_message}The requested resource requires user authentication: {url}'
raise VstsAuthenticationError(full_message_format.format(error_message=error_message,
url=request.url))
raise AzureDevOpsAuthenticationError(full_message_format.format(error_message=error_message,
url=request.url))
else:
full_message_format = '{error_message}Operation returned an invalid status code of {status_code}.'
raise VstsClientRequestError(full_message_format.format(error_message=error_message,
status_code=response.status_code))
raise AzureDevOpsClientRequestError(full_message_format.format(error_message=error_message,
status_code=response.status_code))
@staticmethod
def _normalize_url(url):
@ -272,4 +273,5 @@ class VssClient(object):
_session_data = {_session_header_key: str(uuid.uuid4())}
TRACE_ENV_VAR = 'vsts_python_print_urls'
TRACE_ENV_VAR_COMPAT = 'vsts_python_print_urls'
TRACE_ENV_VAR = 'azure_devops_python_print_urls'

Просмотреть файл

@ -7,11 +7,11 @@ from msrest import Configuration
from .version import VERSION
class VssClientConfiguration(Configuration):
class ClientConfiguration(Configuration):
def __init__(self, base_url=None):
if not base_url:
raise ValueError('base_url is required.')
base_url = base_url.rstrip('/')
super(VssClientConfiguration, self).__init__(base_url)
self.add_user_agent('vsts/{}'.format(VERSION))
super(ClientConfiguration, self).__init__(base_url)
self.add_user_agent('azure-devops/{}'.format(VERSION))
self.additional_headers = {}

Просмотреть файл

@ -7,19 +7,23 @@ import logging
from msrest.service_client import ServiceClient
from ._file_cache import RESOURCE_CACHE as RESOURCE_FILE_CACHE
from .exceptions import VstsClientRequestError
from .location.v4_0.location_client import LocationClient
from .vss_client_configuration import VssClientConfiguration
from .client_configuration import ClientConfiguration
from .exceptions import AzureDevOpsClientRequestError
from .released.client_factory import ClientFactory
from .v5_0.location.location_client import LocationClient
from .v5_0.client_factory import ClientFactoryV5_0
from .v5_1.client_factory import ClientFactoryV5_1
logger = logging.getLogger(__name__)
class VssConnection(object):
"""VssConnection.
class Connection(object):
"""Connection.
"""
def __init__(self, base_url=None, creds=None, user_agent=None):
self._config = VssClientConfiguration(base_url)
self._config = ClientConfiguration(base_url)
self._addition_user_agent = user_agent
if user_agent is not None:
self._config.add_user_agent(user_agent)
@ -28,6 +32,9 @@ class VssConnection(object):
self.base_url = base_url
self._creds = creds
self._resource_areas = None
self.clients = ClientFactory(self)
self.clients_v5_0 = ClientFactoryV5_0(self)
self.clients_v5_1 = ClientFactoryV5_1(self)
def get_client(self, client_type):
"""get_client.
@ -59,17 +66,17 @@ class VssConnection(object):
else:
resource_areas = self._get_resource_areas()
if resource_areas is None:
raise VstsClientRequestError(('Failed to retrieve resource areas '
+ 'from server: {url}').format(url=self.base_url))
raise AzureDevOpsClientRequestError(('Failed to retrieve resource areas '
+ 'from server: {url}').format(url=self.base_url))
if not resource_areas:
# For OnPrem environments we get an empty list.
return self.base_url
for resource_area in resource_areas:
if resource_area.id.lower() == resource_id.lower():
return resource_area.location_url
raise VstsClientRequestError(('Could not find information for resource area {id} '
+ 'from server: {url}').format(id=resource_id,
url=self.base_url))
raise AzureDevOpsClientRequestError(('Could not find information for resource area {id} '
+ 'from server: {url}').format(id=resource_id,
url=self.base_url))
def authenticate(self):
self._get_resource_areas(force=True)

Просмотреть файл

@ -10,28 +10,28 @@ from msrest.exceptions import (
)
class VstsClientError(ClientException):
class AzureDevOpsClientError(ClientException):
pass
class VstsAuthenticationError(AuthenticationError):
class AzureDevOpsAuthenticationError(AuthenticationError):
pass
class VstsClientRequestError(ClientRequestError):
class AzureDevOpsClientRequestError(ClientRequestError):
pass
class VstsServiceError(VstsClientRequestError):
"""VstsServiceError.
class AzureDevOpsServiceError(AzureDevOpsClientRequestError):
"""AzureDevOpsServiceError.
"""
def __init__(self, wrapped_exception):
self.inner_exception = None
if wrapped_exception.inner_exception is not None:
self.inner_exception = VstsServiceError(wrapped_exception.inner_exception)
super(VstsServiceError, self).__init__(message=wrapped_exception.message,
inner_exception=self.inner_exception)
self.inner_exception = AzureDevOpsServiceError(wrapped_exception.inner_exception)
super(AzureDevOpsServiceError, self).__init__(message=wrapped_exception.message,
inner_exception=self.inner_exception)
self.message = wrapped_exception.message
self.exception_id = wrapped_exception.exception_id
self.type_name = wrapped_exception.type_name

Просмотреть файл

@ -0,0 +1,17 @@
# --------------------------------------------------------------------------------------------
# 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_0.accounts.models import *
from .accounts_client import AccountsClient
__all__ = [
'Account',
'AccountCreateInfoInternal',
'AccountPreferencesInternal',
'AccountsClient'
]

Просмотреть файл

@ -0,0 +1,48 @@
# --------------------------------------------------------------------------------------------
# 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_0.accounts import models
class AccountsClient(Client):
"""Accounts
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(AccountsClient, 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 = '0d55247a-1c47-4462-9b1f-5e2125590ee6'
def get_accounts(self, owner_id=None, member_id=None, properties=None):
"""GetAccounts.
Get a list of accounts for a specific owner or a specific member.
:param str owner_id: ID for the owner of the accounts.
:param str member_id: ID for a member of the accounts.
:param str properties:
:rtype: [Account]
"""
query_parameters = {}
if owner_id is not None:
query_parameters['ownerId'] = self._serialize.query('owner_id', owner_id, 'str')
if member_id is not None:
query_parameters['memberId'] = self._serialize.query('member_id', member_id, 'str')
if properties is not None:
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
response = self._send(http_method='GET',
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Account]', self._unwrap_collection(response))

Просмотреть файл

@ -0,0 +1,89 @@
# --------------------------------------------------------------------------------------------
# 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_0.build.models import *
from .build_client import BuildClient
__all__ = [
'AgentPoolQueue',
'AggregatedResultsAnalysis',
'AggregatedResultsByOutcome',
'AggregatedResultsDifference',
'AggregatedRunsByOutcome',
'AggregatedRunsByState',
'ArtifactResource',
'AssociatedWorkItem',
'Attachment',
'AuthorizationHeader',
'Build',
'BuildArtifact',
'BuildBadge',
'BuildController',
'BuildDefinition',
'BuildDefinition3_2',
'BuildDefinitionReference',
'BuildDefinitionReference3_2',
'BuildDefinitionRevision',
'BuildDefinitionStep',
'BuildDefinitionTemplate',
'BuildDefinitionTemplate3_2',
'BuildDefinitionVariable',
'BuildLog',
'BuildLogReference',
'BuildMetric',
'BuildOption',
'BuildOptionDefinition',
'BuildOptionDefinitionReference',
'BuildOptionGroupDefinition',
'BuildOptionInputDefinition',
'BuildReportMetadata',
'BuildRepository',
'BuildRequestValidationResult',
'BuildResourceUsage',
'BuildSettings',
'Change',
'DataSourceBindingBase',
'DefinitionReference',
'DefinitionResourceReference',
'Deployment',
'Folder',
'GraphSubjectBase',
'IdentityRef',
'Issue',
'JsonPatchOperation',
'ProcessParameters',
'PullRequest',
'ReferenceLinks',
'ReleaseReference',
'RepositoryWebhook',
'ResourceRef',
'RetentionPolicy',
'SourceProviderAttributes',
'SourceRepositories',
'SourceRepository',
'SourceRepositoryItem',
'SupportedTrigger',
'TaskAgentPoolReference',
'TaskDefinitionReference',
'TaskInputDefinitionBase',
'TaskInputValidation',
'TaskOrchestrationPlanReference',
'TaskReference',
'TaskSourceDefinitionBase',
'TeamProjectReference',
'TestResultsContext',
'Timeline',
'TimelineAttempt',
'TimelineRecord',
'TimelineReference',
'VariableGroup',
'VariableGroupReference',
'WebApiConnectedServiceRef',
'XamlBuildControllerReference',
'BuildClient'
]

Просмотреть файл

@ -0,0 +1,150 @@
# --------------------------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------------------------
class ClientFactory(object):
"""ClientFactory.
A factory class to get the 5.0 released clients.
"""
def __init__(self, connection):
self._connection = connection
def get_accounts_client(self):
"""get_accounts_client.
Gets the 5.0 version of the AccountsClient
:rtype: :class:`<AccountsClient> <azure.devops.released.accounts.accounts_client.AccountsClient>`
"""
return self._connection.get_client('azure.devops.released.accounts.accounts_client.AccountsClient')
def get_build_client(self):
"""get_build_client.
Gets the 5.0 version of the BuildClient
:rtype: :class:`<BuildClient> <azure.devops.released.build.build_client.BuildClient>`
"""
return self._connection.get_client('azure.devops.released.build.build_client.BuildClient')
def get_cloud_load_test_client(self):
"""get_cloud_load_test_client.
Gets the 5.0 version of the CloudLoadTestClient
:rtype: :class:`<CloudLoadTestClient> <azure.devops.released.cloud_load_test.cloud_load_test_client.CloudLoadTestClient>`
"""
return self._connection.get_client('azure.devops.released.cloud_load_test.cloud_load_test_client.CloudLoadTestClient')
def get_core_client(self):
"""get_core_client.
Gets the 5.0 version of the CoreClient
:rtype: :class:`<CoreClient> <azure.devops.released.core.core_client.CoreClient>`
"""
return self._connection.get_client('azure.devops.released.core.core_client.CoreClient')
def get_git_client(self):
"""get_git_client.
Gets the 5.0 version of the GitClient
:rtype: :class:`<GitClient> <azure.devops.released.git.git_client.GitClient>`
"""
return self._connection.get_client('azure.devops.released.git.git_client.GitClient')
def get_identity_client(self):
"""get_identity_client.
Gets the 5.0 version of the IdentityClient
:rtype: :class:`<IdentityClient> <azure.devops.released.identity.identity_client.IdentityClient>`
"""
return self._connection.get_client('azure.devops.released.identity.identity_client.IdentityClient')
def get_operations_client(self):
"""get_operations_client.
Gets the 5.0 version of the OperationsClient
:rtype: :class:`<OperationsClient> <azure.devops.released.operations.operations_client.OperationsClient>`
"""
return self._connection.get_client('azure.devops.released.operations.operations_client.OperationsClient')
def get_policy_client(self):
"""get_policy_client.
Gets the 5.0 version of the PolicyClient
:rtype: :class:`<PolicyClient> <azure.devops.released.policy.policy_client.PolicyClient>`
"""
return self._connection.get_client('azure.devops.released.policy.policy_client.PolicyClient')
def get_profile_client(self):
"""get_profile_client.
Gets the 5.0 version of the ProfileClient
:rtype: :class:`<ProfileClient> <azure.devops.released.profile.profile_client.ProfileClient>`
"""
return self._connection.get_client('azure.devops.released.profile.profile_client.ProfileClient')
def get_release_client(self):
"""get_release_client.
Gets the 5.0 version of the ReleaseClient
:rtype: :class:`<ReleaseClient> <azure.devops.released.release.release_client.ReleaseClient>`
"""
return self._connection.get_client('azure.devops.released.release.release_client.ReleaseClient')
def get_security_client(self):
"""get_security_client.
Gets the 5.0 version of the SecurityClient
:rtype: :class:`<SecurityClient> <azure.devops.released.security.security_client.SecurityClient>`
"""
return self._connection.get_client('azure.devops.released.security.security_client.SecurityClient')
def get_service_hooks_client(self):
"""get_service_hooks_client.
Gets the 5.0 version of the ServiceHooksClient
:rtype: :class:`<ServiceHooksClient> <azure.devops.released.service_hooks.service_hooks_client.ServiceHooksClient>`
"""
return self._connection.get_client('azure.devops.released.service_hooks.service_hooks_client.ServiceHooksClient')
def get_task_client(self):
"""get_task_client.
Gets the 5.0 version of the TaskClient
:rtype: :class:`<TaskClient> <azure.devops.released.task.task_client.TaskClient>`
"""
return self._connection.get_client('azure.devops.released.task.task_client.TaskClient')
def get_task_agent_client(self):
"""get_task_agent_client.
Gets the 5.0 version of the TaskAgentClient
:rtype: :class:`<TaskAgentClient> <azure.devops.released.task_agent.task_agent_client.TaskAgentClient>`
"""
return self._connection.get_client('azure.devops.released.task_agent.task_agent_client.TaskAgentClient')
def get_test_client(self):
"""get_test_client.
Gets the 5.0 version of the TestClient
:rtype: :class:`<TestClient> <azure.devops.released.test.test_client.TestClient>`
"""
return self._connection.get_client('azure.devops.released.test.test_client.TestClient')
def get_tfvc_client(self):
"""get_tfvc_client.
Gets the 5.0 version of the TfvcClient
:rtype: :class:`<TfvcClient> <azure.devops.released.tfvc.tfvc_client.TfvcClient>`
"""
return self._connection.get_client('azure.devops.released.tfvc.tfvc_client.TfvcClient')
def get_wiki_client(self):
"""get_wiki_client.
Gets the 5.0 version of the WikiClient
:rtype: :class:`<WikiClient> <azure.devops.released.wiki.wiki_client.WikiClient>`
"""
return self._connection.get_client('azure.devops.released.wiki.wiki_client.WikiClient')
def get_work_client(self):
"""get_work_client.
Gets the 5.0 version of the WorkClient
:rtype: :class:`<WorkClient> <azure.devops.released.work.work_client.WorkClient>`
"""
return self._connection.get_client('azure.devops.released.work.work_client.WorkClient')
def get_work_item_tracking_client(self):
"""get_work_item_tracking_client.
Gets the 5.0 version of the WorkItemTrackingClient
:rtype: :class:`<WorkItemTrackingClient> <azure.devops.released.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient>`
"""
return self._connection.get_client('azure.devops.released.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient')

Просмотреть файл

@ -0,0 +1,62 @@
# --------------------------------------------------------------------------------------------
# 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_0.cloud_load_test.models import *
from .cloud_load_test_client import CloudLoadTestClient
__all__ = [
'AgentGroup',
'AgentGroupAccessData',
'Application',
'ApplicationCounters',
'ApplicationType',
'BrowserMix',
'CltCustomerIntelligenceData',
'CounterGroup',
'CounterInstanceSamples',
'CounterSample',
'CounterSampleQueryDetails',
'CounterSamplesResult',
'Diagnostics',
'DropAccessData',
'ErrorDetails',
'LoadGenerationGeoLocation',
'LoadTest',
'LoadTestDefinition',
'LoadTestErrors',
'LoadTestRunDetails',
'LoadTestRunSettings',
'OverridableRunSettings',
'PageSummary',
'RequestSummary',
'ScenarioSummary',
'StaticAgentRunSetting',
'SubType',
'SummaryPercentileData',
'TenantDetails',
'TestDefinition',
'TestDefinitionBasic',
'TestDrop',
'TestDropRef',
'TestResults',
'TestResultsSummary',
'TestRun',
'TestRunAbortMessage',
'TestRunBasic',
'TestRunCounterInstance',
'TestRunMessage',
'TestSettings',
'TestSummary',
'TransactionSummary',
'WebApiLoadTestMachineInput',
'WebApiSetupParamaters',
'WebApiTestMachine',
'WebApiUserLoadTestMachineInput',
'WebInstanceSummaryData',
'CloudLoadTestClient'
]

Просмотреть файл

@ -0,0 +1,432 @@
# --------------------------------------------------------------------------------------------
# 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_0.cloud_load_test import models
class CloudLoadTestClient(Client):
"""CloudLoadTest
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(CloudLoadTestClient, 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 = '7ae6d0a6-cda5-44cf-a261-28c392bed25c'
def create_agent_group(self, group):
"""CreateAgentGroup.
:param :class:`<AgentGroup> <azure.devops.v5_0.cloud_load_test.models.AgentGroup>` group: Agent group to be created
:rtype: :class:`<AgentGroup> <azure.devops.v5_0.cloud_load_test.models.AgentGroup>`
"""
content = self._serialize.body(group, 'AgentGroup')
response = self._send(http_method='POST',
location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720',
version='5.0',
content=content)
return self._deserialize('AgentGroup', response)
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 bool machine_setup_input:
:param bool machine_access_data:
:param bool outgoing_request_urls:
:param str agent_group_name: Name of the agent group
:rtype: object
"""
route_values = {}
if agent_group_id is not None:
route_values['agentGroupId'] = self._serialize.url('agent_group_id', agent_group_id, 'str')
query_parameters = {}
if machine_setup_input is not None:
query_parameters['machineSetupInput'] = self._serialize.query('machine_setup_input', machine_setup_input, 'bool')
if machine_access_data is not None:
query_parameters['machineAccessData'] = self._serialize.query('machine_access_data', machine_access_data, 'bool')
if outgoing_request_urls is not None:
query_parameters['outgoingRequestUrls'] = self._serialize.query('outgoing_request_urls', outgoing_request_urls, 'bool')
if agent_group_name is not None:
query_parameters['agentGroupName'] = self._serialize.query('agent_group_name', agent_group_name, 'str')
response = self._send(http_method='GET',
location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('object', response)
def delete_static_agent(self, agent_group_id, agent_name):
"""DeleteStaticAgent.
:param str agent_group_id: The agent group identifier
:param str agent_name: Name of the static agent
:rtype: str
"""
route_values = {}
if agent_group_id is not None:
route_values['agentGroupId'] = self._serialize.url('agent_group_id', agent_group_id, 'str')
query_parameters = {}
if agent_name is not None:
query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str')
response = self._send(http_method='DELETE',
location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('str', response)
def get_static_agents(self, agent_group_id, agent_name=None):
"""GetStaticAgents.
:param str agent_group_id: The agent group identifier
:param str agent_name: Name of the static agent
:rtype: object
"""
route_values = {}
if agent_group_id is not None:
route_values['agentGroupId'] = self._serialize.url('agent_group_id', agent_group_id, 'str')
query_parameters = {}
if agent_name is not None:
query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str')
response = self._send(http_method='GET',
location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('object', response)
def get_application(self, application_id):
"""GetApplication.
:param str application_id: Filter by APM application identifier.
:rtype: :class:`<Application> <azure.devops.v5_0.cloud_load_test.models.Application>`
"""
route_values = {}
if application_id is not None:
route_values['applicationId'] = self._serialize.url('application_id', application_id, 'str')
response = self._send(http_method='GET',
location_id='2c986dce-8e8d-4142-b541-d016d5aff764',
version='5.0',
route_values=route_values)
return self._deserialize('Application', response)
def get_applications(self, type=None):
"""GetApplications.
:param str type: Filters the results based on the plugin type.
:rtype: [Application]
"""
query_parameters = {}
if type is not None:
query_parameters['type'] = self._serialize.query('type', type, 'str')
response = self._send(http_method='GET',
location_id='2c986dce-8e8d-4142-b541-d016d5aff764',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Application]', self._unwrap_collection(response))
def get_counters(self, test_run_id, group_names, include_summary=None):
"""GetCounters.
:param str test_run_id: The test run identifier
:param str group_names: Comma separated names of counter groups, such as 'Application', 'Performance' and 'Throughput'
:param bool include_summary:
:rtype: [TestRunCounterInstance]
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
query_parameters = {}
if group_names is not None:
query_parameters['groupNames'] = self._serialize.query('group_names', group_names, 'str')
if include_summary is not None:
query_parameters['includeSummary'] = self._serialize.query('include_summary', include_summary, 'bool')
response = self._send(http_method='GET',
location_id='29265ea4-b5a5-4b2e-b054-47f5f6f00183',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestRunCounterInstance]', self._unwrap_collection(response))
def get_application_counters(self, application_id=None, plugintype=None):
"""GetApplicationCounters.
:param str application_id: Filter by APM application identifier.
:param str plugintype: Currently ApplicationInsights is the only available plugin type.
:rtype: [ApplicationCounters]
"""
query_parameters = {}
if application_id is not None:
query_parameters['applicationId'] = self._serialize.query('application_id', application_id, 'str')
if plugintype is not None:
query_parameters['plugintype'] = self._serialize.query('plugintype', plugintype, 'str')
response = self._send(http_method='GET',
location_id='c1275ce9-6d26-4bc6-926b-b846502e812d',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[ApplicationCounters]', self._unwrap_collection(response))
def get_counter_samples(self, counter_sample_query_details, test_run_id):
"""GetCounterSamples.
:param :class:`<VssJsonCollectionWrapper> <azure.devops.v5_0.cloud_load_test.models.VssJsonCollectionWrapper>` counter_sample_query_details:
:param str test_run_id: The test run identifier
:rtype: :class:`<CounterSamplesResult> <azure.devops.v5_0.cloud_load_test.models.CounterSamplesResult>`
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
content = self._serialize.body(counter_sample_query_details, 'VssJsonCollectionWrapper')
response = self._send(http_method='POST',
location_id='bad18480-7193-4518-992a-37289c5bb92d',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('CounterSamplesResult', response)
def get_load_test_run_errors(self, test_run_id, type=None, sub_type=None, detailed=None):
"""GetLoadTestRunErrors.
:param str test_run_id: The test run identifier
:param str type: Filter for the particular type of errors.
:param str sub_type: Filter for a particular subtype of errors. You should not provide error subtype without error type.
:param bool detailed: To include the details of test errors such as messagetext, request, stacktrace, testcasename, scenarioname, and lasterrordate.
:rtype: :class:`<LoadTestErrors> <azure.devops.v5_0.cloud_load_test.models.LoadTestErrors>`
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
query_parameters = {}
if type is not None:
query_parameters['type'] = self._serialize.query('type', type, 'str')
if sub_type is not None:
query_parameters['subType'] = self._serialize.query('sub_type', sub_type, 'str')
if detailed is not None:
query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool')
response = self._send(http_method='GET',
location_id='b52025a7-3fb4-4283-8825-7079e75bd402',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('LoadTestErrors', response)
def get_test_run_messages(self, test_run_id):
"""GetTestRunMessages.
:param str test_run_id: Id of the test run
:rtype: [TestRunMessage]
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
response = self._send(http_method='GET',
location_id='2e7ba122-f522-4205-845b-2d270e59850a',
version='5.0',
route_values=route_values)
return self._deserialize('[TestRunMessage]', self._unwrap_collection(response))
def get_plugin(self, type):
"""GetPlugin.
:param str type: Currently ApplicationInsights is the only available plugin type.
:rtype: :class:`<ApplicationType> <azure.devops.v5_0.cloud_load_test.models.ApplicationType>`
"""
route_values = {}
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
response = self._send(http_method='GET',
location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693',
version='5.0',
route_values=route_values)
return self._deserialize('ApplicationType', response)
def get_plugins(self):
"""GetPlugins.
:rtype: [ApplicationType]
"""
response = self._send(http_method='GET',
location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693',
version='5.0')
return self._deserialize('[ApplicationType]', self._unwrap_collection(response))
def get_load_test_result(self, test_run_id):
"""GetLoadTestResult.
:param str test_run_id: The test run identifier
:rtype: :class:`<TestResults> <azure.devops.v5_0.cloud_load_test.models.TestResults>`
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
response = self._send(http_method='GET',
location_id='5ed69bd8-4557-4cec-9b75-1ad67d0c257b',
version='5.0',
route_values=route_values)
return self._deserialize('TestResults', response)
def create_test_definition(self, test_definition):
"""CreateTestDefinition.
:param :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>` test_definition: Test definition to be created
:rtype: :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>`
"""
content = self._serialize.body(test_definition, 'TestDefinition')
response = self._send(http_method='POST',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='5.0',
content=content)
return self._deserialize('TestDefinition', response)
def get_test_definition(self, test_definition_id):
"""GetTestDefinition.
:param str test_definition_id: The test definition identifier
:rtype: :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>`
"""
route_values = {}
if test_definition_id is not None:
route_values['testDefinitionId'] = self._serialize.url('test_definition_id', test_definition_id, 'str')
response = self._send(http_method='GET',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='5.0',
route_values=route_values)
return self._deserialize('TestDefinition', response)
def get_test_definitions(self, from_date=None, to_date=None, top=None):
"""GetTestDefinitions.
:param str from_date: Date after which test definitions were created
:param str to_date: Date before which test definitions were crated
:param int top:
:rtype: [TestDefinitionBasic]
"""
query_parameters = {}
if from_date is not None:
query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'str')
if to_date is not None:
query_parameters['toDate'] = self._serialize.query('to_date', to_date, 'str')
if top is not None:
query_parameters['top'] = self._serialize.query('top', top, 'int')
response = self._send(http_method='GET',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TestDefinitionBasic]', self._unwrap_collection(response))
def update_test_definition(self, test_definition):
"""UpdateTestDefinition.
:param :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>` test_definition:
:rtype: :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>`
"""
content = self._serialize.body(test_definition, 'TestDefinition')
response = self._send(http_method='PUT',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='5.0',
content=content)
return self._deserialize('TestDefinition', response)
def create_test_drop(self, web_test_drop):
"""CreateTestDrop.
:param :class:`<TestDrop> <azure.devops.v5_0.cloud_load_test.models.TestDrop>` web_test_drop: Test drop to be created
:rtype: :class:`<TestDrop> <azure.devops.v5_0.cloud_load_test.models.TestDrop>`
"""
content = self._serialize.body(web_test_drop, 'TestDrop')
response = self._send(http_method='POST',
location_id='d89d0e08-505c-4357-96f6-9729311ce8ad',
version='5.0',
content=content)
return self._deserialize('TestDrop', response)
def get_test_drop(self, test_drop_id):
"""GetTestDrop.
:param str test_drop_id: The test drop identifier
:rtype: :class:`<TestDrop> <azure.devops.v5_0.cloud_load_test.models.TestDrop>`
"""
route_values = {}
if test_drop_id is not None:
route_values['testDropId'] = self._serialize.url('test_drop_id', test_drop_id, 'str')
response = self._send(http_method='GET',
location_id='d89d0e08-505c-4357-96f6-9729311ce8ad',
version='5.0',
route_values=route_values)
return self._deserialize('TestDrop', response)
def create_test_run(self, web_test_run):
"""CreateTestRun.
:param :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>` web_test_run:
:rtype: :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>`
"""
content = self._serialize.body(web_test_run, 'TestRun')
response = self._send(http_method='POST',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='5.0',
content=content)
return self._deserialize('TestRun', response)
def get_test_run(self, test_run_id):
"""GetTestRun.
:param str test_run_id: Unique ID of the test run
:rtype: :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>`
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
response = self._send(http_method='GET',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='5.0',
route_values=route_values)
return self._deserialize('TestRun', response)
def get_test_runs(self, name=None, requested_by=None, status=None, run_type=None, from_date=None, to_date=None, detailed=None, top=None, runsourceidentifier=None, retention_state=None):
"""GetTestRuns.
Returns test runs based on the filter specified. Returns all runs of the tenant if there is no filter.
:param str name: Name for the test run. Names are not unique. Test runs with same name are assigned sequential rolling numbers.
:param str requested_by: Filter by the user who requested the test run. Here requestedBy should be the display name of the user.
:param str status: Filter by the test run status.
:param str run_type: Valid values include: null, one of TestRunType, or "*"
:param str from_date: Filter by the test runs that have been modified after the fromDate timestamp.
:param str to_date: Filter by the test runs that have been modified before the toDate timestamp.
:param bool detailed: Include the detailed test run attributes.
:param int top: The maximum number of test runs to return.
:param str runsourceidentifier:
:param str retention_state:
:rtype: object
"""
query_parameters = {}
if name is not None:
query_parameters['name'] = self._serialize.query('name', name, 'str')
if requested_by is not None:
query_parameters['requestedBy'] = self._serialize.query('requested_by', requested_by, 'str')
if status is not None:
query_parameters['status'] = self._serialize.query('status', status, 'str')
if run_type is not None:
query_parameters['runType'] = self._serialize.query('run_type', run_type, 'str')
if from_date is not None:
query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'str')
if to_date is not None:
query_parameters['toDate'] = self._serialize.query('to_date', to_date, 'str')
if detailed is not None:
query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool')
if top is not None:
query_parameters['top'] = self._serialize.query('top', top, 'int')
if runsourceidentifier is not None:
query_parameters['runsourceidentifier'] = self._serialize.query('runsourceidentifier', runsourceidentifier, 'str')
if retention_state is not None:
query_parameters['retentionState'] = self._serialize.query('retention_state', retention_state, 'str')
response = self._send(http_method='GET',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('object', response)
def update_test_run(self, web_test_run, test_run_id):
"""UpdateTestRun.
:param :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>` web_test_run:
:param str test_run_id:
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
content = self._serialize.body(web_test_run, 'TestRun')
self._send(http_method='PATCH',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='5.0',
route_values=route_values,
content=content)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,29 +6,11 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import IdentityData
from .models import IdentityRef
from .models import JsonPatchOperation
from .models import OperationReference
from .models import Process
from .models import ProcessReference
from .models import ProjectInfo
from .models import ProjectProperty
from .models import Proxy
from .models import ProxyAuthorization
from .models import PublicKey
from .models import ReferenceLinks
from .models import TeamProject
from .models import TeamProjectCollection
from .models import TeamProjectCollectionReference
from .models import TeamProjectReference
from .models import WebApiConnectedService
from .models import WebApiConnectedServiceDetails
from .models import WebApiConnectedServiceRef
from .models import WebApiTeam
from .models import WebApiTeamRef
from ...v5_0.core.models import *
from .core_client import CoreClient
__all__ = [
'GraphSubjectBase',
'IdentityData',
'IdentityRef',
'JsonPatchOperation',
@ -41,6 +23,7 @@ __all__ = [
'ProxyAuthorization',
'PublicKey',
'ReferenceLinks',
'TeamMember',
'TeamProject',
'TeamProjectCollection',
'TeamProjectCollectionReference',
@ -50,4 +33,5 @@ __all__ = [
'WebApiConnectedServiceRef',
'WebApiTeam',
'WebApiTeamRef',
'CoreClient'
]

Просмотреть файл

@ -0,0 +1,306 @@
# --------------------------------------------------------------------------------------------
# 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_0.core import models
class CoreClient(Client):
"""Core
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(CoreClient, 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 = '79134c72-4a58-4b42-976c-04e7115f32bf'
def get_team_members_with_extended_properties(self, project_id, team_id, top=None, skip=None):
"""GetTeamMembersWithExtendedProperties.
Get a list of members for a specific team.
:param str project_id: The name or ID (GUID) of the team project the team belongs to.
:param str team_id: The name or ID (GUID) of the team .
:param int top:
:param int skip:
:rtype: [TeamMember]
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
query_parameters = {}
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='294c494c-2600-4d7e-b76c-3dd50c3c95be',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TeamMember]', self._unwrap_collection(response))
def get_process_by_id(self, process_id):
"""GetProcessById.
Get a process by ID.
:param str process_id: ID for a process.
:rtype: :class:`<Process> <azure.devops.v5_0.core.models.Process>`
"""
route_values = {}
if process_id is not None:
route_values['processId'] = self._serialize.url('process_id', process_id, 'str')
response = self._send(http_method='GET',
location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8',
version='5.0',
route_values=route_values)
return self._deserialize('Process', response)
def get_processes(self):
"""GetProcesses.
Get a list of processes.
:rtype: [Process]
"""
response = self._send(http_method='GET',
location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8',
version='5.0')
return self._deserialize('[Process]', self._unwrap_collection(response))
def get_project_collection(self, collection_id):
"""GetProjectCollection.
Get project collection with the specified id or name.
:param str collection_id:
:rtype: :class:`<TeamProjectCollection> <azure.devops.v5_0.core.models.TeamProjectCollection>`
"""
route_values = {}
if collection_id is not None:
route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str')
response = self._send(http_method='GET',
location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf',
version='5.0',
route_values=route_values)
return self._deserialize('TeamProjectCollection', response)
def get_project_collections(self, top=None, skip=None):
"""GetProjectCollections.
Get project collection references for this application.
:param int top:
:param int skip:
:rtype: [TeamProjectCollectionReference]
"""
query_parameters = {}
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TeamProjectCollectionReference]', self._unwrap_collection(response))
def get_project(self, project_id, include_capabilities=None, include_history=None):
"""GetProject.
Get project with the specified id or name, optionally including capabilities.
:param str project_id:
:param bool include_capabilities: Include capabilities (such as source control) in the team project result (default: false).
:param bool include_history: Search within renamed projects (that had such name in the past).
:rtype: :class:`<TeamProject> <azure.devops.v5_0.core.models.TeamProject>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
query_parameters = {}
if include_capabilities is not None:
query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool')
if include_history is not None:
query_parameters['includeHistory'] = self._serialize.query('include_history', include_history, 'bool')
response = self._send(http_method='GET',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TeamProject', response)
def get_projects(self, state_filter=None, top=None, skip=None, continuation_token=None, get_default_team_image_url=None):
"""GetProjects.
Get all projects in the organization that the authenticated user has access to.
:param str state_filter: Filter on team projects in a specific team project state (default: WellFormed).
:param int top:
:param int skip:
:param str continuation_token:
:param bool get_default_team_image_url:
:rtype: [TeamProjectReference]
"""
query_parameters = {}
if state_filter is not None:
query_parameters['stateFilter'] = self._serialize.query('state_filter', state_filter, 'str')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str')
if get_default_team_image_url is not None:
query_parameters['getDefaultTeamImageUrl'] = self._serialize.query('get_default_team_image_url', get_default_team_image_url, 'bool')
response = self._send(http_method='GET',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TeamProjectReference]', self._unwrap_collection(response))
def queue_create_project(self, project_to_create):
"""QueueCreateProject.
Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status.
:param :class:`<TeamProject> <azure.devops.v5_0.core.models.TeamProject>` project_to_create: The project to create.
:rtype: :class:`<OperationReference> <azure.devops.v5_0.core.models.OperationReference>`
"""
content = self._serialize.body(project_to_create, 'TeamProject')
response = self._send(http_method='POST',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='5.0',
content=content)
return self._deserialize('OperationReference', response)
def queue_delete_project(self, project_id):
"""QueueDeleteProject.
Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status.
:param str project_id: The project id of the project to delete.
:rtype: :class:`<OperationReference> <azure.devops.v5_0.core.models.OperationReference>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
response = self._send(http_method='DELETE',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='5.0',
route_values=route_values)
return self._deserialize('OperationReference', response)
def update_project(self, project_update, project_id):
"""UpdateProject.
Update an existing project's name, abbreviation, or description.
:param :class:`<TeamProject> <azure.devops.v5_0.core.models.TeamProject>` project_update: The updates for the project.
:param str project_id: The project id of the project to update.
:rtype: :class:`<OperationReference> <azure.devops.v5_0.core.models.OperationReference>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(project_update, 'TeamProject')
response = self._send(http_method='PATCH',
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('OperationReference', response)
def create_team(self, team, project_id):
"""CreateTeam.
Create a team in a team project.
:param :class:`<WebApiTeam> <azure.devops.v5_0.core.models.WebApiTeam>` team: The team data used to create the team.
:param str project_id: The name or ID (GUID) of the team project in which to create the team.
:rtype: :class:`<WebApiTeam> <azure.devops.v5_0.core.models.WebApiTeam>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
content = self._serialize.body(team, 'WebApiTeam')
response = self._send(http_method='POST',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('WebApiTeam', response)
def delete_team(self, project_id, team_id):
"""DeleteTeam.
Delete a team.
:param str project_id: The name or ID (GUID) of the team project containing the team to delete.
:param str team_id: The name of ID of the team to delete.
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
self._send(http_method='DELETE',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='5.0',
route_values=route_values)
def get_team(self, project_id, team_id):
"""GetTeam.
Get a specific team.
:param str project_id: The name or ID (GUID) of the team project containing the team.
:param str team_id: The name or ID (GUID) of the team.
:rtype: :class:`<WebApiTeam> <azure.devops.v5_0.core.models.WebApiTeam>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
response = self._send(http_method='GET',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='5.0',
route_values=route_values)
return self._deserialize('WebApiTeam', response)
def get_teams(self, project_id, mine=None, top=None, skip=None):
"""GetTeams.
Get a list of teams.
:param str project_id:
:param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access
:param int top: Maximum number of teams to return.
:param int skip: Number of teams to skip.
:rtype: [WebApiTeam]
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
query_parameters = {}
if mine is not None:
query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[WebApiTeam]', self._unwrap_collection(response))
def update_team(self, team_data, project_id, team_id):
"""UpdateTeam.
Update a team's name and/or description.
:param :class:`<WebApiTeam> <azure.devops.v5_0.core.models.WebApiTeam>` team_data:
:param str project_id: The name or ID (GUID) of the team project containing the team to update.
:param str team_id: The name of ID of the team to update.
:rtype: :class:`<WebApiTeam> <azure.devops.v5_0.core.models.WebApiTeam>`
"""
route_values = {}
if project_id is not None:
route_values['projectId'] = self._serialize.url('project_id', project_id, 'str')
if team_id is not None:
route_values['teamId'] = self._serialize.url('team_id', team_id, 'str')
content = self._serialize.body(team_data, 'WebApiTeam')
response = self._send(http_method='PATCH',
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('WebApiTeam', response)

Просмотреть файл

@ -0,0 +1,121 @@
# --------------------------------------------------------------------------------------------
# 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_0.git.models import *
from .git_client import GitClient
__all__ = [
'Attachment',
'Change',
'Comment',
'CommentIterationContext',
'CommentPosition',
'CommentThread',
'CommentThreadContext',
'CommentTrackingCriteria',
'FileContentMetadata',
'FileDiff',
'FileDiffParams',
'FileDiffsCriteria',
'GitAnnotatedTag',
'GitAsyncRefOperation',
'GitAsyncRefOperationDetail',
'GitAsyncRefOperationParameters',
'GitAsyncRefOperationSource',
'GitBaseVersionDescriptor',
'GitBlobRef',
'GitBranchStats',
'GitCherryPick',
'GitCommit',
'GitCommitChanges',
'GitCommitDiffs',
'GitCommitRef',
'GitConflict',
'GitConflictUpdateResult',
'GitDeletedRepository',
'GitFilePathsCollection',
'GitForkOperationStatusDetail',
'GitForkRef',
'GitForkSyncRequest',
'GitForkSyncRequestParameters',
'GitImportGitSource',
'GitImportRequest',
'GitImportRequestParameters',
'GitImportStatusDetail',
'GitImportTfvcSource',
'GitItem',
'GitItemDescriptor',
'GitItemRequestData',
'GitMerge',
'GitMergeOperationStatusDetail',
'GitMergeOriginRef',
'GitMergeParameters',
'GitObject',
'GitPullRequest',
'GitPullRequestChange',
'GitPullRequestCommentThread',
'GitPullRequestCommentThreadContext',
'GitPullRequestCompletionOptions',
'GitPullRequestIteration',
'GitPullRequestIterationChanges',
'GitPullRequestMergeOptions',
'GitPullRequestQuery',
'GitPullRequestQueryInput',
'GitPullRequestSearchCriteria',
'GitPullRequestStatus',
'GitPush',
'GitPushRef',
'GitPushSearchCriteria',
'GitQueryBranchStatsCriteria',
'GitQueryCommitsCriteria',
'GitRecycleBinRepositoryDetails',
'GitRef',
'GitRefFavorite',
'GitRefUpdate',
'GitRefUpdateResult',
'GitRepository',
'GitRepositoryCreateOptions',
'GitRepositoryRef',
'GitRepositoryStats',
'GitRevert',
'GitStatus',
'GitStatusContext',
'GitSuggestion',
'GitTargetVersionDescriptor',
'GitTemplate',
'GitTreeDiff',
'GitTreeDiffEntry',
'GitTreeDiffResponse',
'GitTreeEntryRef',
'GitTreeRef',
'GitUserDate',
'GitVersionDescriptor',
'GlobalGitRepositoryKey',
'GraphSubjectBase',
'IdentityRef',
'IdentityRefWithVote',
'ImportRepositoryValidation',
'ItemContent',
'ItemModel',
'JsonPatchOperation',
'LineDiffBlock',
'PolicyConfiguration',
'PolicyConfigurationRef',
'PolicyTypeRef',
'ReferenceLinks',
'ResourceRef',
'ShareNotificationContext',
'SourceToTargetRef',
'TeamProjectCollectionReference',
'TeamProjectReference',
'VersionedPolicyConfigurationRef',
'VstsInfo',
'WebApiCreateTagRequestData',
'WebApiTagDefinition',
'GitClient'
]

Просмотреть файл

@ -0,0 +1,13 @@
# coding=utf-8
from .git_client_base import GitClientBase
class GitClient(GitClientBase):
"""Git
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(GitClient, self).__init__(base_url, creds)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,22 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import AccessTokenResult
from .models import AuthorizationGrant
from .models import ChangedIdentities
from .models import ChangedIdentitiesContext
from .models import CreateScopeInfo
from .models import FrameworkIdentityInfo
from .models import GroupMembership
from .models import Identity
from .models import IdentityBatchInfo
from .models import IdentityScope
from .models import IdentitySelf
from .models import IdentitySnapshot
from .models import IdentityUpdateData
from .models import JsonWebToken
from .models import RefreshTokenGrant
from .models import TenantInfo
from ...v5_0.identity.models import *
from .identity_client import IdentityClient
__all__ = [
'AccessTokenResult',
@ -32,12 +18,16 @@ __all__ = [
'FrameworkIdentityInfo',
'GroupMembership',
'Identity',
'IdentityBase',
'IdentityBatchInfo',
'IdentityScope',
'IdentitySelf',
'IdentitySnapshot',
'IdentityUpdateData',
'JsonPatchOperation',
'JsonWebToken',
'RefreshTokenGrant',
'SwapIdentityInfo',
'TenantInfo',
'IdentityClient'
]

Просмотреть файл

@ -0,0 +1,253 @@
# --------------------------------------------------------------------------------------------
# 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_0.identity import models
class IdentityClient(Client):
"""Identity
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(IdentityClient, 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 = '8a3d49b8-91f0-46ef-b33d-dda338c25db3'
def create_groups(self, container):
"""CreateGroups.
:param :class:`<object> <azure.devops.v5_0.identity.models.object>` container:
:rtype: [Identity]
"""
content = self._serialize.body(container, 'object')
response = self._send(http_method='POST',
location_id='5966283b-4196-4d57-9211-1b68f41ec1c2',
version='5.0',
content=content)
return self._deserialize('[Identity]', self._unwrap_collection(response))
def delete_group(self, group_id):
"""DeleteGroup.
:param str group_id:
"""
route_values = {}
if group_id is not None:
route_values['groupId'] = self._serialize.url('group_id', group_id, 'str')
self._send(http_method='DELETE',
location_id='5966283b-4196-4d57-9211-1b68f41ec1c2',
version='5.0',
route_values=route_values)
def list_groups(self, scope_ids=None, recurse=None, deleted=None, properties=None):
"""ListGroups.
:param str scope_ids:
:param bool recurse:
:param bool deleted:
:param str properties:
:rtype: [Identity]
"""
query_parameters = {}
if scope_ids is not None:
query_parameters['scopeIds'] = self._serialize.query('scope_ids', scope_ids, 'str')
if recurse is not None:
query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool')
if deleted is not None:
query_parameters['deleted'] = self._serialize.query('deleted', deleted, 'bool')
if properties is not None:
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
response = self._send(http_method='GET',
location_id='5966283b-4196-4d57-9211-1b68f41ec1c2',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Identity]', self._unwrap_collection(response))
def get_identity_changes(self, identity_sequence_id, group_sequence_id, organization_identity_sequence_id=None, page_size=None, scope_id=None):
"""GetIdentityChanges.
:param int identity_sequence_id:
:param int group_sequence_id:
:param int organization_identity_sequence_id:
:param int page_size:
:param str scope_id:
:rtype: :class:`<ChangedIdentities> <azure.devops.v5_0.identity.models.ChangedIdentities>`
"""
query_parameters = {}
if identity_sequence_id is not None:
query_parameters['identitySequenceId'] = self._serialize.query('identity_sequence_id', identity_sequence_id, 'int')
if group_sequence_id is not None:
query_parameters['groupSequenceId'] = self._serialize.query('group_sequence_id', group_sequence_id, 'int')
if organization_identity_sequence_id is not None:
query_parameters['organizationIdentitySequenceId'] = self._serialize.query('organization_identity_sequence_id', organization_identity_sequence_id, 'int')
if page_size is not None:
query_parameters['pageSize'] = self._serialize.query('page_size', page_size, 'int')
if scope_id is not None:
query_parameters['scopeId'] = self._serialize.query('scope_id', scope_id, 'str')
response = self._send(http_method='GET',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('ChangedIdentities', response)
def get_user_identity_ids_by_domain_id(self, domain_id):
"""GetUserIdentityIdsByDomainId.
:param str domain_id:
:rtype: [str]
"""
query_parameters = {}
if domain_id is not None:
query_parameters['domainId'] = self._serialize.query('domain_id', domain_id, 'str')
response = self._send(http_method='GET',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[str]', self._unwrap_collection(response))
def read_identities(self, descriptors=None, identity_ids=None, subject_descriptors=None, search_filter=None, filter_value=None, query_membership=None, properties=None, include_restricted_visibility=None, options=None):
"""ReadIdentities.
:param str descriptors:
:param str identity_ids:
:param str subject_descriptors:
:param str search_filter:
:param str filter_value:
:param str query_membership:
:param str properties:
:param bool include_restricted_visibility:
:param str options:
:rtype: [Identity]
"""
query_parameters = {}
if descriptors is not None:
query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str')
if identity_ids is not None:
query_parameters['identityIds'] = self._serialize.query('identity_ids', identity_ids, 'str')
if subject_descriptors is not None:
query_parameters['subjectDescriptors'] = self._serialize.query('subject_descriptors', subject_descriptors, 'str')
if search_filter is not None:
query_parameters['searchFilter'] = self._serialize.query('search_filter', search_filter, 'str')
if filter_value is not None:
query_parameters['filterValue'] = self._serialize.query('filter_value', filter_value, 'str')
if query_membership is not None:
query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str')
if properties is not None:
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
if include_restricted_visibility is not None:
query_parameters['includeRestrictedVisibility'] = self._serialize.query('include_restricted_visibility', include_restricted_visibility, 'bool')
if options is not None:
query_parameters['options'] = self._serialize.query('options', options, 'str')
response = self._send(http_method='GET',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Identity]', self._unwrap_collection(response))
def read_identities_by_scope(self, scope_id, query_membership=None, properties=None):
"""ReadIdentitiesByScope.
:param str scope_id:
:param str query_membership:
:param str properties:
:rtype: [Identity]
"""
query_parameters = {}
if scope_id is not None:
query_parameters['scopeId'] = self._serialize.query('scope_id', scope_id, 'str')
if query_membership is not None:
query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str')
if properties is not None:
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
response = self._send(http_method='GET',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Identity]', self._unwrap_collection(response))
def read_identity(self, identity_id, query_membership=None, properties=None):
"""ReadIdentity.
:param str identity_id:
:param str query_membership:
:param str properties:
:rtype: :class:`<Identity> <azure.devops.v5_0.identity.models.Identity>`
"""
route_values = {}
if identity_id is not None:
route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str')
query_parameters = {}
if query_membership is not None:
query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str')
if properties is not None:
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
response = self._send(http_method='GET',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Identity', response)
def update_identities(self, identities):
"""UpdateIdentities.
:param :class:`<VssJsonCollectionWrapper> <azure.devops.v5_0.identity.models.VssJsonCollectionWrapper>` identities:
:rtype: [IdentityUpdateData]
"""
content = self._serialize.body(identities, 'VssJsonCollectionWrapper')
response = self._send(http_method='PUT',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
content=content)
return self._deserialize('[IdentityUpdateData]', self._unwrap_collection(response))
def update_identity(self, identity, identity_id):
"""UpdateIdentity.
:param :class:`<Identity> <azure.devops.v5_0.identity.models.Identity>` identity:
:param str identity_id:
"""
route_values = {}
if identity_id is not None:
route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str')
content = self._serialize.body(identity, 'Identity')
self._send(http_method='PUT',
location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7',
version='5.0',
route_values=route_values,
content=content)
def create_identity(self, framework_identity_info):
"""CreateIdentity.
:param :class:`<FrameworkIdentityInfo> <azure.devops.v5_0.identity.models.FrameworkIdentityInfo>` framework_identity_info:
:rtype: :class:`<Identity> <azure.devops.v5_0.identity.models.Identity>`
"""
content = self._serialize.body(framework_identity_info, 'FrameworkIdentityInfo')
response = self._send(http_method='PUT',
location_id='dd55f0eb-6ea2-4fe4-9ebe-919e7dd1dfb4',
version='5.0',
content=content)
return self._deserialize('Identity', response)
def get_max_sequence_id(self):
"""GetMaxSequenceId.
Read the max sequence id of all the identities.
:rtype: long
"""
response = self._send(http_method='GET',
location_id='e4a70778-cb2c-4e85-b7cc-3f3c7ae2d408',
version='5.0')
return self._deserialize('long', response)
def get_self(self):
"""GetSelf.
Read identity of the home tenant request user.
:rtype: :class:`<IdentitySelf> <azure.devops.v5_0.identity.models.IdentitySelf>`
"""
response = self._send(http_method='GET',
location_id='4bb02b5b-c120-4be2-b68e-21f7c50a4b82',
version='5.0')
return self._deserialize('IdentitySelf', response)

Просмотреть файл

@ -0,0 +1,18 @@
# --------------------------------------------------------------------------------------------
# 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_0.operations.models import *
from .operations_client import OperationsClient
__all__ = [
'Operation',
'OperationReference',
'OperationResultReference',
'ReferenceLinks',
'OperationsClient'
]

Просмотреть файл

@ -0,0 +1,47 @@
# --------------------------------------------------------------------------------------------
# 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_0.operations import models
class OperationsClient(Client):
"""Operations
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(OperationsClient, 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_operation(self, operation_id, plugin_id=None):
"""GetOperation.
Gets an operation from the the operationId using the given pluginId.
:param str operation_id: The ID for the operation.
:param str plugin_id: The ID for the plugin.
:rtype: :class:`<Operation> <azure.devops.v5_0.operations.models.Operation>`
"""
route_values = {}
if operation_id is not None:
route_values['operationId'] = self._serialize.url('operation_id', operation_id, 'str')
query_parameters = {}
if plugin_id is not None:
query_parameters['pluginId'] = self._serialize.query('plugin_id', plugin_id, 'str')
response = self._send(http_method='GET',
location_id='9a1b74b4-2ca8-4a9f-8470-c2f2e6fdc949',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Operation', response)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,16 +6,11 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import IdentityRef
from .models import PolicyConfiguration
from .models import PolicyConfigurationRef
from .models import PolicyEvaluationRecord
from .models import PolicyType
from .models import PolicyTypeRef
from .models import ReferenceLinks
from .models import VersionedPolicyConfigurationRef
from ...v5_0.policy.models import *
from .policy_client import PolicyClient
__all__ = [
'GraphSubjectBase',
'IdentityRef',
'PolicyConfiguration',
'PolicyConfigurationRef',
@ -24,4 +19,5 @@ __all__ = [
'PolicyTypeRef',
'ReferenceLinks',
'VersionedPolicyConfigurationRef',
'PolicyClient'
]

Просмотреть файл

@ -0,0 +1,206 @@
# --------------------------------------------------------------------------------------------
# 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_0.policy import models
class PolicyClient(Client):
"""Policy
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(PolicyClient, 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 = 'fb13a388-40dd-4a04-b530-013a739c72ef'
def create_policy_configuration(self, configuration, project, configuration_id=None):
"""CreatePolicyConfiguration.
Create a policy configuration of a given policy type.
:param :class:`<PolicyConfiguration> <azure.devops.v5_0.policy.models.PolicyConfiguration>` configuration: The policy configuration to create.
:param str project: Project ID or project name
:param int configuration_id:
:rtype: :class:`<PolicyConfiguration> <azure.devops.v5_0.policy.models.PolicyConfiguration>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if configuration_id is not None:
route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int')
content = self._serialize.body(configuration, 'PolicyConfiguration')
response = self._send(http_method='POST',
location_id='dad91cbe-d183-45f8-9c6e-9c1164472121',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('PolicyConfiguration', response)
def delete_policy_configuration(self, project, configuration_id):
"""DeletePolicyConfiguration.
Delete a policy configuration by its ID.
:param str project: Project ID or project name
:param int configuration_id: ID of the policy configuration to delete.
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if configuration_id is not None:
route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int')
self._send(http_method='DELETE',
location_id='dad91cbe-d183-45f8-9c6e-9c1164472121',
version='5.0',
route_values=route_values)
def get_policy_configuration(self, project, configuration_id):
"""GetPolicyConfiguration.
Get a policy configuration by its ID.
:param str project: Project ID or project name
:param int configuration_id: ID of the policy configuration
:rtype: :class:`<PolicyConfiguration> <azure.devops.v5_0.policy.models.PolicyConfiguration>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if configuration_id is not None:
route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int')
response = self._send(http_method='GET',
location_id='dad91cbe-d183-45f8-9c6e-9c1164472121',
version='5.0',
route_values=route_values)
return self._deserialize('PolicyConfiguration', response)
def get_policy_configurations(self, project, scope=None, policy_type=None):
"""GetPolicyConfigurations.
Get a list of policy configurations in a project.
:param str project: Project ID or project name
:param str scope: [Provided for legacy reasons] The scope on which a subset of policies is defined.
:param str policy_type: Filter returned policies to only this type
:rtype: [PolicyConfiguration]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if scope is not None:
query_parameters['scope'] = self._serialize.query('scope', scope, 'str')
if policy_type is not None:
query_parameters['policyType'] = self._serialize.query('policy_type', policy_type, 'str')
response = self._send(http_method='GET',
location_id='dad91cbe-d183-45f8-9c6e-9c1164472121',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response))
def update_policy_configuration(self, configuration, project, configuration_id):
"""UpdatePolicyConfiguration.
Update a policy configuration by its ID.
:param :class:`<PolicyConfiguration> <azure.devops.v5_0.policy.models.PolicyConfiguration>` configuration: The policy configuration to update.
:param str project: Project ID or project name
:param int configuration_id: ID of the existing policy configuration to be updated.
:rtype: :class:`<PolicyConfiguration> <azure.devops.v5_0.policy.models.PolicyConfiguration>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if configuration_id is not None:
route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int')
content = self._serialize.body(configuration, 'PolicyConfiguration')
response = self._send(http_method='PUT',
location_id='dad91cbe-d183-45f8-9c6e-9c1164472121',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('PolicyConfiguration', response)
def get_policy_configuration_revision(self, project, configuration_id, revision_id):
"""GetPolicyConfigurationRevision.
Retrieve a specific revision of a given policy by ID.
:param str project: Project ID or project name
:param int configuration_id: The policy configuration ID.
:param int revision_id: The revision ID.
:rtype: :class:`<PolicyConfiguration> <azure.devops.v5_0.policy.models.PolicyConfiguration>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if configuration_id is not None:
route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int')
if revision_id is not None:
route_values['revisionId'] = self._serialize.url('revision_id', revision_id, 'int')
response = self._send(http_method='GET',
location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95',
version='5.0',
route_values=route_values)
return self._deserialize('PolicyConfiguration', response)
def get_policy_configuration_revisions(self, project, configuration_id, top=None, skip=None):
"""GetPolicyConfigurationRevisions.
Retrieve all revisions for a given policy.
:param str project: Project ID or project name
:param int configuration_id: The policy configuration ID.
:param int top: The number of revisions to retrieve.
:param int skip: The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
:rtype: [PolicyConfiguration]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if configuration_id is not None:
route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int')
query_parameters = {}
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response))
def get_policy_type(self, project, type_id):
"""GetPolicyType.
Retrieve a specific policy type by ID.
:param str project: Project ID or project name
:param str type_id: The policy ID.
:rtype: :class:`<PolicyType> <azure.devops.v5_0.policy.models.PolicyType>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if type_id is not None:
route_values['typeId'] = self._serialize.url('type_id', type_id, 'str')
response = self._send(http_method='GET',
location_id='44096322-2d3d-466a-bb30-d1b7de69f61f',
version='5.0',
route_values=route_values)
return self._deserialize('PolicyType', response)
def get_policy_types(self, project):
"""GetPolicyTypes.
Retrieve all available policy types.
:param str project: Project ID or project name
:rtype: [PolicyType]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
response = self._send(http_method='GET',
location_id='44096322-2d3d-466a-bb30-d1b7de69f61f',
version='5.0',
route_values=route_values)
return self._deserialize('[PolicyType]', self._unwrap_collection(response))

Просмотреть файл

@ -0,0 +1,26 @@
# --------------------------------------------------------------------------------------------
# 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_0.profile.models import *
from .profile_client import ProfileClient
__all__ = [
'AttributeDescriptor',
'AttributesContainer',
'Avatar',
'CoreProfileAttribute',
'CreateProfileContext',
'GeoRegion',
'Profile',
'ProfileAttribute',
'ProfileAttributeBase',
'ProfileRegion',
'ProfileRegions',
'RemoteProfile',
'ProfileClient'
]

Просмотреть файл

@ -0,0 +1,59 @@
# --------------------------------------------------------------------------------------------
# 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_0.profile import models
class ProfileClient(Client):
"""Profile
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(ProfileClient, 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_profile(self, id, details=None, with_attributes=None, partition=None, core_attributes=None, force_refresh=None):
"""GetProfile.
Get my profile.
:param str id:
:param bool details:
:param bool with_attributes:
:param str partition:
:param str core_attributes:
:param bool force_refresh:
:rtype: :class:`<Profile> <azure.devops.v5_0.profile.models.Profile>`
"""
route_values = {}
if id is not None:
route_values['id'] = self._serialize.url('id', id, 'str')
query_parameters = {}
if details is not None:
query_parameters['details'] = self._serialize.query('details', details, 'bool')
if with_attributes is not None:
query_parameters['withAttributes'] = self._serialize.query('with_attributes', with_attributes, 'bool')
if partition is not None:
query_parameters['partition'] = self._serialize.query('partition', partition, 'str')
if core_attributes is not None:
query_parameters['coreAttributes'] = self._serialize.query('core_attributes', core_attributes, 'str')
if force_refresh is not None:
query_parameters['forceRefresh'] = self._serialize.query('force_refresh', force_refresh, 'bool')
response = self._send(http_method='GET',
location_id='f83735dc-483f-4238-a291-d45f6080a9af',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Profile', response)

Просмотреть файл

@ -0,0 +1,109 @@
# --------------------------------------------------------------------------------------------
# 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_0.release.models import *
from .release_client import ReleaseClient
__all__ = [
'AgentArtifactDefinition',
'ApprovalOptions',
'Artifact',
'ArtifactMetadata',
'ArtifactSourceReference',
'ArtifactTriggerConfiguration',
'ArtifactTypeDefinition',
'ArtifactVersion',
'ArtifactVersionQueryResult',
'AuthorizationHeader',
'AutoTriggerIssue',
'BuildVersion',
'Change',
'Condition',
'ConfigurationVariableValue',
'DataSourceBindingBase',
'DefinitionEnvironmentReference',
'Deployment',
'DeploymentAttempt',
'DeploymentJob',
'DeploymentQueryParameters',
'EmailRecipients',
'EnvironmentExecutionPolicy',
'EnvironmentOptions',
'EnvironmentRetentionPolicy',
'EnvironmentTrigger',
'FavoriteItem',
'Folder',
'GateUpdateMetadata',
'GraphSubjectBase',
'IdentityRef',
'IgnoredGate',
'InputDescriptor',
'InputValidation',
'InputValue',
'InputValues',
'InputValuesError',
'InputValuesQuery',
'Issue',
'MailMessage',
'ManualIntervention',
'ManualInterventionUpdateMetadata',
'Metric',
'PipelineProcess',
'ProcessParameters',
'ProjectReference',
'QueuedReleaseData',
'ReferenceLinks',
'Release',
'ReleaseApproval',
'ReleaseApprovalHistory',
'ReleaseCondition',
'ReleaseDefinition',
'ReleaseDefinitionApprovals',
'ReleaseDefinitionApprovalStep',
'ReleaseDefinitionDeployStep',
'ReleaseDefinitionEnvironment',
'ReleaseDefinitionEnvironmentStep',
'ReleaseDefinitionEnvironmentSummary',
'ReleaseDefinitionEnvironmentTemplate',
'ReleaseDefinitionGate',
'ReleaseDefinitionGatesOptions',
'ReleaseDefinitionGatesStep',
'ReleaseDefinitionRevision',
'ReleaseDefinitionShallowReference',
'ReleaseDefinitionSummary',
'ReleaseDefinitionUndeleteParameter',
'ReleaseDeployPhase',
'ReleaseEnvironment',
'ReleaseEnvironmentShallowReference',
'ReleaseEnvironmentUpdateMetadata',
'ReleaseGates',
'ReleaseReference',
'ReleaseRevision',
'ReleaseSchedule',
'ReleaseSettings',
'ReleaseShallowReference',
'ReleaseStartEnvironmentMetadata',
'ReleaseStartMetadata',
'ReleaseTask',
'ReleaseTaskAttachment',
'ReleaseUpdateMetadata',
'ReleaseWorkItemRef',
'RetentionPolicy',
'RetentionSettings',
'SourcePullRequestVersion',
'SummaryMailSection',
'TaskInputDefinitionBase',
'TaskInputValidation',
'TaskSourceDefinitionBase',
'VariableGroup',
'VariableGroupProviderData',
'VariableValue',
'WorkflowTask',
'WorkflowTaskReference',
'ReleaseClient'
]

Просмотреть файл

@ -0,0 +1,558 @@
# --------------------------------------------------------------------------------------------
# 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_0.release import models
class ReleaseClient(Client):
"""Release
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(ReleaseClient, 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 = 'efc2f575-36ef-48e9-b672-0c6fb4a48ac5'
def get_approvals(self, project, assigned_to_filter=None, status_filter=None, release_ids_filter=None, type_filter=None, top=None, continuation_token=None, query_order=None, include_my_group_approvals=None):
"""GetApprovals.
Get a list of approvals
:param str project: Project ID or project name
:param str assigned_to_filter: Approvals assigned to this user.
:param str status_filter: Approvals with this status. Default is 'pending'.
:param [int] release_ids_filter: Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4.
:param str type_filter: Approval with this type.
:param int top: Number of approvals to get. Default is 50.
:param int continuation_token: Gets the approvals after the continuation token provided.
:param str query_order: Gets the results in the defined order of created approvals. Default is 'descending'.
:param bool include_my_group_approvals: 'true' to include my group approvals. Default is 'false'.
:rtype: [ReleaseApproval]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if assigned_to_filter is not None:
query_parameters['assignedToFilter'] = self._serialize.query('assigned_to_filter', assigned_to_filter, 'str')
if status_filter is not None:
query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str')
if release_ids_filter is not None:
release_ids_filter = ",".join(map(str, release_ids_filter))
query_parameters['releaseIdsFilter'] = self._serialize.query('release_ids_filter', release_ids_filter, 'str')
if type_filter is not None:
query_parameters['typeFilter'] = self._serialize.query('type_filter', type_filter, 'str')
if top is not None:
query_parameters['top'] = self._serialize.query('top', top, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int')
if query_order is not None:
query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str')
if include_my_group_approvals is not None:
query_parameters['includeMyGroupApprovals'] = self._serialize.query('include_my_group_approvals', include_my_group_approvals, 'bool')
response = self._send(http_method='GET',
location_id='b47c6458-e73b-47cb-a770-4df1e8813a91',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[ReleaseApproval]', self._unwrap_collection(response))
def update_release_approval(self, approval, project, approval_id):
"""UpdateReleaseApproval.
Update status of an approval
:param :class:`<ReleaseApproval> <azure.devops.v5_0.release.models.ReleaseApproval>` approval: ReleaseApproval object having status, approver and comments.
:param str project: Project ID or project name
:param int approval_id: Id of the approval.
:rtype: :class:`<ReleaseApproval> <azure.devops.v5_0.release.models.ReleaseApproval>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if approval_id is not None:
route_values['approvalId'] = self._serialize.url('approval_id', approval_id, 'int')
content = self._serialize.body(approval, 'ReleaseApproval')
response = self._send(http_method='PATCH',
location_id='9328e074-59fb-465a-89d9-b09c82ee5109',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('ReleaseApproval', response)
def create_release_definition(self, release_definition, project):
"""CreateReleaseDefinition.
Create a release definition
:param :class:`<ReleaseDefinition> <azure.devops.v5_0.release.models.ReleaseDefinition>` release_definition: release definition object to create.
:param str project: Project ID or project name
:rtype: :class:`<ReleaseDefinition> <azure.devops.v5_0.release.models.ReleaseDefinition>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(release_definition, 'ReleaseDefinition')
response = self._send(http_method='POST',
location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('ReleaseDefinition', response)
def delete_release_definition(self, project, definition_id, comment=None, force_delete=None):
"""DeleteReleaseDefinition.
Delete a release definition.
:param str project: Project ID or project name
:param int definition_id: Id of the release definition.
:param str comment: Comment for deleting a release definition.
:param bool force_delete: 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'.
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if definition_id is not None:
route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int')
query_parameters = {}
if comment is not None:
query_parameters['comment'] = self._serialize.query('comment', comment, 'str')
if force_delete is not None:
query_parameters['forceDelete'] = self._serialize.query('force_delete', force_delete, 'bool')
self._send(http_method='DELETE',
location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
def get_release_definition(self, project, definition_id, property_filters=None):
"""GetReleaseDefinition.
Get a release definition.
:param str project: Project ID or project name
:param int definition_id: Id of the release definition.
:param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included.
:rtype: :class:`<ReleaseDefinition> <azure.devops.v5_0.release.models.ReleaseDefinition>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if definition_id is not None:
route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int')
query_parameters = {}
if property_filters is not None:
property_filters = ",".join(property_filters)
query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str')
response = self._send(http_method='GET',
location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('ReleaseDefinition', response)
def get_release_definitions(self, project, search_text=None, expand=None, artifact_type=None, artifact_source_id=None, top=None, continuation_token=None, query_order=None, path=None, is_exact_name_match=None, tag_filter=None, property_filters=None, definition_id_filter=None, is_deleted=None):
"""GetReleaseDefinitions.
Get a list of release definitions.
:param str project: Project ID or project name
:param str search_text: Get release definitions with names containing searchText.
:param str expand: The properties that should be expanded in the list of Release definitions.
:param str artifact_type: Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
:param str artifact_source_id: Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
:param int top: Number of release definitions to get.
:param str continuation_token: Gets the release definitions after the continuation token provided.
:param str query_order: Gets the results in the defined order. Default is 'IdAscending'.
:param str path: Gets the release definitions under the specified path.
:param bool is_exact_name_match: 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'.
:param [str] tag_filter: A comma-delimited list of tags. Only release definitions with these tags will be returned.
:param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not.
:param [str] definition_id_filter: A comma-delimited list of release definitions to retrieve.
:param bool is_deleted: 'true' to get release definitions that has been deleted. Default is 'false'
:rtype: [ReleaseDefinition]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if search_text is not None:
query_parameters['searchText'] = self._serialize.query('search_text', search_text, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query('expand', expand, 'str')
if artifact_type is not None:
query_parameters['artifactType'] = self._serialize.query('artifact_type', artifact_type, 'str')
if artifact_source_id is not None:
query_parameters['artifactSourceId'] = self._serialize.query('artifact_source_id', artifact_source_id, 'str')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str')
if query_order is not None:
query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str')
if path is not None:
query_parameters['path'] = self._serialize.query('path', path, 'str')
if is_exact_name_match is not None:
query_parameters['isExactNameMatch'] = self._serialize.query('is_exact_name_match', is_exact_name_match, 'bool')
if tag_filter is not None:
tag_filter = ",".join(tag_filter)
query_parameters['tagFilter'] = self._serialize.query('tag_filter', tag_filter, 'str')
if property_filters is not None:
property_filters = ",".join(property_filters)
query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str')
if definition_id_filter is not None:
definition_id_filter = ",".join(definition_id_filter)
query_parameters['definitionIdFilter'] = self._serialize.query('definition_id_filter', definition_id_filter, 'str')
if is_deleted is not None:
query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool')
response = self._send(http_method='GET',
location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[ReleaseDefinition]', self._unwrap_collection(response))
def update_release_definition(self, release_definition, project):
"""UpdateReleaseDefinition.
Update a release definition.
:param :class:`<ReleaseDefinition> <azure.devops.v5_0.release.models.ReleaseDefinition>` release_definition: Release definition object to update.
:param str project: Project ID or project name
:rtype: :class:`<ReleaseDefinition> <azure.devops.v5_0.release.models.ReleaseDefinition>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(release_definition, 'ReleaseDefinition')
response = self._send(http_method='PUT',
location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('ReleaseDefinition', response)
def get_deployments(self, project, definition_id=None, definition_environment_id=None, created_by=None, min_modified_time=None, max_modified_time=None, deployment_status=None, operation_status=None, latest_attempts_only=None, query_order=None, top=None, continuation_token=None, created_for=None, min_started_time=None, max_started_time=None, source_branch=None):
"""GetDeployments.
:param str project: Project ID or project name
:param int definition_id:
:param int definition_environment_id:
:param str created_by:
:param datetime min_modified_time:
:param datetime max_modified_time:
:param str deployment_status:
:param str operation_status:
:param bool latest_attempts_only:
:param str query_order:
:param int top:
:param int continuation_token:
:param str created_for:
:param datetime min_started_time:
:param datetime max_started_time:
:param str source_branch:
:rtype: [Deployment]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if definition_id is not None:
query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int')
if definition_environment_id is not None:
query_parameters['definitionEnvironmentId'] = self._serialize.query('definition_environment_id', definition_environment_id, 'int')
if created_by is not None:
query_parameters['createdBy'] = self._serialize.query('created_by', created_by, 'str')
if min_modified_time is not None:
query_parameters['minModifiedTime'] = self._serialize.query('min_modified_time', min_modified_time, 'iso-8601')
if max_modified_time is not None:
query_parameters['maxModifiedTime'] = self._serialize.query('max_modified_time', max_modified_time, 'iso-8601')
if deployment_status is not None:
query_parameters['deploymentStatus'] = self._serialize.query('deployment_status', deployment_status, 'str')
if operation_status is not None:
query_parameters['operationStatus'] = self._serialize.query('operation_status', operation_status, 'str')
if latest_attempts_only is not None:
query_parameters['latestAttemptsOnly'] = self._serialize.query('latest_attempts_only', latest_attempts_only, 'bool')
if query_order is not None:
query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int')
if created_for is not None:
query_parameters['createdFor'] = self._serialize.query('created_for', created_for, 'str')
if min_started_time is not None:
query_parameters['minStartedTime'] = self._serialize.query('min_started_time', min_started_time, 'iso-8601')
if max_started_time is not None:
query_parameters['maxStartedTime'] = self._serialize.query('max_started_time', max_started_time, 'iso-8601')
if source_branch is not None:
query_parameters['sourceBranch'] = self._serialize.query('source_branch', source_branch, 'str')
response = self._send(http_method='GET',
location_id='b005ef73-cddc-448e-9ba2-5193bf36b19f',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[Deployment]', self._unwrap_collection(response))
def get_manual_intervention(self, project, release_id, manual_intervention_id):
"""GetManualIntervention.
Get manual intervention for a given release and manual intervention id.
:param str project: Project ID or project name
:param int release_id: Id of the release.
:param int manual_intervention_id: Id of the manual intervention.
:rtype: :class:`<ManualIntervention> <azure.devops.v5_0.release.models.ManualIntervention>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
if manual_intervention_id is not None:
route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int')
response = self._send(http_method='GET',
location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e',
version='5.0',
route_values=route_values)
return self._deserialize('ManualIntervention', response)
def get_manual_interventions(self, project, release_id):
"""GetManualInterventions.
List all manual interventions for a given release.
:param str project: Project ID or project name
:param int release_id: Id of the release.
:rtype: [ManualIntervention]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
response = self._send(http_method='GET',
location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e',
version='5.0',
route_values=route_values)
return self._deserialize('[ManualIntervention]', self._unwrap_collection(response))
def update_manual_intervention(self, manual_intervention_update_metadata, project, release_id, manual_intervention_id):
"""UpdateManualIntervention.
Update manual intervention.
:param :class:`<ManualInterventionUpdateMetadata> <azure.devops.v5_0.release.models.ManualInterventionUpdateMetadata>` manual_intervention_update_metadata: Meta data to update manual intervention.
:param str project: Project ID or project name
:param int release_id: Id of the release.
:param int manual_intervention_id: Id of the manual intervention.
:rtype: :class:`<ManualIntervention> <azure.devops.v5_0.release.models.ManualIntervention>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
if manual_intervention_id is not None:
route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int')
content = self._serialize.body(manual_intervention_update_metadata, 'ManualInterventionUpdateMetadata')
response = self._send(http_method='PATCH',
location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('ManualIntervention', response)
def get_releases(self, project=None, definition_id=None, definition_environment_id=None, search_text=None, created_by=None, status_filter=None, environment_status_filter=None, min_created_time=None, max_created_time=None, query_order=None, top=None, continuation_token=None, expand=None, artifact_type_id=None, source_id=None, artifact_version_id=None, source_branch_filter=None, is_deleted=None, tag_filter=None, property_filters=None, release_id_filter=None):
"""GetReleases.
Get a list of releases
:param str project: Project ID or project name
:param int definition_id: Releases from this release definition Id.
:param int definition_environment_id:
:param str search_text: Releases with names containing searchText.
:param str created_by: Releases created by this user.
:param str status_filter: Releases that have this status.
:param int environment_status_filter:
:param datetime min_created_time: Releases that were created after this time.
:param datetime max_created_time: Releases that were created before this time.
:param str query_order: Gets the results in the defined order of created date for releases. Default is descending.
:param int top: Number of releases to get. Default is 50.
:param int continuation_token: Gets the releases after the continuation token provided.
:param str expand: The property that should be expanded in the list of releases.
:param str artifact_type_id: Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
:param str source_id: Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
:param str artifact_version_id: Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId.
:param str source_branch_filter: Releases with given sourceBranchFilter will be returned.
:param bool is_deleted: Gets the soft deleted releases, if true.
:param [str] tag_filter: A comma-delimited list of tags. Only releases with these tags will be returned.
:param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not.
:param [int] release_id_filter: A comma-delimited list of releases Ids. Only releases with these Ids will be returned.
:rtype: [Release]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if definition_id is not None:
query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int')
if definition_environment_id is not None:
query_parameters['definitionEnvironmentId'] = self._serialize.query('definition_environment_id', definition_environment_id, 'int')
if search_text is not None:
query_parameters['searchText'] = self._serialize.query('search_text', search_text, 'str')
if created_by is not None:
query_parameters['createdBy'] = self._serialize.query('created_by', created_by, 'str')
if status_filter is not None:
query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str')
if environment_status_filter is not None:
query_parameters['environmentStatusFilter'] = self._serialize.query('environment_status_filter', environment_status_filter, 'int')
if min_created_time is not None:
query_parameters['minCreatedTime'] = self._serialize.query('min_created_time', min_created_time, 'iso-8601')
if max_created_time is not None:
query_parameters['maxCreatedTime'] = self._serialize.query('max_created_time', max_created_time, 'iso-8601')
if query_order is not None:
query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int')
if expand is not None:
query_parameters['$expand'] = self._serialize.query('expand', expand, 'str')
if artifact_type_id is not None:
query_parameters['artifactTypeId'] = self._serialize.query('artifact_type_id', artifact_type_id, 'str')
if source_id is not None:
query_parameters['sourceId'] = self._serialize.query('source_id', source_id, 'str')
if artifact_version_id is not None:
query_parameters['artifactVersionId'] = self._serialize.query('artifact_version_id', artifact_version_id, 'str')
if source_branch_filter is not None:
query_parameters['sourceBranchFilter'] = self._serialize.query('source_branch_filter', source_branch_filter, 'str')
if is_deleted is not None:
query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool')
if tag_filter is not None:
tag_filter = ",".join(tag_filter)
query_parameters['tagFilter'] = self._serialize.query('tag_filter', tag_filter, 'str')
if property_filters is not None:
property_filters = ",".join(property_filters)
query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str')
if release_id_filter is not None:
release_id_filter = ",".join(map(str, release_id_filter))
query_parameters['releaseIdFilter'] = self._serialize.query('release_id_filter', release_id_filter, 'str')
response = self._send(http_method='GET',
location_id='a166fde7-27ad-408e-ba75-703c2cc9d500',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[Release]', self._unwrap_collection(response))
def create_release(self, release_start_metadata, project):
"""CreateRelease.
Create a release.
:param :class:`<ReleaseStartMetadata> <azure.devops.v5_0.release.models.ReleaseStartMetadata>` release_start_metadata: Metadata to create a release.
:param str project: Project ID or project name
:rtype: :class:`<Release> <azure.devops.v5_0.release.models.Release>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(release_start_metadata, 'ReleaseStartMetadata')
response = self._send(http_method='POST',
location_id='a166fde7-27ad-408e-ba75-703c2cc9d500',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Release', response)
def get_release(self, project, release_id, approval_filters=None, property_filters=None, expand=None, top_gate_records=None):
"""GetRelease.
Get a Release
:param str project: Project ID or project name
:param int release_id: Id of the release.
:param str approval_filters: A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default
:param [str] property_filters: A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included.
:param str expand: A property that should be expanded in the release.
:param int top_gate_records: Number of release gate records to get. Default is 5.
:rtype: :class:`<Release> <azure.devops.v5_0.release.models.Release>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
query_parameters = {}
if approval_filters is not None:
query_parameters['approvalFilters'] = self._serialize.query('approval_filters', approval_filters, 'str')
if property_filters is not None:
property_filters = ",".join(property_filters)
query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query('expand', expand, 'str')
if top_gate_records is not None:
query_parameters['$topGateRecords'] = self._serialize.query('top_gate_records', top_gate_records, 'int')
response = self._send(http_method='GET',
location_id='a166fde7-27ad-408e-ba75-703c2cc9d500',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Release', response)
def get_release_revision(self, project, release_id, definition_snapshot_revision, **kwargs):
"""GetReleaseRevision.
Get release for a given revision number.
:param str project: Project ID or project name
:param int release_id: Id of the release.
:param int definition_snapshot_revision: Definition snapshot revision number.
:rtype: object
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
query_parameters = {}
if definition_snapshot_revision is not None:
query_parameters['definitionSnapshotRevision'] = self._serialize.query('definition_snapshot_revision', definition_snapshot_revision, 'int')
response = self._send(http_method='GET',
location_id='a166fde7-27ad-408e-ba75-703c2cc9d500',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
accept_media_type='text/plain')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
return self._client.stream_download(response, callback=callback)
def update_release(self, release, project, release_id):
"""UpdateRelease.
Update a complete release object.
:param :class:`<Release> <azure.devops.v5_0.release.models.Release>` release: Release object for update.
:param str project: Project ID or project name
:param int release_id: Id of the release to update.
:rtype: :class:`<Release> <azure.devops.v5_0.release.models.Release>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
content = self._serialize.body(release, 'Release')
response = self._send(http_method='PUT',
location_id='a166fde7-27ad-408e-ba75-703c2cc9d500',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Release', response)
def update_release_resource(self, release_update_metadata, project, release_id):
"""UpdateReleaseResource.
Update few properties of a release.
:param :class:`<ReleaseUpdateMetadata> <azure.devops.v5_0.release.models.ReleaseUpdateMetadata>` release_update_metadata: Properties of release to update.
:param str project: Project ID or project name
:param int release_id: Id of the release to update.
:rtype: :class:`<Release> <azure.devops.v5_0.release.models.Release>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if release_id is not None:
route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int')
content = self._serialize.body(release_update_metadata, 'ReleaseUpdateMetadata')
response = self._send(http_method='PATCH',
location_id='a166fde7-27ad-408e-ba75-703c2cc9d500',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Release', response)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,14 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import AccessControlEntry
from .models import AccessControlList
from .models import AccessControlListsCollection
from .models import AceExtendedInformation
from .models import ActionDefinition
from .models import PermissionEvaluation
from .models import PermissionEvaluationBatch
from .models import SecurityNamespaceDescription
from ...v5_0.security.models import *
from .security_client import SecurityClient
__all__ = [
'AccessControlEntry',
@ -24,4 +18,5 @@ __all__ = [
'PermissionEvaluation',
'PermissionEvaluationBatch',
'SecurityNamespaceDescription',
'SecurityClient'
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from . import models
from ...client import Client
from ...v5_0.security import models
class SecurityClient(VssClient):
class SecurityClient(Client):
"""Security
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -27,9 +27,10 @@ class SecurityClient(VssClient):
def remove_access_control_entries(self, security_namespace_id, token=None, descriptors=None):
"""RemoveAccessControlEntries.
:param str security_namespace_id:
:param str token:
:param str descriptors:
Remove the specified ACEs from the ACL belonging to the specified token.
:param str security_namespace_id: Security namespace identifier.
:param str token: The token whose ACL should be modified.
:param str descriptors: String containing a list of identity descriptors separated by ',' whose entries should be removed.
:rtype: bool
"""
route_values = {}
@ -42,15 +43,16 @@ class SecurityClient(VssClient):
query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str')
response = self._send(http_method='DELETE',
location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('bool', response)
def set_access_control_entries(self, container, security_namespace_id):
"""SetAccessControlEntries.
:param :class:`<object> <security.v4_0.models.object>` container:
:param str security_namespace_id:
Add or update ACEs in the ACL for the provided token. The request body contains the target token, a list of [ACEs](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries?#accesscontrolentry) and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
:param :class:`<object> <azure.devops.v5_0.security.models.object>` container:
:param str security_namespace_id: Security namespace identifier.
:rtype: [AccessControlEntry]
"""
route_values = {}
@ -59,18 +61,19 @@ class SecurityClient(VssClient):
content = self._serialize.body(container, 'object')
response = self._send(http_method='POST',
location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[AccessControlEntry]', self._unwrap_collection(response))
def query_access_control_lists(self, security_namespace_id, token=None, descriptors=None, include_extended_info=None, recurse=None):
"""QueryAccessControlLists.
:param str security_namespace_id:
:param str token:
:param str descriptors:
:param bool include_extended_info:
:param bool recurse:
Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
:param str security_namespace_id: Security namespace identifier.
:param str token: Security token
:param str descriptors: An optional filter string containing a list of identity descriptors separated by ',' whose ACEs should be retrieved. If this is left null, entire ACLs will be returned.
:param bool include_extended_info: If true, populate the extended information properties for the access control entries contained in the returned lists.
:param bool recurse: If true and this is a hierarchical namespace, return child ACLs of the specified token.
:rtype: [AccessControlList]
"""
route_values = {}
@ -87,16 +90,17 @@ class SecurityClient(VssClient):
query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool')
response = self._send(http_method='GET',
location_id='18a2ad18-7571-46ae-bec7-0c7da1495885',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[AccessControlList]', self._unwrap_collection(response))
def remove_access_control_lists(self, security_namespace_id, tokens=None, recurse=None):
"""RemoveAccessControlLists.
:param str security_namespace_id:
:param str tokens:
:param bool recurse:
Remove access control lists under the specfied security namespace.
:param str security_namespace_id: Security namespace identifier.
:param str tokens: One or more comma-separated security tokens
:param bool recurse: If true and this is a hierarchical namespace, also remove child ACLs of the specified tokens.
:rtype: bool
"""
route_values = {}
@ -109,15 +113,16 @@ class SecurityClient(VssClient):
query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool')
response = self._send(http_method='DELETE',
location_id='18a2ad18-7571-46ae-bec7-0c7da1495885',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('bool', response)
def set_access_control_lists(self, access_control_lists, security_namespace_id):
"""SetAccessControlLists.
:param :class:`<VssJsonCollectionWrapper> <security.v4_0.models.VssJsonCollectionWrapper>` access_control_lists:
:param str security_namespace_id:
Create or update one or more access control lists. All data that currently exists for the ACLs supplied will be overwritten.
:param :class:`<VssJsonCollectionWrapper> <azure.devops.v5_0.security.models.VssJsonCollectionWrapper>` access_control_lists: A list of ACLs to create or update.
:param str security_namespace_id: Security namespace identifier.
"""
route_values = {}
if security_namespace_id is not None:
@ -125,30 +130,31 @@ class SecurityClient(VssClient):
content = self._serialize.body(access_control_lists, 'VssJsonCollectionWrapper')
self._send(http_method='POST',
location_id='18a2ad18-7571-46ae-bec7-0c7da1495885',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
def has_permissions_batch(self, eval_batch):
"""HasPermissionsBatch.
Perform a batch of "has permission" checks. This methods does not aggregate the results nor does it shortcircut if one of the permissions evaluates to false.
:param :class:`<PermissionEvaluationBatch> <security.v4_0.models.PermissionEvaluationBatch>` eval_batch:
:rtype: :class:`<PermissionEvaluationBatch> <security.v4_0.models.PermissionEvaluationBatch>`
Evaluates multiple permissions for the calling user. Note: This method does not aggregate the results, nor does it short-circuit if one of the permissions evaluates to false.
:param :class:`<PermissionEvaluationBatch> <azure.devops.v5_0.security.models.PermissionEvaluationBatch>` eval_batch: The set of evaluation requests.
:rtype: :class:`<PermissionEvaluationBatch> <azure.devops.v5_0.security.models.PermissionEvaluationBatch>`
"""
content = self._serialize.body(eval_batch, 'PermissionEvaluationBatch')
response = self._send(http_method='POST',
location_id='cf1faa59-1b63-4448-bf04-13d981a46f5d',
version='4.0',
version='5.0',
content=content)
return self._deserialize('PermissionEvaluationBatch', response)
def has_permissions(self, security_namespace_id, permissions=None, tokens=None, always_allow_administrators=None, delimiter=None):
"""HasPermissions.
:param str security_namespace_id:
:param int permissions:
:param str tokens:
:param bool always_allow_administrators:
:param str delimiter:
Evaluates whether the caller has the specified permissions on the specified set of security tokens.
:param str security_namespace_id: Security namespace identifier.
:param int permissions: Permissions to evaluate.
:param str tokens: One or more security tokens to evaluate.
:param bool always_allow_administrators: If true and if the caller is an administrator, always return true.
:param str delimiter: Optional security token separator. Defaults to ",".
:rtype: [bool]
"""
route_values = {}
@ -165,18 +171,19 @@ class SecurityClient(VssClient):
query_parameters['delimiter'] = self._serialize.query('delimiter', delimiter, 'str')
response = self._send(http_method='GET',
location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[bool]', self._unwrap_collection(response))
def remove_permission(self, security_namespace_id, permissions=None, token=None, descriptor=None):
def remove_permission(self, security_namespace_id, descriptor, permissions=None, token=None):
"""RemovePermission.
:param str security_namespace_id:
:param int permissions:
:param str token:
:param str descriptor:
:rtype: :class:`<AccessControlEntry> <security.v4_0.models.AccessControlEntry>`
Removes the specified permissions on a security token for a user or group.
:param str security_namespace_id: Security namespace identifier.
:param str descriptor: Identity descriptor of the user to remove permissions for.
:param int permissions: Permissions to remove.
:param str token: Security token to remove permissions for.
:rtype: :class:`<AccessControlEntry> <azure.devops.v5_0.security.models.AccessControlEntry>`
"""
route_values = {}
if security_namespace_id is not None:
@ -184,21 +191,22 @@ class SecurityClient(VssClient):
if permissions is not None:
route_values['permissions'] = self._serialize.url('permissions', permissions, 'int')
query_parameters = {}
if token is not None:
query_parameters['token'] = self._serialize.query('token', token, 'str')
if descriptor is not None:
query_parameters['descriptor'] = self._serialize.query('descriptor', descriptor, 'str')
if token is not None:
query_parameters['token'] = self._serialize.query('token', token, 'str')
response = self._send(http_method='DELETE',
location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('AccessControlEntry', response)
def query_security_namespaces(self, security_namespace_id, local_only=None):
def query_security_namespaces(self, security_namespace_id=None, local_only=None):
"""QuerySecurityNamespaces.
:param str security_namespace_id:
:param bool local_only:
List all security namespaces or just the specified namespace.
:param str security_namespace_id: Security namespace identifier.
:param bool local_only: If true, retrieve only local security namespaces.
:rtype: [SecurityNamespaceDescription]
"""
route_values = {}
@ -209,23 +217,8 @@ class SecurityClient(VssClient):
query_parameters['localOnly'] = self._serialize.query('local_only', local_only, 'bool')
response = self._send(http_method='GET',
location_id='ce7b9f95-fde9-4be8-a86d-83b366f0b87a',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[SecurityNamespaceDescription]', self._unwrap_collection(response))
def set_inherit_flag(self, container, security_namespace_id):
"""SetInheritFlag.
:param :class:`<object> <security.v4_0.models.object>` container:
:param str security_namespace_id:
"""
route_values = {}
if security_namespace_id is not None:
route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str')
content = self._serialize.body(container, 'object')
self._send(http_method='POST',
location_id='ce7b9f95-fde9-4be8-a86d-83b366f0b87a',
version='4.0',
route_values=route_values,
content=content)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,35 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import Consumer
from .models import ConsumerAction
from .models import Event
from .models import EventTypeDescriptor
from .models import ExternalConfigurationDescriptor
from .models import FormattedEventMessage
from .models import IdentityRef
from .models import InputDescriptor
from .models import InputFilter
from .models import InputFilterCondition
from .models import InputValidation
from .models import InputValue
from .models import InputValues
from .models import InputValuesError
from .models import InputValuesQuery
from .models import Notification
from .models import NotificationDetails
from .models import NotificationResultsSummaryDetail
from .models import NotificationsQuery
from .models import NotificationSummary
from .models import Publisher
from .models import PublisherEvent
from .models import PublishersQuery
from .models import ReferenceLinks
from .models import ResourceContainer
from .models import SessionToken
from .models import Subscription
from .models import SubscriptionsQuery
from .models import VersionedResource
from ...v5_0.service_hooks.models import *
from .service_hooks_client import ServiceHooksClient
__all__ = [
'Consumer',
@ -43,6 +16,7 @@ __all__ = [
'EventTypeDescriptor',
'ExternalConfigurationDescriptor',
'FormattedEventMessage',
'GraphSubjectBase',
'IdentityRef',
'InputDescriptor',
'InputFilter',
@ -64,6 +38,11 @@ __all__ = [
'ResourceContainer',
'SessionToken',
'Subscription',
'SubscriptionDiagnostics',
'SubscriptionsQuery',
'SubscriptionTracing',
'UpdateSubscripitonDiagnosticsParameters',
'UpdateSubscripitonTracingParameters',
'VersionedResource',
'ServiceHooksClient'
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from . import models
from ...client import Client
from ...v5_0.service_hooks import models
class ServiceHooksClient(VssClient):
class ServiceHooksClient(Client):
"""ServiceHooks
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -27,10 +27,11 @@ class ServiceHooksClient(VssClient):
def get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None):
"""GetConsumerAction.
:param str consumer_id:
:param str consumer_action_id:
Get details about a specific consumer action.
:param str consumer_id: ID for a consumer.
:param str consumer_action_id: ID for a consumerActionId.
:param str publisher_id:
:rtype: :class:`<ConsumerAction> <service-hooks.v4_0.models.ConsumerAction>`
:rtype: :class:`<ConsumerAction> <azure.devops.v5_0.service_hooks.models.ConsumerAction>`
"""
route_values = {}
if consumer_id is not None:
@ -42,14 +43,15 @@ class ServiceHooksClient(VssClient):
query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str')
response = self._send(http_method='GET',
location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('ConsumerAction', response)
def list_consumer_actions(self, consumer_id, publisher_id=None):
"""ListConsumerActions.
:param str consumer_id:
Get a list of consumer actions for a specific consumer.
:param str consumer_id: ID for a consumer.
:param str publisher_id:
:rtype: [ConsumerAction]
"""
@ -61,16 +63,17 @@ class ServiceHooksClient(VssClient):
query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str')
response = self._send(http_method='GET',
location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[ConsumerAction]', self._unwrap_collection(response))
def get_consumer(self, consumer_id, publisher_id=None):
"""GetConsumer.
:param str consumer_id:
Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher.
:param str consumer_id: ID for a consumer.
:param str publisher_id:
:rtype: :class:`<Consumer> <service-hooks.v4_0.models.Consumer>`
:rtype: :class:`<Consumer> <azure.devops.v5_0.service_hooks.models.Consumer>`
"""
route_values = {}
if consumer_id is not None:
@ -80,13 +83,14 @@ class ServiceHooksClient(VssClient):
query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str')
response = self._send(http_method='GET',
location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Consumer', response)
def list_consumers(self, publisher_id=None):
"""ListConsumers.
Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher.
:param str publisher_id:
:rtype: [Consumer]
"""
@ -95,15 +99,16 @@ class ServiceHooksClient(VssClient):
query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str')
response = self._send(http_method='GET',
location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19',
version='4.0',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Consumer]', self._unwrap_collection(response))
def get_event_type(self, publisher_id, event_type_id):
"""GetEventType.
:param str publisher_id:
Get a specific event type.
:param str publisher_id: ID for a publisher.
:param str event_type_id:
:rtype: :class:`<EventTypeDescriptor> <service-hooks.v4_0.models.EventTypeDescriptor>`
:rtype: :class:`<EventTypeDescriptor> <azure.devops.v5_0.service_hooks.models.EventTypeDescriptor>`
"""
route_values = {}
if publisher_id is not None:
@ -112,13 +117,14 @@ class ServiceHooksClient(VssClient):
route_values['eventTypeId'] = self._serialize.url('event_type_id', event_type_id, 'str')
response = self._send(http_method='GET',
location_id='db4777cd-8e08-4a84-8ba3-c974ea033718',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('EventTypeDescriptor', response)
def list_event_types(self, publisher_id):
"""ListEventTypes.
:param str publisher_id:
Get the event types for a specific publisher.
:param str publisher_id: ID for a publisher.
:rtype: [EventTypeDescriptor]
"""
route_values = {}
@ -126,32 +132,16 @@ class ServiceHooksClient(VssClient):
route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str')
response = self._send(http_method='GET',
location_id='db4777cd-8e08-4a84-8ba3-c974ea033718',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[EventTypeDescriptor]', self._unwrap_collection(response))
def publish_external_event(self, publisher_id, channel_id=None):
"""PublishExternalEvent.
:param str publisher_id:
:param str channel_id:
:rtype: [PublisherEvent]
"""
query_parameters = {}
if publisher_id is not None:
query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str')
if channel_id is not None:
query_parameters['channelId'] = self._serialize.query('channel_id', channel_id, 'str')
response = self._send(http_method='POST',
location_id='e0e0a1c9-beeb-4fb7-a8c8-b18e3161a50e',
version='4.0',
query_parameters=query_parameters)
return self._deserialize('[PublisherEvent]', self._unwrap_collection(response))
def get_notification(self, subscription_id, notification_id):
"""GetNotification.
:param str subscription_id:
Get a specific notification for a subscription.
:param str subscription_id: ID for a subscription.
:param int notification_id:
:rtype: :class:`<Notification> <service-hooks.v4_0.models.Notification>`
:rtype: :class:`<Notification> <azure.devops.v5_0.service_hooks.models.Notification>`
"""
route_values = {}
if subscription_id is not None:
@ -160,16 +150,17 @@ class ServiceHooksClient(VssClient):
route_values['notificationId'] = self._serialize.url('notification_id', notification_id, 'int')
response = self._send(http_method='GET',
location_id='0c62d343-21b0-4732-997b-017fde84dc28',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('Notification', response)
def get_notifications(self, subscription_id, max_results=None, status=None, result=None):
"""GetNotifications.
:param str subscription_id:
:param int max_results:
:param str status:
:param str result:
Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service.
:param str subscription_id: ID for a subscription.
:param int max_results: Maximum number of notifications to return. Default is **100**.
:param str status: Get only notifications with this status.
:param str result: Get only notifications with this result type.
:rtype: [Notification]
"""
route_values = {}
@ -184,28 +175,29 @@ class ServiceHooksClient(VssClient):
query_parameters['result'] = self._serialize.query('result', result, 'str')
response = self._send(http_method='GET',
location_id='0c62d343-21b0-4732-997b-017fde84dc28',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[Notification]', self._unwrap_collection(response))
def query_notifications(self, query):
"""QueryNotifications.
:param :class:`<NotificationsQuery> <service-hooks.v4_0.models.NotificationsQuery>` query:
:rtype: :class:`<NotificationsQuery> <service-hooks.v4_0.models.NotificationsQuery>`
Query for notifications. A notification includes details about the event, the request to and the response from the consumer service.
:param :class:`<NotificationsQuery> <azure.devops.v5_0.service_hooks.models.NotificationsQuery>` query:
:rtype: :class:`<NotificationsQuery> <azure.devops.v5_0.service_hooks.models.NotificationsQuery>`
"""
content = self._serialize.body(query, 'NotificationsQuery')
response = self._send(http_method='POST',
location_id='1a57562f-160a-4b5c-9185-905e95b39d36',
version='4.0',
version='5.0',
content=content)
return self._deserialize('NotificationsQuery', response)
def query_input_values(self, input_values_query, publisher_id):
"""QueryInputValues.
:param :class:`<InputValuesQuery> <service-hooks.v4_0.models.InputValuesQuery>` input_values_query:
:param :class:`<InputValuesQuery> <azure.devops.v5_0.service_hooks.models.InputValuesQuery>` input_values_query:
:param str publisher_id:
:rtype: :class:`<InputValuesQuery> <service-hooks.v4_0.models.InputValuesQuery>`
:rtype: :class:`<InputValuesQuery> <azure.devops.v5_0.service_hooks.models.InputValuesQuery>`
"""
route_values = {}
if publisher_id is not None:
@ -213,90 +205,97 @@ class ServiceHooksClient(VssClient):
content = self._serialize.body(input_values_query, 'InputValuesQuery')
response = self._send(http_method='POST',
location_id='d815d352-a566-4dc1-a3e3-fd245acf688c',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('InputValuesQuery', response)
def get_publisher(self, publisher_id):
"""GetPublisher.
:param str publisher_id:
:rtype: :class:`<Publisher> <service-hooks.v4_0.models.Publisher>`
Get a specific service hooks publisher.
:param str publisher_id: ID for a publisher.
:rtype: :class:`<Publisher> <azure.devops.v5_0.service_hooks.models.Publisher>`
"""
route_values = {}
if publisher_id is not None:
route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str')
response = self._send(http_method='GET',
location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('Publisher', response)
def list_publishers(self):
"""ListPublishers.
Get a list of publishers.
:rtype: [Publisher]
"""
response = self._send(http_method='GET',
location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731',
version='4.0')
version='5.0')
return self._deserialize('[Publisher]', self._unwrap_collection(response))
def query_publishers(self, query):
"""QueryPublishers.
:param :class:`<PublishersQuery> <service-hooks.v4_0.models.PublishersQuery>` query:
:rtype: :class:`<PublishersQuery> <service-hooks.v4_0.models.PublishersQuery>`
Query for service hook publishers.
:param :class:`<PublishersQuery> <azure.devops.v5_0.service_hooks.models.PublishersQuery>` query:
:rtype: :class:`<PublishersQuery> <azure.devops.v5_0.service_hooks.models.PublishersQuery>`
"""
content = self._serialize.body(query, 'PublishersQuery')
response = self._send(http_method='POST',
location_id='99b44a8a-65a8-4670-8f3e-e7f7842cce64',
version='4.0',
version='5.0',
content=content)
return self._deserialize('PublishersQuery', response)
def create_subscription(self, subscription):
"""CreateSubscription.
:param :class:`<Subscription> <service-hooks.v4_0.models.Subscription>` subscription:
:rtype: :class:`<Subscription> <service-hooks.v4_0.models.Subscription>`
Create a subscription.
:param :class:`<Subscription> <azure.devops.v5_0.service_hooks.models.Subscription>` subscription: Subscription to be created.
:rtype: :class:`<Subscription> <azure.devops.v5_0.service_hooks.models.Subscription>`
"""
content = self._serialize.body(subscription, 'Subscription')
response = self._send(http_method='POST',
location_id='fc50d02a-849f-41fb-8af1-0a5216103269',
version='4.0',
version='5.0',
content=content)
return self._deserialize('Subscription', response)
def delete_subscription(self, subscription_id):
"""DeleteSubscription.
:param str subscription_id:
Delete a specific service hooks subscription.
:param str subscription_id: ID for a subscription.
"""
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='fc50d02a-849f-41fb-8af1-0a5216103269',
version='4.0',
version='5.0',
route_values=route_values)
def get_subscription(self, subscription_id):
"""GetSubscription.
:param str subscription_id:
:rtype: :class:`<Subscription> <service-hooks.v4_0.models.Subscription>`
Get a specific service hooks subscription.
:param str subscription_id: ID for a subscription.
:rtype: :class:`<Subscription> <azure.devops.v5_0.service_hooks.models.Subscription>`
"""
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='fc50d02a-849f-41fb-8af1-0a5216103269',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('Subscription', response)
def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=None, consumer_action_id=None):
"""ListSubscriptions.
:param str publisher_id:
:param str event_type:
:param str consumer_id:
:param str consumer_action_id:
Get a list of subscriptions.
:param str publisher_id: ID for a subscription.
:param str event_type: Maximum number of notifications to return. Default is 100.
:param str consumer_id: ID for a consumer.
:param str consumer_action_id: ID for a consumerActionId.
:rtype: [Subscription]
"""
query_parameters = {}
@ -310,15 +309,16 @@ class ServiceHooksClient(VssClient):
query_parameters['consumerActionId'] = self._serialize.query('consumer_action_id', consumer_action_id, 'str')
response = self._send(http_method='GET',
location_id='fc50d02a-849f-41fb-8af1-0a5216103269',
version='4.0',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Subscription]', self._unwrap_collection(response))
def replace_subscription(self, subscription, subscription_id=None):
"""ReplaceSubscription.
:param :class:`<Subscription> <service-hooks.v4_0.models.Subscription>` subscription:
Update a subscription. <param name="subscriptionId">ID for a subscription that you wish to update.</param>
:param :class:`<Subscription> <azure.devops.v5_0.service_hooks.models.Subscription>` subscription:
:param str subscription_id:
:rtype: :class:`<Subscription> <service-hooks.v4_0.models.Subscription>`
:rtype: :class:`<Subscription> <azure.devops.v5_0.service_hooks.models.Subscription>`
"""
route_values = {}
if subscription_id is not None:
@ -326,28 +326,30 @@ class ServiceHooksClient(VssClient):
content = self._serialize.body(subscription, 'Subscription')
response = self._send(http_method='PUT',
location_id='fc50d02a-849f-41fb-8af1-0a5216103269',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Subscription', response)
def create_subscriptions_query(self, query):
"""CreateSubscriptionsQuery.
:param :class:`<SubscriptionsQuery> <service-hooks.v4_0.models.SubscriptionsQuery>` query:
:rtype: :class:`<SubscriptionsQuery> <service-hooks.v4_0.models.SubscriptionsQuery>`
Query for service hook subscriptions.
:param :class:`<SubscriptionsQuery> <azure.devops.v5_0.service_hooks.models.SubscriptionsQuery>` query:
:rtype: :class:`<SubscriptionsQuery> <azure.devops.v5_0.service_hooks.models.SubscriptionsQuery>`
"""
content = self._serialize.body(query, 'SubscriptionsQuery')
response = self._send(http_method='POST',
location_id='c7c3c1cf-9e05-4c0d-a425-a0f922c2c6ed',
version='4.0',
version='5.0',
content=content)
return self._deserialize('SubscriptionsQuery', response)
def create_test_notification(self, test_notification, use_real_data=None):
"""CreateTestNotification.
:param :class:`<Notification> <service-hooks.v4_0.models.Notification>` test_notification:
:param bool use_real_data:
:rtype: :class:`<Notification> <service-hooks.v4_0.models.Notification>`
Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription.
:param :class:`<Notification> <azure.devops.v5_0.service_hooks.models.Notification>` test_notification:
:param bool use_real_data: Only allow testing with real data in existing subscriptions.
:rtype: :class:`<Notification> <azure.devops.v5_0.service_hooks.models.Notification>`
"""
query_parameters = {}
if use_real_data is not None:
@ -355,7 +357,7 @@ class ServiceHooksClient(VssClient):
content = self._serialize.body(test_notification, 'Notification')
response = self._send(http_method='POST',
location_id='1139462c-7e27-4524-a997-31b9b73551fe',
version='4.0',
version='5.0',
query_parameters=query_parameters,
content=content)
return self._deserialize('Notification', response)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,28 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import Issue
from .models import JobOption
from .models import MaskHint
from .models import PlanEnvironment
from .models import ProjectReference
from .models import ReferenceLinks
from .models import TaskAttachment
from .models import TaskLog
from .models import TaskLogReference
from .models import TaskOrchestrationContainer
from .models import TaskOrchestrationItem
from .models import TaskOrchestrationOwner
from .models import TaskOrchestrationPlan
from .models import TaskOrchestrationPlanGroupsQueueMetrics
from .models import TaskOrchestrationPlanReference
from .models import TaskOrchestrationQueuedPlan
from .models import TaskOrchestrationQueuedPlanGroup
from .models import TaskReference
from .models import Timeline
from .models import TimelineRecord
from .models import TimelineReference
from .models import VariableValue
from ...v5_0.task.models import *
from .task_client import TaskClient
__all__ = [
'Issue',
@ -49,7 +29,10 @@ __all__ = [
'TaskOrchestrationQueuedPlanGroup',
'TaskReference',
'Timeline',
'TimelineAttempt',
'TimelineRecord',
'TimelineRecordFeedLinesWrapper',
'TimelineReference',
'VariableValue',
'TaskClient'
]

Просмотреть файл

@ -0,0 +1,281 @@
# --------------------------------------------------------------------------------------------
# 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_0.task import models
class TaskClient(Client):
"""Task
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(TaskClient, 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 append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id, **kwargs):
"""AppendLogContent.
:param object upload_stream: Stream to upload
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:param int log_id:
:rtype: :class:`<TaskLog> <azure.devops.v5_0.task.models.TaskLog>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if log_id is not None:
route_values['logId'] = self._serialize.url('log_id', log_id, 'int')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
content = self._client.stream_upload(upload_stream, callback=callback)
response = self._send(http_method='POST',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='5.0',
route_values=route_values,
content=content,
media_type='application/octet-stream')
return self._deserialize('TaskLog', response)
def create_log(self, log, scope_identifier, hub_name, plan_id):
"""CreateLog.
:param :class:`<TaskLog> <azure.devops.v5_0.task.models.TaskLog>` log:
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:rtype: :class:`<TaskLog> <azure.devops.v5_0.task.models.TaskLog>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
content = self._serialize.body(log, 'TaskLog')
response = self._send(http_method='POST',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TaskLog', response)
def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, end_line=None):
"""GetLog.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:param int log_id:
:param long start_line:
:param long end_line:
:rtype: [str]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if log_id is not None:
route_values['logId'] = self._serialize.url('log_id', log_id, 'int')
query_parameters = {}
if start_line is not None:
query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long')
if end_line is not None:
query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long')
response = self._send(http_method='GET',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[str]', self._unwrap_collection(response))
def get_logs(self, scope_identifier, hub_name, plan_id):
"""GetLogs.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:rtype: [TaskLog]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
response = self._send(http_method='GET',
location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2',
version='5.0',
route_values=route_values)
return self._deserialize('[TaskLog]', self._unwrap_collection(response))
def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None):
"""GetRecords.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:param str timeline_id:
:param int change_id:
:rtype: [TimelineRecord]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
query_parameters = {}
if change_id is not None:
query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int')
response = self._send(http_method='GET',
location_id='8893bc5b-35b2-4be7-83cb-99e683551db4',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TimelineRecord]', self._unwrap_collection(response))
def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_id):
"""UpdateRecords.
:param :class:`<VssJsonCollectionWrapper> <azure.devops.v5_0.task.models.VssJsonCollectionWrapper>` records:
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:param str timeline_id:
:rtype: [TimelineRecord]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
content = self._serialize.body(records, 'VssJsonCollectionWrapper')
response = self._send(http_method='PATCH',
location_id='8893bc5b-35b2-4be7-83cb-99e683551db4',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[TimelineRecord]', self._unwrap_collection(response))
def create_timeline(self, timeline, scope_identifier, hub_name, plan_id):
"""CreateTimeline.
:param :class:`<Timeline> <azure.devops.v5_0.task.models.Timeline>` timeline:
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:rtype: :class:`<Timeline> <azure.devops.v5_0.task.models.Timeline>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
content = self._serialize.body(timeline, 'Timeline')
response = self._send(http_method='POST',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Timeline', response)
def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id):
"""DeleteTimeline.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:param str timeline_id:
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
self._send(http_method='DELETE',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='5.0',
route_values=route_values)
def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None):
"""GetTimeline.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:param str timeline_id:
:param int change_id:
:param bool include_records:
:rtype: :class:`<Timeline> <azure.devops.v5_0.task.models.Timeline>`
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
if timeline_id is not None:
route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str')
query_parameters = {}
if change_id is not None:
query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int')
if include_records is not None:
query_parameters['includeRecords'] = self._serialize.query('include_records', include_records, 'bool')
response = self._send(http_method='GET',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('Timeline', response)
def get_timelines(self, scope_identifier, hub_name, plan_id):
"""GetTimelines.
:param str scope_identifier: The project GUID to scope the request
:param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server
:param str plan_id:
:rtype: [Timeline]
"""
route_values = {}
if scope_identifier is not None:
route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str')
if hub_name is not None:
route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str')
response = self._send(http_method='GET',
location_id='83597576-cc2c-453c-bea6-2882ae6a1653',
version='5.0',
route_values=route_values)
return self._deserialize('[Timeline]', self._unwrap_collection(response))

Просмотреть файл

@ -0,0 +1,131 @@
# --------------------------------------------------------------------------------------------
# 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_0.task_agent.models import *
from .task_agent_client import TaskAgentClient
__all__ = [
'AadOauthTokenRequest',
'AadOauthTokenResult',
'AuthenticationSchemeReference',
'AuthorizationHeader',
'AzureManagementGroup',
'AzureManagementGroupQueryResult',
'AzureSubscription',
'AzureSubscriptionQueryResult',
'ClientCertificate',
'DataSource',
'DataSourceBinding',
'DataSourceBindingBase',
'DataSourceDetails',
'DependencyBinding',
'DependencyData',
'DependsOn',
'DeploymentGroup',
'DeploymentGroupCreateParameter',
'DeploymentGroupCreateParameterPoolProperty',
'DeploymentGroupMetrics',
'DeploymentGroupReference',
'DeploymentGroupUpdateParameter',
'DeploymentMachine',
'DeploymentMachineGroup',
'DeploymentMachineGroupReference',
'DeploymentPoolSummary',
'DeploymentTargetUpdateParameter',
'EndpointAuthorization',
'EndpointUrl',
'Environment',
'EnvironmentCreateParameter',
'EnvironmentReference',
'EnvironmentUpdateParameter',
'GraphSubjectBase',
'HelpLink',
'IdentityRef',
'InputDescriptor',
'InputValidation',
'InputValidationRequest',
'InputValue',
'InputValues',
'InputValuesError',
'KubernetesServiceGroup',
'KubernetesServiceGroupCreateParameters',
'MarketplacePurchasedLicense',
'MetricsColumnMetaData',
'MetricsColumnsHeader',
'MetricsRow',
'PackageMetadata',
'PackageVersion',
'ProjectReference',
'PublishTaskGroupMetadata',
'ReferenceLinks',
'ResourceLimit',
'ResourceUsage',
'ResultTransformationDetails',
'SecureFile',
'ServiceEndpoint',
'ServiceEndpointAuthenticationScheme',
'ServiceEndpointDetails',
'ServiceEndpointExecutionData',
'ServiceEndpointExecutionRecord',
'ServiceEndpointExecutionRecordsInput',
'ServiceEndpointRequest',
'ServiceEndpointRequestResult',
'ServiceEndpointType',
'ServiceGroup',
'ServiceGroupReference',
'TaskAgent',
'TaskAgentAuthorization',
'TaskAgentCloud',
'TaskAgentCloudRequest',
'TaskAgentCloudType',
'TaskAgentDelaySource',
'TaskAgentJobRequest',
'TaskAgentMessage',
'TaskAgentPool',
'TaskAgentPoolMaintenanceDefinition',
'TaskAgentPoolMaintenanceJob',
'TaskAgentPoolMaintenanceJobTargetAgent',
'TaskAgentPoolMaintenanceOptions',
'TaskAgentPoolMaintenanceRetentionPolicy',
'TaskAgentPoolMaintenanceSchedule',
'TaskAgentPoolReference',
'TaskAgentPublicKey',
'TaskAgentQueue',
'TaskAgentReference',
'TaskAgentSession',
'TaskAgentSessionKey',
'TaskAgentUpdate',
'TaskAgentUpdateReason',
'TaskDefinition',
'TaskDefinitionEndpoint',
'TaskDefinitionReference',
'TaskExecution',
'TaskGroup',
'TaskGroupCreateParameter',
'TaskGroupDefinition',
'TaskGroupRevision',
'TaskGroupStep',
'TaskGroupUpdateParameter',
'TaskHubLicenseDetails',
'TaskInputDefinition',
'TaskInputDefinitionBase',
'TaskInputValidation',
'TaskOrchestrationOwner',
'TaskOutputVariable',
'TaskPackageMetadata',
'TaskReference',
'TaskSourceDefinition',
'TaskSourceDefinitionBase',
'TaskVersion',
'ValidationItem',
'VariableGroup',
'VariableGroupParameters',
'VariableGroupProviderData',
'VariableValue',
'TaskAgentClient'
]

Просмотреть файл

@ -0,0 +1,27 @@
# --------------------------------------------------------------------------------------------
# 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_0.task_agent import models
class TaskAgentClient(Client):
"""TaskAgent
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(TaskAgentClient, 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 = 'a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd'

Просмотреть файл

@ -0,0 +1,122 @@
# --------------------------------------------------------------------------------------------
# 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_0.test.models import *
from .test_client import TestClient
__all__ = [
'AggregatedDataForResultTrend',
'AggregatedResultsAnalysis',
'AggregatedResultsByOutcome',
'AggregatedResultsDifference',
'AggregatedRunsByOutcome',
'AggregatedRunsByState',
'BuildConfiguration',
'BuildCoverage',
'BuildReference',
'CloneOperationInformation',
'CloneOptions',
'CloneStatistics',
'CodeCoverageData',
'CodeCoverageStatistics',
'CodeCoverageSummary',
'CoverageStatistics',
'CustomTestField',
'CustomTestFieldDefinition',
'DtlEnvironmentDetails',
'FailingSince',
'FieldDetailsForTestResults',
'FunctionCoverage',
'GraphSubjectBase',
'IdentityRef',
'LastResultDetails',
'LinkedWorkItemsQuery',
'LinkedWorkItemsQueryResult',
'ModuleCoverage',
'NameValuePair',
'PlanUpdateModel',
'PointAssignment',
'PointsFilter',
'PointUpdateModel',
'PropertyBag',
'QueryModel',
'ReferenceLinks',
'ReleaseEnvironmentDefinitionReference',
'ReleaseReference',
'ResultRetentionSettings',
'ResultsFilter',
'RunCreateModel',
'RunFilter',
'RunStatistic',
'RunUpdateModel',
'ShallowReference',
'ShallowTestCaseResult',
'SharedStepModel',
'SuiteCreateModel',
'SuiteEntry',
'SuiteEntryUpdateModel',
'SuiteTestCase',
'SuiteTestCaseUpdateModel',
'SuiteUpdateModel',
'TeamContext',
'TeamProjectReference',
'TestActionResultModel',
'TestAttachment',
'TestAttachmentReference',
'TestAttachmentRequestModel',
'TestCaseResult',
'TestCaseResultAttachmentModel',
'TestCaseResultIdentifier',
'TestCaseResultUpdateModel',
'TestConfiguration',
'TestEnvironment',
'TestFailureDetails',
'TestFailuresAnalysis',
'TestHistoryQuery',
'TestIterationDetailsModel',
'TestMessageLogDetails',
'TestMethod',
'TestOperationReference',
'TestOutcomeSettings',
'TestPlan',
'TestPlanCloneRequest',
'TestPoint',
'TestPointsQuery',
'TestResolutionState',
'TestResultCreateModel',
'TestResultDocument',
'TestResultHistory',
'TestResultHistoryDetailsForGroup',
'TestResultHistoryForGroup',
'TestResultMetaData',
'TestResultModelBase',
'TestResultParameterModel',
'TestResultPayload',
'TestResultsContext',
'TestResultsDetails',
'TestResultsDetailsForGroup',
'TestResultsGroupsForBuild',
'TestResultsGroupsForRelease',
'TestResultsQuery',
'TestResultSummary',
'TestResultTrendFilter',
'TestRun',
'TestRunCoverage',
'TestRunStatistic',
'TestSession',
'TestSettings',
'TestSubResult',
'TestSuite',
'TestSuiteCloneRequest',
'TestSummaryForWorkItem',
'TestToWorkItemLinks',
'TestVariable',
'WorkItemReference',
'WorkItemToTestLinks',
'TestClient'
]

Просмотреть файл

@ -0,0 +1,916 @@
# --------------------------------------------------------------------------------------------
# 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_0.test import models
class TestClient(Client):
"""Test
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(TestClient, 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 = 'c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e'
def get_action_results(self, project, run_id, test_case_result_id, iteration_id, action_path=None):
"""GetActionResults.
Gets the action results for an iteration in a test result.
:param str project: Project ID or project name
:param int run_id: ID of the test run that contains the result.
:param int test_case_result_id: ID of the test result that contains the iterations.
:param int iteration_id: ID of the iteration that contains the actions.
:param str action_path: Path of a specific action, used to get just that action.
:rtype: [TestActionResultModel]
"""
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')
if test_case_result_id is not None:
route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int')
if iteration_id is not None:
route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int')
if action_path is not None:
route_values['actionPath'] = self._serialize.url('action_path', action_path, 'str')
response = self._send(http_method='GET',
location_id='eaf40c31-ff84-4062-aafd-d5664be11a37',
version='5.0',
route_values=route_values)
return self._deserialize('[TestActionResultModel]', self._unwrap_collection(response))
def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, include_action_results=None):
"""GetTestIteration.
Get iteration for a result
:param str project: Project ID or project name
:param int run_id: ID of the test run that contains the result.
:param int test_case_result_id: ID of the test result that contains the iterations.
:param int iteration_id: Id of the test results Iteration.
:param bool include_action_results: Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
:rtype: :class:`<TestIterationDetailsModel> <azure.devops.v5_0.test.models.TestIterationDetailsModel>`
"""
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')
if test_case_result_id is not None:
route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int')
if iteration_id is not None:
route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int')
query_parameters = {}
if include_action_results is not None:
query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool')
response = self._send(http_method='GET',
location_id='73eb9074-3446-4c44-8296-2f811950ff8d',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TestIterationDetailsModel', response)
def get_test_iterations(self, project, run_id, test_case_result_id, include_action_results=None):
"""GetTestIterations.
Get iterations for a result
:param str project: Project ID or project name
:param int run_id: ID of the test run that contains the result.
:param int test_case_result_id: ID of the test result that contains the iterations.
:param bool include_action_results: Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
:rtype: [TestIterationDetailsModel]
"""
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')
if test_case_result_id is not None:
route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int')
query_parameters = {}
if include_action_results is not None:
query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool')
response = self._send(http_method='GET',
location_id='73eb9074-3446-4c44-8296-2f811950ff8d',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestIterationDetailsModel]', self._unwrap_collection(response))
def get_result_parameters(self, project, run_id, test_case_result_id, iteration_id, param_name=None):
"""GetResultParameters.
Get a list of parameterized results
:param str project: Project ID or project name
:param int run_id: ID of the test run that contains the result.
:param int test_case_result_id: ID of the test result that contains the iterations.
:param int iteration_id: ID of the iteration that contains the parameterized results.
:param str param_name: Name of the parameter.
:rtype: [TestResultParameterModel]
"""
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')
if test_case_result_id is not None:
route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int')
if iteration_id is not None:
route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int')
query_parameters = {}
if param_name is not None:
query_parameters['paramName'] = self._serialize.query('param_name', param_name, 'str')
response = self._send(http_method='GET',
location_id='7c69810d-3354-4af3-844a-180bd25db08a',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestResultParameterModel]', self._unwrap_collection(response))
def create_test_plan(self, test_plan, project):
"""CreateTestPlan.
Create a test plan.
:param :class:`<PlanUpdateModel> <azure.devops.v5_0.test.models.PlanUpdateModel>` test_plan: A test plan object.
:param str project: Project ID or project name
:rtype: :class:`<TestPlan> <azure.devops.v5_0.test.models.TestPlan>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(test_plan, 'PlanUpdateModel')
response = self._send(http_method='POST',
location_id='51712106-7278-4208-8563-1c96f40cf5e4',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TestPlan', response)
def delete_test_plan(self, project, plan_id):
"""DeleteTestPlan.
Delete a test plan.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan to be deleted.
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
self._send(http_method='DELETE',
location_id='51712106-7278-4208-8563-1c96f40cf5e4',
version='5.0',
route_values=route_values)
def get_plan_by_id(self, project, plan_id):
"""GetPlanById.
Get test plan by ID.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan to return.
:rtype: :class:`<TestPlan> <azure.devops.v5_0.test.models.TestPlan>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
response = self._send(http_method='GET',
location_id='51712106-7278-4208-8563-1c96f40cf5e4',
version='5.0',
route_values=route_values)
return self._deserialize('TestPlan', response)
def get_plans(self, project, owner=None, skip=None, top=None, include_plan_details=None, filter_active_plans=None):
"""GetPlans.
Get a list of test plans.
:param str project: Project ID or project name
:param str owner: Filter for test plan by owner ID or name.
:param int skip: Number of test plans to skip.
:param int top: Number of test plans to return.
:param bool include_plan_details: Get all properties of the test plan.
:param bool filter_active_plans: Get just the active plans.
:rtype: [TestPlan]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if owner is not None:
query_parameters['owner'] = self._serialize.query('owner', owner, 'str')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if include_plan_details is not None:
query_parameters['includePlanDetails'] = self._serialize.query('include_plan_details', include_plan_details, 'bool')
if filter_active_plans is not None:
query_parameters['filterActivePlans'] = self._serialize.query('filter_active_plans', filter_active_plans, 'bool')
response = self._send(http_method='GET',
location_id='51712106-7278-4208-8563-1c96f40cf5e4',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestPlan]', self._unwrap_collection(response))
def update_test_plan(self, plan_update_model, project, plan_id):
"""UpdateTestPlan.
Update a test plan.
:param :class:`<PlanUpdateModel> <azure.devops.v5_0.test.models.PlanUpdateModel>` plan_update_model:
:param str project: Project ID or project name
:param int plan_id: ID of the test plan to be updated.
:rtype: :class:`<TestPlan> <azure.devops.v5_0.test.models.TestPlan>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
content = self._serialize.body(plan_update_model, 'PlanUpdateModel')
response = self._send(http_method='PATCH',
location_id='51712106-7278-4208-8563-1c96f40cf5e4',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TestPlan', response)
def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None):
"""GetPoint.
Get a test point.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan.
:param int suite_id: ID of the suite that contains the point.
:param int point_ids: ID of the test point to get.
:param str wit_fields: Comma-separated list of work item field names.
:rtype: :class:`<TestPoint> <azure.devops.v5_0.test.models.TestPoint>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
if point_ids is not None:
route_values['pointIds'] = self._serialize.url('point_ids', point_ids, 'int')
query_parameters = {}
if wit_fields is not None:
query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str')
response = self._send(http_method='GET',
location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TestPoint', response)
def get_points(self, project, plan_id, suite_id, wit_fields=None, configuration_id=None, test_case_id=None, test_point_ids=None, include_point_details=None, skip=None, top=None):
"""GetPoints.
Get a list of test points.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan.
:param int suite_id: ID of the suite that contains the points.
:param str wit_fields: Comma-separated list of work item field names.
:param str configuration_id: Get test points for specific configuration.
:param str test_case_id: Get test points for a specific test case, valid when configurationId is not set.
:param str test_point_ids: Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set.
:param bool include_point_details: Include all properties for the test point.
:param int skip: Number of test points to skip..
:param int top: Number of test points to return.
:rtype: [TestPoint]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
query_parameters = {}
if wit_fields is not None:
query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str')
if configuration_id is not None:
query_parameters['configurationId'] = self._serialize.query('configuration_id', configuration_id, 'str')
if test_case_id is not None:
query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'str')
if test_point_ids is not None:
query_parameters['testPointIds'] = self._serialize.query('test_point_ids', test_point_ids, 'str')
if include_point_details is not None:
query_parameters['includePointDetails'] = self._serialize.query('include_point_details', include_point_details, 'bool')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
response = self._send(http_method='GET',
location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestPoint]', self._unwrap_collection(response))
def update_test_points(self, point_update_model, project, plan_id, suite_id, point_ids):
"""UpdateTestPoints.
Update test points.
:param :class:`<PointUpdateModel> <azure.devops.v5_0.test.models.PointUpdateModel>` point_update_model: Data to update.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan.
:param int suite_id: ID of the suite that contains the points.
:param str point_ids: ID of the test point to get. Use a comma-separated list of IDs to update multiple test points.
:rtype: [TestPoint]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
if point_ids is not None:
route_values['pointIds'] = self._serialize.url('point_ids', point_ids, 'str')
content = self._serialize.body(point_update_model, 'PointUpdateModel')
response = self._send(http_method='PATCH',
location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[TestPoint]', self._unwrap_collection(response))
def add_test_results_to_test_run(self, results, project, run_id):
"""AddTestResultsToTestRun.
Add test results to a test run.
:param [TestCaseResult] results: List of test results to add.
:param str project: Project ID or project name
:param int run_id: Test run ID into which test results to add.
:rtype: [TestCaseResult]
"""
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')
content = self._serialize.body(results, '[TestCaseResult]')
response = self._send(http_method='POST',
location_id='4637d869-3a76-4468-8057-0bb02aa385cf',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[TestCaseResult]', self._unwrap_collection(response))
def get_test_result_by_id(self, project, run_id, test_case_result_id, details_to_include=None):
"""GetTestResultById.
Get a test result for a test run.
:param str project: Project ID or project name
:param int run_id: Test run ID of a test result to fetch.
:param int test_case_result_id: Test result ID.
:param str details_to_include: Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults.
:rtype: :class:`<TestCaseResult> <azure.devops.v5_0.test.models.TestCaseResult>`
"""
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')
if test_case_result_id is not None:
route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int')
query_parameters = {}
if details_to_include is not None:
query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str')
response = self._send(http_method='GET',
location_id='4637d869-3a76-4468-8057-0bb02aa385cf',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TestCaseResult', response)
def get_test_results(self, project, run_id, details_to_include=None, skip=None, top=None, outcomes=None):
"""GetTestResults.
Get test results for a test run.
:param str project: Project ID or project name
:param int run_id: Test run ID of test results to fetch.
:param str details_to_include: Details to include with test results. Default is None. Other values are Iterations and WorkItems.
:param int skip: Number of test results to skip from beginning.
:param int top: Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise.
:param [TestOutcome] outcomes: Comma separated list of test outcomes to filter test results.
:rtype: [TestCaseResult]
"""
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')
query_parameters = {}
if details_to_include is not None:
query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if outcomes is not None:
outcomes = ",".join(map(str, outcomes))
query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str')
response = self._send(http_method='GET',
location_id='4637d869-3a76-4468-8057-0bb02aa385cf',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestCaseResult]', self._unwrap_collection(response))
def update_test_results(self, results, project, run_id):
"""UpdateTestResults.
Update test results in a test run.
:param [TestCaseResult] results: List of test results to update.
:param str project: Project ID or project name
:param int run_id: Test run ID whose test results to update.
:rtype: [TestCaseResult]
"""
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')
content = self._serialize.body(results, '[TestCaseResult]')
response = self._send(http_method='PATCH',
location_id='4637d869-3a76-4468-8057-0bb02aa385cf',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[TestCaseResult]', self._unwrap_collection(response))
def get_test_run_statistics(self, project, run_id):
"""GetTestRunStatistics.
Get test run statistics
:param str project: Project ID or project name
:param int run_id: ID of the run to get.
:rtype: :class:`<TestRunStatistic> <azure.devops.v5_0.test.models.TestRunStatistic>`
"""
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='0a42c424-d764-4a16-a2d5-5c85f87d0ae8',
version='5.0',
route_values=route_values)
return self._deserialize('TestRunStatistic', response)
def create_test_run(self, test_run, project):
"""CreateTestRun.
Create new test run.
:param :class:`<RunCreateModel> <azure.devops.v5_0.test.models.RunCreateModel>` test_run: Run details RunCreateModel
:param str project: Project ID or project name
:rtype: :class:`<TestRun> <azure.devops.v5_0.test.models.TestRun>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(test_run, 'RunCreateModel')
response = self._send(http_method='POST',
location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TestRun', response)
def delete_test_run(self, project, run_id):
"""DeleteTestRun.
Delete a test run by its ID.
:param str project: Project ID or project name
:param int run_id: ID of the run to delete.
"""
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')
self._send(http_method='DELETE',
location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138',
version='5.0',
route_values=route_values)
def get_test_run_by_id(self, project, run_id, include_details=None):
"""GetTestRunById.
Get a test run by its ID.
:param str project: Project ID or project name
:param int run_id: ID of the run to get.
:param bool include_details: Defualt value is true. It includes details like run statistics,release,build,Test enviornment,Post process state and more
:rtype: :class:`<TestRun> <azure.devops.v5_0.test.models.TestRun>`
"""
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')
query_parameters = {}
if include_details is not None:
query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool')
response = self._send(http_method='GET',
location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TestRun', response)
def get_test_runs(self, project, build_uri=None, owner=None, tmi_run_id=None, plan_id=None, include_run_details=None, automated=None, skip=None, top=None):
"""GetTestRuns.
Get a list of test runs.
:param str project: Project ID or project name
:param str build_uri: URI of the build that the runs used.
:param str owner: Team foundation ID of the owner of the runs.
:param str tmi_run_id:
:param int plan_id: ID of the test plan that the runs are a part of.
:param bool include_run_details: If true, include all the properties of the runs.
:param bool automated: If true, only returns automated runs.
:param int skip: Number of test runs to skip.
:param int top: Number of test runs to return.
:rtype: [TestRun]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if build_uri is not None:
query_parameters['buildUri'] = self._serialize.query('build_uri', build_uri, 'str')
if owner is not None:
query_parameters['owner'] = self._serialize.query('owner', owner, 'str')
if tmi_run_id is not None:
query_parameters['tmiRunId'] = self._serialize.query('tmi_run_id', tmi_run_id, 'str')
if plan_id is not None:
query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'int')
if include_run_details is not None:
query_parameters['includeRunDetails'] = self._serialize.query('include_run_details', include_run_details, 'bool')
if automated is not None:
query_parameters['automated'] = self._serialize.query('automated', automated, 'bool')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
response = self._send(http_method='GET',
location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestRun]', self._unwrap_collection(response))
def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, state=None, plan_ids=None, is_automated=None, publish_context=None, build_ids=None, build_def_ids=None, branch_name=None, release_ids=None, release_def_ids=None, release_env_ids=None, release_env_def_ids=None, run_title=None, top=None, continuation_token=None):
"""QueryTestRuns.
Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.
:param str project: Project ID or project name
:param datetime min_last_updated_date: Minimum Last Modified Date of run to be queried (Mandatory).
:param datetime max_last_updated_date: Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
:param str state: Current state of the Runs to be queried.
:param [int] plan_ids: Plan Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param bool is_automated: Automation type of the Runs to be queried.
:param str publish_context: PublishContext of the Runs to be queried.
:param [int] build_ids: Build Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param [int] build_def_ids: Build Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param str branch_name: Source Branch name of the Runs to be queried.
:param [int] release_ids: Release Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param [int] release_def_ids: Release Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param [int] release_env_ids: Release Environment Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param [int] release_env_def_ids: Release Environment Definition Ids of the Runs to be queried, comma seperated list of valid ids (limit no. of ids 10).
:param str run_title: Run Title of the Runs to be queried.
:param int top: Number of runs to be queried. Limit is 100
:param str continuation_token: continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user.
:rtype: [TestRun]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if min_last_updated_date is not None:
query_parameters['minLastUpdatedDate'] = self._serialize.query('min_last_updated_date', min_last_updated_date, 'iso-8601')
if max_last_updated_date is not None:
query_parameters['maxLastUpdatedDate'] = self._serialize.query('max_last_updated_date', max_last_updated_date, 'iso-8601')
if state is not None:
query_parameters['state'] = self._serialize.query('state', state, 'str')
if plan_ids is not None:
plan_ids = ",".join(map(str, plan_ids))
query_parameters['planIds'] = self._serialize.query('plan_ids', plan_ids, 'str')
if is_automated is not None:
query_parameters['isAutomated'] = self._serialize.query('is_automated', is_automated, 'bool')
if publish_context is not None:
query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str')
if build_ids is not None:
build_ids = ",".join(map(str, build_ids))
query_parameters['buildIds'] = self._serialize.query('build_ids', build_ids, 'str')
if build_def_ids is not None:
build_def_ids = ",".join(map(str, build_def_ids))
query_parameters['buildDefIds'] = self._serialize.query('build_def_ids', build_def_ids, 'str')
if branch_name is not None:
query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str')
if release_ids is not None:
release_ids = ",".join(map(str, release_ids))
query_parameters['releaseIds'] = self._serialize.query('release_ids', release_ids, 'str')
if release_def_ids is not None:
release_def_ids = ",".join(map(str, release_def_ids))
query_parameters['releaseDefIds'] = self._serialize.query('release_def_ids', release_def_ids, 'str')
if release_env_ids is not None:
release_env_ids = ",".join(map(str, release_env_ids))
query_parameters['releaseEnvIds'] = self._serialize.query('release_env_ids', release_env_ids, 'str')
if release_env_def_ids is not None:
release_env_def_ids = ",".join(map(str, release_env_def_ids))
query_parameters['releaseEnvDefIds'] = self._serialize.query('release_env_def_ids', release_env_def_ids, 'str')
if run_title is not None:
query_parameters['runTitle'] = self._serialize.query('run_title', run_title, 'str')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if continuation_token is not None:
query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str')
response = self._send(http_method='GET',
location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestRun]', self._unwrap_collection(response))
def update_test_run(self, run_update_model, project, run_id):
"""UpdateTestRun.
Update test run by its ID.
:param :class:`<RunUpdateModel> <azure.devops.v5_0.test.models.RunUpdateModel>` run_update_model: Run details RunUpdateModel
:param str project: Project ID or project name
:param int run_id: ID of the run to update.
:rtype: :class:`<TestRun> <azure.devops.v5_0.test.models.TestRun>`
"""
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')
content = self._serialize.body(run_update_model, 'RunUpdateModel')
response = self._send(http_method='PATCH',
location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TestRun', response)
def add_test_cases_to_suite(self, project, plan_id, suite_id, test_case_ids):
"""AddTestCasesToSuite.
Add test cases to suite.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suite.
:param int suite_id: ID of the test suite to which the test cases must be added.
:param str test_case_ids: IDs of the test cases to add to the suite. Ids are specified in comma separated format.
:rtype: [SuiteTestCase]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
if test_case_ids is not None:
route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'str')
route_values['action'] = 'TestCases'
response = self._send(http_method='POST',
location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e',
version='5.0',
route_values=route_values)
return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response))
def get_test_case_by_id(self, project, plan_id, suite_id, test_case_ids):
"""GetTestCaseById.
Get a specific test case in a test suite with test case id.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suites.
:param int suite_id: ID of the suite that contains the test case.
:param int test_case_ids: ID of the test case to get.
:rtype: :class:`<SuiteTestCase> <azure.devops.v5_0.test.models.SuiteTestCase>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
if test_case_ids is not None:
route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'int')
route_values['action'] = 'TestCases'
response = self._send(http_method='GET',
location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e',
version='5.0',
route_values=route_values)
return self._deserialize('SuiteTestCase', response)
def get_test_cases(self, project, plan_id, suite_id):
"""GetTestCases.
Get all test cases in a suite.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suites.
:param int suite_id: ID of the suite to get.
:rtype: [SuiteTestCase]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
route_values['action'] = 'TestCases'
response = self._send(http_method='GET',
location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e',
version='5.0',
route_values=route_values)
return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response))
def remove_test_cases_from_suite_url(self, project, plan_id, suite_id, test_case_ids):
"""RemoveTestCasesFromSuiteUrl.
The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suite.
:param int suite_id: ID of the suite to get.
:param str test_case_ids: IDs of the test cases to remove from the suite.
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
if test_case_ids is not None:
route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'str')
route_values['action'] = 'TestCases'
self._send(http_method='DELETE',
location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e',
version='5.0',
route_values=route_values)
def update_suite_test_cases(self, suite_test_case_update_model, project, plan_id, suite_id, test_case_ids):
"""UpdateSuiteTestCases.
Updates the properties of the test case association in a suite.
:param :class:`<SuiteTestCaseUpdateModel> <azure.devops.v5_0.test.models.SuiteTestCaseUpdateModel>` suite_test_case_update_model: Model for updation of the properties of test case suite association.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suite.
:param int suite_id: ID of the test suite to which the test cases must be added.
:param str test_case_ids: IDs of the test cases to add to the suite. Ids are specified in comma separated format.
:rtype: [SuiteTestCase]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
if test_case_ids is not None:
route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'str')
route_values['action'] = 'TestCases'
content = self._serialize.body(suite_test_case_update_model, 'SuiteTestCaseUpdateModel')
response = self._send(http_method='PATCH',
location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[SuiteTestCase]', self._unwrap_collection(response))
def create_test_suite(self, test_suite, project, plan_id, suite_id):
"""CreateTestSuite.
Create a test suite.
:param :class:`<SuiteCreateModel> <azure.devops.v5_0.test.models.SuiteCreateModel>` test_suite: Test suite data.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suite.
:param int suite_id: ID of the parent suite.
:rtype: [TestSuite]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
content = self._serialize.body(test_suite, 'SuiteCreateModel')
response = self._send(http_method='POST',
location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[TestSuite]', self._unwrap_collection(response))
def delete_test_suite(self, project, plan_id, suite_id):
"""DeleteTestSuite.
Delete test suite.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suite.
:param int suite_id: ID of the test suite to delete.
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
self._send(http_method='DELETE',
location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1',
version='5.0',
route_values=route_values)
def get_test_suite_by_id(self, project, plan_id, suite_id, expand=None):
"""GetTestSuiteById.
Get test suite by suite id.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suites.
:param int suite_id: ID of the suite to get.
:param int expand: Include the children suites and testers details
:rtype: :class:`<TestSuite> <azure.devops.v5_0.test.models.TestSuite>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
query_parameters = {}
if expand is not None:
query_parameters['$expand'] = self._serialize.query('expand', expand, 'int')
response = self._send(http_method='GET',
location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TestSuite', response)
def get_test_suites_for_plan(self, project, plan_id, expand=None, skip=None, top=None, as_tree_view=None):
"""GetTestSuitesForPlan.
Get test suites for plan.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan for which suites are requested.
:param int expand: Include the children suites and testers details.
:param int skip: Number of suites to skip from the result.
:param int top: Number of Suites to be return after skipping the suites from the result.
:param bool as_tree_view: If the suites returned should be in a tree structure.
:rtype: [TestSuite]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
query_parameters = {}
if expand is not None:
query_parameters['$expand'] = self._serialize.query('expand', expand, 'int')
if skip is not None:
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
if top is not None:
query_parameters['$top'] = self._serialize.query('top', top, 'int')
if as_tree_view is not None:
query_parameters['$asTreeView'] = self._serialize.query('as_tree_view', as_tree_view, 'bool')
response = self._send(http_method='GET',
location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestSuite]', self._unwrap_collection(response))
def update_test_suite(self, suite_update_model, project, plan_id, suite_id):
"""UpdateTestSuite.
Update a test suite.
:param :class:`<SuiteUpdateModel> <azure.devops.v5_0.test.models.SuiteUpdateModel>` suite_update_model: Suite Model to update
:param str project: Project ID or project name
:param int plan_id: ID of the test plan that contains the suites.
:param int suite_id: ID of the suite to update.
:rtype: :class:`<TestSuite> <azure.devops.v5_0.test.models.TestSuite>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if plan_id is not None:
route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int')
if suite_id is not None:
route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int')
content = self._serialize.body(suite_update_model, 'SuiteUpdateModel')
response = self._send(http_method='PATCH',
location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TestSuite', response)
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='09a6167b-e969-4775-9247-b94cf3819caf',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TestSuite]', self._unwrap_collection(response))

Просмотреть файл

@ -0,0 +1,53 @@
# --------------------------------------------------------------------------------------------
# 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_0.tfvc.models import *
from .tfvc_client import TfvcClient
__all__ = [
'AssociatedWorkItem',
'Change',
'CheckinNote',
'FileContentMetadata',
'GitRepository',
'GitRepositoryRef',
'GraphSubjectBase',
'IdentityRef',
'ItemContent',
'ItemModel',
'ReferenceLinks',
'TeamProjectCollectionReference',
'TeamProjectReference',
'TfvcBranch',
'TfvcBranchMapping',
'TfvcBranchRef',
'TfvcChange',
'TfvcChangeset',
'TfvcChangesetRef',
'TfvcChangesetSearchCriteria',
'TfvcChangesetsRequestData',
'TfvcItem',
'TfvcItemDescriptor',
'TfvcItemRequestData',
'TfvcLabel',
'TfvcLabelRef',
'TfvcLabelRequestData',
'TfvcMappingFilter',
'TfvcMergeSource',
'TfvcPolicyFailureInfo',
'TfvcPolicyOverrideInfo',
'TfvcShallowBranchRef',
'TfvcShelveset',
'TfvcShelvesetRef',
'TfvcShelvesetRequestData',
'TfvcStatistics',
'TfvcVersionDescriptor',
'VersionControlProjectInfo',
'VstsInfo',
'TfvcClient'
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from . import models
from ...client import Client
from ...v5_0.tfvc import models
class TfvcClient(VssClient):
class TfvcClient(Client):
"""Tfvc
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -27,12 +27,12 @@ class TfvcClient(VssClient):
def get_branch(self, path, project=None, include_parent=None, include_children=None):
"""GetBranch.
Get a single branch hierarchy at the given path with parents or children (if specified)
:param str path:
Get a single branch hierarchy at the given path with parents or children as specified.
:param str path: Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
:param str project: Project ID or project name
:param bool include_parent:
:param bool include_children:
:rtype: :class:`<TfvcBranch> <tfvc.v4_0.models.TfvcBranch>`
:param bool include_parent: Return the parent branch, if there is one. Default: False
:param bool include_children: Return child branches, if there are any. Default: False
:rtype: :class:`<TfvcBranch> <azure.devops.v5_0.tfvc.models.TfvcBranch>`
"""
route_values = {}
if project is not None:
@ -46,19 +46,19 @@ class TfvcClient(VssClient):
query_parameters['includeChildren'] = self._serialize.query('include_children', include_children, 'bool')
response = self._send(http_method='GET',
location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TfvcBranch', response)
def get_branches(self, project=None, include_parent=None, include_children=None, include_deleted=None, include_links=None):
"""GetBranches.
Get a collection of branch roots -- first-level children, branches with no parents
Get a collection of branch roots -- first-level children, branches with no parents.
:param str project: Project ID or project name
:param bool include_parent:
:param bool include_children:
:param bool include_deleted:
:param bool include_links:
:param bool include_parent: Return the parent branch, if there is one. Default: False
:param bool include_children: Return the child branches for each root branch. Default: False
:param bool include_deleted: Return deleted branches. Default: False
:param bool include_links: Return links. Default: False
:rtype: [TfvcBranch]
"""
route_values = {}
@ -75,7 +75,7 @@ class TfvcClient(VssClient):
query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool')
response = self._send(http_method='GET',
location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcBranch]', self._unwrap_collection(response))
@ -83,10 +83,10 @@ class TfvcClient(VssClient):
def get_branch_refs(self, scope_path, project=None, include_deleted=None, include_links=None):
"""GetBranchRefs.
Get branch hierarchies below the specified scopePath
:param str scope_path:
:param str scope_path: Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder.
:param str project: Project ID or project name
:param bool include_deleted:
:param bool include_links:
:param bool include_deleted: Return deleted branches. Default: False
:param bool include_links: Return links. Default: False
:rtype: [TfvcBranchRef]
"""
route_values = {}
@ -101,17 +101,17 @@ class TfvcClient(VssClient):
query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool')
response = self._send(http_method='GET',
location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcBranchRef]', self._unwrap_collection(response))
def get_changeset_changes(self, id=None, skip=None, top=None):
"""GetChangesetChanges.
Retrieve Tfvc changes for a given changeset
:param int id:
:param int skip:
:param int top:
Retrieve Tfvc changes for a given changeset.
:param int id: ID of the changeset. Default: null
:param int skip: Number of results to skip. Default: null
:param int top: The maximum number of results to return. Default: null
:rtype: [TfvcChange]
"""
route_values = {}
@ -124,7 +124,7 @@ class TfvcClient(VssClient):
query_parameters['$top'] = self._serialize.query('top', top, 'int')
response = self._send(http_method='GET',
location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcChange]', self._unwrap_collection(response))
@ -132,9 +132,9 @@ class TfvcClient(VssClient):
def create_changeset(self, changeset, project=None):
"""CreateChangeset.
Create a new changeset.
:param :class:`<TfvcChangeset> <tfvc.v4_0.models.TfvcChangeset>` changeset:
:param :class:`<TfvcChangeset> <azure.devops.v5_0.tfvc.models.TfvcChangeset>` changeset:
:param str project: Project ID or project name
:rtype: :class:`<TfvcChangesetRef> <tfvc.v4_0.models.TfvcChangesetRef>`
:rtype: :class:`<TfvcChangesetRef> <azure.devops.v5_0.tfvc.models.TfvcChangesetRef>`
"""
route_values = {}
if project is not None:
@ -142,7 +142,7 @@ class TfvcClient(VssClient):
content = self._serialize.body(changeset, 'TfvcChangeset')
response = self._send(http_method='POST',
location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TfvcChangesetRef', response)
@ -150,18 +150,18 @@ class TfvcClient(VssClient):
def get_changeset(self, id, project=None, max_change_count=None, include_details=None, include_work_items=None, max_comment_length=None, include_source_rename=None, skip=None, top=None, orderby=None, search_criteria=None):
"""GetChangeset.
Retrieve a Tfvc Changeset
:param int id:
:param int id: Changeset Id to retrieve.
:param str project: Project ID or project name
:param int max_change_count:
:param bool include_details:
:param bool include_work_items:
:param int max_comment_length:
:param bool include_source_rename:
:param int skip:
:param int top:
:param str orderby:
:param :class:`<TfvcChangesetSearchCriteria> <tfvc.v4_0.models.TfvcChangesetSearchCriteria>` search_criteria:
:rtype: :class:`<TfvcChangeset> <tfvc.v4_0.models.TfvcChangeset>`
:param int max_change_count: Number of changes to return (maximum 100 changes) Default: 0
:param bool include_details: Include policy details and check-in notes in the response. Default: false
:param bool include_work_items: Include workitems. Default: false
:param int max_comment_length: Include details about associated work items in the response. Default: null
:param bool include_source_rename: Include renames. Default: false
:param int skip: Number of results to skip. Default: null
:param int top: The maximum number of results to return. Default: null
:param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
:param :class:`<TfvcChangesetSearchCriteria> <azure.devops.v5_0.tfvc.models.TfvcChangesetSearchCriteria>` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
:rtype: :class:`<TfvcChangeset> <azure.devops.v5_0.tfvc.models.TfvcChangeset>`
"""
route_values = {}
if project is not None:
@ -202,22 +202,24 @@ class TfvcClient(VssClient):
query_parameters['searchCriteria.followRenames'] = search_criteria.follow_renames
if search_criteria.include_links is not None:
query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links
if search_criteria.mappings is not None:
query_parameters['searchCriteria.mappings'] = search_criteria.mappings
response = self._send(http_method='GET',
location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TfvcChangeset', response)
def get_changesets(self, project=None, max_comment_length=None, skip=None, top=None, orderby=None, search_criteria=None):
"""GetChangesets.
Retrieve Tfvc changesets Note: This is a new version of the GetChangesets API that doesn't expose the unneeded queryParams present in the 1.0 version of the API.
Retrieve Tfvc Changesets
:param str project: Project ID or project name
:param int max_comment_length:
:param int skip:
:param int top:
:param str orderby:
:param :class:`<TfvcChangesetSearchCriteria> <tfvc.v4_0.models.TfvcChangesetSearchCriteria>` search_criteria:
:param int max_comment_length: Include details about associated work items in the response. Default: null
:param int skip: Number of results to skip. Default: null
:param int top: The maximum number of results to return. Default: null
:param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order.
:param :class:`<TfvcChangesetSearchCriteria> <azure.devops.v5_0.tfvc.models.TfvcChangesetSearchCriteria>` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null
:rtype: [TfvcChangesetRef]
"""
route_values = {}
@ -249,28 +251,32 @@ class TfvcClient(VssClient):
query_parameters['searchCriteria.followRenames'] = search_criteria.follow_renames
if search_criteria.include_links is not None:
query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links
if search_criteria.mappings is not None:
query_parameters['searchCriteria.mappings'] = search_criteria.mappings
response = self._send(http_method='GET',
location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response))
def get_batched_changesets(self, changesets_request_data):
"""GetBatchedChangesets.
:param :class:`<TfvcChangesetsRequestData> <tfvc.v4_0.models.TfvcChangesetsRequestData>` changesets_request_data:
Returns changesets for a given list of changeset Ids.
:param :class:`<TfvcChangesetsRequestData> <azure.devops.v5_0.tfvc.models.TfvcChangesetsRequestData>` changesets_request_data: List of changeset IDs.
:rtype: [TfvcChangesetRef]
"""
content = self._serialize.body(changesets_request_data, 'TfvcChangesetsRequestData')
response = self._send(http_method='POST',
location_id='b7e7c173-803c-4fea-9ec8-31ee35c5502a',
version='4.0',
version='5.0',
content=content)
return self._deserialize('[TfvcChangesetRef]', self._unwrap_collection(response))
def get_changeset_work_items(self, id=None):
"""GetChangesetWorkItems.
:param int id:
Retrieves the work items associated with a particular changeset.
:param int id: ID of the changeset. Default: null
:rtype: [AssociatedWorkItem]
"""
route_values = {}
@ -278,14 +284,14 @@ class TfvcClient(VssClient):
route_values['id'] = self._serialize.url('id', id, 'int')
response = self._send(http_method='GET',
location_id='64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response))
def get_items_batch(self, item_request_data, project=None):
"""GetItemsBatch.
Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
:param :class:`<TfvcItemRequestData> <tfvc.v4_0.models.TfvcItemRequestData>` item_request_data:
:param :class:`<TfvcItemRequestData> <azure.devops.v5_0.tfvc.models.TfvcItemRequestData>` item_request_data:
:param str project: Project ID or project name
:rtype: [[TfvcItem]]
"""
@ -295,7 +301,7 @@ class TfvcClient(VssClient):
content = self._serialize.body(item_request_data, 'TfvcItemRequestData')
response = self._send(http_method='POST',
location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[[TfvcItem]]', self._unwrap_collection(response))
@ -303,7 +309,7 @@ class TfvcClient(VssClient):
def get_items_batch_zip(self, item_request_data, project=None, **kwargs):
"""GetItemsBatchZip.
Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
:param :class:`<TfvcItemRequestData> <tfvc.v4_0.models.TfvcItemRequestData>` item_request_data:
:param :class:`<TfvcItemRequestData> <azure.devops.v5_0.tfvc.models.TfvcItemRequestData>` item_request_data:
:param str project: Project ID or project name
:rtype: object
"""
@ -313,7 +319,7 @@ class TfvcClient(VssClient):
content = self._serialize.body(item_request_data, 'TfvcItemRequestData')
response = self._send(http_method='POST',
location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833',
version='4.0',
version='5.0',
route_values=route_values,
content=content,
accept_media_type='application/zip')
@ -323,17 +329,18 @@ class TfvcClient(VssClient):
callback = None
return self._client.stream_download(response, callback=callback)
def get_item(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None):
def get_item(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None):
"""GetItem.
Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
:param str path:
:param str path: Version control path of an individual item to return.
:param str project: Project ID or project name
:param str file_name:
:param bool download:
:param str scope_path:
:param str recursion_level:
:param :class:`<TfvcVersionDescriptor> <tfvc.v4_0.models.TfvcVersionDescriptor>` version_descriptor:
:rtype: :class:`<TfvcItem> <tfvc.v4_0.models.TfvcItem>`
:param str file_name: file name of item returned.
:param bool download: If true, create a downloadable attachment.
:param str scope_path: Version control path of a folder to return multiple items.
:param str recursion_level: None (just the item), or OneLevel (contents of a folder).
:param :class:`<TfvcVersionDescriptor> <azure.devops.v5_0.tfvc.models.TfvcVersionDescriptor>` version_descriptor: Version descriptor. Default is null.
:param bool include_content: Set to true to include item content when requesting json. Default is false.
:rtype: :class:`<TfvcItem> <azure.devops.v5_0.tfvc.models.TfvcItem>`
"""
route_values = {}
if project is not None:
@ -356,23 +363,26 @@ class TfvcClient(VssClient):
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TfvcItem', response)
def get_item_content(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, **kwargs):
def get_item_content(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs):
"""GetItemContent.
Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
:param str path:
:param str path: Version control path of an individual item to return.
:param str project: Project ID or project name
:param str file_name:
:param bool download:
:param str scope_path:
:param str recursion_level:
:param :class:`<TfvcVersionDescriptor> <tfvc.v4_0.models.TfvcVersionDescriptor>` version_descriptor:
:param str file_name: file name of item returned.
:param bool download: If true, create a downloadable attachment.
:param str scope_path: Version control path of a folder to return multiple items.
:param str recursion_level: None (just the item), or OneLevel (contents of a folder).
:param :class:`<TfvcVersionDescriptor> <azure.devops.v5_0.tfvc.models.TfvcVersionDescriptor>` version_descriptor: Version descriptor. Default is null.
:param bool include_content: Set to true to include item content when requesting json. Default is false.
:rtype: object
"""
route_values = {}
@ -396,9 +406,11 @@ class TfvcClient(VssClient):
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
accept_media_type='application/octet-stream')
@ -412,10 +424,10 @@ class TfvcClient(VssClient):
"""GetItems.
Get a list of Tfvc items
:param str project: Project ID or project name
:param str scope_path:
:param str recursion_level:
:param bool include_links:
:param :class:`<TfvcVersionDescriptor> <tfvc.v4_0.models.TfvcVersionDescriptor>` version_descriptor:
:param str scope_path: Version control path of a folder to return multiple items.
:param str recursion_level: None (just the item), or OneLevel (contents of a folder).
:param bool include_links: True to include links.
:param :class:`<TfvcVersionDescriptor> <azure.devops.v5_0.tfvc.models.TfvcVersionDescriptor>` version_descriptor:
:rtype: [TfvcItem]
"""
route_values = {}
@ -437,21 +449,22 @@ class TfvcClient(VssClient):
query_parameters['versionDescriptor.version'] = version_descriptor.version
response = self._send(http_method='GET',
location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcItem]', self._unwrap_collection(response))
def get_item_text(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, **kwargs):
def get_item_text(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs):
"""GetItemText.
Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
:param str path:
:param str path: Version control path of an individual item to return.
:param str project: Project ID or project name
:param str file_name:
:param bool download:
:param str scope_path:
:param str recursion_level:
:param :class:`<TfvcVersionDescriptor> <tfvc.v4_0.models.TfvcVersionDescriptor>` version_descriptor:
:param str file_name: file name of item returned.
:param bool download: If true, create a downloadable attachment.
:param str scope_path: Version control path of a folder to return multiple items.
:param str recursion_level: None (just the item), or OneLevel (contents of a folder).
:param :class:`<TfvcVersionDescriptor> <azure.devops.v5_0.tfvc.models.TfvcVersionDescriptor>` version_descriptor: Version descriptor. Default is null.
:param bool include_content: Set to true to include item content when requesting json. Default is false.
:rtype: object
"""
route_values = {}
@ -475,9 +488,11 @@ class TfvcClient(VssClient):
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
accept_media_type='text/plain')
@ -487,16 +502,17 @@ class TfvcClient(VssClient):
callback = None
return self._client.stream_download(response, callback=callback)
def get_item_zip(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, **kwargs):
def get_item_zip(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs):
"""GetItemZip.
Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
:param str path:
:param str path: Version control path of an individual item to return.
:param str project: Project ID or project name
:param str file_name:
:param bool download:
:param str scope_path:
:param str recursion_level:
:param :class:`<TfvcVersionDescriptor> <tfvc.v4_0.models.TfvcVersionDescriptor>` version_descriptor:
:param str file_name: file name of item returned.
:param bool download: If true, create a downloadable attachment.
:param str scope_path: Version control path of a folder to return multiple items.
:param str recursion_level: None (just the item), or OneLevel (contents of a folder).
:param :class:`<TfvcVersionDescriptor> <azure.devops.v5_0.tfvc.models.TfvcVersionDescriptor>` version_descriptor: Version descriptor. Default is null.
:param bool include_content: Set to true to include item content when requesting json. Default is false.
:rtype: object
"""
route_values = {}
@ -520,9 +536,11 @@ class TfvcClient(VssClient):
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
accept_media_type='application/zip')
@ -550,7 +568,7 @@ class TfvcClient(VssClient):
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='06166e34-de17-4b60-8cd1-23182a346fda',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcItem]', self._unwrap_collection(response))
@ -559,9 +577,9 @@ class TfvcClient(VssClient):
"""GetLabel.
Get a single deep label.
:param str label_id: Unique identifier of label
:param :class:`<TfvcLabelRequestData> <tfvc.v4_0.models.TfvcLabelRequestData>` request_data: maxItemCount
:param :class:`<TfvcLabelRequestData> <azure.devops.v5_0.tfvc.models.TfvcLabelRequestData>` request_data: maxItemCount
:param str project: Project ID or project name
:rtype: :class:`<TfvcLabel> <tfvc.v4_0.models.TfvcLabel>`
:rtype: :class:`<TfvcLabel> <azure.devops.v5_0.tfvc.models.TfvcLabel>`
"""
route_values = {}
if project is not None:
@ -584,7 +602,7 @@ class TfvcClient(VssClient):
query_parameters['requestData.includeLinks'] = request_data.include_links
response = self._send(http_method='GET',
location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('TfvcLabel', response)
@ -592,7 +610,7 @@ class TfvcClient(VssClient):
def get_labels(self, request_data, project=None, top=None, skip=None):
"""GetLabels.
Get a collection of shallow label references.
:param :class:`<TfvcLabelRequestData> <tfvc.v4_0.models.TfvcLabelRequestData>` request_data: labelScope, name, owner, and itemLabelFilter
:param :class:`<TfvcLabelRequestData> <azure.devops.v5_0.tfvc.models.TfvcLabelRequestData>` request_data: labelScope, name, owner, and itemLabelFilter
:param str project: Project ID or project name
:param int top: Max number of labels to return
:param int skip: Number of labels to skip
@ -621,7 +639,7 @@ class TfvcClient(VssClient):
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TfvcLabelRef]', self._unwrap_collection(response))
@ -643,7 +661,7 @@ class TfvcClient(VssClient):
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='dbaf075b-0445-4c34-9e5b-82292f856522',
version='4.0',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TfvcChange]', self._unwrap_collection(response))
@ -651,8 +669,8 @@ class TfvcClient(VssClient):
"""GetShelveset.
Get a single deep shelveset.
:param str shelveset_id: Shelveset's unique ID
:param :class:`<TfvcShelvesetRequestData> <tfvc.v4_0.models.TfvcShelvesetRequestData>` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength
:rtype: :class:`<TfvcShelveset> <tfvc.v4_0.models.TfvcShelveset>`
:param :class:`<TfvcShelvesetRequestData> <azure.devops.v5_0.tfvc.models.TfvcShelvesetRequestData>` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength
:rtype: :class:`<TfvcShelveset> <azure.devops.v5_0.tfvc.models.TfvcShelveset>`
"""
query_parameters = {}
if shelveset_id is not None:
@ -674,14 +692,14 @@ class TfvcClient(VssClient):
query_parameters['requestData.includeLinks'] = request_data.include_links
response = self._send(http_method='GET',
location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3',
version='4.0',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('TfvcShelveset', response)
def get_shelvesets(self, request_data=None, top=None, skip=None):
"""GetShelvesets.
Return a collection of shallow shelveset references.
:param :class:`<TfvcShelvesetRequestData> <tfvc.v4_0.models.TfvcShelvesetRequestData>` request_data: name, owner, and maxCommentLength
:param :class:`<TfvcShelvesetRequestData> <azure.devops.v5_0.tfvc.models.TfvcShelvesetRequestData>` request_data: name, owner, and maxCommentLength
:param int top: Max number of shelvesets to return
:param int skip: Number of shelvesets to skip
:rtype: [TfvcShelvesetRef]
@ -708,7 +726,7 @@ class TfvcClient(VssClient):
query_parameters['$skip'] = self._serialize.query('skip', skip, 'int')
response = self._send(http_method='GET',
location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3',
version='4.0',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TfvcShelvesetRef]', self._unwrap_collection(response))
@ -723,7 +741,7 @@ class TfvcClient(VssClient):
query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str')
response = self._send(http_method='GET',
location_id='a7a0c1c1-373e-425a-b031-a519474d743d',
version='4.0',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[AssociatedWorkItem]', self._unwrap_collection(response))

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,22 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import GitRepository
from .models import GitRepositoryRef
from .models import GitVersionDescriptor
from .models import WikiAttachment
from .models import WikiAttachmentResponse
from .models import WikiCreateBaseParameters
from .models import WikiCreateParametersV2
from .models import WikiPage
from .models import WikiPageCreateOrUpdateParameters
from .models import WikiPageMove
from .models import WikiPageMoveParameters
from .models import WikiPageMoveResponse
from .models import WikiPageResponse
from .models import WikiPageViewStats
from .models import WikiUpdateParameters
from .models import WikiV2
from ...v5_0.wiki.models import *
from .wiki_client import WikiClient
__all__ = [
'GitRepository',
@ -40,4 +26,5 @@ __all__ = [
'WikiPageViewStats',
'WikiUpdateParameters',
'WikiV2',
'WikiClient'
]

Просмотреть файл

@ -0,0 +1,366 @@
# --------------------------------------------------------------------------------------------
# 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_0.wiki import models
class WikiClient(Client):
"""Wiki
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(WikiClient, 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 = 'bf7d82a0-8aa5-4613-94ef-6172a5ea01f3'
def create_attachment(self, upload_stream, project, wiki_identifier, name, **kwargs):
"""CreateAttachment.
Creates an attachment in the wiki.
:param object upload_stream: Stream to upload
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str name: Wiki attachment name.
:rtype: :class:`<WikiAttachmentResponse> <azure.devops.v5_0.wiki.models.WikiAttachmentResponse>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if name is not None:
query_parameters['name'] = self._serialize.query('name', name, 'str')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
content = self._client.stream_upload(upload_stream, callback=callback)
response = self._send(http_method='PUT',
location_id='c4382d8d-fefc-40e0-92c5-49852e9e17c0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
content=content,
media_type='application/octet-stream')
response_object = models.WikiAttachmentResponse()
response_object.attachment = self._deserialize('WikiAttachment', response)
response_object.eTag = response.headers.get('ETag')
return response_object
def create_page_move(self, page_move_parameters, project, wiki_identifier, comment=None):
"""CreatePageMove.
Creates a page move operation that updates the path and order of the page as provided in the parameters.
:param :class:`<WikiPageMoveParameters> <azure.devops.v5_0.wiki.models.WikiPageMoveParameters>` page_move_parameters: Page more operation parameters.
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str comment: Comment that is to be associated with this page move.
:rtype: :class:`<WikiPageMoveResponse> <azure.devops.v5_0.wiki.models.WikiPageMoveResponse>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if comment is not None:
query_parameters['comment'] = self._serialize.query('comment', comment, 'str')
content = self._serialize.body(page_move_parameters, 'WikiPageMoveParameters')
response = self._send(http_method='POST',
location_id='e37bbe71-cbae-49e5-9a4e-949143b9d910',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
content=content)
response_object = models.WikiPageMoveResponse()
response_object.page_move = self._deserialize('WikiPageMove', response)
response_object.eTag = response.headers.get('ETag')
return response_object
def create_or_update_page(self, parameters, project, wiki_identifier, path, version, comment=None):
"""CreateOrUpdatePage.
Creates or edits a wiki page.
:param :class:`<WikiPageCreateOrUpdateParameters> <azure.devops.v5_0.wiki.models.WikiPageCreateOrUpdateParameters>` parameters: Wiki create or update operation parameters.
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str path: Wiki page path.
:param String version: Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request.
:param str comment: Comment to be associated with the page operation.
:rtype: :class:`<WikiPageResponse> <azure.devops.v5_0.wiki.models.WikiPageResponse>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if path is not None:
query_parameters['path'] = self._serialize.query('path', path, 'str')
if comment is not None:
query_parameters['comment'] = self._serialize.query('comment', comment, 'str')
content = self._serialize.body(parameters, 'WikiPageCreateOrUpdateParameters')
response = self._send(http_method='PUT',
location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
content=content)
response_object = models.WikiPageResponse()
response_object.page = self._deserialize('WikiPage', response)
response_object.eTag = response.headers.get('ETag')
return response_object
def delete_page(self, project, wiki_identifier, path, comment=None):
"""DeletePage.
Deletes a wiki page.
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str path: Wiki page path.
:param str comment: Comment to be associated with this page delete.
:rtype: :class:`<WikiPageResponse> <azure.devops.v5_0.wiki.models.WikiPageResponse>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if path is not None:
query_parameters['path'] = self._serialize.query('path', path, 'str')
if comment is not None:
query_parameters['comment'] = self._serialize.query('comment', comment, 'str')
response = self._send(http_method='DELETE',
location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
response_object = models.WikiPageResponse()
response_object.page = self._deserialize('WikiPage', response)
response_object.eTag = response.headers.get('ETag')
return response_object
def get_page(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None):
"""GetPage.
Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str path: Wiki page path.
:param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional).
:param :class:`<GitVersionDescriptor> <azure.devops.v5_0.wiki.models.GitVersionDescriptor>` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional).
:param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional)
:rtype: :class:`<WikiPageResponse> <azure.devops.v5_0.wiki.models.WikiPageResponse>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if path is not None:
query_parameters['path'] = self._serialize.query('path', path, 'str')
if recursion_level is not None:
query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str')
if version_descriptor is not None:
if version_descriptor.version_type is not None:
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if version_descriptor.version_options is not None:
query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
response_object = models.WikiPageResponse()
response_object.page = self._deserialize('WikiPage', response)
response_object.eTag = response.headers.get('ETag')
return response_object
def get_page_text(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs):
"""GetPageText.
Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str path: Wiki page path.
:param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional).
:param :class:`<GitVersionDescriptor> <azure.devops.v5_0.wiki.models.GitVersionDescriptor>` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional).
:param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional)
:rtype: object
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if path is not None:
query_parameters['path'] = self._serialize.query('path', path, 'str')
if recursion_level is not None:
query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str')
if version_descriptor is not None:
if version_descriptor.version_type is not None:
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if version_descriptor.version_options is not None:
query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
accept_media_type='text/plain')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
return self._client.stream_download(response, callback=callback)
def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None, **kwargs):
"""GetPageZip.
Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request.
:param str project: Project ID or project name
:param str wiki_identifier: Wiki Id or name.
:param str path: Wiki page path.
:param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional).
:param :class:`<GitVersionDescriptor> <azure.devops.v5_0.wiki.models.GitVersionDescriptor>` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional).
:param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional)
:rtype: object
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
query_parameters = {}
if path is not None:
query_parameters['path'] = self._serialize.query('path', path, 'str')
if recursion_level is not None:
query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str')
if version_descriptor is not None:
if version_descriptor.version_type is not None:
query_parameters['versionDescriptor.versionType'] = version_descriptor.version_type
if version_descriptor.version is not None:
query_parameters['versionDescriptor.version'] = version_descriptor.version
if version_descriptor.version_options is not None:
query_parameters['versionDescriptor.versionOptions'] = version_descriptor.version_options
if include_content is not None:
query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool')
response = self._send(http_method='GET',
location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b',
version='5.0',
route_values=route_values,
query_parameters=query_parameters,
accept_media_type='application/zip')
if "callback" in kwargs:
callback = kwargs["callback"]
else:
callback = None
return self._client.stream_download(response, callback=callback)
def create_wiki(self, wiki_create_params, project=None):
"""CreateWiki.
Creates the wiki resource.
:param :class:`<WikiCreateParametersV2> <azure.devops.v5_0.wiki.models.WikiCreateParametersV2>` wiki_create_params: Parameters for the wiki creation.
:param str project: Project ID or project name
:rtype: :class:`<WikiV2> <azure.devops.v5_0.wiki.models.WikiV2>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(wiki_create_params, 'WikiCreateParametersV2')
response = self._send(http_method='POST',
location_id='288d122c-dbd4-451d-aa5f-7dbbba070728',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('WikiV2', response)
def delete_wiki(self, wiki_identifier, project=None):
"""DeleteWiki.
Deletes the wiki corresponding to the wiki name or Id provided.
:param str wiki_identifier: Wiki name or Id.
:param str project: Project ID or project name
:rtype: :class:`<WikiV2> <azure.devops.v5_0.wiki.models.WikiV2>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
response = self._send(http_method='DELETE',
location_id='288d122c-dbd4-451d-aa5f-7dbbba070728',
version='5.0',
route_values=route_values)
return self._deserialize('WikiV2', response)
def get_all_wikis(self, project=None):
"""GetAllWikis.
Gets all wikis in a project or collection.
:param str project: Project ID or project name
:rtype: [WikiV2]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
response = self._send(http_method='GET',
location_id='288d122c-dbd4-451d-aa5f-7dbbba070728',
version='5.0',
route_values=route_values)
return self._deserialize('[WikiV2]', self._unwrap_collection(response))
def get_wiki(self, wiki_identifier, project=None):
"""GetWiki.
Gets the wiki corresponding to the wiki name or Id provided.
:param str wiki_identifier: Wiki name or id.
:param str project: Project ID or project name
:rtype: :class:`<WikiV2> <azure.devops.v5_0.wiki.models.WikiV2>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
response = self._send(http_method='GET',
location_id='288d122c-dbd4-451d-aa5f-7dbbba070728',
version='5.0',
route_values=route_values)
return self._deserialize('WikiV2', response)
def update_wiki(self, update_parameters, wiki_identifier, project=None):
"""UpdateWiki.
Updates the wiki corresponding to the wiki Id or name provided using the update parameters.
:param :class:`<WikiUpdateParameters> <azure.devops.v5_0.wiki.models.WikiUpdateParameters>` update_parameters: Update parameters.
:param str wiki_identifier: Wiki name or Id.
:param str project: Project ID or project name
:rtype: :class:`<WikiV2> <azure.devops.v5_0.wiki.models.WikiV2>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
if wiki_identifier is not None:
route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str')
content = self._serialize.body(update_parameters, 'WikiUpdateParameters')
response = self._send(http_method='PATCH',
location_id='288d122c-dbd4-451d-aa5f-7dbbba070728',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('WikiV2', response)

Просмотреть файл

@ -0,0 +1,79 @@
# --------------------------------------------------------------------------------------------
# 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_0.work.models import *
from .work_client import WorkClient
__all__ = [
'Activity',
'BacklogColumn',
'BacklogConfiguration',
'BacklogFields',
'BacklogLevel',
'BacklogLevelConfiguration',
'BacklogLevelWorkItems',
'Board',
'BoardCardRuleSettings',
'BoardCardSettings',
'BoardChart',
'BoardChartReference',
'BoardColumn',
'BoardFields',
'BoardReference',
'BoardRow',
'BoardSuggestedValue',
'BoardUserSettings',
'CapacityPatch',
'CategoryConfiguration',
'CreatePlan',
'DateRange',
'DeliveryViewData',
'FieldReference',
'FilterClause',
'GraphSubjectBase',
'IdentityRef',
'IterationWorkItems',
'Link',
'Member',
'ParentChildWIMap',
'Plan',
'PlanViewData',
'PredefinedQuery',
'ProcessConfiguration',
'ReferenceLinks',
'Rule',
'TeamContext',
'TeamFieldValue',
'TeamFieldValues',
'TeamFieldValuesPatch',
'TeamIterationAttributes',
'TeamMemberCapacity',
'TeamSetting',
'TeamSettingsDataContractBase',
'TeamSettingsDaysOff',
'TeamSettingsDaysOffPatch',
'TeamSettingsIteration',
'TeamSettingsPatch',
'TimelineCriteriaStatus',
'TimelineIterationStatus',
'TimelineTeamData',
'TimelineTeamIteration',
'TimelineTeamStatus',
'UpdatePlan',
'WorkItem',
'WorkItemColor',
'WorkItemFieldReference',
'WorkItemLink',
'WorkItemReference',
'WorkItemRelation',
'WorkItemTrackingResource',
'WorkItemTrackingResourceReference',
'WorkItemTypeReference',
'WorkItemTypeStateInfo',
'WorkClient'
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from . import models
from ...client import Client
from ...v5_0.work import models
class WorkClient(VssClient):
class WorkClient(Client):
"""Work
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -27,9 +27,9 @@ class WorkClient(VssClient):
def get_backlog_configurations(self, team_context):
"""GetBacklogConfigurations.
[Preview API]
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<BacklogConfiguration> <work.v4_0.models.BacklogConfiguration>`
Gets backlog configuration for a team
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<BacklogConfiguration> <azure.devops.v5_0.work.models.BacklogConfiguration>`
"""
project = None
team = None
@ -50,12 +50,13 @@ class WorkClient(VssClient):
route_values['team'] = self._serialize.url('team', team, 'string')
response = self._send(http_method='GET',
location_id='7799f497-3cb5-4f16-ad4f-5cd06012db64',
version='4.0-preview.1',
version='5.0',
route_values=route_values)
return self._deserialize('BacklogConfiguration', response)
def get_column_suggested_values(self, project=None):
"""GetColumnSuggestedValues.
Get available board columns in a project
:param str project: Project ID or project name
:rtype: [BoardSuggestedValue]
"""
@ -64,50 +65,13 @@ class WorkClient(VssClient):
route_values['project'] = self._serialize.url('project', project, 'str')
response = self._send(http_method='GET',
location_id='eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response))
def get_board_mapping_parent_items(self, team_context, child_backlog_context_category_ref_name, workitem_ids):
"""GetBoardMappingParentItems.
[Preview API] Returns the list of parent field filter model for the given list of workitem ids
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str child_backlog_context_category_ref_name:
:param [int] workitem_ids:
:rtype: [ParentChildWIMap]
"""
project = None
team = None
if team_context is not None:
if team_context.project_id:
project = team_context.project_id
else:
project = team_context.project
if team_context.team_id:
team = team_context.team_id
else:
team = team_context.team
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'string')
if team is not None:
route_values['team'] = self._serialize.url('team', team, 'string')
query_parameters = {}
if child_backlog_context_category_ref_name is not None:
query_parameters['childBacklogContextCategoryRefName'] = self._serialize.query('child_backlog_context_category_ref_name', child_backlog_context_category_ref_name, 'str')
if workitem_ids is not None:
workitem_ids = ",".join(map(str, workitem_ids))
query_parameters['workitemIds'] = self._serialize.query('workitem_ids', workitem_ids, 'str')
response = self._send(http_method='GET',
location_id='186abea3-5c35-432f-9e28-7a15b4312a0e',
version='4.0-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[ParentChildWIMap]', self._unwrap_collection(response))
def get_row_suggested_values(self, project=None):
"""GetRowSuggestedValues.
Get available board rows in a project
:param str project: Project ID or project name
:rtype: [BoardSuggestedValue]
"""
@ -116,16 +80,16 @@ class WorkClient(VssClient):
route_values['project'] = self._serialize.url('project', project, 'str')
response = self._send(http_method='GET',
location_id='bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response))
def get_board(self, team_context, id):
"""GetBoard.
Get board
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str id: identifier for board, either board's backlog level name (Eg:"Stories") or Id
:rtype: :class:`<Board> <work.v4_0.models.Board>`
:rtype: :class:`<Board> <azure.devops.v5_0.work.models.Board>`
"""
project = None
team = None
@ -148,14 +112,14 @@ class WorkClient(VssClient):
route_values['id'] = self._serialize.url('id', id, 'str')
response = self._send(http_method='GET',
location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('Board', response)
def get_boards(self, team_context):
"""GetBoards.
Get boards
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: [BoardReference]
"""
project = None
@ -177,7 +141,7 @@ class WorkClient(VssClient):
route_values['team'] = self._serialize.url('team', team, 'string')
response = self._send(http_method='GET',
location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[BoardReference]', self._unwrap_collection(response))
@ -185,7 +149,7 @@ class WorkClient(VssClient):
"""SetBoardOptions.
Update board options
:param {str} options: options to updated
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str id: identifier for board, either category plural name (Eg:"Stories") or guid
:rtype: {str}
"""
@ -211,82 +175,16 @@ class WorkClient(VssClient):
content = self._serialize.body(options, '{str}')
response = self._send(http_method='PUT',
location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('{str}', self._unwrap_collection(response))
def get_board_user_settings(self, team_context, board):
"""GetBoardUserSettings.
[Preview API]
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str board:
:rtype: :class:`<BoardUserSettings> <work.v4_0.models.BoardUserSettings>`
"""
project = None
team = None
if team_context is not None:
if team_context.project_id:
project = team_context.project_id
else:
project = team_context.project
if team_context.team_id:
team = team_context.team_id
else:
team = team_context.team
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'string')
if team is not None:
route_values['team'] = self._serialize.url('team', team, 'string')
if board is not None:
route_values['board'] = self._serialize.url('board', board, 'str')
response = self._send(http_method='GET',
location_id='b30d9f58-1891-4b0a-b168-c46408f919b0',
version='4.0-preview.1',
route_values=route_values)
return self._deserialize('BoardUserSettings', response)
def update_board_user_settings(self, board_user_settings, team_context, board):
"""UpdateBoardUserSettings.
[Preview API] Update board user settings for the board id
:param {str} board_user_settings:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str board:
:rtype: :class:`<BoardUserSettings> <work.v4_0.models.BoardUserSettings>`
"""
project = None
team = None
if team_context is not None:
if team_context.project_id:
project = team_context.project_id
else:
project = team_context.project
if team_context.team_id:
team = team_context.team_id
else:
team = team_context.team
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'string')
if team is not None:
route_values['team'] = self._serialize.url('team', team, 'string')
if board is not None:
route_values['board'] = self._serialize.url('board', board, 'str')
content = self._serialize.body(board_user_settings, '{str}')
response = self._send(http_method='PATCH',
location_id='b30d9f58-1891-4b0a-b168-c46408f919b0',
version='4.0-preview.1',
route_values=route_values,
content=content)
return self._deserialize('BoardUserSettings', response)
def get_capacities(self, team_context, iteration_id):
"""GetCapacities.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id:
Get a team's capacity
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id: ID of the iteration
:rtype: [TeamMemberCapacity]
"""
project = None
@ -310,16 +208,17 @@ class WorkClient(VssClient):
route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str')
response = self._send(http_method='GET',
location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[TeamMemberCapacity]', self._unwrap_collection(response))
def get_capacity(self, team_context, iteration_id, team_member_id):
"""GetCapacity.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id:
:param str team_member_id:
:rtype: :class:`<TeamMemberCapacity> <work.v4_0.models.TeamMemberCapacity>`
Get a team member's capacity
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id: ID of the iteration
:param str team_member_id: ID of the team member
:rtype: :class:`<TeamMemberCapacity> <azure.devops.v5_0.work.models.TeamMemberCapacity>`
"""
project = None
team = None
@ -344,15 +243,16 @@ class WorkClient(VssClient):
route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str')
response = self._send(http_method='GET',
location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('TeamMemberCapacity', response)
def replace_capacities(self, capacities, team_context, iteration_id):
"""ReplaceCapacities.
:param [TeamMemberCapacity] capacities:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id:
Replace a team's capacity
:param [TeamMemberCapacity] capacities: Team capacity to replace
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id: ID of the iteration
:rtype: [TeamMemberCapacity]
"""
project = None
@ -377,18 +277,19 @@ class WorkClient(VssClient):
content = self._serialize.body(capacities, '[TeamMemberCapacity]')
response = self._send(http_method='PUT',
location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[TeamMemberCapacity]', self._unwrap_collection(response))
def update_capacity(self, patch, team_context, iteration_id, team_member_id):
"""UpdateCapacity.
:param :class:`<CapacityPatch> <work.v4_0.models.CapacityPatch>` patch:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id:
:param str team_member_id:
:rtype: :class:`<TeamMemberCapacity> <work.v4_0.models.TeamMemberCapacity>`
Update a team member's capacity
:param :class:`<CapacityPatch> <azure.devops.v5_0.work.models.CapacityPatch>` patch: Updated capacity
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id: ID of the iteration
:param str team_member_id: ID of the team member
:rtype: :class:`<TeamMemberCapacity> <azure.devops.v5_0.work.models.TeamMemberCapacity>`
"""
project = None
team = None
@ -414,17 +315,17 @@ class WorkClient(VssClient):
content = self._serialize.body(patch, 'CapacityPatch')
response = self._send(http_method='PATCH',
location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TeamMemberCapacity', response)
def get_board_card_rule_settings(self, team_context, board):
"""GetBoardCardRuleSettings.
[Preview API] Get board card Rule settings for the board id or board by name
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
Get board card Rule settings for the board id or board by name
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board:
:rtype: :class:`<BoardCardRuleSettings> <work.v4_0.models.BoardCardRuleSettings>`
:rtype: :class:`<BoardCardRuleSettings> <azure.devops.v5_0.work.models.BoardCardRuleSettings>`
"""
project = None
team = None
@ -447,17 +348,17 @@ class WorkClient(VssClient):
route_values['board'] = self._serialize.url('board', board, 'str')
response = self._send(http_method='GET',
location_id='b044a3d9-02ea-49c7-91a1-b730949cc896',
version='4.0-preview.1',
version='5.0',
route_values=route_values)
return self._deserialize('BoardCardRuleSettings', response)
def update_board_card_rule_settings(self, board_card_rule_settings, team_context, board):
"""UpdateBoardCardRuleSettings.
[Preview API] Update board card Rule settings for the board id or board by name
:param :class:`<BoardCardRuleSettings> <work.v4_0.models.BoardCardRuleSettings>` board_card_rule_settings:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
Update board card Rule settings for the board id or board by name
:param :class:`<BoardCardRuleSettings> <azure.devops.v5_0.work.models.BoardCardRuleSettings>` board_card_rule_settings:
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board:
:rtype: :class:`<BoardCardRuleSettings> <work.v4_0.models.BoardCardRuleSettings>`
:rtype: :class:`<BoardCardRuleSettings> <azure.devops.v5_0.work.models.BoardCardRuleSettings>`
"""
project = None
team = None
@ -481,7 +382,7 @@ class WorkClient(VssClient):
content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings')
response = self._send(http_method='PATCH',
location_id='b044a3d9-02ea-49c7-91a1-b730949cc896',
version='4.0-preview.1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('BoardCardRuleSettings', response)
@ -489,9 +390,9 @@ class WorkClient(VssClient):
def get_board_card_settings(self, team_context, board):
"""GetBoardCardSettings.
Get board card settings for the board id or board by name
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board:
:rtype: :class:`<BoardCardSettings> <work.v4_0.models.BoardCardSettings>`
:rtype: :class:`<BoardCardSettings> <azure.devops.v5_0.work.models.BoardCardSettings>`
"""
project = None
team = None
@ -514,17 +415,17 @@ class WorkClient(VssClient):
route_values['board'] = self._serialize.url('board', board, 'str')
response = self._send(http_method='GET',
location_id='07c3b467-bc60-4f05-8e34-599ce288fafc',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('BoardCardSettings', response)
def update_board_card_settings(self, board_card_settings_to_save, team_context, board):
"""UpdateBoardCardSettings.
Update board card settings for the board id or board by name
:param :class:`<BoardCardSettings> <work.v4_0.models.BoardCardSettings>` board_card_settings_to_save:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<BoardCardSettings> <azure.devops.v5_0.work.models.BoardCardSettings>` board_card_settings_to_save:
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board:
:rtype: :class:`<BoardCardSettings> <work.v4_0.models.BoardCardSettings>`
:rtype: :class:`<BoardCardSettings> <azure.devops.v5_0.work.models.BoardCardSettings>`
"""
project = None
team = None
@ -548,7 +449,7 @@ class WorkClient(VssClient):
content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings')
response = self._send(http_method='PUT',
location_id='07c3b467-bc60-4f05-8e34-599ce288fafc',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('BoardCardSettings', response)
@ -556,10 +457,10 @@ class WorkClient(VssClient):
def get_board_chart(self, team_context, board, name):
"""GetBoardChart.
Get a board chart
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id
:param str name: The chart name
:rtype: :class:`<BoardChart> <work.v4_0.models.BoardChart>`
:rtype: :class:`<BoardChart> <azure.devops.v5_0.work.models.BoardChart>`
"""
project = None
team = None
@ -584,14 +485,14 @@ class WorkClient(VssClient):
route_values['name'] = self._serialize.url('name', name, 'str')
response = self._send(http_method='GET',
location_id='45fe888c-239e-49fd-958c-df1a1ab21d97',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('BoardChart', response)
def get_board_charts(self, team_context, board):
"""GetBoardCharts.
Get board charts
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id
:rtype: [BoardChartReference]
"""
@ -616,18 +517,18 @@ class WorkClient(VssClient):
route_values['board'] = self._serialize.url('board', board, 'str')
response = self._send(http_method='GET',
location_id='45fe888c-239e-49fd-958c-df1a1ab21d97',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[BoardChartReference]', self._unwrap_collection(response))
def update_board_chart(self, chart, team_context, board, name):
"""UpdateBoardChart.
Update a board chart
:param :class:`<BoardChart> <work.v4_0.models.BoardChart>` chart:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param :class:`<BoardChart> <azure.devops.v5_0.work.models.BoardChart>` chart:
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id
:param str name: The chart name
:rtype: :class:`<BoardChart> <work.v4_0.models.BoardChart>`
:rtype: :class:`<BoardChart> <azure.devops.v5_0.work.models.BoardChart>`
"""
project = None
team = None
@ -653,15 +554,16 @@ class WorkClient(VssClient):
content = self._serialize.body(chart, 'BoardChart')
response = self._send(http_method='PATCH',
location_id='45fe888c-239e-49fd-958c-df1a1ab21d97',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('BoardChart', response)
def get_board_columns(self, team_context, board):
"""GetBoardColumns.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str board:
Get columns on a board
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Name or ID of the specific board
:rtype: [BoardColumn]
"""
project = None
@ -685,15 +587,16 @@ class WorkClient(VssClient):
route_values['board'] = self._serialize.url('board', board, 'str')
response = self._send(http_method='GET',
location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[BoardColumn]', self._unwrap_collection(response))
def update_board_columns(self, board_columns, team_context, board):
"""UpdateBoardColumns.
:param [BoardColumn] board_columns:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str board:
Update columns on a board
:param [BoardColumn] board_columns: List of board columns to update
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Name or ID of the specific board
:rtype: [BoardColumn]
"""
project = None
@ -718,20 +621,20 @@ class WorkClient(VssClient):
content = self._serialize.body(board_columns, '[BoardColumn]')
response = self._send(http_method='PUT',
location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[BoardColumn]', self._unwrap_collection(response))
def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None):
"""GetDeliveryTimelineData.
[Preview API] Get Delivery View Data
Get Delivery View Data
:param str project: Project ID or project name
:param str id: Identifier for delivery view
:param int revision: Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision.
:param datetime start_date: The start date of timeline
:param datetime end_date: The end date of timeline
:rtype: :class:`<DeliveryViewData> <work.v4_0.models.DeliveryViewData>`
:rtype: :class:`<DeliveryViewData> <azure.devops.v5_0.work.models.DeliveryViewData>`
"""
route_values = {}
if project is not None:
@ -747,15 +650,16 @@ class WorkClient(VssClient):
query_parameters['endDate'] = self._serialize.query('end_date', end_date, 'iso-8601')
response = self._send(http_method='GET',
location_id='bdd0834e-101f-49f0-a6ae-509f384a12b4',
version='4.0-preview.1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('DeliveryViewData', response)
def delete_team_iteration(self, team_context, id):
"""DeleteTeamIteration.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str id:
Delete a team's iteration by iterationId
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str id: ID of the iteration
"""
project = None
team = None
@ -778,14 +682,15 @@ class WorkClient(VssClient):
route_values['id'] = self._serialize.url('id', id, 'str')
self._send(http_method='DELETE',
location_id='c9175577-28a1-4b06-9197-8636af9f64ad',
version='4.0',
version='5.0',
route_values=route_values)
def get_team_iteration(self, team_context, id):
"""GetTeamIteration.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str id:
:rtype: :class:`<TeamSettingsIteration> <work.v4_0.models.TeamSettingsIteration>`
Get team's iteration by iterationId
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str id: ID of the iteration
:rtype: :class:`<TeamSettingsIteration> <azure.devops.v5_0.work.models.TeamSettingsIteration>`
"""
project = None
team = None
@ -808,14 +713,15 @@ class WorkClient(VssClient):
route_values['id'] = self._serialize.url('id', id, 'str')
response = self._send(http_method='GET',
location_id='c9175577-28a1-4b06-9197-8636af9f64ad',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('TeamSettingsIteration', response)
def get_team_iterations(self, team_context, timeframe=None):
"""GetTeamIterations.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str timeframe:
Get a team's iterations using timeframe filter
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str timeframe: A filter for which iterations are returned based on relative time. Only Current is supported currently.
:rtype: [TeamSettingsIteration]
"""
project = None
@ -840,16 +746,17 @@ class WorkClient(VssClient):
query_parameters['$timeframe'] = self._serialize.query('timeframe', timeframe, 'str')
response = self._send(http_method='GET',
location_id='c9175577-28a1-4b06-9197-8636af9f64ad',
version='4.0',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TeamSettingsIteration]', self._unwrap_collection(response))
def post_team_iteration(self, iteration, team_context):
"""PostTeamIteration.
:param :class:`<TeamSettingsIteration> <work.v4_0.models.TeamSettingsIteration>` iteration:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamSettingsIteration> <work.v4_0.models.TeamSettingsIteration>`
Add an iteration to the team
:param :class:`<TeamSettingsIteration> <azure.devops.v5_0.work.models.TeamSettingsIteration>` iteration: Iteration to add
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamSettingsIteration> <azure.devops.v5_0.work.models.TeamSettingsIteration>`
"""
project = None
team = None
@ -871,17 +778,17 @@ class WorkClient(VssClient):
content = self._serialize.body(iteration, 'TeamSettingsIteration')
response = self._send(http_method='POST',
location_id='c9175577-28a1-4b06-9197-8636af9f64ad',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TeamSettingsIteration', response)
def create_plan(self, posted_plan, project):
"""CreatePlan.
[Preview API] Add a new plan for the team
:param :class:`<CreatePlan> <work.v4_0.models.CreatePlan>` posted_plan: Plan definition
Add a new plan for the team
:param :class:`<CreatePlan> <azure.devops.v5_0.work.models.CreatePlan>` posted_plan: Plan definition
:param str project: Project ID or project name
:rtype: :class:`<Plan> <work.v4_0.models.Plan>`
:rtype: :class:`<Plan> <azure.devops.v5_0.work.models.Plan>`
"""
route_values = {}
if project is not None:
@ -889,14 +796,14 @@ class WorkClient(VssClient):
content = self._serialize.body(posted_plan, 'CreatePlan')
response = self._send(http_method='POST',
location_id='0b42cb47-cd73-4810-ac90-19c9ba147453',
version='4.0-preview.1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Plan', response)
def delete_plan(self, project, id):
"""DeletePlan.
[Preview API] Delete the specified plan
Delete the specified plan
:param str project: Project ID or project name
:param str id: Identifier of the plan
"""
@ -907,15 +814,15 @@ class WorkClient(VssClient):
route_values['id'] = self._serialize.url('id', id, 'str')
self._send(http_method='DELETE',
location_id='0b42cb47-cd73-4810-ac90-19c9ba147453',
version='4.0-preview.1',
version='5.0',
route_values=route_values)
def get_plan(self, project, id):
"""GetPlan.
[Preview API] Get the information for the specified plan
Get the information for the specified plan
:param str project: Project ID or project name
:param str id: Identifier of the plan
:rtype: :class:`<Plan> <work.v4_0.models.Plan>`
:rtype: :class:`<Plan> <azure.devops.v5_0.work.models.Plan>`
"""
route_values = {}
if project is not None:
@ -924,13 +831,13 @@ class WorkClient(VssClient):
route_values['id'] = self._serialize.url('id', id, 'str')
response = self._send(http_method='GET',
location_id='0b42cb47-cd73-4810-ac90-19c9ba147453',
version='4.0-preview.1',
version='5.0',
route_values=route_values)
return self._deserialize('Plan', response)
def get_plans(self, project):
"""GetPlans.
[Preview API] Get the information for all the plans configured for the given team
Get the information for all the plans configured for the given team
:param str project: Project ID or project name
:rtype: [Plan]
"""
@ -939,17 +846,17 @@ class WorkClient(VssClient):
route_values['project'] = self._serialize.url('project', project, 'str')
response = self._send(http_method='GET',
location_id='0b42cb47-cd73-4810-ac90-19c9ba147453',
version='4.0-preview.1',
version='5.0',
route_values=route_values)
return self._deserialize('[Plan]', self._unwrap_collection(response))
def update_plan(self, updated_plan, project, id):
"""UpdatePlan.
[Preview API] Update the information for the specified plan
:param :class:`<UpdatePlan> <work.v4_0.models.UpdatePlan>` updated_plan: Plan definition to be updated
Update the information for the specified plan
:param :class:`<UpdatePlan> <azure.devops.v5_0.work.models.UpdatePlan>` updated_plan: Plan definition to be updated
:param str project: Project ID or project name
:param str id: Identifier of the plan
:rtype: :class:`<Plan> <work.v4_0.models.Plan>`
:rtype: :class:`<Plan> <azure.devops.v5_0.work.models.Plan>`
"""
route_values = {}
if project is not None:
@ -959,30 +866,16 @@ class WorkClient(VssClient):
content = self._serialize.body(updated_plan, 'UpdatePlan')
response = self._send(http_method='PUT',
location_id='0b42cb47-cd73-4810-ac90-19c9ba147453',
version='4.0-preview.1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('Plan', response)
def get_process_configuration(self, project):
"""GetProcessConfiguration.
[Preview API]
:param str project: Project ID or project name
:rtype: :class:`<ProcessConfiguration> <work.v4_0.models.ProcessConfiguration>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
response = self._send(http_method='GET',
location_id='f901ba42-86d2-4b0c-89c1-3f86d06daa84',
version='4.0-preview.1',
route_values=route_values)
return self._deserialize('ProcessConfiguration', response)
def get_board_rows(self, team_context, board):
"""GetBoardRows.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str board:
Get rows on a board
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Name or ID of the specific board
:rtype: [BoardRow]
"""
project = None
@ -1006,15 +899,16 @@ class WorkClient(VssClient):
route_values['board'] = self._serialize.url('board', board, 'str')
response = self._send(http_method='GET',
location_id='0863355d-aefd-4d63-8669-984c9b7b0e78',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('[BoardRow]', self._unwrap_collection(response))
def update_board_rows(self, board_rows, team_context, board):
"""UpdateBoardRows.
:param [BoardRow] board_rows:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str board:
Update rows on a board
:param [BoardRow] board_rows: List of board rows to update
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str board: Name or ID of the specific board
:rtype: [BoardRow]
"""
project = None
@ -1039,16 +933,17 @@ class WorkClient(VssClient):
content = self._serialize.body(board_rows, '[BoardRow]')
response = self._send(http_method='PUT',
location_id='0863355d-aefd-4d63-8669-984c9b7b0e78',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('[BoardRow]', self._unwrap_collection(response))
def get_team_days_off(self, team_context, iteration_id):
"""GetTeamDaysOff.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id:
:rtype: :class:`<TeamSettingsDaysOff> <work.v4_0.models.TeamSettingsDaysOff>`
Get team's days off for an iteration
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id: ID of the iteration
:rtype: :class:`<TeamSettingsDaysOff> <azure.devops.v5_0.work.models.TeamSettingsDaysOff>`
"""
project = None
team = None
@ -1071,16 +966,17 @@ class WorkClient(VssClient):
route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str')
response = self._send(http_method='GET',
location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('TeamSettingsDaysOff', response)
def update_team_days_off(self, days_off_patch, team_context, iteration_id):
"""UpdateTeamDaysOff.
:param :class:`<TeamSettingsDaysOffPatch> <work.v4_0.models.TeamSettingsDaysOffPatch>` days_off_patch:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id:
:rtype: :class:`<TeamSettingsDaysOff> <work.v4_0.models.TeamSettingsDaysOff>`
Set a team's days off for an iteration
:param :class:`<TeamSettingsDaysOffPatch> <azure.devops.v5_0.work.models.TeamSettingsDaysOffPatch>` days_off_patch: Team's days off patch containting a list of start and end dates
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:param str iteration_id: ID of the iteration
:rtype: :class:`<TeamSettingsDaysOff> <azure.devops.v5_0.work.models.TeamSettingsDaysOff>`
"""
project = None
team = None
@ -1104,15 +1000,16 @@ class WorkClient(VssClient):
content = self._serialize.body(days_off_patch, 'TeamSettingsDaysOffPatch')
response = self._send(http_method='PATCH',
location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TeamSettingsDaysOff', response)
def get_team_field_values(self, team_context):
"""GetTeamFieldValues.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamFieldValues> <work.v4_0.models.TeamFieldValues>`
Get a collection of team field values
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamFieldValues> <azure.devops.v5_0.work.models.TeamFieldValues>`
"""
project = None
team = None
@ -1133,15 +1030,16 @@ class WorkClient(VssClient):
route_values['team'] = self._serialize.url('team', team, 'string')
response = self._send(http_method='GET',
location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('TeamFieldValues', response)
def update_team_field_values(self, patch, team_context):
"""UpdateTeamFieldValues.
:param :class:`<TeamFieldValuesPatch> <work.v4_0.models.TeamFieldValuesPatch>` patch:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamFieldValues> <work.v4_0.models.TeamFieldValues>`
Update team field values
:param :class:`<TeamFieldValuesPatch> <azure.devops.v5_0.work.models.TeamFieldValuesPatch>` patch:
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamFieldValues> <azure.devops.v5_0.work.models.TeamFieldValues>`
"""
project = None
team = None
@ -1163,15 +1061,16 @@ class WorkClient(VssClient):
content = self._serialize.body(patch, 'TeamFieldValuesPatch')
response = self._send(http_method='PATCH',
location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TeamFieldValues', response)
def get_team_settings(self, team_context):
"""GetTeamSettings.
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamSetting> <work.v4_0.models.TeamSetting>`
Get a team's settings
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamSetting> <azure.devops.v5_0.work.models.TeamSetting>`
"""
project = None
team = None
@ -1192,15 +1091,16 @@ class WorkClient(VssClient):
route_values['team'] = self._serialize.url('team', team, 'string')
response = self._send(http_method='GET',
location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c',
version='4.0',
version='5.0',
route_values=route_values)
return self._deserialize('TeamSetting', response)
def update_team_settings(self, team_settings_patch, team_context):
"""UpdateTeamSettings.
:param :class:`<TeamSettingsPatch> <work.v4_0.models.TeamSettingsPatch>` team_settings_patch:
:param :class:`<TeamContext> <work.v4_0.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamSetting> <work.v4_0.models.TeamSetting>`
Update a team's settings
:param :class:`<TeamSettingsPatch> <azure.devops.v5_0.work.models.TeamSettingsPatch>` team_settings_patch: TeamSettings changes
:param :class:`<TeamContext> <azure.devops.v5_0.work.models.TeamContext>` team_context: The team context for the operation
:rtype: :class:`<TeamSetting> <azure.devops.v5_0.work.models.TeamSetting>`
"""
project = None
team = None
@ -1222,7 +1122,7 @@ class WorkClient(VssClient):
content = self._serialize.body(team_settings_patch, 'TeamSettingsPatch')
response = self._send(http_method='PATCH',
location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c',
version='4.0',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('TeamSetting', response)

Просмотреть файл

@ -0,0 +1,84 @@
# --------------------------------------------------------------------------------------------
# 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_0.work_item_tracking.models import *
from .work_item_tracking_client import WorkItemTrackingClient
__all__ = [
'AccountMyWorkResult',
'AccountRecentActivityWorkItemModel',
'AccountRecentMentionWorkItemModel',
'AccountWorkWorkItemModel',
'ArtifactUriQuery',
'ArtifactUriQueryResult',
'AttachmentReference',
'FieldDependentRule',
'FieldsToEvaluate',
'GraphSubjectBase',
'IdentityRef',
'IdentityReference',
'JsonPatchOperation',
'Link',
'ProjectWorkItemStateColors',
'ProvisioningResult',
'QueryBatchGetRequest',
'QueryHierarchyItem',
'QueryHierarchyItemsResult',
'ReferenceLinks',
'ReportingWorkItemLinksBatch',
'ReportingWorkItemRevisionsBatch',
'ReportingWorkItemRevisionsFilter',
'StreamedBatch',
'TeamContext',
'Wiql',
'WorkArtifactLink',
'WorkItem',
'WorkItemBatchGetRequest',
'WorkItemClassificationNode',
'WorkItemComment',
'WorkItemComments',
'WorkItemDelete',
'WorkItemDeleteReference',
'WorkItemDeleteShallowReference',
'WorkItemDeleteUpdate',
'WorkItemField',
'WorkItemFieldOperation',
'WorkItemFieldReference',
'WorkItemFieldUpdate',
'WorkItemHistory',
'WorkItemIcon',
'WorkItemLink',
'WorkItemNextStateOnTransition',
'WorkItemQueryClause',
'WorkItemQueryResult',
'WorkItemQuerySortColumn',
'WorkItemReference',
'WorkItemRelation',
'WorkItemRelationType',
'WorkItemRelationUpdates',
'WorkItemStateColor',
'WorkItemStateTransition',
'WorkItemTemplate',
'WorkItemTemplateReference',
'WorkItemTrackingReference',
'WorkItemTrackingResource',
'WorkItemTrackingResourceReference',
'WorkItemType',
'WorkItemTypeCategory',
'WorkItemTypeColor',
'WorkItemTypeColorAndIcon',
'WorkItemTypeFieldInstance',
'WorkItemTypeFieldInstanceBase',
'WorkItemTypeFieldWithReferences',
'WorkItemTypeReference',
'WorkItemTypeStateColors',
'WorkItemTypeTemplate',
'WorkItemTypeTemplateUpdateModel',
'WorkItemUpdate',
'WorkItemTrackingClient'
]

Просмотреть файл

@ -0,0 +1,17 @@
# --------------------------------------------------------------------------------------------
# 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 .models import *
from .accounts_client import AccountsClient
__all__ = [
'Account',
'AccountCreateInfoInternal',
'AccountPreferencesInternal',
'AccountsClient'
]

Просмотреть файл

@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from ...client import Client
from . import models
class AccountsClient(VssClient):
class AccountsClient(Client):
"""Accounts
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -42,7 +42,7 @@ class AccountsClient(VssClient):
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
response = self._send(http_method='GET',
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
version='4.1',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Account]', self._unwrap_collection(response))

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,11 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class Account(Model):
"""Account.
@ -43,7 +41,7 @@ class Account(Model):
:param organization_name: Organization that created the account
:type organization_name: str
:param properties: Extended properties
:type properties: :class:`object <accounts.v4_1.models.object>`
:type properties: :class:`object <azure.devops.v5_0.accounts.models.object>`
:param status_reason: Reason for current status
:type status_reason: str
"""
@ -87,7 +85,6 @@ class Account(Model):
self.status_reason = status_reason
class AccountCreateInfoInternal(Model):
"""AccountCreateInfoInternal.
@ -98,9 +95,9 @@ class AccountCreateInfoInternal(Model):
:param organization:
:type organization: str
:param preferences:
:type preferences: :class:`AccountPreferencesInternal <accounts.v4_1.models.AccountPreferencesInternal>`
:type preferences: :class:`AccountPreferencesInternal <azure.devops.v5_0.accounts.models.AccountPreferencesInternal>`
:param properties:
:type properties: :class:`object <accounts.v4_1.models.object>`
:type properties: :class:`object <azure.devops.v5_0.accounts.models.object>`
:param service_definitions:
:type service_definitions: list of { key: str; value: str }
"""
@ -124,7 +121,6 @@ class AccountCreateInfoInternal(Model):
self.service_definitions = service_definitions
class AccountPreferencesInternal(Model):
"""AccountPreferencesInternal.
@ -147,3 +143,10 @@ class AccountPreferencesInternal(Model):
self.culture = culture
self.language = language
self.time_zone = time_zone
__all__ = [
'Account',
'AccountCreateInfoInternal',
'AccountPreferencesInternal',
]

Просмотреть файл

@ -0,0 +1,40 @@
# --------------------------------------------------------------------------------------------
# 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 .models import *
from .boards_client import BoardsClient
__all__ = [
'Board',
'BoardColumn',
'BoardColumnBase',
'BoardColumnCollectionResponse',
'BoardColumnCreate',
'BoardColumnResponse',
'BoardColumnUpdate',
'BoardItem',
'BoardItemCollectionResponse',
'BoardItemIdAndType',
'BoardItemReference',
'BoardItemResponse',
'BoardReference',
'BoardResponse',
'BoardRow',
'BoardRowBase',
'BoardRowCollectionResponse',
'BoardRowCreate',
'BoardRowResponse',
'BoardRowUpdate',
'CreateBoard',
'EntityReference',
'NewBoardItem',
'ReferenceLinks',
'UpdateBoard',
'UpdateBoardItem',
'BoardsClient'
]

Просмотреть файл

@ -0,0 +1,27 @@
# --------------------------------------------------------------------------------------------
# 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 . import models
class BoardsClient(Client):
"""Boards
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
"""
def __init__(self, base_url=None, creds=None):
super(BoardsClient, 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 = '11635d5f-a4f9-43ea-a48b-d56be43fee0f'

Просмотреть файл

@ -0,0 +1,644 @@
# --------------------------------------------------------------------------------------------
# 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.serialization import Model
class BoardColumnBase(Model):
"""BoardColumnBase.
:param description: Board column description.
:type description: str
:param name: Name of the column.
:type name: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, description=None, name=None):
super(BoardColumnBase, self).__init__()
self.description = description
self.name = name
class BoardColumnCollectionResponse(Model):
"""BoardColumnCollectionResponse.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param board_columns: The resulting collection of BoardColumn.
:type board_columns: list of :class:`BoardColumn <azure.devops.v5_0.boards.models.BoardColumn>`
:param eTag: The last change date and time for all the columns in the collection.
:type eTag: list of str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'board_columns': {'key': 'boardColumns', 'type': '[BoardColumn]'},
'eTag': {'key': 'eTag', 'type': '[str]'}
}
def __init__(self, _links=None, board_columns=None, eTag=None):
super(BoardColumnCollectionResponse, self).__init__()
self._links = _links
self.board_columns = board_columns
self.eTag = eTag
class BoardColumnCreate(BoardColumnBase):
"""BoardColumnCreate.
:param description: Board column description.
:type description: str
:param name: Name of the column.
:type name: str
:param next_column_id: Next column identifier or supported directive: $first or $last.
:type next_column_id: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'next_column_id': {'key': 'nextColumnId', 'type': 'str'}
}
def __init__(self, description=None, name=None, next_column_id=None):
super(BoardColumnCreate, self).__init__(description=description, name=name)
self.next_column_id = next_column_id
class BoardColumnResponse(Model):
"""BoardColumnResponse.
:param board_column: The resulting BoardColumn.
:type board_column: :class:`BoardColumn <azure.devops.v5_0.boards.models.BoardColumn>`
:param eTag: The last change date and time for all the columns in the collection.
:type eTag: list of str
"""
_attribute_map = {
'board_column': {'key': 'boardColumn', 'type': 'BoardColumn'},
'eTag': {'key': 'eTag', 'type': '[str]'}
}
def __init__(self, board_column=None, eTag=None):
super(BoardColumnResponse, self).__init__()
self.board_column = board_column
self.eTag = eTag
class BoardColumnUpdate(BoardColumnCreate):
"""BoardColumnUpdate.
:param description: Board column description.
:type description: str
:param next_column_id: Next column identifier or supported directive: $first or $last.
:type next_column_id: str
:param name: Name of the column.
:type name: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'next_column_id': {'key': 'nextColumnId', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, description=None, next_column_id=None, name=None):
super(BoardColumnUpdate, self).__init__(description=description, next_column_id=next_column_id)
self.name = name
class BoardItemCollectionResponse(Model):
"""BoardItemCollectionResponse.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param board_items: The resulting collection of BoardItem.
:type board_items: list of :class:`BoardItem <azure.devops.v5_0.boards.models.BoardItem>`
:param eTag: The last change date and time for all items in the collection.
:type eTag: list of str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'board_items': {'key': 'boardItems', 'type': '[BoardItem]'},
'eTag': {'key': 'eTag', 'type': '[str]'}
}
def __init__(self, _links=None, board_items=None, eTag=None):
super(BoardItemCollectionResponse, self).__init__()
self._links = _links
self.board_items = board_items
self.eTag = eTag
class BoardItemIdAndType(Model):
"""BoardItemIdAndType.
:param item_id: Item id.
:type item_id: str
:param item_type: Item type.
:type item_type: str
"""
_attribute_map = {
'item_id': {'key': 'itemId', 'type': 'str'},
'item_type': {'key': 'itemType', 'type': 'str'}
}
def __init__(self, item_id=None, item_type=None):
super(BoardItemIdAndType, self).__init__()
self.item_id = item_id
self.item_type = item_type
class BoardItemReference(BoardItemIdAndType):
"""BoardItemReference.
:param item_id: Item id.
:type item_id: str
:param item_type: Item type.
:type item_type: str
:param unique_id: Board's unique identifier. Compound identifier generated using the item identifier and item type.
:type unique_id: str
:param url: Full http link to the resource.
:type url: str
"""
_attribute_map = {
'item_id': {'key': 'itemId', 'type': 'str'},
'item_type': {'key': 'itemType', 'type': 'str'},
'unique_id': {'key': 'uniqueId', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, item_id=None, item_type=None, unique_id=None, url=None):
super(BoardItemReference, self).__init__(item_id=item_id, item_type=item_type)
self.unique_id = unique_id
self.url = url
class BoardItemResponse(Model):
"""BoardItemResponse.
:param eTag: The last changed date for the board item.
:type eTag: list of str
:param item: The resulting BoardItem.
:type item: :class:`BoardItem <azure.devops.v5_0.boards.models.BoardItem>`
"""
_attribute_map = {
'eTag': {'key': 'eTag', 'type': '[str]'},
'item': {'key': 'item', 'type': 'BoardItem'}
}
def __init__(self, eTag=None, item=None):
super(BoardItemResponse, self).__init__()
self.eTag = eTag
self.item = item
class BoardResponse(Model):
"""BoardResponse.
:param board: The resulting Board.
:type board: :class:`Board <azure.devops.v5_0.boards.models.Board>`
:param eTag: The last date and time the board was changed.
:type eTag: list of str
"""
_attribute_map = {
'board': {'key': 'board', 'type': 'Board'},
'eTag': {'key': 'eTag', 'type': '[str]'}
}
def __init__(self, board=None, eTag=None):
super(BoardResponse, self).__init__()
self.board = board
self.eTag = eTag
class BoardRowBase(Model):
"""BoardRowBase.
:param name: Row name.
:type name: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, name=None):
super(BoardRowBase, self).__init__()
self.name = name
class BoardRowCollectionResponse(Model):
"""BoardRowCollectionResponse.
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param board_rows: The resulting collection of BoardRow.
:type board_rows: list of :class:`BoardRow <azure.devops.v5_0.boards.models.BoardRow>`
:param eTag: The last change date and time for all the rows in the collection.
:type eTag: list of str
"""
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'board_rows': {'key': 'boardRows', 'type': '[BoardRow]'},
'eTag': {'key': 'eTag', 'type': '[str]'}
}
def __init__(self, _links=None, board_rows=None, eTag=None):
super(BoardRowCollectionResponse, self).__init__()
self._links = _links
self.board_rows = board_rows
self.eTag = eTag
class BoardRowCreate(BoardRowBase):
"""BoardRowCreate.
:param name: Row name.
:type name: str
:param next_row_id: Next row identifier or supported directive: $first or $last.
:type next_row_id: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'next_row_id': {'key': 'nextRowId', 'type': 'str'}
}
def __init__(self, name=None, next_row_id=None):
super(BoardRowCreate, self).__init__(name=name)
self.next_row_id = next_row_id
class BoardRowResponse(Model):
"""BoardRowResponse.
:param board_row: The resulting collection of BoardRow.
:type board_row: :class:`BoardRow <azure.devops.v5_0.boards.models.BoardRow>`
:param eTag: The last change date and time for all the rows in the collection.
:type eTag: list of str
"""
_attribute_map = {
'board_row': {'key': 'boardRow', 'type': 'BoardRow'},
'eTag': {'key': 'eTag', 'type': '[str]'}
}
def __init__(self, board_row=None, eTag=None):
super(BoardRowResponse, self).__init__()
self.board_row = board_row
self.eTag = eTag
class BoardRowUpdate(BoardRowCreate):
"""BoardRowUpdate.
:param name: Row name.
:type name: str
:param next_row_id: Next row identifier or supported directive: $first or $last.
:type next_row_id: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'next_row_id': {'key': 'nextRowId', 'type': 'str'},
}
def __init__(self, name=None, next_row_id=None):
super(BoardRowUpdate, self).__init__(name=name, next_row_id=next_row_id)
class CreateBoard(Model):
"""CreateBoard.
:param description: Description of the board.
:type description: str
:param name: Name of the board to create.
:type name: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, description=None, name=None):
super(CreateBoard, self).__init__()
self.description = description
self.name = name
class EntityReference(Model):
"""EntityReference.
:param name: Name of the resource.
:type name: str
:param url: Full http link to the resource.
:type url: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, name=None, url=None):
super(EntityReference, self).__init__()
self.name = name
self.url = url
class NewBoardItem(BoardItemIdAndType):
"""NewBoardItem.
:param item_id: Item id.
:type item_id: str
:param item_type: Item type.
:type item_type: str
:param column_id: Board column identifier.
:type column_id: str
:param next_item_unique_id: Next item unique identifier or supported directive: $first or $last.
:type next_item_unique_id: str
:param row_id: Board row identifier.
:type row_id: str
"""
_attribute_map = {
'item_id': {'key': 'itemId', 'type': 'str'},
'item_type': {'key': 'itemType', 'type': 'str'},
'column_id': {'key': 'columnId', 'type': 'str'},
'next_item_unique_id': {'key': 'nextItemUniqueId', 'type': 'str'},
'row_id': {'key': 'rowId', 'type': 'str'}
}
def __init__(self, item_id=None, item_type=None, column_id=None, next_item_unique_id=None, row_id=None):
super(NewBoardItem, self).__init__(item_id=item_id, item_type=item_type)
self.column_id = column_id
self.next_item_unique_id = next_item_unique_id
self.row_id = row_id
class ReferenceLinks(Model):
"""ReferenceLinks.
:param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.
:type links: dict
"""
_attribute_map = {
'links': {'key': 'links', 'type': '{object}'}
}
def __init__(self, links=None):
super(ReferenceLinks, self).__init__()
self.links = links
class UpdateBoard(Model):
"""UpdateBoard.
:param description: New description of the board.
:type description: str
:param name: New name of the board.
:type name: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'}
}
def __init__(self, description=None, name=None):
super(UpdateBoard, self).__init__()
self.description = description
self.name = name
class UpdateBoardItem(Model):
"""UpdateBoardItem.
:param column_id: Board column identifier.
:type column_id: str
:param next_item_unique_id: Next unique item identifier or supported directive: $first or $last.
:type next_item_unique_id: str
:param row_id: Board row identifier.
:type row_id: str
"""
_attribute_map = {
'column_id': {'key': 'columnId', 'type': 'str'},
'next_item_unique_id': {'key': 'nextItemUniqueId', 'type': 'str'},
'row_id': {'key': 'rowId', 'type': 'str'}
}
def __init__(self, column_id=None, next_item_unique_id=None, row_id=None):
super(UpdateBoardItem, self).__init__()
self.column_id = column_id
self.next_item_unique_id = next_item_unique_id
self.row_id = row_id
class BoardColumn(BoardColumnBase):
"""BoardColumn.
:param description: Board column description.
:type description: str
:param name: Name of the column.
:type name: str
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param id: Id of the resource.
:type id: str
:param next_column_id: Next column identifier.
:type next_column_id: str
:param url: Full http link to the resource.
:type url: str
"""
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'id': {'key': 'id', 'type': 'str'},
'next_column_id': {'key': 'nextColumnId', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, description=None, name=None, _links=None, id=None, next_column_id=None, url=None):
super(BoardColumn, self).__init__(description=description, name=name)
self._links = _links
self.id = id
self.next_column_id = next_column_id
self.url = url
class BoardItem(BoardItemReference):
"""BoardItem.
:param item_id: Item id.
:type item_id: str
:param item_type: Item type.
:type item_type: str
:param unique_id: Board's unique identifier. Compound identifier generated using the item identifier and item type.
:type unique_id: str
:param url: Full http link to the resource.
:type url: str
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param board_id: Board id for this item.
:type board_id: int
:param column: Board column id for this item.
:type column: str
:param next_item_unique_id: Next item unique identifier.
:type next_item_unique_id: str
:param row: Board row id for this item.
:type row: str
"""
_attribute_map = {
'item_id': {'key': 'itemId', 'type': 'str'},
'item_type': {'key': 'itemType', 'type': 'str'},
'unique_id': {'key': 'uniqueId', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'board_id': {'key': 'boardId', 'type': 'int'},
'column': {'key': 'column', 'type': 'str'},
'next_item_unique_id': {'key': 'nextItemUniqueId', 'type': 'str'},
'row': {'key': 'row', 'type': 'str'}
}
def __init__(self, item_id=None, item_type=None, unique_id=None, url=None, _links=None, board_id=None, column=None, next_item_unique_id=None, row=None):
super(BoardItem, self).__init__(item_id=item_id, item_type=item_type, unique_id=unique_id, url=url)
self._links = _links
self.board_id = board_id
self.column = column
self.next_item_unique_id = next_item_unique_id
self.row = row
class BoardReference(EntityReference):
"""BoardReference.
:param name: Name of the resource.
:type name: str
:param url: Full http link to the resource.
:type url: str
:param id: Id of the resource.
:type id: int
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'}
}
def __init__(self, name=None, url=None, id=None):
super(BoardReference, self).__init__(name=name, url=url)
self.id = id
class BoardRow(BoardRowBase):
"""BoardRow.
:param name: Row name.
:type name: str
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param id: Id of the resource.
:type id: str
:param next_row_id: Next row identifier.
:type next_row_id: str
:param url: Full http link to the resource.
:type url: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'id': {'key': 'id', 'type': 'str'},
'next_row_id': {'key': 'nextRowId', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}
def __init__(self, name=None, _links=None, id=None, next_row_id=None, url=None):
super(BoardRow, self).__init__(name=name)
self._links = _links
self.id = id
self.next_row_id = next_row_id
self.url = url
class Board(BoardReference):
"""Board.
:param name: Name of the resource.
:type name: str
:param url: Full http link to the resource.
:type url: str
:param id: Id of the resource.
:type id: int
:param _links: Links to other related objects.
:type _links: :class:`ReferenceLinks <azure.devops.v5_0.boards.models.ReferenceLinks>`
:param description: Description of the board.
:type description: str
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'id': {'key': 'id', 'type': 'int'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'description': {'key': 'description', 'type': 'str'}
}
def __init__(self, name=None, url=None, id=None, _links=None, description=None):
super(Board, self).__init__(name=name, url=url, id=id)
self._links = _links
self.description = description
__all__ = [
'BoardColumnBase',
'BoardColumnCollectionResponse',
'BoardColumnCreate',
'BoardColumnResponse',
'BoardColumnUpdate',
'BoardItemCollectionResponse',
'BoardItemIdAndType',
'BoardItemReference',
'BoardItemResponse',
'BoardResponse',
'BoardRowBase',
'BoardRowCollectionResponse',
'BoardRowCreate',
'BoardRowResponse',
'BoardRowUpdate',
'CreateBoard',
'EntityReference',
'NewBoardItem',
'ReferenceLinks',
'UpdateBoard',
'UpdateBoardItem',
'BoardColumn',
'BoardItem',
'BoardReference',
'BoardRow',
'Board',
]

Просмотреть файл

@ -0,0 +1,89 @@
# --------------------------------------------------------------------------------------------
# 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 .models import *
from .build_client import BuildClient
__all__ = [
'AgentPoolQueue',
'AggregatedResultsAnalysis',
'AggregatedResultsByOutcome',
'AggregatedResultsDifference',
'AggregatedRunsByOutcome',
'AggregatedRunsByState',
'ArtifactResource',
'AssociatedWorkItem',
'Attachment',
'AuthorizationHeader',
'Build',
'BuildArtifact',
'BuildBadge',
'BuildController',
'BuildDefinition',
'BuildDefinition3_2',
'BuildDefinitionReference',
'BuildDefinitionReference3_2',
'BuildDefinitionRevision',
'BuildDefinitionStep',
'BuildDefinitionTemplate',
'BuildDefinitionTemplate3_2',
'BuildDefinitionVariable',
'BuildLog',
'BuildLogReference',
'BuildMetric',
'BuildOption',
'BuildOptionDefinition',
'BuildOptionDefinitionReference',
'BuildOptionGroupDefinition',
'BuildOptionInputDefinition',
'BuildReportMetadata',
'BuildRepository',
'BuildRequestValidationResult',
'BuildResourceUsage',
'BuildSettings',
'Change',
'DataSourceBindingBase',
'DefinitionReference',
'DefinitionResourceReference',
'Deployment',
'Folder',
'GraphSubjectBase',
'IdentityRef',
'Issue',
'JsonPatchOperation',
'ProcessParameters',
'PullRequest',
'ReferenceLinks',
'ReleaseReference',
'RepositoryWebhook',
'ResourceRef',
'RetentionPolicy',
'SourceProviderAttributes',
'SourceRepositories',
'SourceRepository',
'SourceRepositoryItem',
'SupportedTrigger',
'TaskAgentPoolReference',
'TaskDefinitionReference',
'TaskInputDefinitionBase',
'TaskInputValidation',
'TaskOrchestrationPlanReference',
'TaskReference',
'TaskSourceDefinitionBase',
'TeamProjectReference',
'TestResultsContext',
'Timeline',
'TimelineAttempt',
'TimelineRecord',
'TimelineReference',
'VariableGroup',
'VariableGroupReference',
'WebApiConnectedServiceRef',
'XamlBuildControllerReference',
'BuildClient'
]

Просмотреть файл

@ -0,0 +1,360 @@
# --------------------------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------------------------
class ClientFactoryV5_0(object):
"""ClientFactoryV5_0.
A factory class to get the 5.0 clients.
"""
def __init__(self, connection):
self._connection = connection
def get_accounts_client(self):
"""get_accounts_client.
Gets the 5.0 version of the AccountsClient
:rtype: :class:`<AccountsClient> <azure.devops.v5_0.accounts.accounts_client.AccountsClient>`
"""
return self._connection.get_client('azure.devops.v5_0.accounts.accounts_client.AccountsClient')
def get_boards_client(self):
"""get_boards_client.
Gets the 5.0 version of the BoardsClient
:rtype: :class:`<BoardsClient> <azure.devops.v5_0.boards.boards_client.BoardsClient>`
"""
return self._connection.get_client('azure.devops.v5_0.boards.boards_client.BoardsClient')
def get_build_client(self):
"""get_build_client.
Gets the 5.0 version of the BuildClient
:rtype: :class:`<BuildClient> <azure.devops.v5_0.build.build_client.BuildClient>`
"""
return self._connection.get_client('azure.devops.v5_0.build.build_client.BuildClient')
def get_client_trace_client(self):
"""get_client_trace_client.
Gets the 5.0 version of the ClientTraceClient
:rtype: :class:`<ClientTraceClient> <azure.devops.v5_0.client_trace.client_trace_client.ClientTraceClient>`
"""
return self._connection.get_client('azure.devops.v5_0.client_trace.client_trace_client.ClientTraceClient')
def get_cloud_load_test_client(self):
"""get_cloud_load_test_client.
Gets the 5.0 version of the CloudLoadTestClient
:rtype: :class:`<CloudLoadTestClient> <azure.devops.v5_0.cloud_load_test.cloud_load_test_client.CloudLoadTestClient>`
"""
return self._connection.get_client('azure.devops.v5_0.cloud_load_test.cloud_load_test_client.CloudLoadTestClient')
def get_contributions_client(self):
"""get_contributions_client.
Gets the 5.0 version of the ContributionsClient
:rtype: :class:`<ContributionsClient> <azure.devops.v5_0.contributions.contributions_client.ContributionsClient>`
"""
return self._connection.get_client('azure.devops.v5_0.contributions.contributions_client.ContributionsClient')
def get_core_client(self):
"""get_core_client.
Gets the 5.0 version of the CoreClient
:rtype: :class:`<CoreClient> <azure.devops.v5_0.core.core_client.CoreClient>`
"""
return self._connection.get_client('azure.devops.v5_0.core.core_client.CoreClient')
def get_customer_intelligence_client(self):
"""get_customer_intelligence_client.
Gets the 5.0 version of the CustomerIntelligenceClient
:rtype: :class:`<CustomerIntelligenceClient> <azure.devops.v5_0.customer_intelligence.customer_intelligence_client.CustomerIntelligenceClient>`
"""
return self._connection.get_client('azure.devops.v5_0.customer_intelligence.customer_intelligence_client.CustomerIntelligenceClient')
def get_dashboard_client(self):
"""get_dashboard_client.
Gets the 5.0 version of the DashboardClient
:rtype: :class:`<DashboardClient> <azure.devops.v5_0.dashboard.dashboard_client.DashboardClient>`
"""
return self._connection.get_client('azure.devops.v5_0.dashboard.dashboard_client.DashboardClient')
def get_extension_management_client(self):
"""get_extension_management_client.
Gets the 5.0 version of the ExtensionManagementClient
:rtype: :class:`<ExtensionManagementClient> <azure.devops.v5_0.extension_management.extension_management_client.ExtensionManagementClient>`
"""
return self._connection.get_client('azure.devops.v5_0.extension_management.extension_management_client.ExtensionManagementClient')
def get_feature_availability_client(self):
"""get_feature_availability_client.
Gets the 5.0 version of the FeatureAvailabilityClient
:rtype: :class:`<FeatureAvailabilityClient> <azure.devops.v5_0.feature_availability.feature_availability_client.FeatureAvailabilityClient>`
"""
return self._connection.get_client('azure.devops.v5_0.feature_availability.feature_availability_client.FeatureAvailabilityClient')
def get_feature_management_client(self):
"""get_feature_management_client.
Gets the 5.0 version of the FeatureManagementClient
:rtype: :class:`<FeatureManagementClient> <azure.devops.v5_0.feature_management.feature_management_client.FeatureManagementClient>`
"""
return self._connection.get_client('azure.devops.v5_0.feature_management.feature_management_client.FeatureManagementClient')
def get_feed_client(self):
"""get_feed_client.
Gets the 5.0 version of the FeedClient
:rtype: :class:`<FeedClient> <azure.devops.v5_0.feed.feed_client.FeedClient>`
"""
return self._connection.get_client('azure.devops.v5_0.feed.feed_client.FeedClient')
def get_feed_token_client(self):
"""get_feed_token_client.
Gets the 5.0 version of the FeedTokenClient
:rtype: :class:`<FeedTokenClient> <azure.devops.v5_0.feed_token.feed_token_client.FeedTokenClient>`
"""
return self._connection.get_client('azure.devops.v5_0.feed_token.feed_token_client.FeedTokenClient')
def get_file_container_client(self):
"""get_file_container_client.
Gets the 5.0 version of the FileContainerClient
:rtype: :class:`<FileContainerClient> <azure.devops.v5_0.file_container.file_container_client.FileContainerClient>`
"""
return self._connection.get_client('azure.devops.v5_0.file_container.file_container_client.FileContainerClient')
def get_gallery_client(self):
"""get_gallery_client.
Gets the 5.0 version of the GalleryClient
:rtype: :class:`<GalleryClient> <azure.devops.v5_0.gallery.gallery_client.GalleryClient>`
"""
return self._connection.get_client('azure.devops.v5_0.gallery.gallery_client.GalleryClient')
def get_git_client(self):
"""get_git_client.
Gets the 5.0 version of the GitClient
:rtype: :class:`<GitClient> <azure.devops.v5_0.git.git_client.GitClient>`
"""
return self._connection.get_client('azure.devops.v5_0.git.git_client.GitClient')
def get_graph_client(self):
"""get_graph_client.
Gets the 5.0 version of the GraphClient
:rtype: :class:`<GraphClient> <azure.devops.v5_0.graph.graph_client.GraphClient>`
"""
return self._connection.get_client('azure.devops.v5_0.graph.graph_client.GraphClient')
def get_identity_client(self):
"""get_identity_client.
Gets the 5.0 version of the IdentityClient
:rtype: :class:`<IdentityClient> <azure.devops.v5_0.identity.identity_client.IdentityClient>`
"""
return self._connection.get_client('azure.devops.v5_0.identity.identity_client.IdentityClient')
def get_licensing_client(self):
"""get_licensing_client.
Gets the 5.0 version of the LicensingClient
:rtype: :class:`<LicensingClient> <azure.devops.v5_0.licensing.licensing_client.LicensingClient>`
"""
return self._connection.get_client('azure.devops.v5_0.licensing.licensing_client.LicensingClient')
def get_location_client(self):
"""get_location_client.
Gets the 5.0 version of the LocationClient
:rtype: :class:`<LocationClient> <azure.devops.v5_0.location.location_client.LocationClient>`
"""
return self._connection.get_client('azure.devops.v5_0.location.location_client.LocationClient')
def get_maven_client(self):
"""get_maven_client.
Gets the 5.0 version of the MavenClient
:rtype: :class:`<MavenClient> <azure.devops.v5_0.maven.maven_client.MavenClient>`
"""
return self._connection.get_client('azure.devops.v5_0.maven.maven_client.MavenClient')
def get_member_entitlement_management_client(self):
"""get_member_entitlement_management_client.
Gets the 5.0 version of the MemberEntitlementManagementClient
:rtype: :class:`<MemberEntitlementManagementClient> <azure.devops.v5_0.member_entitlement_management.member_entitlement_management_client.MemberEntitlementManagementClient>`
"""
return self._connection.get_client('azure.devops.v5_0.member_entitlement_management.member_entitlement_management_client.MemberEntitlementManagementClient')
def get_notification_client(self):
"""get_notification_client.
Gets the 5.0 version of the NotificationClient
:rtype: :class:`<NotificationClient> <azure.devops.v5_0.notification.notification_client.NotificationClient>`
"""
return self._connection.get_client('azure.devops.v5_0.notification.notification_client.NotificationClient')
def get_npm_client(self):
"""get_npm_client.
Gets the 5.0 version of the NpmClient
:rtype: :class:`<NpmClient> <azure.devops.v5_0.npm.npm_client.NpmClient>`
"""
return self._connection.get_client('azure.devops.v5_0.npm.npm_client.NpmClient')
def get_nuget_client(self):
"""get_nuget_client.
Gets the 5.0 version of the NuGetClient
:rtype: :class:`<NuGetClient> <azure.devops.v5_0.nuget.nuget_client.NuGetClient>`
"""
return self._connection.get_client('azure.devops.v5_0.nuget.nuget_client.NuGetClient')
def get_operations_client(self):
"""get_operations_client.
Gets the 5.0 version of the OperationsClient
:rtype: :class:`<OperationsClient> <azure.devops.v5_0.operations.operations_client.OperationsClient>`
"""
return self._connection.get_client('azure.devops.v5_0.operations.operations_client.OperationsClient')
def get_policy_client(self):
"""get_policy_client.
Gets the 5.0 version of the PolicyClient
:rtype: :class:`<PolicyClient> <azure.devops.v5_0.policy.policy_client.PolicyClient>`
"""
return self._connection.get_client('azure.devops.v5_0.policy.policy_client.PolicyClient')
def get_profile_client(self):
"""get_profile_client.
Gets the 5.0 version of the ProfileClient
:rtype: :class:`<ProfileClient> <azure.devops.v5_0.profile.profile_client.ProfileClient>`
"""
return self._connection.get_client('azure.devops.v5_0.profile.profile_client.ProfileClient')
def get_project_analysis_client(self):
"""get_project_analysis_client.
Gets the 5.0 version of the ProjectAnalysisClient
:rtype: :class:`<ProjectAnalysisClient> <azure.devops.v5_0.project_analysis.project_analysis_client.ProjectAnalysisClient>`
"""
return self._connection.get_client('azure.devops.v5_0.project_analysis.project_analysis_client.ProjectAnalysisClient')
def get_provenance_client(self):
"""get_provenance_client.
Gets the 5.0 version of the ProvenanceClient
:rtype: :class:`<ProvenanceClient> <azure.devops.v5_0.provenance.provenance_client.ProvenanceClient>`
"""
return self._connection.get_client('azure.devops.v5_0.provenance.provenance_client.ProvenanceClient')
def get_py_pi_api_client(self):
"""get_py_pi_api_client.
Gets the 5.0 version of the PyPiApiClient
:rtype: :class:`<PyPiApiClient> <azure.devops.v5_0.py_pi_api.py_pi_api_client.PyPiApiClient>`
"""
return self._connection.get_client('azure.devops.v5_0.py_pi_api.py_pi_api_client.PyPiApiClient')
def get_release_client(self):
"""get_release_client.
Gets the 5.0 version of the ReleaseClient
:rtype: :class:`<ReleaseClient> <azure.devops.v5_0.release.release_client.ReleaseClient>`
"""
return self._connection.get_client('azure.devops.v5_0.release.release_client.ReleaseClient')
def get_security_client(self):
"""get_security_client.
Gets the 5.0 version of the SecurityClient
:rtype: :class:`<SecurityClient> <azure.devops.v5_0.security.security_client.SecurityClient>`
"""
return self._connection.get_client('azure.devops.v5_0.security.security_client.SecurityClient')
def get_service_endpoint_client(self):
"""get_service_endpoint_client.
Gets the 5.0 version of the ServiceEndpointClient
:rtype: :class:`<ServiceEndpointClient> <azure.devops.v5_0.service_endpoint.service_endpoint_client.ServiceEndpointClient>`
"""
return self._connection.get_client('azure.devops.v5_0.service_endpoint.service_endpoint_client.ServiceEndpointClient')
def get_service_hooks_client(self):
"""get_service_hooks_client.
Gets the 5.0 version of the ServiceHooksClient
:rtype: :class:`<ServiceHooksClient> <azure.devops.v5_0.service_hooks.service_hooks_client.ServiceHooksClient>`
"""
return self._connection.get_client('azure.devops.v5_0.service_hooks.service_hooks_client.ServiceHooksClient')
def get_settings_client(self):
"""get_settings_client.
Gets the 5.0 version of the SettingsClient
:rtype: :class:`<SettingsClient> <azure.devops.v5_0.settings.settings_client.SettingsClient>`
"""
return self._connection.get_client('azure.devops.v5_0.settings.settings_client.SettingsClient')
def get_symbol_client(self):
"""get_symbol_client.
Gets the 5.0 version of the SymbolClient
:rtype: :class:`<SymbolClient> <azure.devops.v5_0.symbol.symbol_client.SymbolClient>`
"""
return self._connection.get_client('azure.devops.v5_0.symbol.symbol_client.SymbolClient')
def get_task_client(self):
"""get_task_client.
Gets the 5.0 version of the TaskClient
:rtype: :class:`<TaskClient> <azure.devops.v5_0.task.task_client.TaskClient>`
"""
return self._connection.get_client('azure.devops.v5_0.task.task_client.TaskClient')
def get_task_agent_client(self):
"""get_task_agent_client.
Gets the 5.0 version of the TaskAgentClient
:rtype: :class:`<TaskAgentClient> <azure.devops.v5_0.task_agent.task_agent_client.TaskAgentClient>`
"""
return self._connection.get_client('azure.devops.v5_0.task_agent.task_agent_client.TaskAgentClient')
def get_test_client(self):
"""get_test_client.
Gets the 5.0 version of the TestClient
:rtype: :class:`<TestClient> <azure.devops.v5_0.test.test_client.TestClient>`
"""
return self._connection.get_client('azure.devops.v5_0.test.test_client.TestClient')
def get_tfvc_client(self):
"""get_tfvc_client.
Gets the 5.0 version of the TfvcClient
:rtype: :class:`<TfvcClient> <azure.devops.v5_0.tfvc.tfvc_client.TfvcClient>`
"""
return self._connection.get_client('azure.devops.v5_0.tfvc.tfvc_client.TfvcClient')
def get_upack_api_client(self):
"""get_upack_api_client.
Gets the 5.0 version of the UPackApiClient
:rtype: :class:`<UPackApiClient> <azure.devops.v5_0.upack_api.upack_api_client.UPackApiClient>`
"""
return self._connection.get_client('azure.devops.v5_0.upack_api.upack_api_client.UPackApiClient')
def get_upack_packaging_client(self):
"""get_upack_packaging_client.
Gets the 5.0 version of the UPackPackagingClient
:rtype: :class:`<UPackPackagingClient> <azure.devops.v5_0.upack_packaging.upack_packaging_client.UPackPackagingClient>`
"""
return self._connection.get_client('azure.devops.v5_0.upack_packaging.upack_packaging_client.UPackPackagingClient')
def get_wiki_client(self):
"""get_wiki_client.
Gets the 5.0 version of the WikiClient
:rtype: :class:`<WikiClient> <azure.devops.v5_0.wiki.wiki_client.WikiClient>`
"""
return self._connection.get_client('azure.devops.v5_0.wiki.wiki_client.WikiClient')
def get_work_client(self):
"""get_work_client.
Gets the 5.0 version of the WorkClient
:rtype: :class:`<WorkClient> <azure.devops.v5_0.work.work_client.WorkClient>`
"""
return self._connection.get_client('azure.devops.v5_0.work.work_client.WorkClient')
def get_work_item_tracking_client(self):
"""get_work_item_tracking_client.
Gets the 5.0 version of the WorkItemTrackingClient
:rtype: :class:`<WorkItemTrackingClient> <azure.devops.v5_0.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient>`
"""
return self._connection.get_client('azure.devops.v5_0.work_item_tracking.work_item_tracking_client.WorkItemTrackingClient')
def get_work_item_tracking_process_client(self):
"""get_work_item_tracking_process_client.
Gets the 5.0 version of the WorkItemTrackingProcessClient
:rtype: :class:`<WorkItemTrackingProcessClient> <azure.devops.v5_0.work_item_tracking_process.work_item_tracking_process_client.WorkItemTrackingProcessClient>`
"""
return self._connection.get_client('azure.devops.v5_0.work_item_tracking_process.work_item_tracking_process_client.WorkItemTrackingProcessClient')
def get_work_item_tracking_process_template_client(self):
"""get_work_item_tracking_process_template_client.
Gets the 5.0 version of the WorkItemTrackingProcessTemplateClient
:rtype: :class:`<WorkItemTrackingProcessTemplateClient> <azure.devops.v5_0.work_item_tracking_process_template.work_item_tracking_process_template_client.WorkItemTrackingProcessTemplateClient>`
"""
return self._connection.get_client('azure.devops.v5_0.work_item_tracking_process_template.work_item_tracking_process_template_client.WorkItemTrackingProcessTemplateClient')

Просмотреть файл

@ -0,0 +1,15 @@
# --------------------------------------------------------------------------------------------
# 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 .models import *
from .client_trace_client import ClientTraceClient
__all__ = [
'ClientTraceEvent',
'ClientTraceClient'
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from ...client import Client
from . import models
class ClientTraceClient(VssClient):
class ClientTraceClient(Client):
"""ClientTrace
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -33,6 +33,6 @@ class ClientTraceClient(VssClient):
content = self._serialize.body(events, '[ClientTraceEvent]')
self._send(http_method='POST',
location_id='06bcc74a-1491-4eb8-a0eb-704778f9d041',
version='4.1-preview.1',
version='5.0-preview.1',
content=content)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,11 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class ClientTraceEvent(Model):
"""ClientTraceEvent.
@ -53,3 +51,8 @@ class ClientTraceEvent(Model):
self.message = message
self.method = method
self.properties = properties
__all__ = [
'ClientTraceEvent',
]

Просмотреть файл

@ -0,0 +1,62 @@
# --------------------------------------------------------------------------------------------
# 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 .models import *
from .cloud_load_test_client import CloudLoadTestClient
__all__ = [
'AgentGroup',
'AgentGroupAccessData',
'Application',
'ApplicationCounters',
'ApplicationType',
'BrowserMix',
'CltCustomerIntelligenceData',
'CounterGroup',
'CounterInstanceSamples',
'CounterSample',
'CounterSampleQueryDetails',
'CounterSamplesResult',
'Diagnostics',
'DropAccessData',
'ErrorDetails',
'LoadGenerationGeoLocation',
'LoadTest',
'LoadTestDefinition',
'LoadTestErrors',
'LoadTestRunDetails',
'LoadTestRunSettings',
'OverridableRunSettings',
'PageSummary',
'RequestSummary',
'ScenarioSummary',
'StaticAgentRunSetting',
'SubType',
'SummaryPercentileData',
'TenantDetails',
'TestDefinition',
'TestDefinitionBasic',
'TestDrop',
'TestDropRef',
'TestResults',
'TestResultsSummary',
'TestRun',
'TestRunAbortMessage',
'TestRunBasic',
'TestRunCounterInstance',
'TestRunMessage',
'TestSettings',
'TestSummary',
'TransactionSummary',
'WebApiLoadTestMachineInput',
'WebApiSetupParamaters',
'WebApiTestMachine',
'WebApiUserLoadTestMachineInput',
'WebInstanceSummaryData',
'CloudLoadTestClient'
]

Просмотреть файл

@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from ...client import Client
from . import models
class CloudLoadTestClient(VssClient):
class CloudLoadTestClient(Client):
"""CloudLoadTest
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -27,13 +27,13 @@ class CloudLoadTestClient(VssClient):
def create_agent_group(self, group):
"""CreateAgentGroup.
:param :class:`<AgentGroup> <cloud-load-test.v4_1.models.AgentGroup>` group: Agent group to be created
:rtype: :class:`<AgentGroup> <cloud-load-test.v4_1.models.AgentGroup>`
:param :class:`<AgentGroup> <azure.devops.v5_0.cloud_load_test.models.AgentGroup>` group: Agent group to be created
:rtype: :class:`<AgentGroup> <azure.devops.v5_0.cloud_load_test.models.AgentGroup>`
"""
content = self._serialize.body(group, 'AgentGroup')
response = self._send(http_method='POST',
location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720',
version='4.1',
version='5.0',
content=content)
return self._deserialize('AgentGroup', response)
@ -60,7 +60,7 @@ class CloudLoadTestClient(VssClient):
query_parameters['agentGroupName'] = self._serialize.query('agent_group_name', agent_group_name, 'str')
response = self._send(http_method='GET',
location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720',
version='4.1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('object', response)
@ -79,7 +79,7 @@ class CloudLoadTestClient(VssClient):
query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str')
response = self._send(http_method='DELETE',
location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b',
version='4.1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('str', response)
@ -98,7 +98,7 @@ class CloudLoadTestClient(VssClient):
query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str')
response = self._send(http_method='GET',
location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b',
version='4.1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('object', response)
@ -106,14 +106,14 @@ class CloudLoadTestClient(VssClient):
def get_application(self, application_id):
"""GetApplication.
:param str application_id: Filter by APM application identifier.
:rtype: :class:`<Application> <cloud-load-test.v4_1.models.Application>`
:rtype: :class:`<Application> <azure.devops.v5_0.cloud_load_test.models.Application>`
"""
route_values = {}
if application_id is not None:
route_values['applicationId'] = self._serialize.url('application_id', application_id, 'str')
response = self._send(http_method='GET',
location_id='2c986dce-8e8d-4142-b541-d016d5aff764',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('Application', response)
@ -127,7 +127,7 @@ class CloudLoadTestClient(VssClient):
query_parameters['type'] = self._serialize.query('type', type, 'str')
response = self._send(http_method='GET',
location_id='2c986dce-8e8d-4142-b541-d016d5aff764',
version='4.1',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[Application]', self._unwrap_collection(response))
@ -148,7 +148,7 @@ class CloudLoadTestClient(VssClient):
query_parameters['includeSummary'] = self._serialize.query('include_summary', include_summary, 'bool')
response = self._send(http_method='GET',
location_id='29265ea4-b5a5-4b2e-b054-47f5f6f00183',
version='4.1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[TestRunCounterInstance]', self._unwrap_collection(response))
@ -166,15 +166,15 @@ class CloudLoadTestClient(VssClient):
query_parameters['plugintype'] = self._serialize.query('plugintype', plugintype, 'str')
response = self._send(http_method='GET',
location_id='c1275ce9-6d26-4bc6-926b-b846502e812d',
version='4.1',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[ApplicationCounters]', self._unwrap_collection(response))
def get_counter_samples(self, counter_sample_query_details, test_run_id):
"""GetCounterSamples.
:param :class:`<VssJsonCollectionWrapper> <cloud-load-test.v4_1.models.VssJsonCollectionWrapper>` counter_sample_query_details:
:param :class:`<VssJsonCollectionWrapper> <azure.devops.v5_0.cloud_load_test.models.VssJsonCollectionWrapper>` counter_sample_query_details:
:param str test_run_id: The test run identifier
:rtype: :class:`<CounterSamplesResult> <cloud-load-test.v4_1.models.CounterSamplesResult>`
:rtype: :class:`<CounterSamplesResult> <azure.devops.v5_0.cloud_load_test.models.CounterSamplesResult>`
"""
route_values = {}
if test_run_id is not None:
@ -182,7 +182,7 @@ class CloudLoadTestClient(VssClient):
content = self._serialize.body(counter_sample_query_details, 'VssJsonCollectionWrapper')
response = self._send(http_method='POST',
location_id='bad18480-7193-4518-992a-37289c5bb92d',
version='4.1',
version='5.0',
route_values=route_values,
content=content)
return self._deserialize('CounterSamplesResult', response)
@ -193,7 +193,7 @@ class CloudLoadTestClient(VssClient):
:param str type: Filter for the particular type of errors.
:param str sub_type: Filter for a particular subtype of errors. You should not provide error subtype without error type.
:param bool detailed: To include the details of test errors such as messagetext, request, stacktrace, testcasename, scenarioname, and lasterrordate.
:rtype: :class:`<LoadTestErrors> <cloud-load-test.v4_1.models.LoadTestErrors>`
:rtype: :class:`<LoadTestErrors> <azure.devops.v5_0.cloud_load_test.models.LoadTestErrors>`
"""
route_values = {}
if test_run_id is not None:
@ -207,7 +207,7 @@ class CloudLoadTestClient(VssClient):
query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool')
response = self._send(http_method='GET',
location_id='b52025a7-3fb4-4283-8825-7079e75bd402',
version='4.1',
version='5.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('LoadTestErrors', response)
@ -215,28 +215,28 @@ class CloudLoadTestClient(VssClient):
def get_test_run_messages(self, test_run_id):
"""GetTestRunMessages.
:param str test_run_id: Id of the test run
:rtype: [Microsoft.VisualStudio.TestService.WebApiModel.TestRunMessage]
:rtype: [TestRunMessage]
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
response = self._send(http_method='GET',
location_id='2e7ba122-f522-4205-845b-2d270e59850a',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('[Microsoft.VisualStudio.TestService.WebApiModel.TestRunMessage]', self._unwrap_collection(response))
return self._deserialize('[TestRunMessage]', self._unwrap_collection(response))
def get_plugin(self, type):
"""GetPlugin.
:param str type: Currently ApplicationInsights is the only available plugin type.
:rtype: :class:`<ApplicationType> <cloud-load-test.v4_1.models.ApplicationType>`
:rtype: :class:`<ApplicationType> <azure.devops.v5_0.cloud_load_test.models.ApplicationType>`
"""
route_values = {}
if type is not None:
route_values['type'] = self._serialize.url('type', type, 'str')
response = self._send(http_method='GET',
location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('ApplicationType', response)
@ -246,46 +246,46 @@ class CloudLoadTestClient(VssClient):
"""
response = self._send(http_method='GET',
location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693',
version='4.1')
version='5.0')
return self._deserialize('[ApplicationType]', self._unwrap_collection(response))
def get_load_test_result(self, test_run_id):
"""GetLoadTestResult.
:param str test_run_id: The test run identifier
:rtype: :class:`<TestResults> <cloud-load-test.v4_1.models.TestResults>`
:rtype: :class:`<TestResults> <azure.devops.v5_0.cloud_load_test.models.TestResults>`
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
response = self._send(http_method='GET',
location_id='5ed69bd8-4557-4cec-9b75-1ad67d0c257b',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('TestResults', response)
def create_test_definition(self, test_definition):
"""CreateTestDefinition.
:param :class:`<TestDefinition> <cloud-load-test.v4_1.models.TestDefinition>` test_definition: Test definition to be created
:rtype: :class:`<TestDefinition> <cloud-load-test.v4_1.models.TestDefinition>`
:param :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>` test_definition: Test definition to be created
:rtype: :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>`
"""
content = self._serialize.body(test_definition, 'TestDefinition')
response = self._send(http_method='POST',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='4.1',
version='5.0',
content=content)
return self._deserialize('TestDefinition', response)
def get_test_definition(self, test_definition_id):
"""GetTestDefinition.
:param str test_definition_id: The test definition identifier
:rtype: :class:`<TestDefinition> <cloud-load-test.v4_1.models.TestDefinition>`
:rtype: :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>`
"""
route_values = {}
if test_definition_id is not None:
route_values['testDefinitionId'] = self._serialize.url('test_definition_id', test_definition_id, 'str')
response = self._send(http_method='GET',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('TestDefinition', response)
@ -305,71 +305,71 @@ class CloudLoadTestClient(VssClient):
query_parameters['top'] = self._serialize.query('top', top, 'int')
response = self._send(http_method='GET',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='4.1',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('[TestDefinitionBasic]', self._unwrap_collection(response))
def update_test_definition(self, test_definition):
"""UpdateTestDefinition.
:param :class:`<TestDefinition> <cloud-load-test.v4_1.models.TestDefinition>` test_definition:
:rtype: :class:`<TestDefinition> <cloud-load-test.v4_1.models.TestDefinition>`
:param :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>` test_definition:
:rtype: :class:`<TestDefinition> <azure.devops.v5_0.cloud_load_test.models.TestDefinition>`
"""
content = self._serialize.body(test_definition, 'TestDefinition')
response = self._send(http_method='PUT',
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
version='4.1',
version='5.0',
content=content)
return self._deserialize('TestDefinition', response)
def create_test_drop(self, web_test_drop):
"""CreateTestDrop.
:param :class:`<Microsoft.VisualStudio.TestService.WebApiModel.TestDrop> <cloud-load-test.v4_1.models.Microsoft.VisualStudio.TestService.WebApiModel.TestDrop>` web_test_drop: Test drop to be created
:rtype: :class:`<Microsoft.VisualStudio.TestService.WebApiModel.TestDrop> <cloud-load-test.v4_1.models.Microsoft.VisualStudio.TestService.WebApiModel.TestDrop>`
:param :class:`<TestDrop> <azure.devops.v5_0.cloud_load_test.models.TestDrop>` web_test_drop: Test drop to be created
:rtype: :class:`<TestDrop> <azure.devops.v5_0.cloud_load_test.models.TestDrop>`
"""
content = self._serialize.body(web_test_drop, 'Microsoft.VisualStudio.TestService.WebApiModel.TestDrop')
content = self._serialize.body(web_test_drop, 'TestDrop')
response = self._send(http_method='POST',
location_id='d89d0e08-505c-4357-96f6-9729311ce8ad',
version='4.1',
version='5.0',
content=content)
return self._deserialize('Microsoft.VisualStudio.TestService.WebApiModel.TestDrop', response)
return self._deserialize('TestDrop', response)
def get_test_drop(self, test_drop_id):
"""GetTestDrop.
:param str test_drop_id: The test drop identifier
:rtype: :class:`<Microsoft.VisualStudio.TestService.WebApiModel.TestDrop> <cloud-load-test.v4_1.models.Microsoft.VisualStudio.TestService.WebApiModel.TestDrop>`
:rtype: :class:`<TestDrop> <azure.devops.v5_0.cloud_load_test.models.TestDrop>`
"""
route_values = {}
if test_drop_id is not None:
route_values['testDropId'] = self._serialize.url('test_drop_id', test_drop_id, 'str')
response = self._send(http_method='GET',
location_id='d89d0e08-505c-4357-96f6-9729311ce8ad',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('Microsoft.VisualStudio.TestService.WebApiModel.TestDrop', response)
return self._deserialize('TestDrop', response)
def create_test_run(self, web_test_run):
"""CreateTestRun.
:param :class:`<TestRun> <cloud-load-test.v4_1.models.TestRun>` web_test_run:
:rtype: :class:`<TestRun> <cloud-load-test.v4_1.models.TestRun>`
:param :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>` web_test_run:
:rtype: :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>`
"""
content = self._serialize.body(web_test_run, 'TestRun')
response = self._send(http_method='POST',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='4.1',
version='5.0',
content=content)
return self._deserialize('TestRun', response)
def get_test_run(self, test_run_id):
"""GetTestRun.
:param str test_run_id: Unique ID of the test run
:rtype: :class:`<TestRun> <cloud-load-test.v4_1.models.TestRun>`
:rtype: :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>`
"""
route_values = {}
if test_run_id is not None:
route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str')
response = self._send(http_method='GET',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='4.1',
version='5.0',
route_values=route_values)
return self._deserialize('TestRun', response)
@ -411,13 +411,13 @@ class CloudLoadTestClient(VssClient):
query_parameters['retentionState'] = self._serialize.query('retention_state', retention_state, 'str')
response = self._send(http_method='GET',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='4.1',
version='5.0',
query_parameters=query_parameters)
return self._deserialize('object', response)
def update_test_run(self, web_test_run, test_run_id):
"""UpdateTestRun.
:param :class:`<TestRun> <cloud-load-test.v4_1.models.TestRun>` web_test_run:
:param :class:`<TestRun> <azure.devops.v5_0.cloud_load_test.models.TestRun>` web_test_run:
:param str test_run_id:
"""
route_values = {}
@ -426,7 +426,7 @@ class CloudLoadTestClient(VssClient):
content = self._serialize.body(web_test_run, 'TestRun')
self._send(http_method='PATCH',
location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba',
version='4.1',
version='5.0',
route_values=route_values,
content=content)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,11 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class AgentGroup(Model):
"""AgentGroup.
@ -23,9 +21,9 @@ class AgentGroup(Model):
:param group_name:
:type group_name: str
:param machine_access_data:
:type machine_access_data: list of :class:`AgentGroupAccessData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.AgentGroupAccessData>`
:type machine_access_data: list of :class:`AgentGroupAccessData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.AgentGroupAccessData>`
:param machine_configuration:
:type machine_configuration: :class:`WebApiUserLoadTestMachineInput <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.WebApiUserLoadTestMachineInput>`
:type machine_configuration: :class:`WebApiUserLoadTestMachineInput <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.WebApiUserLoadTestMachineInput>`
:param tenant_id:
:type tenant_id: str
"""
@ -51,7 +49,6 @@ class AgentGroup(Model):
self.tenant_id = tenant_id
class AgentGroupAccessData(Model):
"""AgentGroupAccessData.
@ -84,7 +81,6 @@ class AgentGroupAccessData(Model):
self.storage_type = storage_type
class Application(Model):
"""Application.
@ -125,7 +121,6 @@ class Application(Model):
self.version = version
class ApplicationCounters(Model):
"""ApplicationCounters.
@ -162,7 +157,6 @@ class ApplicationCounters(Model):
self.path = path
class ApplicationType(Model):
"""ApplicationType.
@ -199,7 +193,6 @@ class ApplicationType(Model):
self.type = type
class BrowserMix(Model):
"""BrowserMix.
@ -220,7 +213,6 @@ class BrowserMix(Model):
self.browser_percentage = browser_percentage
class CltCustomerIntelligenceData(Model):
"""CltCustomerIntelligenceData.
@ -245,7 +237,6 @@ class CltCustomerIntelligenceData(Model):
self.properties = properties
class CounterGroup(Model):
"""CounterGroup.
@ -266,7 +257,6 @@ class CounterGroup(Model):
self.url = url
class CounterInstanceSamples(Model):
"""CounterInstanceSamples.
@ -277,7 +267,7 @@ class CounterInstanceSamples(Model):
:param next_refresh_time:
:type next_refresh_time: datetime
:param values:
:type values: list of :class:`CounterSample <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.CounterSample>`
:type values: list of :class:`CounterSample <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.CounterSample>`
"""
_attribute_map = {
@ -295,7 +285,6 @@ class CounterInstanceSamples(Model):
self.values = values
class CounterSample(Model):
"""CounterSample.
@ -348,36 +337,6 @@ class CounterSample(Model):
self.time_stamp = time_stamp
class CounterSamplesResult(Model):
"""CounterSamplesResult.
:param count:
:type count: int
:param max_batch_size:
:type max_batch_size: int
:param total_samples_count:
:type total_samples_count: int
:param values:
:type values: list of :class:`CounterInstanceSamples <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.CounterInstanceSamples>`
"""
_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'max_batch_size': {'key': 'maxBatchSize', 'type': 'int'},
'total_samples_count': {'key': 'totalSamplesCount', 'type': 'int'},
'values': {'key': 'values', 'type': '[CounterInstanceSamples]'}
}
def __init__(self, count=None, max_batch_size=None, total_samples_count=None, values=None):
super(CounterSamplesResult, self).__init__()
self.count = count
self.max_batch_size = max_batch_size
self.total_samples_count = total_samples_count
self.values = values
class CounterSampleQueryDetails(Model):
"""CounterSampleQueryDetails.
@ -402,6 +361,33 @@ class CounterSampleQueryDetails(Model):
self.to_interval = to_interval
class CounterSamplesResult(Model):
"""CounterSamplesResult.
:param count:
:type count: int
:param max_batch_size:
:type max_batch_size: int
:param total_samples_count:
:type total_samples_count: int
:param values:
:type values: list of :class:`CounterInstanceSamples <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.CounterInstanceSamples>`
"""
_attribute_map = {
'count': {'key': 'count', 'type': 'int'},
'max_batch_size': {'key': 'maxBatchSize', 'type': 'int'},
'total_samples_count': {'key': 'totalSamplesCount', 'type': 'int'},
'values': {'key': 'values', 'type': '[CounterInstanceSamples]'}
}
def __init__(self, count=None, max_batch_size=None, total_samples_count=None, values=None):
super(CounterSamplesResult, self).__init__()
self.count = count
self.max_batch_size = max_batch_size
self.total_samples_count = total_samples_count
self.values = values
class Diagnostics(Model):
"""Diagnostics.
@ -427,7 +413,6 @@ class Diagnostics(Model):
self.relative_path_to_diagnostic_files = relative_path_to_diagnostic_files
class DropAccessData(Model):
"""DropAccessData.
@ -448,7 +433,6 @@ class DropAccessData(Model):
self.sas_key = sas_key
class ErrorDetails(Model):
"""ErrorDetails.
@ -489,7 +473,6 @@ class ErrorDetails(Model):
self.test_case_name = test_case_name
class LoadGenerationGeoLocation(Model):
"""LoadGenerationGeoLocation.
@ -510,7 +493,6 @@ class LoadGenerationGeoLocation(Model):
self.percentage = percentage
class LoadTest(Model):
"""LoadTest.
@ -523,20 +505,19 @@ class LoadTest(Model):
super(LoadTest, self).__init__()
class LoadTestDefinition(Model):
"""LoadTestDefinition.
:param agent_count:
:type agent_count: int
:param browser_mixs:
:type browser_mixs: list of :class:`BrowserMix <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.BrowserMix>`
:type browser_mixs: list of :class:`BrowserMix <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.BrowserMix>`
:param core_count:
:type core_count: int
:param cores_per_agent:
:type cores_per_agent: int
:param load_generation_geo_locations:
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadGenerationGeoLocation>`
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadGenerationGeoLocation>`
:param load_pattern_name:
:type load_pattern_name: str
:param load_test_name:
@ -584,7 +565,6 @@ class LoadTestDefinition(Model):
self.urls = urls
class LoadTestErrors(Model):
"""LoadTestErrors.
@ -593,7 +573,7 @@ class LoadTestErrors(Model):
:param occurrences:
:type occurrences: int
:param types:
:type types: list of :class:`object <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.object>`
:type types: list of :class:`object <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.object>`
:param url:
:type url: str
"""
@ -613,7 +593,6 @@ class LoadTestErrors(Model):
self.url = url
class LoadTestRunSettings(Model):
"""LoadTestRunSettings.
@ -654,14 +633,13 @@ class LoadTestRunSettings(Model):
self.warm_up_duration = warm_up_duration
class OverridableRunSettings(Model):
"""OverridableRunSettings.
:param load_generator_machines_type:
:type load_generator_machines_type: object
:param static_agent_run_settings:
:type static_agent_run_settings: :class:`StaticAgentRunSetting <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.StaticAgentRunSetting>`
:type static_agent_run_settings: :class:`StaticAgentRunSetting <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.StaticAgentRunSetting>`
"""
_attribute_map = {
@ -675,7 +653,6 @@ class OverridableRunSettings(Model):
self.static_agent_run_settings = static_agent_run_settings
class PageSummary(Model):
"""PageSummary.
@ -686,7 +663,7 @@ class PageSummary(Model):
:param percentage_pages_meeting_goal:
:type percentage_pages_meeting_goal: int
:param percentile_data:
:type percentile_data: list of :class:`SummaryPercentileData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.SummaryPercentileData>`
:type percentile_data: list of :class:`SummaryPercentileData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.SummaryPercentileData>`
:param scenario_name:
:type scenario_name: str
:param test_name:
@ -716,7 +693,6 @@ class PageSummary(Model):
self.total_pages = total_pages
class RequestSummary(Model):
"""RequestSummary.
@ -727,7 +703,7 @@ class RequestSummary(Model):
:param passed_requests:
:type passed_requests: int
:param percentile_data:
:type percentile_data: list of :class:`SummaryPercentileData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.SummaryPercentileData>`
:type percentile_data: list of :class:`SummaryPercentileData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.SummaryPercentileData>`
:param requests_per_sec:
:type requests_per_sec: float
:param request_url:
@ -765,7 +741,6 @@ class RequestSummary(Model):
self.total_requests = total_requests
class ScenarioSummary(Model):
"""ScenarioSummary.
@ -790,7 +765,6 @@ class ScenarioSummary(Model):
self.scenario_name = scenario_name
class StaticAgentRunSetting(Model):
"""StaticAgentRunSetting.
@ -811,14 +785,13 @@ class StaticAgentRunSetting(Model):
self.static_agent_group_name = static_agent_group_name
class SubType(Model):
"""SubType.
:param count:
:type count: int
:param error_detail_list:
:type error_detail_list: list of :class:`ErrorDetails <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.ErrorDetails>`
:type error_detail_list: list of :class:`ErrorDetails <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.ErrorDetails>`
:param occurrences:
:type occurrences: int
:param sub_type_name:
@ -844,7 +817,6 @@ class SubType(Model):
self.url = url
class SummaryPercentileData(Model):
"""SummaryPercentileData.
@ -865,18 +837,17 @@ class SummaryPercentileData(Model):
self.percentile_value = percentile_value
class TenantDetails(Model):
"""TenantDetails.
:param access_details:
:type access_details: list of :class:`AgentGroupAccessData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.AgentGroupAccessData>`
:type access_details: list of :class:`AgentGroupAccessData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.AgentGroupAccessData>`
:param id:
:type id: str
:param static_machines:
:type static_machines: list of :class:`WebApiTestMachine <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.WebApiTestMachine>`
:type static_machines: list of :class:`WebApiTestMachine <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.WebApiTestMachine>`
:param user_load_agent_input:
:type user_load_agent_input: :class:`WebApiUserLoadTestMachineInput <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.WebApiUserLoadTestMachineInput>`
:type user_load_agent_input: :class:`WebApiUserLoadTestMachineInput <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.WebApiUserLoadTestMachineInput>`
:param user_load_agent_resources_uri:
:type user_load_agent_resources_uri: str
:param valid_geo_locations:
@ -902,12 +873,11 @@ class TenantDetails(Model):
self.valid_geo_locations = valid_geo_locations
class TestDefinitionBasic(Model):
"""TestDefinitionBasic.
:param access_data:
:type access_data: :class:`DropAccessData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.DropAccessData>`
:type access_data: :class:`DropAccessData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.DropAccessData>`
:param created_by:
:type created_by: IdentityRef
:param created_date:
@ -947,12 +917,11 @@ class TestDefinitionBasic(Model):
self.name = name
class TestDrop(Model):
"""TestDrop.
:param access_data:
:type access_data: :class:`DropAccessData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.DropAccessData>`
:type access_data: :class:`DropAccessData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.DropAccessData>`
:param created_date:
:type created_date: datetime
:param drop_type:
@ -960,7 +929,7 @@ class TestDrop(Model):
:param id:
:type id: str
:param load_test_definition:
:type load_test_definition: :class:`LoadTestDefinition <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadTestDefinition>`
:type load_test_definition: :class:`LoadTestDefinition <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadTestDefinition>`
:param test_run_id:
:type test_run_id: str
"""
@ -984,7 +953,6 @@ class TestDrop(Model):
self.test_run_id = test_run_id
class TestDropRef(Model):
"""TestDropRef.
@ -1005,16 +973,15 @@ class TestDropRef(Model):
self.url = url
class TestResults(Model):
"""TestResults.
:param cloud_load_test_solution_url:
:type cloud_load_test_solution_url: str
:param counter_groups:
:type counter_groups: list of :class:`CounterGroup <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.CounterGroup>`
:type counter_groups: list of :class:`CounterGroup <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.CounterGroup>`
:param diagnostics:
:type diagnostics: :class:`Diagnostics <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.Diagnostics>`
:type diagnostics: :class:`Diagnostics <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.Diagnostics>`
:param results_url:
:type results_url: str
"""
@ -1034,28 +1001,27 @@ class TestResults(Model):
self.results_url = results_url
class TestResultsSummary(Model):
"""TestResultsSummary.
:param overall_page_summary:
:type overall_page_summary: :class:`PageSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.PageSummary>`
:type overall_page_summary: :class:`PageSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.PageSummary>`
:param overall_request_summary:
:type overall_request_summary: :class:`RequestSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.RequestSummary>`
:type overall_request_summary: :class:`RequestSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.RequestSummary>`
:param overall_scenario_summary:
:type overall_scenario_summary: :class:`ScenarioSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.ScenarioSummary>`
:type overall_scenario_summary: :class:`ScenarioSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.ScenarioSummary>`
:param overall_test_summary:
:type overall_test_summary: :class:`TestSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TestSummary>`
:type overall_test_summary: :class:`TestSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TestSummary>`
:param overall_transaction_summary:
:type overall_transaction_summary: :class:`TransactionSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TransactionSummary>`
:type overall_transaction_summary: :class:`TransactionSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TransactionSummary>`
:param top_slow_pages:
:type top_slow_pages: list of :class:`PageSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.PageSummary>`
:type top_slow_pages: list of :class:`PageSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.PageSummary>`
:param top_slow_requests:
:type top_slow_requests: list of :class:`RequestSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.RequestSummary>`
:type top_slow_requests: list of :class:`RequestSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.RequestSummary>`
:param top_slow_tests:
:type top_slow_tests: list of :class:`TestSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TestSummary>`
:type top_slow_tests: list of :class:`TestSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TestSummary>`
:param top_slow_transactions:
:type top_slow_transactions: list of :class:`TransactionSummary <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TransactionSummary>`
:type top_slow_transactions: list of :class:`TransactionSummary <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TransactionSummary>`
"""
_attribute_map = {
@ -1083,7 +1049,6 @@ class TestResultsSummary(Model):
self.top_slow_transactions = top_slow_transactions
class TestRunAbortMessage(Model):
"""TestRunAbortMessage.
@ -1116,7 +1081,6 @@ class TestRunAbortMessage(Model):
self.source = source
class TestRunBasic(Model):
"""TestRunBasic.
@ -1133,7 +1097,7 @@ class TestRunBasic(Model):
:param id:
:type id: str
:param load_generation_geo_locations:
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadGenerationGeoLocation>`
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadGenerationGeoLocation>`
:param load_test_file_name:
:type load_test_file_name: str
:param name:
@ -1143,7 +1107,7 @@ class TestRunBasic(Model):
:param run_source:
:type run_source: str
:param run_specific_details:
:type run_specific_details: :class:`LoadTestRunDetails <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadTestRunDetails>`
:type run_specific_details: :class:`LoadTestRunDetails <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadTestRunDetails>`
:param run_type:
:type run_type: object
:param state:
@ -1189,7 +1153,6 @@ class TestRunBasic(Model):
self.url = url
class TestRunCounterInstance(Model):
"""TestRunCounterInstance.
@ -1210,7 +1173,7 @@ class TestRunCounterInstance(Model):
:param part_of_counter_groups:
:type part_of_counter_groups: list of str
:param summary_data:
:type summary_data: :class:`WebInstanceSummaryData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.WebInstanceSummaryData>`
:type summary_data: :class:`WebInstanceSummaryData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.WebInstanceSummaryData>`
:param unique_name:
:type unique_name: str
"""
@ -1242,7 +1205,6 @@ class TestRunCounterInstance(Model):
self.unique_name = unique_name
class TestRunMessage(Model):
"""TestRunMessage.
@ -1291,7 +1253,6 @@ class TestRunMessage(Model):
self.url = url
class TestSettings(Model):
"""TestSettings.
@ -1316,7 +1277,6 @@ class TestSettings(Model):
self.setup_command = setup_command
class TestSummary(Model):
"""TestSummary.
@ -1327,7 +1287,7 @@ class TestSummary(Model):
:param passed_tests:
:type passed_tests: int
:param percentile_data:
:type percentile_data: list of :class:`SummaryPercentileData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.SummaryPercentileData>`
:type percentile_data: list of :class:`SummaryPercentileData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.SummaryPercentileData>`
:param scenario_name:
:type scenario_name: str
:param test_name:
@ -1357,7 +1317,6 @@ class TestSummary(Model):
self.total_tests = total_tests
class TransactionSummary(Model):
"""TransactionSummary.
@ -1366,7 +1325,7 @@ class TransactionSummary(Model):
:param average_transaction_time:
:type average_transaction_time: float
:param percentile_data:
:type percentile_data: list of :class:`SummaryPercentileData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.SummaryPercentileData>`
:type percentile_data: list of :class:`SummaryPercentileData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.SummaryPercentileData>`
:param scenario_name:
:type scenario_name: str
:param test_name:
@ -1398,7 +1357,6 @@ class TransactionSummary(Model):
self.transaction_name = transaction_name
class WebApiLoadTestMachineInput(Model):
"""WebApiLoadTestMachineInput.
@ -1407,7 +1365,7 @@ class WebApiLoadTestMachineInput(Model):
:param machine_type:
:type machine_type: object
:param setup_configuration:
:type setup_configuration: :class:`WebApiSetupParamaters <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.WebApiSetupParamaters>`
:type setup_configuration: :class:`WebApiSetupParamaters <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.WebApiSetupParamaters>`
:param supported_run_types:
:type supported_run_types: list of TestRunType
"""
@ -1427,7 +1385,6 @@ class WebApiLoadTestMachineInput(Model):
self.supported_run_types = supported_run_types
class WebApiSetupParamaters(Model):
"""WebApiSetupParamaters.
@ -1444,7 +1401,6 @@ class WebApiSetupParamaters(Model):
self.configurations = configurations
class WebApiTestMachine(Model):
"""WebApiTestMachine.
@ -1469,7 +1425,6 @@ class WebApiTestMachine(Model):
self.status = status
class WebApiUserLoadTestMachineInput(WebApiLoadTestMachineInput):
"""WebApiUserLoadTestMachineInput.
@ -1478,7 +1433,7 @@ class WebApiUserLoadTestMachineInput(WebApiLoadTestMachineInput):
:param machine_type:
:type machine_type: object
:param setup_configuration:
:type setup_configuration: :class:`WebApiSetupParamaters <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.WebApiSetupParamaters>`
:type setup_configuration: :class:`WebApiSetupParamaters <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.WebApiSetupParamaters>`
:param supported_run_types:
:type supported_run_types: list of TestRunType
:param agent_group_name:
@ -1510,7 +1465,6 @@ class WebApiUserLoadTestMachineInput(WebApiLoadTestMachineInput):
self.vSTSAccount_uri = vSTSAccount_uri
class WebInstanceSummaryData(Model):
"""WebInstanceSummaryData.
@ -1535,7 +1489,6 @@ class WebInstanceSummaryData(Model):
self.min = min
class LoadTestRunDetails(LoadTestRunSettings):
"""LoadTestRunDetails.
@ -1573,12 +1526,11 @@ class LoadTestRunDetails(LoadTestRunSettings):
self.virtual_user_count = virtual_user_count
class TestDefinition(TestDefinitionBasic):
"""TestDefinition.
:param access_data:
:type access_data: :class:`DropAccessData <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.DropAccessData>`
:type access_data: :class:`DropAccessData <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.DropAccessData>`
:param created_by:
:type created_by: IdentityRef
:param created_date:
@ -1596,15 +1548,15 @@ class TestDefinition(TestDefinitionBasic):
:param description:
:type description: str
:param load_generation_geo_locations:
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadGenerationGeoLocation>`
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadGenerationGeoLocation>`
:param load_test_definition_source:
:type load_test_definition_source: str
:param run_settings:
:type run_settings: :class:`LoadTestRunSettings <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadTestRunSettings>`
:type run_settings: :class:`LoadTestRunSettings <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadTestRunSettings>`
:param static_agent_run_settings:
:type static_agent_run_settings: :class:`StaticAgentRunSetting <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.StaticAgentRunSetting>`
:type static_agent_run_settings: :class:`StaticAgentRunSetting <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.StaticAgentRunSetting>`
:param test_details:
:type test_details: :class:`LoadTest <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadTest>`
:type test_details: :class:`LoadTest <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadTest>`
"""
_attribute_map = {
@ -1634,7 +1586,6 @@ class TestDefinition(TestDefinitionBasic):
self.test_details = test_details
class TestRun(TestRunBasic):
"""TestRun.
@ -1651,7 +1602,7 @@ class TestRun(TestRunBasic):
:param id:
:type id: str
:param load_generation_geo_locations:
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadGenerationGeoLocation>`
:type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadGenerationGeoLocation>`
:param load_test_file_name:
:type load_test_file_name: str
:param name:
@ -1661,7 +1612,7 @@ class TestRun(TestRunBasic):
:param run_source:
:type run_source: str
:param run_specific_details:
:type run_specific_details: :class:`LoadTestRunDetails <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.LoadTestRunDetails>`
:type run_specific_details: :class:`LoadTestRunDetails <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.LoadTestRunDetails>`
:param run_type:
:type run_type: object
:param state:
@ -1669,7 +1620,7 @@ class TestRun(TestRunBasic):
:param url:
:type url: str
:param abort_message:
:type abort_message: :class:`TestRunAbortMessage <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TestRunAbortMessage>`
:type abort_message: :class:`TestRunAbortMessage <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TestRunAbortMessage>`
:param aut_initialization_error:
:type aut_initialization_error: bool
:param chargeable:
@ -1699,11 +1650,11 @@ class TestRun(TestRunBasic):
:param sub_state:
:type sub_state: object
:param supersede_run_settings:
:type supersede_run_settings: :class:`OverridableRunSettings <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.OverridableRunSettings>`
:type supersede_run_settings: :class:`OverridableRunSettings <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.OverridableRunSettings>`
:param test_drop:
:type test_drop: :class:`TestDropRef <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TestDropRef>`
:type test_drop: :class:`TestDropRef <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TestDropRef>`
:param test_settings:
:type test_settings: :class:`TestSettings <microsoft.-visual-studio.-test-service.-web-api-model.v4_1.models.TestSettings>`
:type test_settings: :class:`TestSettings <azure.devops.v5_0.microsoft._visual_studio._test_service._web_api_model.models.TestSettings>`
:param warm_up_started_date:
:type warm_up_started_date: datetime
:param web_result_url:
@ -1770,3 +1721,55 @@ class TestRun(TestRunBasic):
self.test_settings = test_settings
self.warm_up_started_date = warm_up_started_date
self.web_result_url = web_result_url
__all__ = [
'AgentGroup',
'AgentGroupAccessData',
'Application',
'ApplicationCounters',
'ApplicationType',
'BrowserMix',
'CltCustomerIntelligenceData',
'CounterGroup',
'CounterInstanceSamples',
'CounterSample',
'CounterSampleQueryDetails',
'CounterSamplesResult',
'Diagnostics',
'DropAccessData',
'ErrorDetails',
'LoadGenerationGeoLocation',
'LoadTest',
'LoadTestDefinition',
'LoadTestErrors',
'LoadTestRunSettings',
'OverridableRunSettings',
'PageSummary',
'RequestSummary',
'ScenarioSummary',
'StaticAgentRunSetting',
'SubType',
'SummaryPercentileData',
'TenantDetails',
'TestDefinitionBasic',
'TestDrop',
'TestDropRef',
'TestResults',
'TestResultsSummary',
'TestRunAbortMessage',
'TestRunBasic',
'TestRunCounterInstance',
'TestRunMessage',
'TestSettings',
'TestSummary',
'TransactionSummary',
'WebApiLoadTestMachineInput',
'WebApiSetupParamaters',
'WebApiTestMachine',
'WebApiUserLoadTestMachineInput',
'WebInstanceSummaryData',
'LoadTestRunDetails',
'TestDefinition',
'TestRun',
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,31 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import ClientContribution
from .models import ClientContributionNode
from .models import ClientContributionProviderDetails
from .models import ClientDataProviderQuery
from .models import Contribution
from .models import ContributionBase
from .models import ContributionConstraint
from .models import ContributionNodeQuery
from .models import ContributionNodeQueryResult
from .models import ContributionPropertyDescription
from .models import ContributionType
from .models import DataProviderContext
from .models import DataProviderExceptionDetails
from .models import DataProviderQuery
from .models import DataProviderResult
from .models import ExtensionEventCallback
from .models import ExtensionEventCallbackCollection
from .models import ExtensionFile
from .models import ExtensionLicensing
from .models import ExtensionManifest
from .models import InstalledExtension
from .models import InstalledExtensionState
from .models import InstalledExtensionStateIssue
from .models import LicensingOverride
from .models import ResolvedDataProvider
from .models import *
from .contributions_client import ContributionsClient
__all__ = [
'ClientContribution',
@ -58,4 +35,5 @@ __all__ = [
'InstalledExtensionStateIssue',
'LicensingOverride',
'ResolvedDataProvider',
'ContributionsClient'
]

Просмотреть файл

@ -7,11 +7,11 @@
# --------------------------------------------------------------------------------------------
from msrest import Serializer, Deserializer
from ...vss_client import VssClient
from ...client import Client
from . import models
class ContributionsClient(VssClient):
class ContributionsClient(Client):
"""Contributions
:param str base_url: Service URL
:param Authentication creds: Authenticated credentials.
@ -28,23 +28,23 @@ class ContributionsClient(VssClient):
def query_contribution_nodes(self, query):
"""QueryContributionNodes.
[Preview API] Query for contribution nodes and provider details according the parameters in the passed in query object.
:param :class:`<ContributionNodeQuery> <contributions.v4_1.models.ContributionNodeQuery>` query:
:rtype: :class:`<ContributionNodeQueryResult> <contributions.v4_1.models.ContributionNodeQueryResult>`
:param :class:`<ContributionNodeQuery> <azure.devops.v5_0.contributions.models.ContributionNodeQuery>` query:
:rtype: :class:`<ContributionNodeQueryResult> <azure.devops.v5_0.contributions.models.ContributionNodeQueryResult>`
"""
content = self._serialize.body(query, 'ContributionNodeQuery')
response = self._send(http_method='POST',
location_id='db7f2146-2309-4cee-b39c-c767777a1c55',
version='4.1-preview.1',
version='5.0-preview.1',
content=content)
return self._deserialize('ContributionNodeQueryResult', response)
def query_data_providers(self, query, scope_name=None, scope_value=None):
"""QueryDataProviders.
[Preview API]
:param :class:`<DataProviderQuery> <contributions.v4_1.models.DataProviderQuery>` query:
:param :class:`<DataProviderQuery> <azure.devops.v5_0.contributions.models.DataProviderQuery>` query:
:param str scope_name:
:param str scope_value:
:rtype: :class:`<DataProviderResult> <contributions.v4_1.models.DataProviderResult>`
:rtype: :class:`<DataProviderResult> <azure.devops.v5_0.contributions.models.DataProviderResult>`
"""
route_values = {}
if scope_name is not None:
@ -54,7 +54,7 @@ class ContributionsClient(VssClient):
content = self._serialize.body(query, 'DataProviderQuery')
response = self._send(http_method='POST',
location_id='738368db-35ee-4b85-9f94-77ed34af2b0d',
version='4.1-preview.1',
version='5.0-preview.1',
route_values=route_values,
content=content)
return self._deserialize('DataProviderResult', response)
@ -78,7 +78,7 @@ class ContributionsClient(VssClient):
query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str')
response = self._send(http_method='GET',
location_id='2648442b-fd63-4b9a-902f-0c913510f139',
version='4.1-preview.1',
version='5.0-preview.1',
query_parameters=query_parameters)
return self._deserialize('[InstalledExtension]', self._unwrap_collection(response))
@ -88,7 +88,7 @@ class ContributionsClient(VssClient):
:param str publisher_name:
:param str extension_name:
:param [str] asset_types:
:rtype: :class:`<InstalledExtension> <contributions.v4_1.models.InstalledExtension>`
:rtype: :class:`<InstalledExtension> <azure.devops.v5_0.contributions.models.InstalledExtension>`
"""
route_values = {}
if publisher_name is not None:
@ -101,7 +101,7 @@ class ContributionsClient(VssClient):
query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str')
response = self._send(http_method='GET',
location_id='3e2f6668-0798-4dcb-b592-bfe2fa57fde2',
version='4.1-preview.1',
version='5.0-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('InstalledExtension', response)

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,11 +6,9 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from msrest.serialization import Model
class ClientContribution(Model):
"""ClientContribution.
@ -21,7 +19,7 @@ class ClientContribution(Model):
:param includes: Includes is a set of contributions that should have this contribution included in their targets list.
:type includes: list of str
:param properties: Properties/attributes of this contribution
:type properties: :class:`object <contributions.v4_1.models.object>`
:type properties: :class:`object <azure.devops.v5_0.contributions.models.object>`
:param targets: The ids of the contribution(s) that this contribution targets. (parent contributions)
:type targets: list of str
:param type: Id of the Contribution Type
@ -47,14 +45,13 @@ class ClientContribution(Model):
self.type = type
class ClientContributionNode(Model):
"""ClientContributionNode.
:param children: List of ids for contributions which are children to the current contribution.
:type children: list of str
:param contribution: Contribution associated with this node.
:type contribution: :class:`ClientContribution <contributions.v4_1.models.ClientContribution>`
:type contribution: :class:`ClientContribution <azure.devops.v5_0.contributions.models.ClientContribution>`
:param parents: List of ids for contributions which are parents to the current contribution.
:type parents: list of str
"""
@ -72,7 +69,6 @@ class ClientContributionNode(Model):
self.parents = parents
class ClientContributionProviderDetails(Model):
"""ClientContributionProviderDetails.
@ -101,7 +97,6 @@ class ClientContributionProviderDetails(Model):
self.version = version
class ContributionBase(Model):
"""ContributionBase.
@ -126,7 +121,6 @@ class ContributionBase(Model):
self.visible_to = visible_to
class ContributionConstraint(Model):
"""ContributionConstraint.
@ -139,7 +133,7 @@ class ContributionConstraint(Model):
:param name: Name of the IContributionFilter plugin
:type name: str
:param properties: Properties that are fed to the contribution filter class
:type properties: :class:`object <contributions.v4_1.models.object>`
:type properties: :class:`object <azure.devops.v5_0.contributions.models.object>`
:param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied.
:type relationships: list of str
"""
@ -163,12 +157,13 @@ class ContributionConstraint(Model):
self.relationships = relationships
class ContributionNodeQuery(Model):
"""ContributionNodeQuery.
:param contribution_ids: The contribution ids of the nodes to find.
:type contribution_ids: list of str
:param data_provider_context: Contextual information that can be leveraged by contribution constraints
:type data_provider_context: :class:`DataProviderContext <azure.devops.v5_0.contributions.models.DataProviderContext>`
:param include_provider_details: Indicator if contribution provider details should be included in the result.
:type include_provider_details: bool
:param query_options: Query options tpo be used when fetching ContributionNodes
@ -177,18 +172,19 @@ class ContributionNodeQuery(Model):
_attribute_map = {
'contribution_ids': {'key': 'contributionIds', 'type': '[str]'},
'data_provider_context': {'key': 'dataProviderContext', 'type': 'DataProviderContext'},
'include_provider_details': {'key': 'includeProviderDetails', 'type': 'bool'},
'query_options': {'key': 'queryOptions', 'type': 'object'}
}
def __init__(self, contribution_ids=None, include_provider_details=None, query_options=None):
def __init__(self, contribution_ids=None, data_provider_context=None, include_provider_details=None, query_options=None):
super(ContributionNodeQuery, self).__init__()
self.contribution_ids = contribution_ids
self.data_provider_context = data_provider_context
self.include_provider_details = include_provider_details
self.query_options = query_options
class ContributionNodeQueryResult(Model):
"""ContributionNodeQueryResult.
@ -209,7 +205,6 @@ class ContributionNodeQueryResult(Model):
self.provider_details = provider_details
class ContributionPropertyDescription(Model):
"""ContributionPropertyDescription.
@ -238,7 +233,6 @@ class ContributionPropertyDescription(Model):
self.type = type
class ContributionType(ContributionBase):
"""ContributionType.
@ -272,7 +266,6 @@ class ContributionType(ContributionBase):
self.properties = properties
class DataProviderContext(Model):
"""DataProviderContext.
@ -289,7 +282,6 @@ class DataProviderContext(Model):
self.properties = properties
class DataProviderExceptionDetails(Model):
"""DataProviderExceptionDetails.
@ -314,12 +306,11 @@ class DataProviderExceptionDetails(Model):
self.stack_trace = stack_trace
class DataProviderQuery(Model):
"""DataProviderQuery.
:param context: Contextual information to pass to the data providers
:type context: :class:`DataProviderContext <contributions.v4_1.models.DataProviderContext>`
:type context: :class:`DataProviderContext <azure.devops.v5_0.contributions.models.DataProviderContext>`
:param contribution_ids: The contribution ids of the data providers to resolve
:type contribution_ids: list of str
"""
@ -335,7 +326,6 @@ class DataProviderQuery(Model):
self.contribution_ids = contribution_ids
class DataProviderResult(Model):
"""DataProviderResult.
@ -346,7 +336,7 @@ class DataProviderResult(Model):
:param exceptions: Set of exceptions that occurred resolving the data providers.
:type exceptions: dict
:param resolved_providers: List of data providers resolved in the data-provider query
:type resolved_providers: list of :class:`ResolvedDataProvider <contributions.v4_1.models.ResolvedDataProvider>`
:type resolved_providers: list of :class:`ResolvedDataProvider <azure.devops.v5_0.contributions.models.ResolvedDataProvider>`
:param scope_name: Scope name applied to this data provider result.
:type scope_name: str
:param scope_value: Scope value applied to this data provider result.
@ -376,7 +366,6 @@ class DataProviderResult(Model):
self.shared_data = shared_data
class ExtensionEventCallback(Model):
"""ExtensionEventCallback.
@ -393,24 +382,23 @@ class ExtensionEventCallback(Model):
self.uri = uri
class ExtensionEventCallbackCollection(Model):
"""ExtensionEventCallbackCollection.
:param post_disable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension disable has occurred.
:type post_disable: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type post_disable: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
:param post_enable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension enable has occurred.
:type post_enable: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type post_enable: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
:param post_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install has completed.
:type post_install: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type post_install: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
:param post_uninstall: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension uninstall has occurred.
:type post_uninstall: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type post_uninstall: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
:param post_update: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension update has occurred.
:type post_update: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type post_update: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
:param pre_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install is about to occur. Response indicates whether to proceed or abort.
:type pre_install: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type pre_install: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
:param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used
:type version_check: :class:`ExtensionEventCallback <contributions.v4_1.models.ExtensionEventCallback>`
:type version_check: :class:`ExtensionEventCallback <azure.devops.v5_0.contributions.models.ExtensionEventCallback>`
"""
_attribute_map = {
@ -434,7 +422,6 @@ class ExtensionEventCallbackCollection(Model):
self.version_check = version_check
class ExtensionFile(Model):
"""ExtensionFile.
@ -459,12 +446,11 @@ class ExtensionFile(Model):
self.source = source
class ExtensionLicensing(Model):
"""ExtensionLicensing.
:param overrides: A list of contributions which deviate from the default licensing behavior
:type overrides: list of :class:`LicensingOverride <contributions.v4_1.models.LicensingOverride>`
:type overrides: list of :class:`LicensingOverride <azure.devops.v5_0.contributions.models.LicensingOverride>`
"""
_attribute_map = {
@ -476,28 +462,27 @@ class ExtensionLicensing(Model):
self.overrides = overrides
class ExtensionManifest(Model):
"""ExtensionManifest.
:param base_uri: Uri used as base for other relative uri's defined in extension
:type base_uri: str
:param constraints: List of shared constraints defined by this extension
:type constraints: list of :class:`ContributionConstraint <contributions.v4_1.models.ContributionConstraint>`
:type constraints: list of :class:`ContributionConstraint <azure.devops.v5_0.contributions.models.ContributionConstraint>`
:param contributions: List of contributions made by this extension
:type contributions: list of :class:`Contribution <contributions.v4_1.models.Contribution>`
:type contributions: list of :class:`Contribution <azure.devops.v5_0.contributions.models.Contribution>`
:param contribution_types: List of contribution types defined by this extension
:type contribution_types: list of :class:`ContributionType <contributions.v4_1.models.ContributionType>`
:type contribution_types: list of :class:`ContributionType <azure.devops.v5_0.contributions.models.ContributionType>`
:param demands: List of explicit demands required by this extension
:type demands: list of str
:param event_callbacks: Collection of endpoints that get called when particular extension events occur
:type event_callbacks: :class:`ExtensionEventCallbackCollection <contributions.v4_1.models.ExtensionEventCallbackCollection>`
:type event_callbacks: :class:`ExtensionEventCallbackCollection <azure.devops.v5_0.contributions.models.ExtensionEventCallbackCollection>`
:param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension
:type fallback_base_uri: str
:param language: Language Culture Name set by the Gallery
:type language: str
:param licensing: How this extension behaves with respect to licensing
:type licensing: :class:`ExtensionLicensing <contributions.v4_1.models.ExtensionLicensing>`
:type licensing: :class:`ExtensionLicensing <azure.devops.v5_0.contributions.models.ExtensionLicensing>`
:param manifest_version: Version of the extension manifest format/content
:type manifest_version: float
:param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution.
@ -541,28 +526,27 @@ class ExtensionManifest(Model):
self.service_instance_type = service_instance_type
class InstalledExtension(ExtensionManifest):
"""InstalledExtension.
:param base_uri: Uri used as base for other relative uri's defined in extension
:type base_uri: str
:param constraints: List of shared constraints defined by this extension
:type constraints: list of :class:`ContributionConstraint <contributions.v4_1.models.ContributionConstraint>`
:type constraints: list of :class:`ContributionConstraint <azure.devops.v5_0.contributions.models.ContributionConstraint>`
:param contributions: List of contributions made by this extension
:type contributions: list of :class:`Contribution <contributions.v4_1.models.Contribution>`
:type contributions: list of :class:`Contribution <azure.devops.v5_0.contributions.models.Contribution>`
:param contribution_types: List of contribution types defined by this extension
:type contribution_types: list of :class:`ContributionType <contributions.v4_1.models.ContributionType>`
:type contribution_types: list of :class:`ContributionType <azure.devops.v5_0.contributions.models.ContributionType>`
:param demands: List of explicit demands required by this extension
:type demands: list of str
:param event_callbacks: Collection of endpoints that get called when particular extension events occur
:type event_callbacks: :class:`ExtensionEventCallbackCollection <contributions.v4_1.models.ExtensionEventCallbackCollection>`
:type event_callbacks: :class:`ExtensionEventCallbackCollection <azure.devops.v5_0.contributions.models.ExtensionEventCallbackCollection>`
:param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension
:type fallback_base_uri: str
:param language: Language Culture Name set by the Gallery
:type language: str
:param licensing: How this extension behaves with respect to licensing
:type licensing: :class:`ExtensionLicensing <contributions.v4_1.models.ExtensionLicensing>`
:type licensing: :class:`ExtensionLicensing <azure.devops.v5_0.contributions.models.ExtensionLicensing>`
:param manifest_version: Version of the extension manifest format/content
:type manifest_version: float
:param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution.
@ -576,11 +560,11 @@ class InstalledExtension(ExtensionManifest):
:param extension_name: The display name of the extension.
:type extension_name: str
:param files: This is the set of files available from the extension.
:type files: list of :class:`ExtensionFile <contributions.v4_1.models.ExtensionFile>`
:type files: list of :class:`ExtensionFile <azure.devops.v5_0.contributions.models.ExtensionFile>`
:param flags: Extension flags relevant to contribution consumers
:type flags: object
:param install_state: Information about this particular installation of the extension
:type install_state: :class:`InstalledExtensionState <contributions.v4_1.models.InstalledExtensionState>`
:type install_state: :class:`InstalledExtensionState <azure.devops.v5_0.contributions.models.InstalledExtensionState>`
:param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension.
:type last_published: datetime
:param publisher_id: Unique id of the publisher of this extension
@ -633,14 +617,13 @@ class InstalledExtension(ExtensionManifest):
self.version = version
class InstalledExtensionState(Model):
"""InstalledExtensionState.
:param flags: States of an installed extension
:type flags: object
:param installation_issues: List of installation issues
:type installation_issues: list of :class:`InstalledExtensionStateIssue <contributions.v4_1.models.InstalledExtensionStateIssue>`
:type installation_issues: list of :class:`InstalledExtensionStateIssue <azure.devops.v5_0.contributions.models.InstalledExtensionStateIssue>`
:param last_updated: The time at which this installation was last updated
:type last_updated: datetime
"""
@ -658,7 +641,6 @@ class InstalledExtensionState(Model):
self.last_updated = last_updated
class InstalledExtensionStateIssue(Model):
"""InstalledExtensionStateIssue.
@ -683,7 +665,6 @@ class InstalledExtensionStateIssue(Model):
self.type = type
class LicensingOverride(Model):
"""LicensingOverride.
@ -704,7 +685,6 @@ class LicensingOverride(Model):
self.id = id
class ResolvedDataProvider(Model):
"""ResolvedDataProvider.
@ -729,12 +709,11 @@ class ResolvedDataProvider(Model):
self.id = id
class ClientDataProviderQuery(DataProviderQuery):
"""ClientDataProviderQuery.
:param context: Contextual information to pass to the data providers
:type context: :class:`DataProviderContext <contributions.v4_1.models.DataProviderContext>`
:type context: :class:`DataProviderContext <azure.devops.v5_0.contributions.models.DataProviderContext>`
:param contribution_ids: The contribution ids of the data providers to resolve
:type contribution_ids: list of str
:param query_service_instance_type: The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values.
@ -752,7 +731,6 @@ class ClientDataProviderQuery(DataProviderQuery):
self.query_service_instance_type = query_service_instance_type
class Contribution(ContributionBase):
"""Contribution.
@ -763,11 +741,11 @@ class Contribution(ContributionBase):
:param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this.
:type visible_to: list of str
:param constraints: List of constraints (filters) that should be applied to the availability of this contribution
:type constraints: list of :class:`ContributionConstraint <contributions.v4_1.models.ContributionConstraint>`
:type constraints: list of :class:`ContributionConstraint <azure.devops.v5_0.contributions.models.ContributionConstraint>`
:param includes: Includes is a set of contributions that should have this contribution included in their targets list.
:type includes: list of str
:param properties: Properties/attributes of this contribution
:type properties: :class:`object <contributions.v4_1.models.object>`
:type properties: :class:`object <azure.devops.v5_0.contributions.models.object>`
:param restricted_to: List of demanded claims in order for the user to see this contribution (like anonymous, public, member...).
:type restricted_to: list of str
:param targets: The ids of the contribution(s) that this contribution targets. (parent contributions)
@ -796,3 +774,32 @@ class Contribution(ContributionBase):
self.restricted_to = restricted_to
self.targets = targets
self.type = type
__all__ = [
'ClientContribution',
'ClientContributionNode',
'ClientContributionProviderDetails',
'ContributionBase',
'ContributionConstraint',
'ContributionNodeQuery',
'ContributionNodeQueryResult',
'ContributionPropertyDescription',
'ContributionType',
'DataProviderContext',
'DataProviderExceptionDetails',
'DataProviderQuery',
'DataProviderResult',
'ExtensionEventCallback',
'ExtensionEventCallbackCollection',
'ExtensionFile',
'ExtensionLicensing',
'ExtensionManifest',
'InstalledExtension',
'InstalledExtensionState',
'InstalledExtensionStateIssue',
'LicensingOverride',
'ResolvedDataProvider',
'ClientDataProviderQuery',
'Contribution',
]

Просмотреть файл

@ -1,4 +1,4 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
@ -6,29 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .models import GraphSubjectBase
from .models import IdentityData
from .models import IdentityRef
from .models import JsonPatchOperation
from .models import OperationReference
from .models import Process
from .models import ProcessReference
from .models import ProjectInfo
from .models import ProjectProperty
from .models import Proxy
from .models import ProxyAuthorization
from .models import PublicKey
from .models import ReferenceLinks
from .models import TeamMember
from .models import TeamProject
from .models import TeamProjectCollection
from .models import TeamProjectCollectionReference
from .models import TeamProjectReference
from .models import WebApiConnectedService
from .models import WebApiConnectedServiceDetails
from .models import WebApiConnectedServiceRef
from .models import WebApiTeam
from .models import WebApiTeamRef
from .models import *
from .core_client import CoreClient
__all__ = [
'GraphSubjectBase',
@ -54,4 +33,5 @@ __all__ = [
'WebApiConnectedServiceRef',
'WebApiTeam',
'WebApiTeamRef',
'CoreClient'
]

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше