Skip to content

Commit

Permalink
Remove old versions, add 7.0 and relased versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Nechvátal committed Apr 17, 2023
1 parent 8e3e121 commit f7d515a
Show file tree
Hide file tree
Showing 403 changed files with 18,000 additions and 102,288 deletions.
2 changes: 1 addition & 1 deletion azure-devops/azure/devops/released/accounts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from ...v5_1.accounts.models import *
from ...v7_0.accounts.models import *
from .accounts_client import AccountsClient

__all__ = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from msrest import Serializer, Deserializer
from ...client import Client
from ...v5_1.accounts import models
from ...v7_0.accounts import models


class AccountsClient(Client):
Expand All @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None):

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.
Get a list of accounts for a specific owner or a specific member. One of the following parameters is required: ownerId, memberId.
: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:
Expand All @@ -42,7 +42,7 @@ def get_accounts(self, owner_id=None, member_id=None, properties=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.1',
version='7.0',
query_parameters=query_parameters)
return self._deserialize('[Account]', self._unwrap_collection(response))

22 changes: 20 additions & 2 deletions azure-devops/azure/devops/released/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from ...v5_1.build.models import *
from ...v7_0.build.models import *
from .build_client import BuildClient

__all__ = [
Expand Down Expand Up @@ -46,28 +46,41 @@
'BuildRepository',
'BuildRequestValidationResult',
'BuildResourceUsage',
'BuildRetentionHistory',
'BuildRetentionSample',
'BuildSettings',
'Change',
'DataSourceBindingBase',
'DefinitionReference',
'DefinitionResourceReference',
'Deployment',
'Folder',
'GraphSubjectBase',
'Change',
'IdentityRef',
'Issue',
'JobReference',
'JsonPatchOperation',
'MinimalRetentionLease',
'NewRetentionLease',
'PhaseReference',
'PipelineGeneralSettings',
'PipelineReference',
'ProcessParameters',
'ProjectRetentionSetting',
'PullRequest',
'ReferenceLinks',
'ReleaseReference',
'RepositoryWebhook',
'ResourceRef',
'RetentionLease',
'RetentionLeaseUpdate',
'RetentionPolicy',
'RetentionSetting',
'SourceProviderAttributes',
'SourceRepositories',
'SourceRepository',
'SourceRepositoryItem',
'StageReference',
'SupportedTrigger',
'TaskAgentPoolReference',
'TaskDefinitionReference',
Expand All @@ -82,9 +95,14 @@
'TimelineAttempt',
'TimelineRecord',
'TimelineReference',
'UpdateProjectRetentionSettingModel',
'UpdateRetentionSettingModel',
'UpdateStageParameters',
'UpdateTagParameters',
'VariableGroup',
'VariableGroupReference',
'WebApiConnectedServiceRef',
'XamlBuildControllerReference',
'YamlBuild',
'BuildClient'
]
1,216 changes: 1,052 additions & 164 deletions azure-devops/azure/devops/released/build/build_client.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from .models import *
from ...v7_0.cix.models import *
from .cix_client import CixClient

