Skip to content

Initial support for 7.1 API version #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]

steps:
- uses: actions/checkout@v1
Expand Down
10 changes: 5 additions & 5 deletions azure-devops/azure/devops/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from .client_configuration import ClientConfiguration
from .exceptions import AzureDevOpsClientRequestError
from .released.client_factory import ClientFactory
from .v5_1.location.location_client import LocationClient
from .v5_1.client_factory import ClientFactoryV5_1
from .v6_0.client_factory import ClientFactoryV6_0
from .v7_1.location.location_client import LocationClient
from .v7_1.client_factory import ClientFactoryV7_1
from .v7_0.client_factory import ClientFactoryV7_0

logger = logging.getLogger(__name__)

Expand All @@ -33,8 +33,8 @@ def __init__(self, base_url=None, creds=None, user_agent=None):
self._creds = creds
self._resource_areas = None
self.clients = ClientFactory(self)
self.clients_v5_1 = ClientFactoryV5_1(self)
self.clients_v6_0 = ClientFactoryV6_0(self)
self.clients_v7_1 = ClientFactoryV7_1(self)
self.clients_v7_0 = ClientFactoryV7_0(self)
self.use_fiddler = False

def get_client(self, client_type):
Expand Down
8 changes: 4 additions & 4 deletions azure-devops/azure/devops/issue_tests/test_issue_268.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def text(self, encoding=None):
class TestDeserialization(unittest.TestCase):

# https://github.com/microsoft/azure-devops-python-api/issues/268
def test_deserialization_issue_268_51(self):
from azure.devops.v5_1.task_agent import models
def test_deserialization_issue_268_71(self):
from azure.devops.v7_1.task_agent import models
self._test_deserialization(models.__dict__.items(), _268_type, _268_json)

# https://github.com/microsoft/azure-devops-python-api/issues/268
def test_deserialization_issue_268_60(self):
from azure.devops.v6_0.task_agent import models
def test_deserialization_issue_268_70(self):
from azure.devops.v7_0.task_agent import models
self._test_deserialization(models.__dict__.items(), _268_type, _268_json)

@staticmethod
Expand Down
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'
]
Loading