Skip to content
Merged

M149 #200

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions azure-devops/azure/devops/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Connection(object):

def __init__(self, base_url=None, creds=None, user_agent=None):
self._config = ClientConfiguration(base_url)
self._config.credentials = creds
self._addition_user_agent = user_agent
if user_agent is not None:
self._config.add_user_agent(user_agent)
Expand Down
1 change: 1 addition & 0 deletions azure-devops/azure/devops/v5_1/maven/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
'PluginConfiguration',
'ReferenceLink',
'ReferenceLinks',
'UpstreamSourceInfo',
'MavenClient'
]
35 changes: 34 additions & 1 deletion azure-devops/azure/devops/v5_1/maven/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@ class Package(Model):
:type name: str
:param permanently_deleted_date: If and when the package was permanently deleted.
:type permanently_deleted_date: datetime
:param source_chain: The history of upstream sources for this package. The first source in the list is the immediate source from which this package was saved.
:type source_chain: list of :class:`UpstreamSourceInfo <azure.devops.v5_1.maven.models.UpstreamSourceInfo>`
:param version: The version of the package.
:type version: str
"""
Expand All @@ -645,16 +647,18 @@ class Package(Model):
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'permanently_deleted_date': {'key': 'permanentlyDeletedDate', 'type': 'iso-8601'},
'source_chain': {'key': 'sourceChain', 'type': '[UpstreamSourceInfo]'},
'version': {'key': 'version', 'type': 'str'}
}

def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanently_deleted_date=None, version=None):
def __init__(self, _links=None, deleted_date=None, id=None, name=None, permanently_deleted_date=None, source_chain=None, version=None):
super(Package, self).__init__()
self._links = _links
self.deleted_date = deleted_date
self.id = id
self.name = name
self.permanently_deleted_date = permanently_deleted_date
self.source_chain = source_chain
self.version = version


Expand Down Expand Up @@ -731,6 +735,34 @@ def __init__(self, links=None):
self.links = links


class UpstreamSourceInfo(Model):
"""UpstreamSourceInfo.

:param id: Identity of the upstream source.
:type id: str
:param location: Locator for connecting to the upstream source.
:type location: str
:param name: Display name.
:type name: str
:param source_type: Source type, such as Public or Internal.
:type source_type: object
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'source_type': {'key': 'sourceType', 'type': 'object'}
}

def __init__(self, id=None, location=None, name=None, source_type=None):
super(UpstreamSourceInfo, self).__init__()
self.id = id
self.location = location
self.name = name
self.source_type = source_type


class MavenPomDependency(MavenPomGav):
"""MavenPomDependency.

Expand Down Expand Up @@ -813,6 +845,7 @@ def __init__(self, name=None, url=None, distribution=None):
'PluginConfiguration',
'ReferenceLink',
'ReferenceLinks',
'UpstreamSourceInfo',
'MavenPomDependency',
'MavenPomLicense',
]
2 changes: 1 addition & 1 deletion azure-devops/azure/devops/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

VERSION = "5.0.0b3"
VERSION = "5.0.0b4"
2 changes: 1 addition & 1 deletion azure-devops/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import setup, find_packages

NAME = "azure-devops"
VERSION = "5.0.0b3"
VERSION = "5.0.0b4"

# To install the library, run the following
#
Expand Down