__all__ = [
Expand All @@ -23,11 +23,6 @@
'ResourceCreationParameter',
'TeamProject',
'TeamProjectReference',
'Template',
'TemplateAsset',
'TemplateDataSourceBinding',
'TemplateParameterDefinition',
'TemplateParameters',
'WebApiTeamRef',
'CixClient'
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from msrest import Serializer, Deserializer
from ...client import Client
from . import models
from ...v7_0.cix import models


class CixClient(Client):
Expand All @@ -27,7 +27,7 @@ def __init__(self, base_url=None, creds=None):

def get_configurations(self, project, repository_type=None, repository_id=None, branch=None, service_connection_id=None):
"""GetConfigurations.
[Preview API] Gets a list of existing configuration files for the given repository.
Gets a list of existing configuration files for the given repository.
:param str project: Project ID or project name
:param str repository_type: The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc.
:param str repository_id: The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos)
Expand All @@ -49,32 +49,32 @@ def get_configurations(self, project, repository_type=None, repository_id=None,
query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str')
response = self._send(http_method='GET',
location_id='8fc87684-9ebc-4c37-ab92-f4ac4a58cb3a',
version='5.1-preview.1',
version='7.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[ConfigurationFile]', self._unwrap_collection(response))

def create_project_connection(self, create_connection_inputs, project):
"""CreateProjectConnection.
[Preview API] Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created.
:param :class:`<CreatePipelineConnectionInputs> <azure.devops.v5_1.cix.models.CreatePipelineConnectionInputs>` create_connection_inputs:
Creates a new Pipeline connection between the provider installation and the specified project. Returns the PipelineConnection object created.
:param :class:`<CreatePipelineConnectionInputs> <azure.devops.v7_0.cix.models.CreatePipelineConnectionInputs>` create_connection_inputs:
:param str project:
:rtype: :class:`<PipelineConnection> <azure.devops.v5_1.cix.models.PipelineConnection>`
:rtype: :class:`<PipelineConnection> <azure.devops.v7_0.cix.models.PipelineConnection>`
"""
query_parameters = {}
if project is not None:
query_parameters['project'] = self._serialize.query('project', project, 'str')
content = self._serialize.body(create_connection_inputs, 'CreatePipelineConnectionInputs')
response = self._send(http_method='POST',
location_id='00df4879-9216-45d5-b38d-4a487b626b2c',
version='5.1-preview.1',
version='7.0',
query_parameters=query_parameters,
content=content)
return self._deserialize('PipelineConnection', response)

def get_detected_build_frameworks(self, project, repository_type=None, repository_id=None, branch=None, detection_type=None, service_connection_id=None):
"""GetDetectedBuildFrameworks.
[Preview API] Returns a list of build frameworks that best match the given repository based on its contents.
Returns a list of build frameworks that best match the given repository based on its contents.
:param str project: Project ID or project name
:param str repository_type: The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc.
:param str repository_id: The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos)
Expand All @@ -99,73 +99,25 @@ def get_detected_build_frameworks(self, project, repository_type=None, repositor
query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str')
response = self._send(http_method='GET',
location_id='29a30bab-9efb-4652-bf1b-9269baca0980',
version='5.1-preview.1',
version='7.0',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[DetectedBuildFramework]', self._unwrap_collection(response))

def get_template_recommendations(self, project, repository_type=None, repository_id=None, branch=None, service_connection_id=None):
"""GetTemplateRecommendations.
[Preview API] Returns a list of all YAML templates with weighting based on which would best fit the given repository.
:param str project: Project ID or project name
:param str repository_type: The type of the repository such as GitHub, TfsGit (i.e. Azure Repos), Bitbucket, etc.
:param str repository_id: The vendor-specific identifier or the name of the repository, e.g. Microsoft/vscode (GitHub) or e9d82045-ddba-4e01-a63d-2ab9f040af62 (Azure Repos)
:param str branch: The repository branch which to find matching templates for.
:param str service_connection_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TfsGit (i.e. Azure Repos).
:rtype: [Template]
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
query_parameters = {}
if repository_type is not None:
query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str')
if repository_id is not None:
query_parameters['repositoryId'] = self._serialize.query('repository_id', repository_id, 'str')
if branch is not None:
query_parameters['branch'] = self._serialize.query('branch', branch, 'str')
if service_connection_id is not None:
query_parameters['serviceConnectionId'] = self._serialize.query('service_connection_id', service_connection_id, 'str')
response = self._send(http_method='GET',
location_id='63ea8f13-b563-4be7-bc31-3a96eda27220',
version='5.1-preview.1',
route_values=route_values,
query_parameters=query_parameters)
return self._deserialize('[Template]', self._unwrap_collection(response))

def create_resources(self, creation_parameters, project):
"""CreateResources.
[Preview API]
:param {ResourceCreationParameter} creation_parameters:
:param str project: Project ID or project name
:rtype: :class:`<CreatedResources> <azure.devops.v5_1.cix.models.CreatedResources>`
:rtype: :class:`<CreatedResources> <azure.devops.v7_0.cix.models.CreatedResources>`
"""
route_values = {}
if project is not None:
route_values['project'] = self._serialize.url('project', project, 'str')
content = self._serialize.body(creation_parameters, '{ResourceCreationParameter}')
response = self._send(http_method='POST',
location_id='43201899-7690-4870-9c79-ab69605f21ed',
version='5.1-preview.1',
version='7.0',
route_values=route_values,
content=content)
return self._deserialize('CreatedResources', response)

def render_template(self, template_parameters, template_id):
"""RenderTemplate.
[Preview API]
:param :class:`<TemplateParameters> <azure.devops.v5_1.cix.models.TemplateParameters>` template_parameters:
:param str template_id:
:rtype: :class:`<Template> <azure.devops.v5_1.cix.models.Template>`
"""
route_values = {}
if template_id is not None:
route_values['templateId'] = self._serialize.url('template_id', template_id, 'str')
content = self._serialize.body(template_parameters, 'TemplateParameters')
response = self._send(http_method='POST',
location_id='eb5d6d1d-98a2-4bbd-9028-f9a6b2d66515',
version='5.1-preview.1',
route_values=route_values,
content=content)
return self._deserialize('Template', response)

Loading

0 comments on commit f7d515a

Please sign in to comment.